// package: xrc.ecnova.account.v1 // file: api/ecnova/account/v1/account_proto/account.proto import * as api_ecnova_account_v1_account_proto_account_pb from "../../../../../api/ecnova/account/v1/account_proto/account_pb"; import * as api_ecnova_type_accesstoken_accesstoken_proto_accesstoken_pb from "../../../../../api/ecnova/type/accesstoken/accesstoken_proto/accesstoken_pb"; import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; import {grpc} from "grpc-web-client"; type AccountBasicAuth = { readonly methodName: string; readonly service: typeof Account; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_account_v1_account_proto_account_pb.BasicAuthRequest; readonly responseType: typeof api_ecnova_type_accesstoken_accesstoken_proto_accesstoken_pb.Token; }; type AccountFederalAuth = { readonly methodName: string; readonly service: typeof Account; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_account_v1_account_proto_account_pb.FederalAuthRequest; readonly responseType: typeof api_ecnova_type_accesstoken_accesstoken_proto_accesstoken_pb.Token; }; type AccountGetAccessToken = { readonly methodName: string; readonly service: typeof Account; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_account_v1_account_proto_account_pb.GetAccessTokenRequest; readonly responseType: typeof api_ecnova_type_accesstoken_accesstoken_proto_accesstoken_pb.Token; }; type AccountSetUsername = { readonly methodName: string; readonly service: typeof Account; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_account_v1_account_proto_account_pb.SetUsernameRequest; readonly responseType: typeof google_protobuf_empty_pb.Empty; }; type AccountSetPassword = { readonly methodName: string; readonly service: typeof Account; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_account_v1_account_proto_account_pb.SetPasswordRequest; readonly responseType: typeof google_protobuf_empty_pb.Empty; }; type AccountSetUserInfo = { readonly methodName: string; readonly service: typeof Account; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_account_v1_account_proto_account_pb.SetUserInfoRequest; readonly responseType: typeof google_protobuf_empty_pb.Empty; }; export class Account { static readonly serviceName: string; static readonly BasicAuth: AccountBasicAuth; static readonly FederalAuth: AccountFederalAuth; static readonly GetAccessToken: AccountGetAccessToken; static readonly SetUsername: AccountSetUsername; static readonly SetPassword: AccountSetPassword; static readonly SetUserInfo: AccountSetUserInfo; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } export type Status = { details: string, code: number; metadata: grpc.Metadata } export type ServiceClientOptions = { transport: grpc.TransportConstructor; debug?: boolean } interface ResponseStream { cancel(): void; on(type: 'data', handler: (message: T) => void): ResponseStream; on(type: 'end', handler: () => void): ResponseStream; on(type: 'status', handler: (status: Status) => void): ResponseStream; } interface RequestStream { write(message: T): RequestStream; end(): void; cancel(): void; on(type: 'end', handler: () => void): RequestStream; on(type: 'status', handler: (status: Status) => void): RequestStream; } interface BidirectionalStream { write(message: T): BidirectionalStream; end(): void; cancel(): void; on(type: 'data', handler: (message: T) => void): BidirectionalStream; on(type: 'end', handler: () => void): BidirectionalStream; on(type: 'status', handler: (status: Status) => void): BidirectionalStream; } export class AccountClient { readonly serviceHost: string; constructor(serviceHost: string, options?: ServiceClientOptions); basicAuth( requestMessage: api_ecnova_account_v1_account_proto_account_pb.BasicAuthRequest, metadata: grpc.Metadata, callback: (error: ServiceError, responseMessage: api_ecnova_type_accesstoken_accesstoken_proto_accesstoken_pb.Token|null) => void ): void; basicAuth( requestMessage: api_ecnova_account_v1_account_proto_account_pb.BasicAuthRequest, callback: (error: ServiceError, responseMessage: api_ecnova_type_accesstoken_accesstoken_proto_accesstoken_pb.Token|null) => void ): void; federalAuth( requestMessage: api_ecnova_account_v1_account_proto_account_pb.FederalAuthRequest, metadata: grpc.Metadata, callback: (error: ServiceError, responseMessage: api_ecnova_type_accesstoken_accesstoken_proto_accesstoken_pb.Token|null) => void ): void; federalAuth( requestMessage: api_ecnova_account_v1_account_proto_account_pb.FederalAuthRequest, callback: (error: ServiceError, responseMessage: api_ecnova_type_accesstoken_accesstoken_proto_accesstoken_pb.Token|null) => void ): void; getAccessToken( requestMessage: api_ecnova_account_v1_account_proto_account_pb.GetAccessTokenRequest, metadata: grpc.Metadata, callback: (error: ServiceError, responseMessage: api_ecnova_type_accesstoken_accesstoken_proto_accesstoken_pb.Token|null) => void ): void; getAccessToken( requestMessage: api_ecnova_account_v1_account_proto_account_pb.GetAccessTokenRequest, callback: (error: ServiceError, responseMessage: api_ecnova_type_accesstoken_accesstoken_proto_accesstoken_pb.Token|null) => void ): void; setUsername( requestMessage: api_ecnova_account_v1_account_proto_account_pb.SetUsernameRequest, metadata: grpc.Metadata, callback: (error: ServiceError, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): void; setUsername( requestMessage: api_ecnova_account_v1_account_proto_account_pb.SetUsernameRequest, callback: (error: ServiceError, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): void; setPassword( requestMessage: api_ecnova_account_v1_account_proto_account_pb.SetPasswordRequest, metadata: grpc.Metadata, callback: (error: ServiceError, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): void; setPassword( requestMessage: api_ecnova_account_v1_account_proto_account_pb.SetPasswordRequest, callback: (error: ServiceError, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): void; setUserInfo( requestMessage: api_ecnova_account_v1_account_proto_account_pb.SetUserInfoRequest, metadata: grpc.Metadata, callback: (error: ServiceError, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): void; setUserInfo( requestMessage: api_ecnova_account_v1_account_proto_account_pb.SetUserInfoRequest, callback: (error: ServiceError, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): void; }