wash-service-sdk 1.0.3 → 1.0.5

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.
@@ -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, GetDailyPaymentSummaryV1Response, 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,6 @@ 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>;
19
+ getDailyPaymentSummary(request: GetPaymentSummaryV1Request): Promise<GetDailyPaymentSummaryV1Response>;
18
20
  }
@@ -141,5 +141,25 @@ 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
+ }
154
+ getDailyPaymentSummary(request) {
155
+ return new Promise((resolve, reject) => {
156
+ this.client.getDailyPaymentSummary(request, this.metadata, (error, response) => {
157
+ if (error) {
158
+ return reject(error);
159
+ }
160
+ resolve(response);
161
+ });
162
+ });
163
+ }
144
164
  }
145
165
  exports.PaymentClientWrapper = PaymentClientWrapper;
@@ -394,6 +394,78 @@ export interface GetPaymentV1Response {
394
394
  */
395
395
  updatedAt: string;
396
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
+ }
435
+ /**
436
+ * @generated from protobuf message payment.PaymentDateSummary
437
+ */
438
+ export interface PaymentDateSummary {
439
+ /**
440
+ * @generated from protobuf field: string storeId = 1
441
+ */
442
+ storeId: string;
443
+ /**
444
+ * @generated from protobuf field: string date = 2
445
+ */
446
+ date: string;
447
+ /**
448
+ * @generated from protobuf field: int32 rf = 3
449
+ */
450
+ rf: number;
451
+ /**
452
+ * @generated from protobuf field: int32 credit = 4
453
+ */
454
+ credit: number;
455
+ /**
456
+ * @generated from protobuf field: int32 billing = 5
457
+ */
458
+ billing: number;
459
+ }
460
+ /**
461
+ * @generated from protobuf message payment.GetDailyPaymentSummaryV1Response
462
+ */
463
+ export interface GetDailyPaymentSummaryV1Response {
464
+ /**
465
+ * @generated from protobuf field: repeated payment.PaymentDateSummary summaries = 1
466
+ */
467
+ summaries: PaymentDateSummary[];
468
+ }
397
469
  declare class AddServiceRequest$Type extends MessageType<AddServiceRequest> {
398
470
  constructor();
399
471
  create(value?: PartialMessage<AddServiceRequest>): AddServiceRequest;
@@ -584,6 +656,46 @@ declare class GetPaymentV1Response$Type extends MessageType<GetPaymentV1Response
584
656
  * @generated MessageType for protobuf message payment.GetPaymentV1Response
585
657
  */
586
658
  export declare const GetPaymentV1Response: GetPaymentV1Response$Type;
659
+ declare class GetPaymentSummaryV1Request$Type extends MessageType<GetPaymentSummaryV1Request> {
660
+ constructor();
661
+ create(value?: PartialMessage<GetPaymentSummaryV1Request>): GetPaymentSummaryV1Request;
662
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPaymentSummaryV1Request): GetPaymentSummaryV1Request;
663
+ internalBinaryWrite(message: GetPaymentSummaryV1Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
664
+ }
665
+ /**
666
+ * @generated MessageType for protobuf message payment.GetPaymentSummaryV1Request
667
+ */
668
+ export declare const GetPaymentSummaryV1Request: GetPaymentSummaryV1Request$Type;
669
+ declare class GetPaymentSummaryV1Response$Type extends MessageType<GetPaymentSummaryV1Response> {
670
+ constructor();
671
+ create(value?: PartialMessage<GetPaymentSummaryV1Response>): GetPaymentSummaryV1Response;
672
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPaymentSummaryV1Response): GetPaymentSummaryV1Response;
673
+ internalBinaryWrite(message: GetPaymentSummaryV1Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
674
+ }
675
+ /**
676
+ * @generated MessageType for protobuf message payment.GetPaymentSummaryV1Response
677
+ */
678
+ export declare const GetPaymentSummaryV1Response: GetPaymentSummaryV1Response$Type;
679
+ declare class PaymentDateSummary$Type extends MessageType<PaymentDateSummary> {
680
+ constructor();
681
+ create(value?: PartialMessage<PaymentDateSummary>): PaymentDateSummary;
682
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PaymentDateSummary): PaymentDateSummary;
683
+ internalBinaryWrite(message: PaymentDateSummary, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
684
+ }
685
+ /**
686
+ * @generated MessageType for protobuf message payment.PaymentDateSummary
687
+ */
688
+ export declare const PaymentDateSummary: PaymentDateSummary$Type;
689
+ declare class GetDailyPaymentSummaryV1Response$Type extends MessageType<GetDailyPaymentSummaryV1Response> {
690
+ constructor();
691
+ create(value?: PartialMessage<GetDailyPaymentSummaryV1Response>): GetDailyPaymentSummaryV1Response;
692
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDailyPaymentSummaryV1Response): GetDailyPaymentSummaryV1Response;
693
+ internalBinaryWrite(message: GetDailyPaymentSummaryV1Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
694
+ }
695
+ /**
696
+ * @generated MessageType for protobuf message payment.GetDailyPaymentSummaryV1Response
697
+ */
698
+ export declare const GetDailyPaymentSummaryV1Response: GetDailyPaymentSummaryV1Response$Type;
587
699
  /**
588
700
  * @generated ServiceType for protobuf service payment.PaymentService
589
701
  */
@@ -1,5 +1,8 @@
1
1
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
2
  import type { BinaryReadOptions } from "@protobuf-ts/runtime";
3
+ import type { GetDailyPaymentSummaryV1Response } from "./payment";
4
+ import type { GetPaymentSummaryV1Response } from "./payment";
5
+ import type { GetPaymentSummaryV1Request } from "./payment";
3
6
  import type { GetPaymentV1Response } from "./payment";
4
7
  import type { GetPaymentV1Request } from "./payment";
5
8
  import type { ConfirmPaymentResponse } from "./payment";
@@ -101,6 +104,20 @@ export interface IPaymentServiceClient {
101
104
  getPayment(input: GetPaymentV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
102
105
  getPayment(input: GetPaymentV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
103
106
  getPayment(input: GetPaymentV1Request, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
107
+ /**
108
+ * @generated from protobuf rpc: GetPaymentSummary
109
+ */
110
+ getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
111
+ getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
112
+ getPaymentSummary(input: GetPaymentSummaryV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
113
+ getPaymentSummary(input: GetPaymentSummaryV1Request, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
114
+ /**
115
+ * @generated from protobuf rpc: GetDailyPaymentSummary
116
+ */
117
+ getDailyPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
118
+ getDailyPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
119
+ getDailyPaymentSummary(input: GetPaymentSummaryV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
120
+ getDailyPaymentSummary(input: GetPaymentSummaryV1Request, callback: (err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
104
121
  }
105
122
  /**
106
123
  * 결제 서비스 정의
@@ -154,4 +171,12 @@ export declare class PaymentServiceClient extends grpc.Client implements IPaymen
154
171
  * @generated from protobuf rpc: GetPayment
155
172
  */
156
173
  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;
174
+ /**
175
+ * @generated from protobuf rpc: GetPaymentSummary
176
+ */
177
+ 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;
178
+ /**
179
+ * @generated from protobuf rpc: GetDailyPaymentSummary
180
+ */
181
+ getDailyPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void), callback?: ((err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void)): grpc.ClientUnaryCall;
157
182
  }
@@ -112,5 +112,19 @@ 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
+ }
122
+ /**
123
+ * @generated from protobuf rpc: GetDailyPaymentSummary
124
+ */
125
+ getDailyPaymentSummary(input, metadata, options, callback) {
126
+ const method = payment_1.PaymentService.methods[12];
127
+ 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);
128
+ }
115
129
  }
116
130
  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.GetDailyPaymentSummaryV1Response = exports.PaymentDateSummary = 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
@@ -1303,6 +1303,266 @@ class GetPaymentV1Response$Type extends runtime_4.MessageType {
1303
1303
  * @generated MessageType for protobuf message payment.GetPaymentV1Response
1304
1304
  */
1305
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();
1440
+ // @generated message type with reflection information, may provide speed optimized methods
1441
+ class PaymentDateSummary$Type extends runtime_4.MessageType {
1442
+ constructor() {
1443
+ super("payment.PaymentDateSummary", [
1444
+ { no: 1, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1445
+ { no: 2, name: "date", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1446
+ { no: 3, name: "rf", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
1447
+ { no: 4, name: "credit", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
1448
+ { no: 5, name: "billing", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
1449
+ ]);
1450
+ }
1451
+ create(value) {
1452
+ const message = globalThis.Object.create((this.messagePrototype));
1453
+ message.storeId = "";
1454
+ message.date = "";
1455
+ message.rf = 0;
1456
+ message.credit = 0;
1457
+ message.billing = 0;
1458
+ if (value !== undefined)
1459
+ runtime_3.reflectionMergePartial(this, message, value);
1460
+ return message;
1461
+ }
1462
+ internalBinaryRead(reader, length, options, target) {
1463
+ let message = target ?? this.create(), end = reader.pos + length;
1464
+ while (reader.pos < end) {
1465
+ let [fieldNo, wireType] = reader.tag();
1466
+ switch (fieldNo) {
1467
+ case /* string storeId */ 1:
1468
+ message.storeId = reader.string();
1469
+ break;
1470
+ case /* string date */ 2:
1471
+ message.date = reader.string();
1472
+ break;
1473
+ case /* int32 rf */ 3:
1474
+ message.rf = reader.int32();
1475
+ break;
1476
+ case /* int32 credit */ 4:
1477
+ message.credit = reader.int32();
1478
+ break;
1479
+ case /* int32 billing */ 5:
1480
+ message.billing = reader.int32();
1481
+ break;
1482
+ default:
1483
+ let u = options.readUnknownField;
1484
+ if (u === "throw")
1485
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1486
+ let d = reader.skip(wireType);
1487
+ if (u !== false)
1488
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1489
+ }
1490
+ }
1491
+ return message;
1492
+ }
1493
+ internalBinaryWrite(message, writer, options) {
1494
+ /* string storeId = 1; */
1495
+ if (message.storeId !== "")
1496
+ writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.storeId);
1497
+ /* string date = 2; */
1498
+ if (message.date !== "")
1499
+ writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.date);
1500
+ /* int32 rf = 3; */
1501
+ if (message.rf !== 0)
1502
+ writer.tag(3, runtime_1.WireType.Varint).int32(message.rf);
1503
+ /* int32 credit = 4; */
1504
+ if (message.credit !== 0)
1505
+ writer.tag(4, runtime_1.WireType.Varint).int32(message.credit);
1506
+ /* int32 billing = 5; */
1507
+ if (message.billing !== 0)
1508
+ writer.tag(5, runtime_1.WireType.Varint).int32(message.billing);
1509
+ let u = options.writeUnknownFields;
1510
+ if (u !== false)
1511
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1512
+ return writer;
1513
+ }
1514
+ }
1515
+ /**
1516
+ * @generated MessageType for protobuf message payment.PaymentDateSummary
1517
+ */
1518
+ exports.PaymentDateSummary = new PaymentDateSummary$Type();
1519
+ // @generated message type with reflection information, may provide speed optimized methods
1520
+ class GetDailyPaymentSummaryV1Response$Type extends runtime_4.MessageType {
1521
+ constructor() {
1522
+ super("payment.GetDailyPaymentSummaryV1Response", [
1523
+ { no: 1, name: "summaries", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.PaymentDateSummary }
1524
+ ]);
1525
+ }
1526
+ create(value) {
1527
+ const message = globalThis.Object.create((this.messagePrototype));
1528
+ message.summaries = [];
1529
+ if (value !== undefined)
1530
+ runtime_3.reflectionMergePartial(this, message, value);
1531
+ return message;
1532
+ }
1533
+ internalBinaryRead(reader, length, options, target) {
1534
+ let message = target ?? this.create(), end = reader.pos + length;
1535
+ while (reader.pos < end) {
1536
+ let [fieldNo, wireType] = reader.tag();
1537
+ switch (fieldNo) {
1538
+ case /* repeated payment.PaymentDateSummary summaries */ 1:
1539
+ message.summaries.push(exports.PaymentDateSummary.internalBinaryRead(reader, reader.uint32(), options));
1540
+ break;
1541
+ default:
1542
+ let u = options.readUnknownField;
1543
+ if (u === "throw")
1544
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1545
+ let d = reader.skip(wireType);
1546
+ if (u !== false)
1547
+ (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1548
+ }
1549
+ }
1550
+ return message;
1551
+ }
1552
+ internalBinaryWrite(message, writer, options) {
1553
+ /* repeated payment.PaymentDateSummary summaries = 1; */
1554
+ for (let i = 0; i < message.summaries.length; i++)
1555
+ exports.PaymentDateSummary.internalBinaryWrite(message.summaries[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join();
1556
+ let u = options.writeUnknownFields;
1557
+ if (u !== false)
1558
+ (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1559
+ return writer;
1560
+ }
1561
+ }
1562
+ /**
1563
+ * @generated MessageType for protobuf message payment.GetDailyPaymentSummaryV1Response
1564
+ */
1565
+ exports.GetDailyPaymentSummaryV1Response = new GetDailyPaymentSummaryV1Response$Type();
1306
1566
  /**
1307
1567
  * @generated ServiceType for protobuf service payment.PaymentService
1308
1568
  */
@@ -1317,5 +1577,7 @@ exports.PaymentService = new runtime_rpc_1.ServiceType("payment.PaymentService",
1317
1577
  { name: "GetRevenueSubscription", options: {}, I: exports.GetRevenueSubscriptionRequest, O: exports.GetRevenueSubscriptionResponse },
1318
1578
  { name: "GetDailyRevenueSubscription", options: {}, I: exports.GetRevenueSubscriptionRequest, O: exports.GetDailySubscriptionRevenueResponse },
1319
1579
  { name: "ConfirmPayment", options: {}, I: exports.ConfirmPaymentRequest, O: exports.ConfirmPaymentResponse },
1320
- { name: "GetPayment", options: {}, I: exports.GetPaymentV1Request, O: exports.GetPaymentV1Response }
1580
+ { name: "GetPayment", options: {}, I: exports.GetPaymentV1Request, O: exports.GetPaymentV1Response },
1581
+ { name: "GetPaymentSummary", options: {}, I: exports.GetPaymentSummaryV1Request, O: exports.GetPaymentSummaryV1Response },
1582
+ { name: "GetDailyPaymentSummary", options: {}, I: exports.GetPaymentSummaryV1Request, O: exports.GetDailyPaymentSummaryV1Response }
1321
1583
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wash-service-sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": "",
@@ -19,7 +19,7 @@
19
19
  "@protobuf-ts/grpc-transport": "^2.11.1",
20
20
  "@protobuf-ts/runtime": "^2.11.1",
21
21
  "@protobuf-ts/runtime-rpc": "^2.11.1",
22
- "wash-service-sdk": "^1.0.2"
22
+ "wash-service-sdk": "^1.0.3"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@protobuf-ts/plugin": "^2.11.1"
@@ -136,6 +136,33 @@ message GetPaymentV1Response {
136
136
  string updatedAt = 12;
137
137
  }
138
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
+
152
+
153
+ message PaymentDateSummary {
154
+ string storeId = 1;
155
+ string date = 2;
156
+ int32 rf = 3;
157
+ int32 credit = 4;
158
+ int32 billing = 5;
159
+ }
160
+
161
+ message GetDailyPaymentSummaryV1Response {
162
+ repeated PaymentDateSummary summaries = 1;
163
+ }
164
+
165
+
139
166
  // 결제 서비스 정의
140
167
  service PaymentService {
141
168
  rpc AddService(AddServiceRequest) returns (AddServiceResponse);
@@ -149,4 +176,6 @@ service PaymentService {
149
176
  rpc GetDailyRevenueSubscription(GetRevenueSubscriptionRequest) returns (GetDailySubscriptionRevenueResponse);
150
177
  rpc ConfirmPayment(ConfirmPaymentRequest) returns (ConfirmPaymentResponse);
151
178
  rpc GetPayment(GetPaymentV1Request) returns (GetPaymentV1Response);
179
+ rpc GetPaymentSummary(GetPaymentSummaryV1Request) returns (GetPaymentSummaryV1Response);
180
+ rpc GetDailyPaymentSummary(GetPaymentSummaryV1Request) returns (GetDailyPaymentSummaryV1Response);
152
181
  }
@@ -6,9 +6,12 @@ import {
6
6
  CancelRequest,
7
7
  ConfirmPaymentRequest,
8
8
  ConfirmPaymentResponse,
9
+ type GetDailyPaymentSummaryV1Response,
9
10
  GetDailySubscriptionRevenueResponse,
10
11
  GetPaymentFailuresRequest,
11
12
  GetPaymentFailuresResponse,
13
+ type GetPaymentSummaryV1Request,
14
+ type GetPaymentSummaryV1Response,
12
15
  GetPaymentV1Request,
13
16
  GetPaymentV1Response,
14
17
  GetRevenueSubscriptionRequest,
@@ -230,4 +233,40 @@ export class PaymentClientWrapper {
230
233
  );
231
234
  });
232
235
  }
236
+
237
+ public getPaymentRevenueSummary(
238
+ request: GetPaymentSummaryV1Request,
239
+ ): Promise<GetPaymentSummaryV1Response> {
240
+ return new Promise<GetPaymentSummaryV1Response>((resolve, reject) => {
241
+ this.client.getPaymentSummary(
242
+ request,
243
+ this.metadata,
244
+ (error, response) => {
245
+ if (error) {
246
+ return reject(error);
247
+ }
248
+ resolve(response as GetPaymentSummaryV1Response);
249
+ },
250
+ );
251
+ });
252
+ }
253
+
254
+ public getDailyPaymentSummary(
255
+ request: GetPaymentSummaryV1Request,
256
+ ): Promise<GetDailyPaymentSummaryV1Response> {
257
+ return new Promise<GetDailyPaymentSummaryV1Response>(
258
+ (resolve, reject) => {
259
+ this.client.getDailyPaymentSummary(
260
+ request,
261
+ this.metadata,
262
+ (error, response) => {
263
+ if (error) {
264
+ return reject(error);
265
+ }
266
+ resolve(response as GetDailyPaymentSummaryV1Response);
267
+ },
268
+ );
269
+ },
270
+ );
271
+ }
233
272
  }
@@ -4,6 +4,9 @@
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 { GetDailyPaymentSummaryV1Response } from "./payment";
8
+ import type { GetPaymentSummaryV1Response } from "./payment";
9
+ import type { GetPaymentSummaryV1Request } from "./payment";
7
10
  import type { GetPaymentV1Response } from "./payment";
8
11
  import type { GetPaymentV1Request } from "./payment";
9
12
  import type { ConfirmPaymentResponse } from "./payment";
@@ -105,6 +108,20 @@ export interface IPaymentServiceClient {
105
108
  getPayment(input: GetPaymentV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
106
109
  getPayment(input: GetPaymentV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
107
110
  getPayment(input: GetPaymentV1Request, callback: (err: grpc.ServiceError | null, value?: GetPaymentV1Response) => void): grpc.ClientUnaryCall;
111
+ /**
112
+ * @generated from protobuf rpc: GetPaymentSummary
113
+ */
114
+ getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
115
+ getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
116
+ getPaymentSummary(input: GetPaymentSummaryV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
117
+ getPaymentSummary(input: GetPaymentSummaryV1Request, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
118
+ /**
119
+ * @generated from protobuf rpc: GetDailyPaymentSummary
120
+ */
121
+ getDailyPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
122
+ getDailyPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
123
+ getDailyPaymentSummary(input: GetPaymentSummaryV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
124
+ getDailyPaymentSummary(input: GetPaymentSummaryV1Request, callback: (err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
108
125
  }
109
126
  /**
110
127
  * 결제 서비스 정의
@@ -194,4 +211,18 @@ export class PaymentServiceClient extends grpc.Client implements IPaymentService
194
211
  const method = PaymentService.methods[10];
195
212
  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
213
  }
214
+ /**
215
+ * @generated from protobuf rpc: GetPaymentSummary
216
+ */
217
+ 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 {
218
+ const method = PaymentService.methods[11];
219
+ 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));
220
+ }
221
+ /**
222
+ * @generated from protobuf rpc: GetDailyPaymentSummary
223
+ */
224
+ getDailyPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void), callback?: ((err: grpc.ServiceError | null, value?: GetDailyPaymentSummaryV1Response) => void)): grpc.ClientUnaryCall {
225
+ const method = PaymentService.methods[12];
226
+ return this.makeUnaryRequest<GetPaymentSummaryV1Request, GetDailyPaymentSummaryV1Response>(`/${PaymentService.typeName}/${method.name}`, (value: GetPaymentSummaryV1Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetDailyPaymentSummaryV1Response => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any));
227
+ }
197
228
  }
@@ -400,6 +400,78 @@ export interface GetPaymentV1Response {
400
400
  */
401
401
  updatedAt: string;
402
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
+ }
441
+ /**
442
+ * @generated from protobuf message payment.PaymentDateSummary
443
+ */
444
+ export interface PaymentDateSummary {
445
+ /**
446
+ * @generated from protobuf field: string storeId = 1
447
+ */
448
+ storeId: string;
449
+ /**
450
+ * @generated from protobuf field: string date = 2
451
+ */
452
+ date: string;
453
+ /**
454
+ * @generated from protobuf field: int32 rf = 3
455
+ */
456
+ rf: number;
457
+ /**
458
+ * @generated from protobuf field: int32 credit = 4
459
+ */
460
+ credit: number;
461
+ /**
462
+ * @generated from protobuf field: int32 billing = 5
463
+ */
464
+ billing: number;
465
+ }
466
+ /**
467
+ * @generated from protobuf message payment.GetDailyPaymentSummaryV1Response
468
+ */
469
+ export interface GetDailyPaymentSummaryV1Response {
470
+ /**
471
+ * @generated from protobuf field: repeated payment.PaymentDateSummary summaries = 1
472
+ */
473
+ summaries: PaymentDateSummary[];
474
+ }
403
475
  // @generated message type with reflection information, may provide speed optimized methods
404
476
  class AddServiceRequest$Type extends MessageType<AddServiceRequest> {
405
477
  constructor() {
@@ -1694,6 +1766,266 @@ class GetPaymentV1Response$Type extends MessageType<GetPaymentV1Response> {
1694
1766
  * @generated MessageType for protobuf message payment.GetPaymentV1Response
1695
1767
  */
1696
1768
  export const GetPaymentV1Response = new GetPaymentV1Response$Type();
1769
+ // @generated message type with reflection information, may provide speed optimized methods
1770
+ class GetPaymentSummaryV1Request$Type extends MessageType<GetPaymentSummaryV1Request> {
1771
+ constructor() {
1772
+ super("payment.GetPaymentSummaryV1Request", [
1773
+ { no: 1, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1774
+ { no: 2, name: "startTime", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
1775
+ { no: 3, name: "endTime", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
1776
+ ]);
1777
+ }
1778
+ create(value?: PartialMessage<GetPaymentSummaryV1Request>): GetPaymentSummaryV1Request {
1779
+ const message = globalThis.Object.create((this.messagePrototype!));
1780
+ message.storeId = "";
1781
+ message.startTime = 0;
1782
+ message.endTime = 0;
1783
+ if (value !== undefined)
1784
+ reflectionMergePartial<GetPaymentSummaryV1Request>(this, message, value);
1785
+ return message;
1786
+ }
1787
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPaymentSummaryV1Request): GetPaymentSummaryV1Request {
1788
+ let message = target ?? this.create(), end = reader.pos + length;
1789
+ while (reader.pos < end) {
1790
+ let [fieldNo, wireType] = reader.tag();
1791
+ switch (fieldNo) {
1792
+ case /* string storeId */ 1:
1793
+ message.storeId = reader.string();
1794
+ break;
1795
+ case /* int32 startTime */ 2:
1796
+ message.startTime = reader.int32();
1797
+ break;
1798
+ case /* int32 endTime */ 3:
1799
+ message.endTime = reader.int32();
1800
+ break;
1801
+ default:
1802
+ let u = options.readUnknownField;
1803
+ if (u === "throw")
1804
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1805
+ let d = reader.skip(wireType);
1806
+ if (u !== false)
1807
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1808
+ }
1809
+ }
1810
+ return message;
1811
+ }
1812
+ internalBinaryWrite(message: GetPaymentSummaryV1Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1813
+ /* string storeId = 1; */
1814
+ if (message.storeId !== "")
1815
+ writer.tag(1, WireType.LengthDelimited).string(message.storeId);
1816
+ /* int32 startTime = 2; */
1817
+ if (message.startTime !== 0)
1818
+ writer.tag(2, WireType.Varint).int32(message.startTime);
1819
+ /* int32 endTime = 3; */
1820
+ if (message.endTime !== 0)
1821
+ writer.tag(3, WireType.Varint).int32(message.endTime);
1822
+ let u = options.writeUnknownFields;
1823
+ if (u !== false)
1824
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1825
+ return writer;
1826
+ }
1827
+ }
1828
+ /**
1829
+ * @generated MessageType for protobuf message payment.GetPaymentSummaryV1Request
1830
+ */
1831
+ export const GetPaymentSummaryV1Request = new GetPaymentSummaryV1Request$Type();
1832
+ // @generated message type with reflection information, may provide speed optimized methods
1833
+ class GetPaymentSummaryV1Response$Type extends MessageType<GetPaymentSummaryV1Response> {
1834
+ constructor() {
1835
+ super("payment.GetPaymentSummaryV1Response", [
1836
+ { no: 1, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1837
+ { no: 2, name: "rf", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
1838
+ { no: 3, name: "credit", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
1839
+ { no: 4, name: "billing", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
1840
+ ]);
1841
+ }
1842
+ create(value?: PartialMessage<GetPaymentSummaryV1Response>): GetPaymentSummaryV1Response {
1843
+ const message = globalThis.Object.create((this.messagePrototype!));
1844
+ message.storeId = "";
1845
+ message.rf = 0;
1846
+ message.credit = 0;
1847
+ message.billing = 0;
1848
+ if (value !== undefined)
1849
+ reflectionMergePartial<GetPaymentSummaryV1Response>(this, message, value);
1850
+ return message;
1851
+ }
1852
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPaymentSummaryV1Response): GetPaymentSummaryV1Response {
1853
+ let message = target ?? this.create(), end = reader.pos + length;
1854
+ while (reader.pos < end) {
1855
+ let [fieldNo, wireType] = reader.tag();
1856
+ switch (fieldNo) {
1857
+ case /* string storeId */ 1:
1858
+ message.storeId = reader.string();
1859
+ break;
1860
+ case /* int32 rf */ 2:
1861
+ message.rf = reader.int32();
1862
+ break;
1863
+ case /* int32 credit */ 3:
1864
+ message.credit = reader.int32();
1865
+ break;
1866
+ case /* int32 billing */ 4:
1867
+ message.billing = reader.int32();
1868
+ break;
1869
+ default:
1870
+ let u = options.readUnknownField;
1871
+ if (u === "throw")
1872
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1873
+ let d = reader.skip(wireType);
1874
+ if (u !== false)
1875
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1876
+ }
1877
+ }
1878
+ return message;
1879
+ }
1880
+ internalBinaryWrite(message: GetPaymentSummaryV1Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1881
+ /* string storeId = 1; */
1882
+ if (message.storeId !== "")
1883
+ writer.tag(1, WireType.LengthDelimited).string(message.storeId);
1884
+ /* int32 rf = 2; */
1885
+ if (message.rf !== 0)
1886
+ writer.tag(2, WireType.Varint).int32(message.rf);
1887
+ /* int32 credit = 3; */
1888
+ if (message.credit !== 0)
1889
+ writer.tag(3, WireType.Varint).int32(message.credit);
1890
+ /* int32 billing = 4; */
1891
+ if (message.billing !== 0)
1892
+ writer.tag(4, WireType.Varint).int32(message.billing);
1893
+ let u = options.writeUnknownFields;
1894
+ if (u !== false)
1895
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1896
+ return writer;
1897
+ }
1898
+ }
1899
+ /**
1900
+ * @generated MessageType for protobuf message payment.GetPaymentSummaryV1Response
1901
+ */
1902
+ export const GetPaymentSummaryV1Response = new GetPaymentSummaryV1Response$Type();
1903
+ // @generated message type with reflection information, may provide speed optimized methods
1904
+ class PaymentDateSummary$Type extends MessageType<PaymentDateSummary> {
1905
+ constructor() {
1906
+ super("payment.PaymentDateSummary", [
1907
+ { no: 1, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1908
+ { no: 2, name: "date", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1909
+ { no: 3, name: "rf", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
1910
+ { no: 4, name: "credit", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
1911
+ { no: 5, name: "billing", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
1912
+ ]);
1913
+ }
1914
+ create(value?: PartialMessage<PaymentDateSummary>): PaymentDateSummary {
1915
+ const message = globalThis.Object.create((this.messagePrototype!));
1916
+ message.storeId = "";
1917
+ message.date = "";
1918
+ message.rf = 0;
1919
+ message.credit = 0;
1920
+ message.billing = 0;
1921
+ if (value !== undefined)
1922
+ reflectionMergePartial<PaymentDateSummary>(this, message, value);
1923
+ return message;
1924
+ }
1925
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PaymentDateSummary): PaymentDateSummary {
1926
+ let message = target ?? this.create(), end = reader.pos + length;
1927
+ while (reader.pos < end) {
1928
+ let [fieldNo, wireType] = reader.tag();
1929
+ switch (fieldNo) {
1930
+ case /* string storeId */ 1:
1931
+ message.storeId = reader.string();
1932
+ break;
1933
+ case /* string date */ 2:
1934
+ message.date = reader.string();
1935
+ break;
1936
+ case /* int32 rf */ 3:
1937
+ message.rf = reader.int32();
1938
+ break;
1939
+ case /* int32 credit */ 4:
1940
+ message.credit = reader.int32();
1941
+ break;
1942
+ case /* int32 billing */ 5:
1943
+ message.billing = reader.int32();
1944
+ break;
1945
+ default:
1946
+ let u = options.readUnknownField;
1947
+ if (u === "throw")
1948
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1949
+ let d = reader.skip(wireType);
1950
+ if (u !== false)
1951
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1952
+ }
1953
+ }
1954
+ return message;
1955
+ }
1956
+ internalBinaryWrite(message: PaymentDateSummary, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1957
+ /* string storeId = 1; */
1958
+ if (message.storeId !== "")
1959
+ writer.tag(1, WireType.LengthDelimited).string(message.storeId);
1960
+ /* string date = 2; */
1961
+ if (message.date !== "")
1962
+ writer.tag(2, WireType.LengthDelimited).string(message.date);
1963
+ /* int32 rf = 3; */
1964
+ if (message.rf !== 0)
1965
+ writer.tag(3, WireType.Varint).int32(message.rf);
1966
+ /* int32 credit = 4; */
1967
+ if (message.credit !== 0)
1968
+ writer.tag(4, WireType.Varint).int32(message.credit);
1969
+ /* int32 billing = 5; */
1970
+ if (message.billing !== 0)
1971
+ writer.tag(5, WireType.Varint).int32(message.billing);
1972
+ let u = options.writeUnknownFields;
1973
+ if (u !== false)
1974
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1975
+ return writer;
1976
+ }
1977
+ }
1978
+ /**
1979
+ * @generated MessageType for protobuf message payment.PaymentDateSummary
1980
+ */
1981
+ export const PaymentDateSummary = new PaymentDateSummary$Type();
1982
+ // @generated message type with reflection information, may provide speed optimized methods
1983
+ class GetDailyPaymentSummaryV1Response$Type extends MessageType<GetDailyPaymentSummaryV1Response> {
1984
+ constructor() {
1985
+ super("payment.GetDailyPaymentSummaryV1Response", [
1986
+ { no: 1, name: "summaries", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PaymentDateSummary }
1987
+ ]);
1988
+ }
1989
+ create(value?: PartialMessage<GetDailyPaymentSummaryV1Response>): GetDailyPaymentSummaryV1Response {
1990
+ const message = globalThis.Object.create((this.messagePrototype!));
1991
+ message.summaries = [];
1992
+ if (value !== undefined)
1993
+ reflectionMergePartial<GetDailyPaymentSummaryV1Response>(this, message, value);
1994
+ return message;
1995
+ }
1996
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDailyPaymentSummaryV1Response): GetDailyPaymentSummaryV1Response {
1997
+ let message = target ?? this.create(), end = reader.pos + length;
1998
+ while (reader.pos < end) {
1999
+ let [fieldNo, wireType] = reader.tag();
2000
+ switch (fieldNo) {
2001
+ case /* repeated payment.PaymentDateSummary summaries */ 1:
2002
+ message.summaries.push(PaymentDateSummary.internalBinaryRead(reader, reader.uint32(), options));
2003
+ break;
2004
+ default:
2005
+ let u = options.readUnknownField;
2006
+ if (u === "throw")
2007
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2008
+ let d = reader.skip(wireType);
2009
+ if (u !== false)
2010
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2011
+ }
2012
+ }
2013
+ return message;
2014
+ }
2015
+ internalBinaryWrite(message: GetDailyPaymentSummaryV1Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2016
+ /* repeated payment.PaymentDateSummary summaries = 1; */
2017
+ for (let i = 0; i < message.summaries.length; i++)
2018
+ PaymentDateSummary.internalBinaryWrite(message.summaries[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2019
+ let u = options.writeUnknownFields;
2020
+ if (u !== false)
2021
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2022
+ return writer;
2023
+ }
2024
+ }
2025
+ /**
2026
+ * @generated MessageType for protobuf message payment.GetDailyPaymentSummaryV1Response
2027
+ */
2028
+ export const GetDailyPaymentSummaryV1Response = new GetDailyPaymentSummaryV1Response$Type();
1697
2029
  /**
1698
2030
  * @generated ServiceType for protobuf service payment.PaymentService
1699
2031
  */
@@ -1708,5 +2040,7 @@ export const PaymentService = new ServiceType("payment.PaymentService", [
1708
2040
  { name: "GetRevenueSubscription", options: {}, I: GetRevenueSubscriptionRequest, O: GetRevenueSubscriptionResponse },
1709
2041
  { name: "GetDailyRevenueSubscription", options: {}, I: GetRevenueSubscriptionRequest, O: GetDailySubscriptionRevenueResponse },
1710
2042
  { name: "ConfirmPayment", options: {}, I: ConfirmPaymentRequest, O: ConfirmPaymentResponse },
1711
- { name: "GetPayment", options: {}, I: GetPaymentV1Request, O: GetPaymentV1Response }
2043
+ { name: "GetPayment", options: {}, I: GetPaymentV1Request, O: GetPaymentV1Response },
2044
+ { name: "GetPaymentSummary", options: {}, I: GetPaymentSummaryV1Request, O: GetPaymentSummaryV1Response },
2045
+ { name: "GetDailyPaymentSummary", options: {}, I: GetPaymentSummaryV1Request, O: GetDailyPaymentSummaryV1Response }
1712
2046
  ]);