// package: xrc.ecnova.accounting.v1 // file: api/ecnova/accounting/v1/accounting_proto/accounting.proto import * as api_ecnova_accounting_v1_accounting_proto_accounting_pb from "../../../../../api/ecnova/accounting/v1/accounting_proto/accounting_pb"; import {grpc} from "grpc-web-client"; type AccountingTrade = { readonly methodName: string; readonly service: typeof Accounting; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_accounting_v1_accounting_proto_accounting_pb.TradeRequest; readonly responseType: typeof api_ecnova_accounting_v1_accounting_proto_accounting_pb.TradeResponse; }; type AccountingGetTransaction = { readonly methodName: string; readonly service: typeof Accounting; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_accounting_v1_accounting_proto_accounting_pb.GetTransactionRequest; readonly responseType: typeof api_ecnova_accounting_v1_accounting_proto_accounting_pb.Transaction; }; type AccountingListTransactions = { readonly methodName: string; readonly service: typeof Accounting; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_accounting_v1_accounting_proto_accounting_pb.ListTransactionsRequest; readonly responseType: typeof api_ecnova_accounting_v1_accounting_proto_accounting_pb.ListTransactionsResponse; }; type AccountingConfirmTransaction = { readonly methodName: string; readonly service: typeof Accounting; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_accounting_v1_accounting_proto_accounting_pb.ConfirmTransactionRequest; readonly responseType: typeof api_ecnova_accounting_v1_accounting_proto_accounting_pb.Transaction; }; type AccountingUndoConfirmTransaction = { readonly methodName: string; readonly service: typeof Accounting; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_accounting_v1_accounting_proto_accounting_pb.UndoConfirmTransactionRequest; readonly responseType: typeof api_ecnova_accounting_v1_accounting_proto_accounting_pb.Transaction; }; export class Accounting { static readonly serviceName: string; static readonly Trade: AccountingTrade; static readonly GetTransaction: AccountingGetTransaction; static readonly ListTransactions: AccountingListTransactions; static readonly ConfirmTransaction: AccountingConfirmTransaction; static readonly UndoConfirmTransaction: AccountingUndoConfirmTransaction; } 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 AccountingClient { readonly serviceHost: string; constructor(serviceHost: string, options?: ServiceClientOptions); trade( requestMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.TradeRequest, metadata: grpc.Metadata, callback: (error: ServiceError, responseMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.TradeResponse|null) => void ): void; trade( requestMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.TradeRequest, callback: (error: ServiceError, responseMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.TradeResponse|null) => void ): void; getTransaction( requestMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.GetTransactionRequest, metadata: grpc.Metadata, callback: (error: ServiceError, responseMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.Transaction|null) => void ): void; getTransaction( requestMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.GetTransactionRequest, callback: (error: ServiceError, responseMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.Transaction|null) => void ): void; listTransactions( requestMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.ListTransactionsRequest, metadata: grpc.Metadata, callback: (error: ServiceError, responseMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.ListTransactionsResponse|null) => void ): void; listTransactions( requestMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.ListTransactionsRequest, callback: (error: ServiceError, responseMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.ListTransactionsResponse|null) => void ): void; confirmTransaction( requestMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.ConfirmTransactionRequest, metadata: grpc.Metadata, callback: (error: ServiceError, responseMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.Transaction|null) => void ): void; confirmTransaction( requestMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.ConfirmTransactionRequest, callback: (error: ServiceError, responseMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.Transaction|null) => void ): void; undoConfirmTransaction( requestMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.UndoConfirmTransactionRequest, metadata: grpc.Metadata, callback: (error: ServiceError, responseMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.Transaction|null) => void ): void; undoConfirmTransaction( requestMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.UndoConfirmTransactionRequest, callback: (error: ServiceError, responseMessage: api_ecnova_accounting_v1_accounting_proto_accounting_pb.Transaction|null) => void ): void; }