// package: xrc.ecnova.pingpp.v1 // file: api/ecnova/pingpp/v1/pingpp_proto/pingpp.proto import * as api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb from "../../../../../api/ecnova/pingpp/v1/pingpp_proto/pingpp_pb"; import {grpc} from "grpc-web-client"; type PingppListPayments = { readonly methodName: string; readonly service: typeof Pingpp; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListPaymentsRequest; readonly responseType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListPaymentsResponse; }; type PingppGetPayment = { readonly methodName: string; readonly service: typeof Pingpp; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.GetPaymentRequest; readonly responseType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Payment; }; type PingppCreatePayment = { readonly methodName: string; readonly service: typeof Pingpp; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.CreatePaymentRequest; readonly responseType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Payment; }; type PingppListRefunds = { readonly methodName: string; readonly service: typeof Pingpp; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListRefundsRequest; readonly responseType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListRefundsResponse; }; type PingppGetRefund = { readonly methodName: string; readonly service: typeof Pingpp; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.GetRefundRequest; readonly responseType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Refund; }; type PingppCreateRefund = { readonly methodName: string; readonly service: typeof Pingpp; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.CreateRefundRequest; readonly responseType: typeof api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Refund; }; export class Pingpp { static readonly serviceName: string; static readonly ListPayments: PingppListPayments; static readonly GetPayment: PingppGetPayment; static readonly CreatePayment: PingppCreatePayment; static readonly ListRefunds: PingppListRefunds; static readonly GetRefund: PingppGetRefund; static readonly CreateRefund: PingppCreateRefund; } 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 PingppClient { readonly serviceHost: string; constructor(serviceHost: string, options?: grpc.RpcOptions); listPayments( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListPaymentsRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListPaymentsResponse|null) => void ): UnaryResponse; listPayments( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListPaymentsRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListPaymentsResponse|null) => void ): UnaryResponse; getPayment( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.GetPaymentRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Payment|null) => void ): UnaryResponse; getPayment( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.GetPaymentRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Payment|null) => void ): UnaryResponse; createPayment( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.CreatePaymentRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Payment|null) => void ): UnaryResponse; createPayment( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.CreatePaymentRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Payment|null) => void ): UnaryResponse; listRefunds( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListRefundsRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListRefundsResponse|null) => void ): UnaryResponse; listRefunds( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListRefundsRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.ListRefundsResponse|null) => void ): UnaryResponse; getRefund( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.GetRefundRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Refund|null) => void ): UnaryResponse; getRefund( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.GetRefundRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Refund|null) => void ): UnaryResponse; createRefund( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.CreateRefundRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Refund|null) => void ): UnaryResponse; createRefund( requestMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.CreateRefundRequest, callback: (error: ServiceError|null, responseMessage: api_ecnova_pingpp_v1_pingpp_proto_pingpp_pb.Refund|null) => void ): UnaryResponse; }