@platfformx/proto-contracts 1.3.14 → 1.4.0

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.
@@ -12,6 +12,13 @@ export interface CreatePaymentResponse {
12
12
  paymentId: string;
13
13
  clientSecret: string;
14
14
  }
15
+ export interface ConfirmPaymentRequest {
16
+ paymentId: string;
17
+ status: string;
18
+ }
19
+ export interface ConfirmPaymentResponse {
20
+ success: boolean;
21
+ }
15
22
  export interface CreatePaymentMethodRequest {
16
23
  userId: string;
17
24
  }
@@ -27,26 +34,28 @@ export interface GetUserPaymentMethodsResponse {
27
34
  }
28
35
  export interface PaymentInfo {
29
36
  id: string;
30
- bank: string;
31
37
  brand: string;
32
- first6: string;
33
38
  last4: string;
39
+ expMonth: number;
40
+ expYear: number;
34
41
  }
35
42
  export interface DeletePaymentMethodRequest {
36
43
  paymentMethodId: string;
37
44
  }
38
45
  export interface DeletePaymentMethodResponse {
39
- ok: boolean;
46
+ success: boolean;
40
47
  }
41
48
  export declare const PAYMENT_V1_PACKAGE_NAME = "payment.v1";
42
49
  export interface PaymentServiceClient {
43
50
  createPayment(request: CreatePaymentRequest): Observable<CreatePaymentResponse>;
51
+ confirmPayment(request: ConfirmPaymentRequest): Observable<ConfirmPaymentResponse>;
44
52
  createPaymentMethod(request: CreatePaymentMethodRequest): Observable<CreatePaymentMethodResponse>;
45
53
  getUserPaymentMethods(request: GetUserPaymentMethodsRequest): Observable<GetUserPaymentMethodsResponse>;
46
54
  deletePaymentMethod(request: DeletePaymentMethodRequest): Observable<DeletePaymentMethodResponse>;
47
55
  }
48
56
  export interface PaymentServiceController {
49
57
  createPayment(request: CreatePaymentRequest): Promise<CreatePaymentResponse> | Observable<CreatePaymentResponse> | CreatePaymentResponse;
58
+ confirmPayment(request: ConfirmPaymentRequest): Promise<ConfirmPaymentResponse> | Observable<ConfirmPaymentResponse> | ConfirmPaymentResponse;
50
59
  createPaymentMethod(request: CreatePaymentMethodRequest): Promise<CreatePaymentMethodResponse> | Observable<CreatePaymentMethodResponse> | CreatePaymentMethodResponse;
51
60
  getUserPaymentMethods(request: GetUserPaymentMethodsRequest): Promise<GetUserPaymentMethodsResponse> | Observable<GetUserPaymentMethodsResponse> | GetUserPaymentMethodsResponse;
52
61
  deletePaymentMethod(request: DeletePaymentMethodRequest): Promise<DeletePaymentMethodResponse> | Observable<DeletePaymentMethodResponse> | DeletePaymentMethodResponse;
@@ -15,6 +15,7 @@ function PaymentServiceControllerMethods() {
15
15
  return function (constructor) {
16
16
  const grpcMethods = [
17
17
  "createPayment",
18
+ "confirmPayment",
18
19
  "createPaymentMethod",
19
20
  "getUserPaymentMethods",
20
21
  "deletePaymentMethod",
@@ -3,6 +3,7 @@ export declare const protobufPackage = "refund.v1";
3
3
  export interface CreateRefundRequest {
4
4
  paymentId: string;
5
5
  amount: number;
6
+ currency: string;
6
7
  }
7
8
  export interface CreateRefundResponse {
8
9
  ok: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platfformx/proto-contracts",
3
- "version": "1.3.14",
3
+ "version": "1.4.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -4,6 +4,7 @@ package payment.v1;
4
4
 
5
5
  service PaymentService {
6
6
  rpc CreatePayment (CreatePaymentRequest) returns (CreatePaymentResponse);
7
+ rpc ConfirmPayment (ConfirmPaymentRequest) returns (ConfirmPaymentResponse);
7
8
 
8
9
  rpc CreatePaymentMethod (CreatePaymentMethodRequest) returns (CreatePaymentMethodResponse);
9
10
  rpc GetUserPaymentMethods (GetUserPaymentMethodsRequest) returns (GetUserPaymentMethodsResponse);
@@ -14,7 +15,7 @@ service PaymentService {
14
15
  message CreatePaymentRequest {
15
16
  string user_id = 1;
16
17
  string currency = 2;
17
- double amount = 3;
18
+ int64 amount = 3;
18
19
  string order_id = 4;
19
20
  optional string payment_method_id = 5;
20
21
  optional bool save_payment_method = 6;
@@ -25,6 +26,13 @@ message CreatePaymentResponse {
25
26
  string client_secret = 2;
26
27
  }
27
28
 
29
+ message ConfirmPaymentRequest {
30
+ string payment_id = 1;
31
+ string status = 2;
32
+ }
33
+ message ConfirmPaymentResponse {
34
+ bool success = 1;
35
+ }
28
36
 
29
37
  message CreatePaymentMethodRequest {
30
38
  string user_id = 1;
@@ -44,16 +52,15 @@ message GetUserPaymentMethodsResponse {
44
52
 
45
53
  message PaymentInfo {
46
54
  string id = 1;
47
- string bank = 2;
48
- string brand = 3;
49
- string first6 = 4;
50
- string last4 = 5;
51
-
55
+ string brand = 2;
56
+ string last4 = 3;
57
+ int32 exp_month = 4;
58
+ int32 exp_year = 5;
52
59
  }
53
60
 
54
61
  message DeletePaymentMethodRequest {
55
62
  string payment_method_id = 1;
56
63
  }
57
64
  message DeletePaymentMethodResponse {
58
- bool ok = 1;
65
+ bool success = 1;
59
66
  }
@@ -9,7 +9,8 @@ service RefundService {
9
9
 
10
10
  message CreateRefundRequest {
11
11
  string payment_id = 1;
12
- double amount = 2;
12
+ int64 amount = 2;
13
+ string currency = 3;
13
14
  }
14
15
  message CreateRefundResponse {
15
16
  bool ok = 1;