@platfformx/proto-contracts 1.5.5 → 1.5.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.
@@ -1,38 +1,28 @@
1
1
  import { Observable } from "rxjs";
2
2
  export declare const protobufPackage = "refund.v1";
3
3
  export interface CreateRefundRequest {
4
- paymentId: string;
4
+ providerId: string;
5
5
  amount: number;
6
6
  currency?: string | undefined;
7
7
  }
8
8
  export interface CreateRefundResponse {
9
9
  ok: boolean;
10
- providerId: string;
10
+ refundProviderId: string;
11
11
  }
12
12
  export interface ConfirmRefundRequest {
13
- providerId: string;
13
+ refundProviderId: string;
14
14
  status: string;
15
15
  }
16
16
  export interface ConfirmRefundResponse {
17
17
  success: boolean;
18
18
  }
19
- export interface CreateRefundWebhookRequest {
20
- paymentProviderId: string;
21
- amount: number;
22
- currency?: string | undefined;
23
- }
24
- export interface CreateRefundWebhookResponse {
25
- ok: boolean;
26
- }
27
19
  export declare const REFUND_V1_PACKAGE_NAME = "refund.v1";
28
20
  export interface RefundServiceClient {
29
21
  createRefund(request: CreateRefundRequest): Observable<CreateRefundResponse>;
30
- createRefundWebhook(request: CreateRefundWebhookRequest): Observable<CreateRefundWebhookResponse>;
31
22
  confirmRefund(request: ConfirmRefundRequest): Observable<ConfirmRefundResponse>;
32
23
  }
33
24
  export interface RefundServiceController {
34
25
  createRefund(request: CreateRefundRequest): Promise<CreateRefundResponse> | Observable<CreateRefundResponse> | CreateRefundResponse;
35
- createRefundWebhook(request: CreateRefundWebhookRequest): Promise<CreateRefundWebhookResponse> | Observable<CreateRefundWebhookResponse> | CreateRefundWebhookResponse;
36
26
  confirmRefund(request: ConfirmRefundRequest): Promise<ConfirmRefundResponse> | Observable<ConfirmRefundResponse> | ConfirmRefundResponse;
37
27
  }
38
28
  export declare function RefundServiceControllerMethods(): (constructor: Function) => void;
@@ -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", "createRefundWebhook", "confirmRefund"];
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platfformx/proto-contracts",
3
- "version": "1.5.5",
3
+ "version": "1.5.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -4,34 +4,24 @@ package refund.v1;
4
4
 
5
5
  service RefundService {
6
6
  rpc CreateRefund (CreateRefundRequest) returns (CreateRefundResponse);
7
- rpc CreateRefundWebhook (CreateRefundWebhookRequest) returns (CreateRefundWebhookResponse);
8
7
  rpc ConfirmRefund (ConfirmRefundRequest) returns (ConfirmRefundResponse);
9
8
  }
10
9
 
11
10
  message CreateRefundRequest {
12
- string paymentId = 1;
11
+ string providerId = 1;
13
12
  int64 amount = 32;
14
13
  optional string currency = 4;
15
14
  }
16
15
 
17
16
  message CreateRefundResponse {
18
17
  bool ok = 1;
19
- string providerId = 2;
18
+ string refundProviderId = 2;
20
19
  }
21
20
  message ConfirmRefundRequest {
22
- string providerId = 1;
21
+ string refundProviderId = 1;
23
22
  string status = 2;
24
23
  }
25
24
 
26
25
  message ConfirmRefundResponse {
27
26
  bool success = 1;
28
27
  }
29
-
30
- message CreateRefundWebhookRequest {
31
- string paymentProviderId = 1;
32
- int64 amount = 2;
33
- optional string currency = 3;
34
- }
35
- message CreateRefundWebhookResponse {
36
- bool ok = 1;
37
- }