chore: auto-generate protobuf files [skip ci]
This commit is contained in:
109
gen/users/users.ts
Normal file
109
gen/users/users.ts
Normal file
@@ -0,0 +1,109 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.11.6
|
||||
// protoc v4.25.9
|
||||
// source: users/users.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import type { Metadata } from "@grpc/grpc-js";
|
||||
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
export const protobufPackage = "users.v1";
|
||||
|
||||
export interface GetMeRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface GetMeResponse {
|
||||
user: User | undefined;
|
||||
}
|
||||
|
||||
export interface CreateUserRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface CreateUserResponse {
|
||||
success: string;
|
||||
}
|
||||
|
||||
export interface ChangeMeRequest {
|
||||
userId: string;
|
||||
sessionId: string;
|
||||
email?: string | undefined;
|
||||
phone?: string | undefined;
|
||||
fullName?: string | undefined;
|
||||
avatarUrl?: string | undefined;
|
||||
customStatusText?: string | undefined;
|
||||
customStatusEmoji?: string | undefined;
|
||||
timezone?: string | undefined;
|
||||
language?: string | undefined;
|
||||
isPublic?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface ChangeMeResponse {
|
||||
success: boolean;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
username?: string | undefined;
|
||||
email?: string | undefined;
|
||||
phone?: string | undefined;
|
||||
fullName?: string | undefined;
|
||||
isLdap: boolean;
|
||||
status?: string | undefined;
|
||||
roles: string[];
|
||||
avatarUrl?: string | undefined;
|
||||
employeeId?: string | undefined;
|
||||
presence?: string | undefined;
|
||||
lastActive?: string | undefined;
|
||||
customStatusText?: string | undefined;
|
||||
customStatusEmoji?: string | undefined;
|
||||
timezone?: string | undefined;
|
||||
language?: string | undefined;
|
||||
twoFaEnabled: boolean;
|
||||
hasPin: boolean;
|
||||
}
|
||||
|
||||
export const USERS_V1_PACKAGE_NAME = "users.v1";
|
||||
|
||||
export interface UsersServiceClient {
|
||||
getMe(request: GetMeRequest, metadata?: Metadata): Observable<GetMeResponse>;
|
||||
|
||||
changeMe(request: ChangeMeRequest, metadata?: Metadata): Observable<ChangeMeResponse>;
|
||||
|
||||
createUser(request: CreateUserRequest, metadata?: Metadata): Observable<CreateUserResponse>;
|
||||
}
|
||||
|
||||
export interface UsersServiceController {
|
||||
getMe(request: GetMeRequest, metadata?: Metadata): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
|
||||
|
||||
changeMe(
|
||||
request: ChangeMeRequest,
|
||||
metadata?: Metadata,
|
||||
): Promise<ChangeMeResponse> | Observable<ChangeMeResponse> | ChangeMeResponse;
|
||||
|
||||
createUser(
|
||||
request: CreateUserRequest,
|
||||
metadata?: Metadata,
|
||||
): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
|
||||
}
|
||||
|
||||
export function UsersServiceControllerMethods() {
|
||||
return function (constructor: Function) {
|
||||
const grpcMethods: string[] = ["getMe", "changeMe", "createUser"];
|
||||
for (const method of grpcMethods) {
|
||||
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||
GrpcMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
|
||||
}
|
||||
const grpcStreamMethods: string[] = [];
|
||||
for (const method of grpcStreamMethods) {
|
||||
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||
GrpcStreamMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export const USERS_SERVICE_NAME = "UsersService";
|
||||
Reference in New Issue
Block a user