// package: xrc.ecnova.accounting.admin.account.v1 // file: api/ecnova/accounting/admin/account/v1/account_proto/account.proto import * as api_ecnova_accounting_admin_account_v1_account_proto_account_pb from "../../../../../../../api/ecnova/accounting/admin/account/v1/account_proto/account_pb"; import {grpc} from "grpc-web-client"; type AccountAdminCreateAccount = { readonly methodName: string; readonly service: typeof AccountAdmin; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.CreateAccountRequest; readonly responseType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account; }; type AccountAdminGetAccount = { readonly methodName: string; readonly service: typeof AccountAdmin; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.GetAccountRequest; readonly responseType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account; }; type AccountAdminDeleteAccount = { readonly methodName: string; readonly service: typeof AccountAdmin; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.DeleteAccountRequest; readonly responseType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account; }; type AccountAdminUndeleteAccount = { readonly methodName: string; readonly service: typeof AccountAdmin; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.UndeleteAccountRequest; readonly responseType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account; }; type AccountAdminListAccounts = { readonly methodName: string; readonly service: typeof AccountAdmin; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.ListAccountsRequest; readonly responseType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.ListAccountsResponse; }; type AccountAdminUpdateAccount = { readonly methodName: string; readonly service: typeof AccountAdmin; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.UpdateAccountRequest; readonly responseType: typeof api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account; }; export class AccountAdmin { static readonly serviceName: string; static readonly CreateAccount: AccountAdminCreateAccount; static readonly GetAccount: AccountAdminGetAccount; static readonly DeleteAccount: AccountAdminDeleteAccount; static readonly UndeleteAccount: AccountAdminUndeleteAccount; static readonly ListAccounts: AccountAdminListAccounts; static readonly UpdateAccount: AccountAdminUpdateAccount; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } export type Status = { details: string, code: number; metadata: grpc.Metadata } interface UnaryResponse { cancel(): void; } 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: ReqT): BidirectionalStream; end(): void; cancel(): void; on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; on(type: 'end', handler: () => void): BidirectionalStream; on(type: 'status', handler: (status: Status) => void): BidirectionalStream; } export class AccountAdminClient { readonly serviceHost: string; constructor(serviceHost: string, options?: grpc.RpcOptions); createAccount( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.CreateAccountRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account|null) => void ): UnaryResponse; createAccount( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.CreateAccountRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account|null) => void ): UnaryResponse; getAccount( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.GetAccountRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account|null) => void ): UnaryResponse; getAccount( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.GetAccountRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account|null) => void ): UnaryResponse; deleteAccount( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.DeleteAccountRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account|null) => void ): UnaryResponse; deleteAccount( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.DeleteAccountRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account|null) => void ): UnaryResponse; undeleteAccount( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.UndeleteAccountRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account|null) => void ): UnaryResponse; undeleteAccount( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.UndeleteAccountRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account|null) => void ): UnaryResponse; listAccounts( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.ListAccountsRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.ListAccountsResponse|null) => void ): UnaryResponse; listAccounts( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.ListAccountsRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.ListAccountsResponse|null) => void ): UnaryResponse; updateAccount( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.UpdateAccountRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account|null) => void ): UnaryResponse; updateAccount( requestMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.UpdateAccountRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_accounting_admin_account_v1_account_proto_account_pb.Account|null) => void ): UnaryResponse; }