@platfformx/proto-contracts 1.4.4 → 1.4.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.
|
@@ -3,17 +3,26 @@ export declare const protobufPackage = "refund.v1";
|
|
|
3
3
|
export interface CreateRefundRequest {
|
|
4
4
|
paymentId: string;
|
|
5
5
|
amount: number;
|
|
6
|
-
currency
|
|
6
|
+
currency?: string | undefined;
|
|
7
7
|
}
|
|
8
8
|
export interface CreateRefundResponse {
|
|
9
9
|
ok: boolean;
|
|
10
10
|
}
|
|
11
|
+
export interface ConfirmRefundRequest {
|
|
12
|
+
providerId: string;
|
|
13
|
+
status: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ConfirmRefundResponse {
|
|
16
|
+
success: boolean;
|
|
17
|
+
}
|
|
11
18
|
export declare const REFUND_V1_PACKAGE_NAME = "refund.v1";
|
|
12
19
|
export interface RefundServiceClient {
|
|
13
20
|
createRefund(request: CreateRefundRequest): Observable<CreateRefundResponse>;
|
|
21
|
+
confirmRefund(request: ConfirmRefundRequest): Observable<ConfirmRefundResponse>;
|
|
14
22
|
}
|
|
15
23
|
export interface RefundServiceController {
|
|
16
24
|
createRefund(request: CreateRefundRequest): Promise<CreateRefundResponse> | Observable<CreateRefundResponse> | CreateRefundResponse;
|
|
25
|
+
confirmRefund(request: ConfirmRefundRequest): Promise<ConfirmRefundResponse> | Observable<ConfirmRefundResponse> | ConfirmRefundResponse;
|
|
17
26
|
}
|
|
18
27
|
export declare function RefundServiceControllerMethods(): (constructor: Function) => void;
|
|
19
28
|
export declare const REFUND_SERVICE_NAME = "RefundService";
|
|
@@ -13,7 +13,7 @@ exports.protobufPackage = "refund.v1";
|
|
|
13
13
|
exports.REFUND_V1_PACKAGE_NAME = "refund.v1";
|
|
14
14
|
function RefundServiceControllerMethods() {
|
|
15
15
|
return function (constructor) {
|
|
16
|
-
const grpcMethods = ["createRefund"];
|
|
16
|
+
const grpcMethods = ["createRefund", "confirmRefund"];
|
|
17
17
|
for (const method of grpcMethods) {
|
|
18
18
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
19
|
(0, microservices_1.GrpcMethod)("RefundService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
|
@@ -4,14 +4,23 @@ package refund.v1;
|
|
|
4
4
|
|
|
5
5
|
service RefundService {
|
|
6
6
|
rpc CreateRefund (CreateRefundRequest) returns (CreateRefundResponse);
|
|
7
|
+
rpc ConfirmRefund (ConfirmRefundRequest) returns (ConfirmRefundResponse);
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
|
|
10
10
|
message CreateRefundRequest {
|
|
11
|
-
string
|
|
12
|
-
int64
|
|
13
|
-
string currency
|
|
11
|
+
string payment_id = 1;
|
|
12
|
+
int64 amount = 2;
|
|
13
|
+
optional string currency = 3;
|
|
14
14
|
}
|
|
15
|
+
|
|
15
16
|
message CreateRefundResponse {
|
|
16
17
|
bool ok = 1;
|
|
18
|
+
}
|
|
19
|
+
message ConfirmRefundRequest {
|
|
20
|
+
string providerId = 1;
|
|
21
|
+
string status = 2;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message ConfirmRefundResponse {
|
|
25
|
+
bool success = 1;
|
|
17
26
|
}
|