wash-service-sdk 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clients/payment.client.d.ts +2 -1
- package/dist/clients/payment.client.js +10 -0
- package/dist/generated/payment.d.ts +58 -4
- package/dist/generated/payment.grpc-client.d.ts +13 -0
- package/dist/generated/payment.grpc-client.js +7 -0
- package/dist/generated/payment.js +138 -11
- package/package.json +3 -2
- package/proto/payment.proto +14 -1
- package/src/clients/payment.client.ts +19 -0
- package/src/generated/payment.grpc-client.ts +16 -0
- package/src/generated/payment.ts +175 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as grpc from '@grpc/grpc-js';
|
|
2
|
-
import { AddServiceRequest, AddServiceResponse, CancelRequest, ConfirmPaymentRequest, ConfirmPaymentResponse, GetDailySubscriptionRevenueResponse, GetPaymentFailuresRequest, GetPaymentFailuresResponse, GetPaymentV1Request, GetPaymentV1Response, GetRevenueSubscriptionRequest, GetRevenueSubscriptionResponse, IsRegisteredCardRequest, IsRegisteredCardResponse, PaymentPaymentKeyRequest, PaymentRequest, PaymentResponse } from '../generated/payment';
|
|
2
|
+
import { AddServiceRequest, AddServiceResponse, CancelRequest, ConfirmPaymentRequest, ConfirmPaymentResponse, GetDailySubscriptionRevenueResponse, GetPaymentFailuresRequest, GetPaymentFailuresResponse, GetPaymentSummaryV1Request, GetPaymentSummaryV1Response, GetPaymentV1Request, GetPaymentV1Response, GetRevenueSubscriptionRequest, GetRevenueSubscriptionResponse, IsRegisteredCardRequest, IsRegisteredCardResponse, PaymentPaymentKeyRequest, PaymentRequest, PaymentResponse } from '../generated/payment';
|
|
3
3
|
export declare class PaymentClientWrapper {
|
|
4
4
|
private readonly client;
|
|
5
5
|
private readonly metadata;
|
|
@@ -15,4 +15,5 @@ export declare class PaymentClientWrapper {
|
|
|
15
15
|
getRevenueSubscription(request: GetRevenueSubscriptionRequest): Promise<GetRevenueSubscriptionResponse>;
|
|
16
16
|
getDailyRevenueSubscription(request: GetRevenueSubscriptionRequest): Promise<GetDailySubscriptionRevenueResponse>;
|
|
17
17
|
getPayment(request: GetPaymentV1Request): Promise<GetPaymentV1Response>;
|
|
18
|
+
getPaymentRevenueSummary(request: GetPaymentSummaryV1Request): Promise<GetPaymentSummaryV1Response>;
|
|
18
19
|
}
|
|
@@ -141,5 +141,15 @@ class PaymentClientWrapper {
|
|
|
141
141
|
});
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
+
getPaymentRevenueSummary(request) {
|
|
145
|
+
return new Promise((resolve, reject) => {
|
|
146
|
+
this.client.getPaymentSummary(request, this.metadata, (error, response) => {
|
|
147
|
+
if (error) {
|
|
148
|
+
return reject(error);
|
|
149
|
+
}
|
|
150
|
+
resolve(response);
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
}
|
|
144
154
|
}
|
|
145
155
|
exports.PaymentClientWrapper = PaymentClientWrapper;
|
|
@@ -69,10 +69,6 @@ export interface PaymentRequest {
|
|
|
69
69
|
* @generated from protobuf field: string storeId = 7
|
|
70
70
|
*/
|
|
71
71
|
storeId: string;
|
|
72
|
-
/**
|
|
73
|
-
* @generated from protobuf field: string transactionId = 8
|
|
74
|
-
*/
|
|
75
|
-
transactionId: string;
|
|
76
72
|
}
|
|
77
73
|
/**
|
|
78
74
|
* @generated from protobuf message payment.ConfirmPaymentRequest
|
|
@@ -398,6 +394,44 @@ export interface GetPaymentV1Response {
|
|
|
398
394
|
*/
|
|
399
395
|
updatedAt: string;
|
|
400
396
|
}
|
|
397
|
+
/**
|
|
398
|
+
* @generated from protobuf message payment.GetPaymentSummaryV1Request
|
|
399
|
+
*/
|
|
400
|
+
export interface GetPaymentSummaryV1Request {
|
|
401
|
+
/**
|
|
402
|
+
* @generated from protobuf field: string storeId = 1
|
|
403
|
+
*/
|
|
404
|
+
storeId: string;
|
|
405
|
+
/**
|
|
406
|
+
* @generated from protobuf field: int32 startTime = 2
|
|
407
|
+
*/
|
|
408
|
+
startTime: number;
|
|
409
|
+
/**
|
|
410
|
+
* @generated from protobuf field: int32 endTime = 3
|
|
411
|
+
*/
|
|
412
|
+
endTime: number;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* @generated from protobuf message payment.GetPaymentSummaryV1Response
|
|
416
|
+
*/
|
|
417
|
+
export interface GetPaymentSummaryV1Response {
|
|
418
|
+
/**
|
|
419
|
+
* @generated from protobuf field: string storeId = 1
|
|
420
|
+
*/
|
|
421
|
+
storeId: string;
|
|
422
|
+
/**
|
|
423
|
+
* @generated from protobuf field: int32 rf = 2
|
|
424
|
+
*/
|
|
425
|
+
rf: number;
|
|
426
|
+
/**
|
|
427
|
+
* @generated from protobuf field: int32 credit = 3
|
|
428
|
+
*/
|
|
429
|
+
credit: number;
|
|
430
|
+
/**
|
|
431
|
+
* @generated from protobuf field: int32 billing = 4
|
|
432
|
+
*/
|
|
433
|
+
billing: number;
|
|
434
|
+
}
|
|
401
435
|
declare class AddServiceRequest$Type extends MessageType<AddServiceRequest> {
|
|
402
436
|
constructor();
|
|
403
437
|
create(value?: PartialMessage<AddServiceRequest>): AddServiceRequest;
|
|
@@ -588,6 +622,26 @@ declare class GetPaymentV1Response$Type extends MessageType<GetPaymentV1Response
|
|
|
588
622
|
* @generated MessageType for protobuf message payment.GetPaymentV1Response
|
|
589
623
|
*/
|
|
590
624
|
export declare const GetPaymentV1Response: GetPaymentV1Response$Type;
|
|
625
|
+
declare class GetPaymentSummaryV1Request$Type extends MessageType<GetPaymentSummaryV1Request> {
|
|
626
|
+
constructor();
|
|
627
|
+
create(value?: PartialMessage<GetPaymentSummaryV1Request>): GetPaymentSummaryV1Request;
|
|
628
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPaymentSummaryV1Request): GetPaymentSummaryV1Request;
|
|
629
|
+
internalBinaryWrite(message: GetPaymentSummaryV1Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* @generated MessageType for protobuf message payment.GetPaymentSummaryV1Request
|
|
633
|
+
*/
|
|
634
|
+
export declare const GetPaymentSummaryV1Request: GetPaymentSummaryV1Request$Type;
|
|
635
|
+
declare class GetPaymentSummaryV1Response$Type extends MessageType<GetPaymentSummaryV1Response> {
|
|
636
|
+
constructor();
|
|
637
|
+
create(value?: PartialMessage<GetPaymentSummaryV1Response>): GetPaymentSummaryV1Response;
|
|
638
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPaymentSummaryV1Response): GetPaymentSummaryV1Response;
|
|
639
|
+
internalBinaryWrite(message: GetPaymentSummaryV1Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* @generated MessageType for protobuf message payment.GetPaymentSummaryV1Response
|
|
643
|
+
*/
|
|
644
|
+
export declare const GetPaymentSummaryV1Response: GetPaymentSummaryV1Response$Type;
|
|
591
645
|
/**
|
|
592
646
|
* @generated ServiceType for protobuf service payment.PaymentService
|
|
593
647
|
*/
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
2
2
|
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
3
|
+
import type { GetPaymentSummaryV1Response } from "./payment";
|
|
4
|
+
import type { GetPaymentSummaryV1Request } from "./payment";
|
|
3
5
|
import type { GetPaymentV1Response } from "./payment";
|
|
4
6
|
import type { GetPaymentV1Request } from "./payment";
|
|
5
7
|
import type { ConfirmPaymentResponse } from "./payment";
|
|
@@ -101,6 +103,13 @@ export interface IPaymentServiceClient {
|
|
|
101
103
|
getPayment(input: GetPaymentV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
|
|
102
104
|
getPayment(input: GetPaymentV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
|
|
103
105
|
getPayment(input: GetPaymentV1Request, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
|
|
106
|
+
/**
|
|
107
|
+
* @generated from protobuf rpc: GetPaymentSummary
|
|
108
|
+
*/
|
|
109
|
+
getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
110
|
+
getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
111
|
+
getPaymentSummary(input: GetPaymentSummaryV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
112
|
+
getPaymentSummary(input: GetPaymentSummaryV1Request, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
104
113
|
}
|
|
105
114
|
/**
|
|
106
115
|
* 결제 서비스 정의
|
|
@@ -154,4 +163,8 @@ export declare class PaymentServiceClient extends grpc.Client implements IPaymen
|
|
|
154
163
|
* @generated from protobuf rpc: GetPayment
|
|
155
164
|
*/
|
|
156
165
|
getPayment(input: GetPaymentV1Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void), callback?: ((err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void)): grpc.ClientUnaryCall;
|
|
166
|
+
/**
|
|
167
|
+
* @generated from protobuf rpc: GetPaymentSummary
|
|
168
|
+
*/
|
|
169
|
+
getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void), callback?: ((err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void)): grpc.ClientUnaryCall;
|
|
157
170
|
}
|
|
@@ -112,5 +112,12 @@ class PaymentServiceClient extends grpc.Client {
|
|
|
112
112
|
const method = payment_1.PaymentService.methods[10];
|
|
113
113
|
return this.makeUnaryRequest(`/${payment_1.PaymentService.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback);
|
|
114
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* @generated from protobuf rpc: GetPaymentSummary
|
|
117
|
+
*/
|
|
118
|
+
getPaymentSummary(input, metadata, options, callback) {
|
|
119
|
+
const method = payment_1.PaymentService.methods[11];
|
|
120
|
+
return this.makeUnaryRequest(`/${payment_1.PaymentService.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback);
|
|
121
|
+
}
|
|
115
122
|
}
|
|
116
123
|
exports.PaymentServiceClient = PaymentServiceClient;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaymentService = exports.GetPaymentV1Response = exports.GetPaymentV1Request = exports.GetDailySubscriptionRevenueResponse = exports.GetDailySubscriptionRevenue = exports.GetRevenueSubscriptionResponse = exports.GetPaymentFailuresResponse = exports.GetPaymentFailuresRequest = exports.IsRegisteredCardResponse = exports.IsRegisteredCardRequest = exports.CancelResponse = exports.GetRevenueSubscriptionRequest = exports.CancelRequest = exports.PaymentResponse = exports.PaymentPaymentKeyRequest = exports.ConfirmPaymentResponse = exports.ConfirmPaymentRequest = exports.PaymentRequest = exports.AddServiceResponse = exports.AddServiceRequest = void 0;
|
|
3
|
+
exports.PaymentService = exports.GetPaymentSummaryV1Response = exports.GetPaymentSummaryV1Request = exports.GetPaymentV1Response = exports.GetPaymentV1Request = exports.GetDailySubscriptionRevenueResponse = exports.GetDailySubscriptionRevenue = exports.GetRevenueSubscriptionResponse = exports.GetPaymentFailuresResponse = exports.GetPaymentFailuresRequest = exports.IsRegisteredCardResponse = exports.IsRegisteredCardRequest = exports.CancelResponse = exports.GetRevenueSubscriptionRequest = exports.CancelRequest = exports.PaymentResponse = exports.PaymentPaymentKeyRequest = exports.ConfirmPaymentResponse = exports.ConfirmPaymentRequest = exports.PaymentRequest = exports.AddServiceResponse = exports.AddServiceRequest = void 0;
|
|
4
4
|
// @generated by protobuf-ts 2.11.1 with parameter client_grpc1
|
|
5
5
|
// @generated from protobuf file "payment.proto" (package "payment", syntax proto3)
|
|
6
6
|
// tslint:disable
|
|
@@ -129,8 +129,7 @@ class PaymentRequest$Type extends runtime_4.MessageType {
|
|
|
129
129
|
{ no: 4, name: "amount", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
130
130
|
{ no: 5, name: "data", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
131
131
|
{ no: 6, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
132
|
-
{ no: 7, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
133
|
-
{ no: 8, name: "transactionId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
132
|
+
{ no: 7, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
134
133
|
]);
|
|
135
134
|
}
|
|
136
135
|
create(value) {
|
|
@@ -142,7 +141,6 @@ class PaymentRequest$Type extends runtime_4.MessageType {
|
|
|
142
141
|
message.data = "";
|
|
143
142
|
message.type = "";
|
|
144
143
|
message.storeId = "";
|
|
145
|
-
message.transactionId = "";
|
|
146
144
|
if (value !== undefined)
|
|
147
145
|
runtime_3.reflectionMergePartial(this, message, value);
|
|
148
146
|
return message;
|
|
@@ -173,9 +171,6 @@ class PaymentRequest$Type extends runtime_4.MessageType {
|
|
|
173
171
|
case /* string storeId */ 7:
|
|
174
172
|
message.storeId = reader.string();
|
|
175
173
|
break;
|
|
176
|
-
case /* string transactionId */ 8:
|
|
177
|
-
message.transactionId = reader.string();
|
|
178
|
-
break;
|
|
179
174
|
default:
|
|
180
175
|
let u = options.readUnknownField;
|
|
181
176
|
if (u === "throw")
|
|
@@ -209,9 +204,6 @@ class PaymentRequest$Type extends runtime_4.MessageType {
|
|
|
209
204
|
/* string storeId = 7; */
|
|
210
205
|
if (message.storeId !== "")
|
|
211
206
|
writer.tag(7, runtime_1.WireType.LengthDelimited).string(message.storeId);
|
|
212
|
-
/* string transactionId = 8; */
|
|
213
|
-
if (message.transactionId !== "")
|
|
214
|
-
writer.tag(8, runtime_1.WireType.LengthDelimited).string(message.transactionId);
|
|
215
207
|
let u = options.writeUnknownFields;
|
|
216
208
|
if (u !== false)
|
|
217
209
|
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -1311,6 +1303,140 @@ class GetPaymentV1Response$Type extends runtime_4.MessageType {
|
|
|
1311
1303
|
* @generated MessageType for protobuf message payment.GetPaymentV1Response
|
|
1312
1304
|
*/
|
|
1313
1305
|
exports.GetPaymentV1Response = new GetPaymentV1Response$Type();
|
|
1306
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1307
|
+
class GetPaymentSummaryV1Request$Type extends runtime_4.MessageType {
|
|
1308
|
+
constructor() {
|
|
1309
|
+
super("payment.GetPaymentSummaryV1Request", [
|
|
1310
|
+
{ no: 1, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1311
|
+
{ no: 2, name: "startTime", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1312
|
+
{ no: 3, name: "endTime", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
1313
|
+
]);
|
|
1314
|
+
}
|
|
1315
|
+
create(value) {
|
|
1316
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
1317
|
+
message.storeId = "";
|
|
1318
|
+
message.startTime = 0;
|
|
1319
|
+
message.endTime = 0;
|
|
1320
|
+
if (value !== undefined)
|
|
1321
|
+
runtime_3.reflectionMergePartial(this, message, value);
|
|
1322
|
+
return message;
|
|
1323
|
+
}
|
|
1324
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1325
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1326
|
+
while (reader.pos < end) {
|
|
1327
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1328
|
+
switch (fieldNo) {
|
|
1329
|
+
case /* string storeId */ 1:
|
|
1330
|
+
message.storeId = reader.string();
|
|
1331
|
+
break;
|
|
1332
|
+
case /* int32 startTime */ 2:
|
|
1333
|
+
message.startTime = reader.int32();
|
|
1334
|
+
break;
|
|
1335
|
+
case /* int32 endTime */ 3:
|
|
1336
|
+
message.endTime = reader.int32();
|
|
1337
|
+
break;
|
|
1338
|
+
default:
|
|
1339
|
+
let u = options.readUnknownField;
|
|
1340
|
+
if (u === "throw")
|
|
1341
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1342
|
+
let d = reader.skip(wireType);
|
|
1343
|
+
if (u !== false)
|
|
1344
|
+
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
return message;
|
|
1348
|
+
}
|
|
1349
|
+
internalBinaryWrite(message, writer, options) {
|
|
1350
|
+
/* string storeId = 1; */
|
|
1351
|
+
if (message.storeId !== "")
|
|
1352
|
+
writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.storeId);
|
|
1353
|
+
/* int32 startTime = 2; */
|
|
1354
|
+
if (message.startTime !== 0)
|
|
1355
|
+
writer.tag(2, runtime_1.WireType.Varint).int32(message.startTime);
|
|
1356
|
+
/* int32 endTime = 3; */
|
|
1357
|
+
if (message.endTime !== 0)
|
|
1358
|
+
writer.tag(3, runtime_1.WireType.Varint).int32(message.endTime);
|
|
1359
|
+
let u = options.writeUnknownFields;
|
|
1360
|
+
if (u !== false)
|
|
1361
|
+
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1362
|
+
return writer;
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
/**
|
|
1366
|
+
* @generated MessageType for protobuf message payment.GetPaymentSummaryV1Request
|
|
1367
|
+
*/
|
|
1368
|
+
exports.GetPaymentSummaryV1Request = new GetPaymentSummaryV1Request$Type();
|
|
1369
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1370
|
+
class GetPaymentSummaryV1Response$Type extends runtime_4.MessageType {
|
|
1371
|
+
constructor() {
|
|
1372
|
+
super("payment.GetPaymentSummaryV1Response", [
|
|
1373
|
+
{ no: 1, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1374
|
+
{ no: 2, name: "rf", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1375
|
+
{ no: 3, name: "credit", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1376
|
+
{ no: 4, name: "billing", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
1377
|
+
]);
|
|
1378
|
+
}
|
|
1379
|
+
create(value) {
|
|
1380
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
1381
|
+
message.storeId = "";
|
|
1382
|
+
message.rf = 0;
|
|
1383
|
+
message.credit = 0;
|
|
1384
|
+
message.billing = 0;
|
|
1385
|
+
if (value !== undefined)
|
|
1386
|
+
runtime_3.reflectionMergePartial(this, message, value);
|
|
1387
|
+
return message;
|
|
1388
|
+
}
|
|
1389
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1390
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1391
|
+
while (reader.pos < end) {
|
|
1392
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1393
|
+
switch (fieldNo) {
|
|
1394
|
+
case /* string storeId */ 1:
|
|
1395
|
+
message.storeId = reader.string();
|
|
1396
|
+
break;
|
|
1397
|
+
case /* int32 rf */ 2:
|
|
1398
|
+
message.rf = reader.int32();
|
|
1399
|
+
break;
|
|
1400
|
+
case /* int32 credit */ 3:
|
|
1401
|
+
message.credit = reader.int32();
|
|
1402
|
+
break;
|
|
1403
|
+
case /* int32 billing */ 4:
|
|
1404
|
+
message.billing = reader.int32();
|
|
1405
|
+
break;
|
|
1406
|
+
default:
|
|
1407
|
+
let u = options.readUnknownField;
|
|
1408
|
+
if (u === "throw")
|
|
1409
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1410
|
+
let d = reader.skip(wireType);
|
|
1411
|
+
if (u !== false)
|
|
1412
|
+
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
return message;
|
|
1416
|
+
}
|
|
1417
|
+
internalBinaryWrite(message, writer, options) {
|
|
1418
|
+
/* string storeId = 1; */
|
|
1419
|
+
if (message.storeId !== "")
|
|
1420
|
+
writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.storeId);
|
|
1421
|
+
/* int32 rf = 2; */
|
|
1422
|
+
if (message.rf !== 0)
|
|
1423
|
+
writer.tag(2, runtime_1.WireType.Varint).int32(message.rf);
|
|
1424
|
+
/* int32 credit = 3; */
|
|
1425
|
+
if (message.credit !== 0)
|
|
1426
|
+
writer.tag(3, runtime_1.WireType.Varint).int32(message.credit);
|
|
1427
|
+
/* int32 billing = 4; */
|
|
1428
|
+
if (message.billing !== 0)
|
|
1429
|
+
writer.tag(4, runtime_1.WireType.Varint).int32(message.billing);
|
|
1430
|
+
let u = options.writeUnknownFields;
|
|
1431
|
+
if (u !== false)
|
|
1432
|
+
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1433
|
+
return writer;
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
* @generated MessageType for protobuf message payment.GetPaymentSummaryV1Response
|
|
1438
|
+
*/
|
|
1439
|
+
exports.GetPaymentSummaryV1Response = new GetPaymentSummaryV1Response$Type();
|
|
1314
1440
|
/**
|
|
1315
1441
|
* @generated ServiceType for protobuf service payment.PaymentService
|
|
1316
1442
|
*/
|
|
@@ -1325,5 +1451,6 @@ exports.PaymentService = new runtime_rpc_1.ServiceType("payment.PaymentService",
|
|
|
1325
1451
|
{ name: "GetRevenueSubscription", options: {}, I: exports.GetRevenueSubscriptionRequest, O: exports.GetRevenueSubscriptionResponse },
|
|
1326
1452
|
{ name: "GetDailyRevenueSubscription", options: {}, I: exports.GetRevenueSubscriptionRequest, O: exports.GetDailySubscriptionRevenueResponse },
|
|
1327
1453
|
{ name: "ConfirmPayment", options: {}, I: exports.ConfirmPaymentRequest, O: exports.ConfirmPaymentResponse },
|
|
1328
|
-
{ name: "GetPayment", options: {}, I: exports.GetPaymentV1Request, O: exports.GetPaymentV1Response }
|
|
1454
|
+
{ name: "GetPayment", options: {}, I: exports.GetPaymentV1Request, O: exports.GetPaymentV1Response },
|
|
1455
|
+
{ name: "GetPaymentSummary", options: {}, I: exports.GetPaymentSummaryV1Request, O: exports.GetPaymentSummaryV1Response }
|
|
1329
1456
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wash-service-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"@grpc/grpc-js": "^1.14.1",
|
|
19
19
|
"@protobuf-ts/grpc-transport": "^2.11.1",
|
|
20
20
|
"@protobuf-ts/runtime": "^2.11.1",
|
|
21
|
-
"@protobuf-ts/runtime-rpc": "^2.11.1"
|
|
21
|
+
"@protobuf-ts/runtime-rpc": "^2.11.1",
|
|
22
|
+
"wash-service-sdk": "^1.0.3"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@protobuf-ts/plugin": "^2.11.1"
|
package/proto/payment.proto
CHANGED
|
@@ -23,7 +23,6 @@ message PaymentRequest {
|
|
|
23
23
|
string data = 5; // 결제 데이터
|
|
24
24
|
string type = 6; // 결제 데이터
|
|
25
25
|
string storeId = 7;
|
|
26
|
-
string transactionId = 8;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
message ConfirmPaymentRequest {
|
|
@@ -137,6 +136,19 @@ message GetPaymentV1Response {
|
|
|
137
136
|
string updatedAt = 12;
|
|
138
137
|
}
|
|
139
138
|
|
|
139
|
+
message GetPaymentSummaryV1Request {
|
|
140
|
+
string storeId = 1;
|
|
141
|
+
int32 startTime = 2;
|
|
142
|
+
int32 endTime = 3;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
message GetPaymentSummaryV1Response {
|
|
146
|
+
string storeId = 1;
|
|
147
|
+
int32 rf = 2;
|
|
148
|
+
int32 credit = 3;
|
|
149
|
+
int32 billing = 4;
|
|
150
|
+
}
|
|
151
|
+
|
|
140
152
|
// 결제 서비스 정의
|
|
141
153
|
service PaymentService {
|
|
142
154
|
rpc AddService(AddServiceRequest) returns (AddServiceResponse);
|
|
@@ -150,4 +162,5 @@ service PaymentService {
|
|
|
150
162
|
rpc GetDailyRevenueSubscription(GetRevenueSubscriptionRequest) returns (GetDailySubscriptionRevenueResponse);
|
|
151
163
|
rpc ConfirmPayment(ConfirmPaymentRequest) returns (ConfirmPaymentResponse);
|
|
152
164
|
rpc GetPayment(GetPaymentV1Request) returns (GetPaymentV1Response);
|
|
165
|
+
rpc GetPaymentSummary(GetPaymentSummaryV1Request) returns (GetPaymentSummaryV1Response);
|
|
153
166
|
}
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
GetDailySubscriptionRevenueResponse,
|
|
10
10
|
GetPaymentFailuresRequest,
|
|
11
11
|
GetPaymentFailuresResponse,
|
|
12
|
+
type GetPaymentSummaryV1Request,
|
|
13
|
+
type GetPaymentSummaryV1Response,
|
|
12
14
|
GetPaymentV1Request,
|
|
13
15
|
GetPaymentV1Response,
|
|
14
16
|
GetRevenueSubscriptionRequest,
|
|
@@ -230,4 +232,21 @@ export class PaymentClientWrapper {
|
|
|
230
232
|
);
|
|
231
233
|
});
|
|
232
234
|
}
|
|
235
|
+
|
|
236
|
+
public getPaymentRevenueSummary(
|
|
237
|
+
request: GetPaymentSummaryV1Request,
|
|
238
|
+
): Promise<GetPaymentSummaryV1Response> {
|
|
239
|
+
return new Promise<GetPaymentSummaryV1Response>((resolve, reject) => {
|
|
240
|
+
this.client.getPaymentSummary(
|
|
241
|
+
request,
|
|
242
|
+
this.metadata,
|
|
243
|
+
(error, response) => {
|
|
244
|
+
if (error) {
|
|
245
|
+
return reject(error);
|
|
246
|
+
}
|
|
247
|
+
resolve(response as GetPaymentSummaryV1Response);
|
|
248
|
+
},
|
|
249
|
+
);
|
|
250
|
+
});
|
|
251
|
+
}
|
|
233
252
|
}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
import { PaymentService } from "./payment";
|
|
5
5
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
6
|
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
7
|
+
import type { GetPaymentSummaryV1Response } from "./payment";
|
|
8
|
+
import type { GetPaymentSummaryV1Request } from "./payment";
|
|
7
9
|
import type { GetPaymentV1Response } from "./payment";
|
|
8
10
|
import type { GetPaymentV1Request } from "./payment";
|
|
9
11
|
import type { ConfirmPaymentResponse } from "./payment";
|
|
@@ -105,6 +107,13 @@ export interface IPaymentServiceClient {
|
|
|
105
107
|
getPayment(input: GetPaymentV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
|
|
106
108
|
getPayment(input: GetPaymentV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
|
|
107
109
|
getPayment(input: GetPaymentV1Request, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
|
|
110
|
+
/**
|
|
111
|
+
* @generated from protobuf rpc: GetPaymentSummary
|
|
112
|
+
*/
|
|
113
|
+
getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
114
|
+
getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
115
|
+
getPaymentSummary(input: GetPaymentSummaryV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
116
|
+
getPaymentSummary(input: GetPaymentSummaryV1Request, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
108
117
|
}
|
|
109
118
|
/**
|
|
110
119
|
* 결제 서비스 정의
|
|
@@ -194,4 +203,11 @@ export class PaymentServiceClient extends grpc.Client implements IPaymentService
|
|
|
194
203
|
const method = PaymentService.methods[10];
|
|
195
204
|
return this.makeUnaryRequest<GetPaymentV1Request, GetPaymentV1Response>(`/${PaymentService.typeName}/${method.name}`, (value: GetPaymentV1Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetPaymentV1Response => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
|
196
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* @generated from protobuf rpc: GetPaymentSummary
|
|
208
|
+
*/
|
|
209
|
+
getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void), callback?: ((err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void)): grpc.ClientUnaryCall {
|
|
210
|
+
const method = PaymentService.methods[11];
|
|
211
|
+
return this.makeUnaryRequest<GetPaymentSummaryV1Request, GetPaymentSummaryV1Response>(`/${PaymentService.typeName}/${method.name}`, (value: GetPaymentSummaryV1Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetPaymentSummaryV1Response => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
|
|
212
|
+
}
|
|
197
213
|
}
|
package/src/generated/payment.ts
CHANGED
|
@@ -75,10 +75,6 @@ export interface PaymentRequest {
|
|
|
75
75
|
* @generated from protobuf field: string storeId = 7
|
|
76
76
|
*/
|
|
77
77
|
storeId: string;
|
|
78
|
-
/**
|
|
79
|
-
* @generated from protobuf field: string transactionId = 8
|
|
80
|
-
*/
|
|
81
|
-
transactionId: string;
|
|
82
78
|
}
|
|
83
79
|
/**
|
|
84
80
|
* @generated from protobuf message payment.ConfirmPaymentRequest
|
|
@@ -404,6 +400,44 @@ export interface GetPaymentV1Response {
|
|
|
404
400
|
*/
|
|
405
401
|
updatedAt: string;
|
|
406
402
|
}
|
|
403
|
+
/**
|
|
404
|
+
* @generated from protobuf message payment.GetPaymentSummaryV1Request
|
|
405
|
+
*/
|
|
406
|
+
export interface GetPaymentSummaryV1Request {
|
|
407
|
+
/**
|
|
408
|
+
* @generated from protobuf field: string storeId = 1
|
|
409
|
+
*/
|
|
410
|
+
storeId: string;
|
|
411
|
+
/**
|
|
412
|
+
* @generated from protobuf field: int32 startTime = 2
|
|
413
|
+
*/
|
|
414
|
+
startTime: number;
|
|
415
|
+
/**
|
|
416
|
+
* @generated from protobuf field: int32 endTime = 3
|
|
417
|
+
*/
|
|
418
|
+
endTime: number;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* @generated from protobuf message payment.GetPaymentSummaryV1Response
|
|
422
|
+
*/
|
|
423
|
+
export interface GetPaymentSummaryV1Response {
|
|
424
|
+
/**
|
|
425
|
+
* @generated from protobuf field: string storeId = 1
|
|
426
|
+
*/
|
|
427
|
+
storeId: string;
|
|
428
|
+
/**
|
|
429
|
+
* @generated from protobuf field: int32 rf = 2
|
|
430
|
+
*/
|
|
431
|
+
rf: number;
|
|
432
|
+
/**
|
|
433
|
+
* @generated from protobuf field: int32 credit = 3
|
|
434
|
+
*/
|
|
435
|
+
credit: number;
|
|
436
|
+
/**
|
|
437
|
+
* @generated from protobuf field: int32 billing = 4
|
|
438
|
+
*/
|
|
439
|
+
billing: number;
|
|
440
|
+
}
|
|
407
441
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
408
442
|
class AddServiceRequest$Type extends MessageType<AddServiceRequest> {
|
|
409
443
|
constructor() {
|
|
@@ -524,8 +558,7 @@ class PaymentRequest$Type extends MessageType<PaymentRequest> {
|
|
|
524
558
|
{ no: 4, name: "amount", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
525
559
|
{ no: 5, name: "data", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
526
560
|
{ no: 6, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
527
|
-
{ no: 7, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
528
|
-
{ no: 8, name: "transactionId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
561
|
+
{ no: 7, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
529
562
|
]);
|
|
530
563
|
}
|
|
531
564
|
create(value?: PartialMessage<PaymentRequest>): PaymentRequest {
|
|
@@ -537,7 +570,6 @@ class PaymentRequest$Type extends MessageType<PaymentRequest> {
|
|
|
537
570
|
message.data = "";
|
|
538
571
|
message.type = "";
|
|
539
572
|
message.storeId = "";
|
|
540
|
-
message.transactionId = "";
|
|
541
573
|
if (value !== undefined)
|
|
542
574
|
reflectionMergePartial<PaymentRequest>(this, message, value);
|
|
543
575
|
return message;
|
|
@@ -568,9 +600,6 @@ class PaymentRequest$Type extends MessageType<PaymentRequest> {
|
|
|
568
600
|
case /* string storeId */ 7:
|
|
569
601
|
message.storeId = reader.string();
|
|
570
602
|
break;
|
|
571
|
-
case /* string transactionId */ 8:
|
|
572
|
-
message.transactionId = reader.string();
|
|
573
|
-
break;
|
|
574
603
|
default:
|
|
575
604
|
let u = options.readUnknownField;
|
|
576
605
|
if (u === "throw")
|
|
@@ -604,9 +633,6 @@ class PaymentRequest$Type extends MessageType<PaymentRequest> {
|
|
|
604
633
|
/* string storeId = 7; */
|
|
605
634
|
if (message.storeId !== "")
|
|
606
635
|
writer.tag(7, WireType.LengthDelimited).string(message.storeId);
|
|
607
|
-
/* string transactionId = 8; */
|
|
608
|
-
if (message.transactionId !== "")
|
|
609
|
-
writer.tag(8, WireType.LengthDelimited).string(message.transactionId);
|
|
610
636
|
let u = options.writeUnknownFields;
|
|
611
637
|
if (u !== false)
|
|
612
638
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -1706,6 +1732,140 @@ class GetPaymentV1Response$Type extends MessageType<GetPaymentV1Response> {
|
|
|
1706
1732
|
* @generated MessageType for protobuf message payment.GetPaymentV1Response
|
|
1707
1733
|
*/
|
|
1708
1734
|
export const GetPaymentV1Response = new GetPaymentV1Response$Type();
|
|
1735
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1736
|
+
class GetPaymentSummaryV1Request$Type extends MessageType<GetPaymentSummaryV1Request> {
|
|
1737
|
+
constructor() {
|
|
1738
|
+
super("payment.GetPaymentSummaryV1Request", [
|
|
1739
|
+
{ no: 1, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1740
|
+
{ no: 2, name: "startTime", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1741
|
+
{ no: 3, name: "endTime", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
1742
|
+
]);
|
|
1743
|
+
}
|
|
1744
|
+
create(value?: PartialMessage<GetPaymentSummaryV1Request>): GetPaymentSummaryV1Request {
|
|
1745
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1746
|
+
message.storeId = "";
|
|
1747
|
+
message.startTime = 0;
|
|
1748
|
+
message.endTime = 0;
|
|
1749
|
+
if (value !== undefined)
|
|
1750
|
+
reflectionMergePartial<GetPaymentSummaryV1Request>(this, message, value);
|
|
1751
|
+
return message;
|
|
1752
|
+
}
|
|
1753
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPaymentSummaryV1Request): GetPaymentSummaryV1Request {
|
|
1754
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1755
|
+
while (reader.pos < end) {
|
|
1756
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1757
|
+
switch (fieldNo) {
|
|
1758
|
+
case /* string storeId */ 1:
|
|
1759
|
+
message.storeId = reader.string();
|
|
1760
|
+
break;
|
|
1761
|
+
case /* int32 startTime */ 2:
|
|
1762
|
+
message.startTime = reader.int32();
|
|
1763
|
+
break;
|
|
1764
|
+
case /* int32 endTime */ 3:
|
|
1765
|
+
message.endTime = reader.int32();
|
|
1766
|
+
break;
|
|
1767
|
+
default:
|
|
1768
|
+
let u = options.readUnknownField;
|
|
1769
|
+
if (u === "throw")
|
|
1770
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1771
|
+
let d = reader.skip(wireType);
|
|
1772
|
+
if (u !== false)
|
|
1773
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
return message;
|
|
1777
|
+
}
|
|
1778
|
+
internalBinaryWrite(message: GetPaymentSummaryV1Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1779
|
+
/* string storeId = 1; */
|
|
1780
|
+
if (message.storeId !== "")
|
|
1781
|
+
writer.tag(1, WireType.LengthDelimited).string(message.storeId);
|
|
1782
|
+
/* int32 startTime = 2; */
|
|
1783
|
+
if (message.startTime !== 0)
|
|
1784
|
+
writer.tag(2, WireType.Varint).int32(message.startTime);
|
|
1785
|
+
/* int32 endTime = 3; */
|
|
1786
|
+
if (message.endTime !== 0)
|
|
1787
|
+
writer.tag(3, WireType.Varint).int32(message.endTime);
|
|
1788
|
+
let u = options.writeUnknownFields;
|
|
1789
|
+
if (u !== false)
|
|
1790
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1791
|
+
return writer;
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
/**
|
|
1795
|
+
* @generated MessageType for protobuf message payment.GetPaymentSummaryV1Request
|
|
1796
|
+
*/
|
|
1797
|
+
export const GetPaymentSummaryV1Request = new GetPaymentSummaryV1Request$Type();
|
|
1798
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1799
|
+
class GetPaymentSummaryV1Response$Type extends MessageType<GetPaymentSummaryV1Response> {
|
|
1800
|
+
constructor() {
|
|
1801
|
+
super("payment.GetPaymentSummaryV1Response", [
|
|
1802
|
+
{ no: 1, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1803
|
+
{ no: 2, name: "rf", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1804
|
+
{ no: 3, name: "credit", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1805
|
+
{ no: 4, name: "billing", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
1806
|
+
]);
|
|
1807
|
+
}
|
|
1808
|
+
create(value?: PartialMessage<GetPaymentSummaryV1Response>): GetPaymentSummaryV1Response {
|
|
1809
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1810
|
+
message.storeId = "";
|
|
1811
|
+
message.rf = 0;
|
|
1812
|
+
message.credit = 0;
|
|
1813
|
+
message.billing = 0;
|
|
1814
|
+
if (value !== undefined)
|
|
1815
|
+
reflectionMergePartial<GetPaymentSummaryV1Response>(this, message, value);
|
|
1816
|
+
return message;
|
|
1817
|
+
}
|
|
1818
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPaymentSummaryV1Response): GetPaymentSummaryV1Response {
|
|
1819
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1820
|
+
while (reader.pos < end) {
|
|
1821
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1822
|
+
switch (fieldNo) {
|
|
1823
|
+
case /* string storeId */ 1:
|
|
1824
|
+
message.storeId = reader.string();
|
|
1825
|
+
break;
|
|
1826
|
+
case /* int32 rf */ 2:
|
|
1827
|
+
message.rf = reader.int32();
|
|
1828
|
+
break;
|
|
1829
|
+
case /* int32 credit */ 3:
|
|
1830
|
+
message.credit = reader.int32();
|
|
1831
|
+
break;
|
|
1832
|
+
case /* int32 billing */ 4:
|
|
1833
|
+
message.billing = reader.int32();
|
|
1834
|
+
break;
|
|
1835
|
+
default:
|
|
1836
|
+
let u = options.readUnknownField;
|
|
1837
|
+
if (u === "throw")
|
|
1838
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1839
|
+
let d = reader.skip(wireType);
|
|
1840
|
+
if (u !== false)
|
|
1841
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
return message;
|
|
1845
|
+
}
|
|
1846
|
+
internalBinaryWrite(message: GetPaymentSummaryV1Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1847
|
+
/* string storeId = 1; */
|
|
1848
|
+
if (message.storeId !== "")
|
|
1849
|
+
writer.tag(1, WireType.LengthDelimited).string(message.storeId);
|
|
1850
|
+
/* int32 rf = 2; */
|
|
1851
|
+
if (message.rf !== 0)
|
|
1852
|
+
writer.tag(2, WireType.Varint).int32(message.rf);
|
|
1853
|
+
/* int32 credit = 3; */
|
|
1854
|
+
if (message.credit !== 0)
|
|
1855
|
+
writer.tag(3, WireType.Varint).int32(message.credit);
|
|
1856
|
+
/* int32 billing = 4; */
|
|
1857
|
+
if (message.billing !== 0)
|
|
1858
|
+
writer.tag(4, WireType.Varint).int32(message.billing);
|
|
1859
|
+
let u = options.writeUnknownFields;
|
|
1860
|
+
if (u !== false)
|
|
1861
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1862
|
+
return writer;
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
/**
|
|
1866
|
+
* @generated MessageType for protobuf message payment.GetPaymentSummaryV1Response
|
|
1867
|
+
*/
|
|
1868
|
+
export const GetPaymentSummaryV1Response = new GetPaymentSummaryV1Response$Type();
|
|
1709
1869
|
/**
|
|
1710
1870
|
* @generated ServiceType for protobuf service payment.PaymentService
|
|
1711
1871
|
*/
|
|
@@ -1720,5 +1880,6 @@ export const PaymentService = new ServiceType("payment.PaymentService", [
|
|
|
1720
1880
|
{ name: "GetRevenueSubscription", options: {}, I: GetRevenueSubscriptionRequest, O: GetRevenueSubscriptionResponse },
|
|
1721
1881
|
{ name: "GetDailyRevenueSubscription", options: {}, I: GetRevenueSubscriptionRequest, O: GetDailySubscriptionRevenueResponse },
|
|
1722
1882
|
{ name: "ConfirmPayment", options: {}, I: ConfirmPaymentRequest, O: ConfirmPaymentResponse },
|
|
1723
|
-
{ name: "GetPayment", options: {}, I: GetPaymentV1Request, O: GetPaymentV1Response }
|
|
1883
|
+
{ name: "GetPayment", options: {}, I: GetPaymentV1Request, O: GetPaymentV1Response },
|
|
1884
|
+
{ name: "GetPaymentSummary", options: {}, I: GetPaymentSummaryV1Request, O: GetPaymentSummaryV1Response }
|
|
1724
1885
|
]);
|