76 lines
2.1 KiB
TypeScript
76 lines
2.1 KiB
TypeScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-ts_proto v2.11.6
|
|
// protoc v3.21.12
|
|
// source: account.proto
|
|
|
|
/* eslint-disable */
|
|
import type { Metadata } from "@grpc/grpc-js";
|
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
import { Observable } from "rxjs";
|
|
|
|
export const protobufPackage = "account.v1";
|
|
|
|
export enum Presence {
|
|
PRESENCE_UNSPECIFIED = 0,
|
|
OFFLINE = 1,
|
|
ONLINE = 2,
|
|
AWAY = 3,
|
|
UNRECOGNIZED = -1,
|
|
}
|
|
|
|
export interface GetAccountRequest {
|
|
id: string;
|
|
}
|
|
|
|
export interface GetAccountResponse {
|
|
id: string;
|
|
username: string;
|
|
email: string;
|
|
phone: string;
|
|
fullName: string;
|
|
isLdap: boolean;
|
|
status: string;
|
|
roles: string[];
|
|
avatarUrl: string;
|
|
employeeId?: string | undefined;
|
|
presence: Presence;
|
|
lastActive: string;
|
|
customStatusText: string;
|
|
customStatusEmoji: string;
|
|
timezone: string;
|
|
language: string;
|
|
twoFaEnabled: boolean;
|
|
hasPin: boolean;
|
|
}
|
|
|
|
export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
|
|
export interface AccountServiceClient {
|
|
getAccount(request: GetAccountRequest, metadata?: Metadata): Observable<GetAccountResponse>;
|
|
}
|
|
|
|
export interface AccountServiceController {
|
|
getAccount(
|
|
request: GetAccountRequest,
|
|
metadata?: Metadata,
|
|
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
}
|
|
|
|
export function AccountServiceControllerMethods() {
|
|
return function (constructor: Function) {
|
|
const grpcMethods: string[] = ["getAccount"];
|
|
for (const method of grpcMethods) {
|
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
|
}
|
|
const grpcStreamMethods: string[] = [];
|
|
for (const method of grpcStreamMethods) {
|
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
GrpcStreamMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
|
}
|
|
};
|
|
}
|
|
|
|
export const ACCOUNT_SERVICE_NAME = "AccountService";
|