wash-service-sdk 1.0.4 → 1.0.6
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 -0
- package/dist/generated/payment.grpc-client.d.ts +12 -0
- package/dist/generated/payment.grpc-client.js +7 -0
- package/dist/generated/payment.js +137 -2
- package/package.json +2 -2
- package/proto/payment.proto +16 -0
- package/src/clients/payment.client.ts +20 -0
- package/src/generated/payment.grpc-client.ts +15 -0
- package/src/generated/payment.ts +174 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as grpc from '@grpc/grpc-js';
|
|
2
|
-
import { AddServiceRequest, AddServiceResponse, CancelRequest, ConfirmPaymentRequest, ConfirmPaymentResponse, GetDailySubscriptionRevenueResponse, GetPaymentFailuresRequest, GetPaymentFailuresResponse, GetPaymentSummaryV1Request, GetPaymentSummaryV1Response, 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;
|
|
@@ -16,4 +16,5 @@ export declare class PaymentClientWrapper {
|
|
|
16
16
|
getDailyRevenueSubscription(request: GetRevenueSubscriptionRequest): Promise<GetDailySubscriptionRevenueResponse>;
|
|
17
17
|
getPayment(request: GetPaymentV1Request): Promise<GetPaymentV1Response>;
|
|
18
18
|
getPaymentRevenueSummary(request: GetPaymentSummaryV1Request): Promise<GetPaymentSummaryV1Response>;
|
|
19
|
+
getDailyPaymentSummary(request: GetPaymentSummaryV1Request): Promise<GetDailyPaymentSummaryV1Response>;
|
|
19
20
|
}
|
|
@@ -151,5 +151,15 @@ class PaymentClientWrapper {
|
|
|
151
151
|
});
|
|
152
152
|
});
|
|
153
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
|
+
}
|
|
154
164
|
}
|
|
155
165
|
exports.PaymentClientWrapper = PaymentClientWrapper;
|
|
@@ -432,6 +432,44 @@ export interface GetPaymentSummaryV1Response {
|
|
|
432
432
|
*/
|
|
433
433
|
billing: number;
|
|
434
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
|
+
* @generated from protobuf field: int32 subscription = 6
|
|
461
|
+
*/
|
|
462
|
+
subscription: number;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* @generated from protobuf message payment.GetDailyPaymentSummaryV1Response
|
|
466
|
+
*/
|
|
467
|
+
export interface GetDailyPaymentSummaryV1Response {
|
|
468
|
+
/**
|
|
469
|
+
* @generated from protobuf field: repeated payment.PaymentDateSummary summaries = 1
|
|
470
|
+
*/
|
|
471
|
+
summaries: PaymentDateSummary[];
|
|
472
|
+
}
|
|
435
473
|
declare class AddServiceRequest$Type extends MessageType<AddServiceRequest> {
|
|
436
474
|
constructor();
|
|
437
475
|
create(value?: PartialMessage<AddServiceRequest>): AddServiceRequest;
|
|
@@ -642,6 +680,26 @@ declare class GetPaymentSummaryV1Response$Type extends MessageType<GetPaymentSum
|
|
|
642
680
|
* @generated MessageType for protobuf message payment.GetPaymentSummaryV1Response
|
|
643
681
|
*/
|
|
644
682
|
export declare const GetPaymentSummaryV1Response: GetPaymentSummaryV1Response$Type;
|
|
683
|
+
declare class PaymentDateSummary$Type extends MessageType<PaymentDateSummary> {
|
|
684
|
+
constructor();
|
|
685
|
+
create(value?: PartialMessage<PaymentDateSummary>): PaymentDateSummary;
|
|
686
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PaymentDateSummary): PaymentDateSummary;
|
|
687
|
+
internalBinaryWrite(message: PaymentDateSummary, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* @generated MessageType for protobuf message payment.PaymentDateSummary
|
|
691
|
+
*/
|
|
692
|
+
export declare const PaymentDateSummary: PaymentDateSummary$Type;
|
|
693
|
+
declare class GetDailyPaymentSummaryV1Response$Type extends MessageType<GetDailyPaymentSummaryV1Response> {
|
|
694
|
+
constructor();
|
|
695
|
+
create(value?: PartialMessage<GetDailyPaymentSummaryV1Response>): GetDailyPaymentSummaryV1Response;
|
|
696
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDailyPaymentSummaryV1Response): GetDailyPaymentSummaryV1Response;
|
|
697
|
+
internalBinaryWrite(message: GetDailyPaymentSummaryV1Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* @generated MessageType for protobuf message payment.GetDailyPaymentSummaryV1Response
|
|
701
|
+
*/
|
|
702
|
+
export declare const GetDailyPaymentSummaryV1Response: GetDailyPaymentSummaryV1Response$Type;
|
|
645
703
|
/**
|
|
646
704
|
* @generated ServiceType for protobuf service payment.PaymentService
|
|
647
705
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
2
2
|
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
3
|
+
import type { GetDailyPaymentSummaryV1Response } from "./payment";
|
|
3
4
|
import type { GetPaymentSummaryV1Response } from "./payment";
|
|
4
5
|
import type { GetPaymentSummaryV1Request } from "./payment";
|
|
5
6
|
import type { GetPaymentV1Response } from "./payment";
|
|
@@ -110,6 +111,13 @@ export interface IPaymentServiceClient {
|
|
|
110
111
|
getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
111
112
|
getPaymentSummary(input: GetPaymentSummaryV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
112
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;
|
|
113
121
|
}
|
|
114
122
|
/**
|
|
115
123
|
* 결제 서비스 정의
|
|
@@ -167,4 +175,8 @@ export declare class PaymentServiceClient extends grpc.Client implements IPaymen
|
|
|
167
175
|
* @generated from protobuf rpc: GetPaymentSummary
|
|
168
176
|
*/
|
|
169
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;
|
|
170
182
|
}
|
|
@@ -119,5 +119,12 @@ class PaymentServiceClient extends grpc.Client {
|
|
|
119
119
|
const method = payment_1.PaymentService.methods[11];
|
|
120
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
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
|
+
}
|
|
122
129
|
}
|
|
123
130
|
exports.PaymentServiceClient = PaymentServiceClient;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
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
|
|
@@ -1437,6 +1437,140 @@ class GetPaymentSummaryV1Response$Type extends runtime_4.MessageType {
|
|
|
1437
1437
|
* @generated MessageType for protobuf message payment.GetPaymentSummaryV1Response
|
|
1438
1438
|
*/
|
|
1439
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
|
+
{ no: 6, name: "subscription", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
1450
|
+
]);
|
|
1451
|
+
}
|
|
1452
|
+
create(value) {
|
|
1453
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
1454
|
+
message.storeId = "";
|
|
1455
|
+
message.date = "";
|
|
1456
|
+
message.rf = 0;
|
|
1457
|
+
message.credit = 0;
|
|
1458
|
+
message.billing = 0;
|
|
1459
|
+
message.subscription = 0;
|
|
1460
|
+
if (value !== undefined)
|
|
1461
|
+
runtime_3.reflectionMergePartial(this, message, value);
|
|
1462
|
+
return message;
|
|
1463
|
+
}
|
|
1464
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1465
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1466
|
+
while (reader.pos < end) {
|
|
1467
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1468
|
+
switch (fieldNo) {
|
|
1469
|
+
case /* string storeId */ 1:
|
|
1470
|
+
message.storeId = reader.string();
|
|
1471
|
+
break;
|
|
1472
|
+
case /* string date */ 2:
|
|
1473
|
+
message.date = reader.string();
|
|
1474
|
+
break;
|
|
1475
|
+
case /* int32 rf */ 3:
|
|
1476
|
+
message.rf = reader.int32();
|
|
1477
|
+
break;
|
|
1478
|
+
case /* int32 credit */ 4:
|
|
1479
|
+
message.credit = reader.int32();
|
|
1480
|
+
break;
|
|
1481
|
+
case /* int32 billing */ 5:
|
|
1482
|
+
message.billing = reader.int32();
|
|
1483
|
+
break;
|
|
1484
|
+
case /* int32 subscription */ 6:
|
|
1485
|
+
message.subscription = reader.int32();
|
|
1486
|
+
break;
|
|
1487
|
+
default:
|
|
1488
|
+
let u = options.readUnknownField;
|
|
1489
|
+
if (u === "throw")
|
|
1490
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1491
|
+
let d = reader.skip(wireType);
|
|
1492
|
+
if (u !== false)
|
|
1493
|
+
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
return message;
|
|
1497
|
+
}
|
|
1498
|
+
internalBinaryWrite(message, writer, options) {
|
|
1499
|
+
/* string storeId = 1; */
|
|
1500
|
+
if (message.storeId !== "")
|
|
1501
|
+
writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.storeId);
|
|
1502
|
+
/* string date = 2; */
|
|
1503
|
+
if (message.date !== "")
|
|
1504
|
+
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.date);
|
|
1505
|
+
/* int32 rf = 3; */
|
|
1506
|
+
if (message.rf !== 0)
|
|
1507
|
+
writer.tag(3, runtime_1.WireType.Varint).int32(message.rf);
|
|
1508
|
+
/* int32 credit = 4; */
|
|
1509
|
+
if (message.credit !== 0)
|
|
1510
|
+
writer.tag(4, runtime_1.WireType.Varint).int32(message.credit);
|
|
1511
|
+
/* int32 billing = 5; */
|
|
1512
|
+
if (message.billing !== 0)
|
|
1513
|
+
writer.tag(5, runtime_1.WireType.Varint).int32(message.billing);
|
|
1514
|
+
/* int32 subscription = 6; */
|
|
1515
|
+
if (message.subscription !== 0)
|
|
1516
|
+
writer.tag(6, runtime_1.WireType.Varint).int32(message.subscription);
|
|
1517
|
+
let u = options.writeUnknownFields;
|
|
1518
|
+
if (u !== false)
|
|
1519
|
+
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1520
|
+
return writer;
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* @generated MessageType for protobuf message payment.PaymentDateSummary
|
|
1525
|
+
*/
|
|
1526
|
+
exports.PaymentDateSummary = new PaymentDateSummary$Type();
|
|
1527
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1528
|
+
class GetDailyPaymentSummaryV1Response$Type extends runtime_4.MessageType {
|
|
1529
|
+
constructor() {
|
|
1530
|
+
super("payment.GetDailyPaymentSummaryV1Response", [
|
|
1531
|
+
{ no: 1, name: "summaries", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.PaymentDateSummary }
|
|
1532
|
+
]);
|
|
1533
|
+
}
|
|
1534
|
+
create(value) {
|
|
1535
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
1536
|
+
message.summaries = [];
|
|
1537
|
+
if (value !== undefined)
|
|
1538
|
+
runtime_3.reflectionMergePartial(this, message, value);
|
|
1539
|
+
return message;
|
|
1540
|
+
}
|
|
1541
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1542
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1543
|
+
while (reader.pos < end) {
|
|
1544
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1545
|
+
switch (fieldNo) {
|
|
1546
|
+
case /* repeated payment.PaymentDateSummary summaries */ 1:
|
|
1547
|
+
message.summaries.push(exports.PaymentDateSummary.internalBinaryRead(reader, reader.uint32(), options));
|
|
1548
|
+
break;
|
|
1549
|
+
default:
|
|
1550
|
+
let u = options.readUnknownField;
|
|
1551
|
+
if (u === "throw")
|
|
1552
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1553
|
+
let d = reader.skip(wireType);
|
|
1554
|
+
if (u !== false)
|
|
1555
|
+
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
return message;
|
|
1559
|
+
}
|
|
1560
|
+
internalBinaryWrite(message, writer, options) {
|
|
1561
|
+
/* repeated payment.PaymentDateSummary summaries = 1; */
|
|
1562
|
+
for (let i = 0; i < message.summaries.length; i++)
|
|
1563
|
+
exports.PaymentDateSummary.internalBinaryWrite(message.summaries[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join();
|
|
1564
|
+
let u = options.writeUnknownFields;
|
|
1565
|
+
if (u !== false)
|
|
1566
|
+
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1567
|
+
return writer;
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* @generated MessageType for protobuf message payment.GetDailyPaymentSummaryV1Response
|
|
1572
|
+
*/
|
|
1573
|
+
exports.GetDailyPaymentSummaryV1Response = new GetDailyPaymentSummaryV1Response$Type();
|
|
1440
1574
|
/**
|
|
1441
1575
|
* @generated ServiceType for protobuf service payment.PaymentService
|
|
1442
1576
|
*/
|
|
@@ -1452,5 +1586,6 @@ exports.PaymentService = new runtime_rpc_1.ServiceType("payment.PaymentService",
|
|
|
1452
1586
|
{ name: "GetDailyRevenueSubscription", options: {}, I: exports.GetRevenueSubscriptionRequest, O: exports.GetDailySubscriptionRevenueResponse },
|
|
1453
1587
|
{ name: "ConfirmPayment", options: {}, I: exports.ConfirmPaymentRequest, O: exports.ConfirmPaymentResponse },
|
|
1454
1588
|
{ name: "GetPayment", options: {}, I: exports.GetPaymentV1Request, O: exports.GetPaymentV1Response },
|
|
1455
|
-
{ name: "GetPaymentSummary", options: {}, I: exports.GetPaymentSummaryV1Request, O: exports.GetPaymentSummaryV1Response }
|
|
1589
|
+
{ name: "GetPaymentSummary", options: {}, I: exports.GetPaymentSummaryV1Request, O: exports.GetPaymentSummaryV1Response },
|
|
1590
|
+
{ name: "GetDailyPaymentSummary", options: {}, I: exports.GetPaymentSummaryV1Request, O: exports.GetDailyPaymentSummaryV1Response }
|
|
1456
1591
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wash-service-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
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.
|
|
22
|
+
"wash-service-sdk": "^1.0.5"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@protobuf-ts/plugin": "^2.11.1"
|
package/proto/payment.proto
CHANGED
|
@@ -149,6 +149,21 @@ message GetPaymentSummaryV1Response {
|
|
|
149
149
|
int32 billing = 4;
|
|
150
150
|
}
|
|
151
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
|
+
int32 subscription = 6;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
message GetDailyPaymentSummaryV1Response {
|
|
163
|
+
repeated PaymentDateSummary summaries = 1;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
|
|
152
167
|
// 결제 서비스 정의
|
|
153
168
|
service PaymentService {
|
|
154
169
|
rpc AddService(AddServiceRequest) returns (AddServiceResponse);
|
|
@@ -163,4 +178,5 @@ service PaymentService {
|
|
|
163
178
|
rpc ConfirmPayment(ConfirmPaymentRequest) returns (ConfirmPaymentResponse);
|
|
164
179
|
rpc GetPayment(GetPaymentV1Request) returns (GetPaymentV1Response);
|
|
165
180
|
rpc GetPaymentSummary(GetPaymentSummaryV1Request) returns (GetPaymentSummaryV1Response);
|
|
181
|
+
rpc GetDailyPaymentSummary(GetPaymentSummaryV1Request) returns (GetDailyPaymentSummaryV1Response);
|
|
166
182
|
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
CancelRequest,
|
|
7
7
|
ConfirmPaymentRequest,
|
|
8
8
|
ConfirmPaymentResponse,
|
|
9
|
+
type GetDailyPaymentSummaryV1Response,
|
|
9
10
|
GetDailySubscriptionRevenueResponse,
|
|
10
11
|
GetPaymentFailuresRequest,
|
|
11
12
|
GetPaymentFailuresResponse,
|
|
@@ -249,4 +250,23 @@ export class PaymentClientWrapper {
|
|
|
249
250
|
);
|
|
250
251
|
});
|
|
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
|
+
}
|
|
252
272
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
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";
|
|
7
8
|
import type { GetPaymentSummaryV1Response } from "./payment";
|
|
8
9
|
import type { GetPaymentSummaryV1Request } from "./payment";
|
|
9
10
|
import type { GetPaymentV1Response } from "./payment";
|
|
@@ -114,6 +115,13 @@ export interface IPaymentServiceClient {
|
|
|
114
115
|
getPaymentSummary(input: GetPaymentSummaryV1Request, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
115
116
|
getPaymentSummary(input: GetPaymentSummaryV1Request, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetPaymentSummaryV1Response) => void): grpc.ClientUnaryCall;
|
|
116
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;
|
|
117
125
|
}
|
|
118
126
|
/**
|
|
119
127
|
* 결제 서비스 정의
|
|
@@ -210,4 +218,11 @@ export class PaymentServiceClient extends grpc.Client implements IPaymentService
|
|
|
210
218
|
const method = PaymentService.methods[11];
|
|
211
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));
|
|
212
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
|
+
}
|
|
213
228
|
}
|
package/src/generated/payment.ts
CHANGED
|
@@ -438,6 +438,44 @@ export interface GetPaymentSummaryV1Response {
|
|
|
438
438
|
*/
|
|
439
439
|
billing: number;
|
|
440
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
|
+
* @generated from protobuf field: int32 subscription = 6
|
|
467
|
+
*/
|
|
468
|
+
subscription: number;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* @generated from protobuf message payment.GetDailyPaymentSummaryV1Response
|
|
472
|
+
*/
|
|
473
|
+
export interface GetDailyPaymentSummaryV1Response {
|
|
474
|
+
/**
|
|
475
|
+
* @generated from protobuf field: repeated payment.PaymentDateSummary summaries = 1
|
|
476
|
+
*/
|
|
477
|
+
summaries: PaymentDateSummary[];
|
|
478
|
+
}
|
|
441
479
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
442
480
|
class AddServiceRequest$Type extends MessageType<AddServiceRequest> {
|
|
443
481
|
constructor() {
|
|
@@ -1866,6 +1904,140 @@ class GetPaymentSummaryV1Response$Type extends MessageType<GetPaymentSummaryV1Re
|
|
|
1866
1904
|
* @generated MessageType for protobuf message payment.GetPaymentSummaryV1Response
|
|
1867
1905
|
*/
|
|
1868
1906
|
export const GetPaymentSummaryV1Response = new GetPaymentSummaryV1Response$Type();
|
|
1907
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1908
|
+
class PaymentDateSummary$Type extends MessageType<PaymentDateSummary> {
|
|
1909
|
+
constructor() {
|
|
1910
|
+
super("payment.PaymentDateSummary", [
|
|
1911
|
+
{ no: 1, name: "storeId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1912
|
+
{ no: 2, name: "date", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1913
|
+
{ no: 3, name: "rf", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1914
|
+
{ no: 4, name: "credit", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1915
|
+
{ no: 5, name: "billing", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1916
|
+
{ no: 6, name: "subscription", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
1917
|
+
]);
|
|
1918
|
+
}
|
|
1919
|
+
create(value?: PartialMessage<PaymentDateSummary>): PaymentDateSummary {
|
|
1920
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1921
|
+
message.storeId = "";
|
|
1922
|
+
message.date = "";
|
|
1923
|
+
message.rf = 0;
|
|
1924
|
+
message.credit = 0;
|
|
1925
|
+
message.billing = 0;
|
|
1926
|
+
message.subscription = 0;
|
|
1927
|
+
if (value !== undefined)
|
|
1928
|
+
reflectionMergePartial<PaymentDateSummary>(this, message, value);
|
|
1929
|
+
return message;
|
|
1930
|
+
}
|
|
1931
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PaymentDateSummary): PaymentDateSummary {
|
|
1932
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1933
|
+
while (reader.pos < end) {
|
|
1934
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1935
|
+
switch (fieldNo) {
|
|
1936
|
+
case /* string storeId */ 1:
|
|
1937
|
+
message.storeId = reader.string();
|
|
1938
|
+
break;
|
|
1939
|
+
case /* string date */ 2:
|
|
1940
|
+
message.date = reader.string();
|
|
1941
|
+
break;
|
|
1942
|
+
case /* int32 rf */ 3:
|
|
1943
|
+
message.rf = reader.int32();
|
|
1944
|
+
break;
|
|
1945
|
+
case /* int32 credit */ 4:
|
|
1946
|
+
message.credit = reader.int32();
|
|
1947
|
+
break;
|
|
1948
|
+
case /* int32 billing */ 5:
|
|
1949
|
+
message.billing = reader.int32();
|
|
1950
|
+
break;
|
|
1951
|
+
case /* int32 subscription */ 6:
|
|
1952
|
+
message.subscription = reader.int32();
|
|
1953
|
+
break;
|
|
1954
|
+
default:
|
|
1955
|
+
let u = options.readUnknownField;
|
|
1956
|
+
if (u === "throw")
|
|
1957
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1958
|
+
let d = reader.skip(wireType);
|
|
1959
|
+
if (u !== false)
|
|
1960
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
return message;
|
|
1964
|
+
}
|
|
1965
|
+
internalBinaryWrite(message: PaymentDateSummary, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1966
|
+
/* string storeId = 1; */
|
|
1967
|
+
if (message.storeId !== "")
|
|
1968
|
+
writer.tag(1, WireType.LengthDelimited).string(message.storeId);
|
|
1969
|
+
/* string date = 2; */
|
|
1970
|
+
if (message.date !== "")
|
|
1971
|
+
writer.tag(2, WireType.LengthDelimited).string(message.date);
|
|
1972
|
+
/* int32 rf = 3; */
|
|
1973
|
+
if (message.rf !== 0)
|
|
1974
|
+
writer.tag(3, WireType.Varint).int32(message.rf);
|
|
1975
|
+
/* int32 credit = 4; */
|
|
1976
|
+
if (message.credit !== 0)
|
|
1977
|
+
writer.tag(4, WireType.Varint).int32(message.credit);
|
|
1978
|
+
/* int32 billing = 5; */
|
|
1979
|
+
if (message.billing !== 0)
|
|
1980
|
+
writer.tag(5, WireType.Varint).int32(message.billing);
|
|
1981
|
+
/* int32 subscription = 6; */
|
|
1982
|
+
if (message.subscription !== 0)
|
|
1983
|
+
writer.tag(6, WireType.Varint).int32(message.subscription);
|
|
1984
|
+
let u = options.writeUnknownFields;
|
|
1985
|
+
if (u !== false)
|
|
1986
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1987
|
+
return writer;
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
/**
|
|
1991
|
+
* @generated MessageType for protobuf message payment.PaymentDateSummary
|
|
1992
|
+
*/
|
|
1993
|
+
export const PaymentDateSummary = new PaymentDateSummary$Type();
|
|
1994
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1995
|
+
class GetDailyPaymentSummaryV1Response$Type extends MessageType<GetDailyPaymentSummaryV1Response> {
|
|
1996
|
+
constructor() {
|
|
1997
|
+
super("payment.GetDailyPaymentSummaryV1Response", [
|
|
1998
|
+
{ no: 1, name: "summaries", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PaymentDateSummary }
|
|
1999
|
+
]);
|
|
2000
|
+
}
|
|
2001
|
+
create(value?: PartialMessage<GetDailyPaymentSummaryV1Response>): GetDailyPaymentSummaryV1Response {
|
|
2002
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
2003
|
+
message.summaries = [];
|
|
2004
|
+
if (value !== undefined)
|
|
2005
|
+
reflectionMergePartial<GetDailyPaymentSummaryV1Response>(this, message, value);
|
|
2006
|
+
return message;
|
|
2007
|
+
}
|
|
2008
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDailyPaymentSummaryV1Response): GetDailyPaymentSummaryV1Response {
|
|
2009
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
2010
|
+
while (reader.pos < end) {
|
|
2011
|
+
let [fieldNo, wireType] = reader.tag();
|
|
2012
|
+
switch (fieldNo) {
|
|
2013
|
+
case /* repeated payment.PaymentDateSummary summaries */ 1:
|
|
2014
|
+
message.summaries.push(PaymentDateSummary.internalBinaryRead(reader, reader.uint32(), options));
|
|
2015
|
+
break;
|
|
2016
|
+
default:
|
|
2017
|
+
let u = options.readUnknownField;
|
|
2018
|
+
if (u === "throw")
|
|
2019
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
2020
|
+
let d = reader.skip(wireType);
|
|
2021
|
+
if (u !== false)
|
|
2022
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
return message;
|
|
2026
|
+
}
|
|
2027
|
+
internalBinaryWrite(message: GetDailyPaymentSummaryV1Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2028
|
+
/* repeated payment.PaymentDateSummary summaries = 1; */
|
|
2029
|
+
for (let i = 0; i < message.summaries.length; i++)
|
|
2030
|
+
PaymentDateSummary.internalBinaryWrite(message.summaries[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
2031
|
+
let u = options.writeUnknownFields;
|
|
2032
|
+
if (u !== false)
|
|
2033
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
2034
|
+
return writer;
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
/**
|
|
2038
|
+
* @generated MessageType for protobuf message payment.GetDailyPaymentSummaryV1Response
|
|
2039
|
+
*/
|
|
2040
|
+
export const GetDailyPaymentSummaryV1Response = new GetDailyPaymentSummaryV1Response$Type();
|
|
1869
2041
|
/**
|
|
1870
2042
|
* @generated ServiceType for protobuf service payment.PaymentService
|
|
1871
2043
|
*/
|
|
@@ -1881,5 +2053,6 @@ export const PaymentService = new ServiceType("payment.PaymentService", [
|
|
|
1881
2053
|
{ name: "GetDailyRevenueSubscription", options: {}, I: GetRevenueSubscriptionRequest, O: GetDailySubscriptionRevenueResponse },
|
|
1882
2054
|
{ name: "ConfirmPayment", options: {}, I: ConfirmPaymentRequest, O: ConfirmPaymentResponse },
|
|
1883
2055
|
{ name: "GetPayment", options: {}, I: GetPaymentV1Request, O: GetPaymentV1Response },
|
|
1884
|
-
{ name: "GetPaymentSummary", options: {}, I: GetPaymentSummaryV1Request, O: GetPaymentSummaryV1Response }
|
|
2056
|
+
{ name: "GetPaymentSummary", options: {}, I: GetPaymentSummaryV1Request, O: GetPaymentSummaryV1Response },
|
|
2057
|
+
{ name: "GetDailyPaymentSummary", options: {}, I: GetPaymentSummaryV1Request, O: GetDailyPaymentSummaryV1Response }
|
|
1885
2058
|
]);
|