@stashfin/grpc 1.3.6 → 1.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stashfin/grpc",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -1,11 +1,16 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "eqxpayments.initiateattemptv2";
3
- export interface request {
3
+ export interface InitiateAttemptRequestV2 {
4
+ /** JWT from CreateOrderV2 */
4
5
  checkout_token: string;
6
+ /** paymode selected by user */
5
7
  mode_id: number;
8
+ /** optional idempotency key (UUID) */
6
9
  client_attempt_ref: string;
10
+ /** required when mode is NETBANKING */
11
+ bank_code: string;
7
12
  }
8
- export interface response {
13
+ export interface InitiateAttemptResponseV2 {
9
14
  transaction_id: string;
10
15
  attempt_id: string;
11
16
  attempt_no: number;
@@ -17,25 +22,28 @@ export interface response {
17
22
  vendor_code: string;
18
23
  merchant_name: string;
19
24
  pg_txn_id: string;
25
+ /** redirect/collect flows */
20
26
  redirect_url: string;
27
+ /** UPI intent flows */
21
28
  intent_string: string;
29
+ /** AWAITING_WEBHOOK|REDIRECTED|AUTHORIZED|CAPTURED */
22
30
  state: string;
23
31
  }
24
- export declare const request: {
25
- encode(message: request, writer?: _m0.Writer): _m0.Writer;
26
- decode(input: _m0.Reader | Uint8Array, length?: number): request;
27
- fromJSON(object: any): request;
28
- toJSON(message: request): unknown;
29
- create<I extends Exact<DeepPartial<request>, I>>(base?: I): request;
30
- fromPartial<I extends Exact<DeepPartial<request>, I>>(object: I): request;
32
+ export declare const InitiateAttemptRequestV2: {
33
+ encode(message: InitiateAttemptRequestV2, writer?: _m0.Writer): _m0.Writer;
34
+ decode(input: _m0.Reader | Uint8Array, length?: number): InitiateAttemptRequestV2;
35
+ fromJSON(object: any): InitiateAttemptRequestV2;
36
+ toJSON(message: InitiateAttemptRequestV2): unknown;
37
+ create<I extends Exact<DeepPartial<InitiateAttemptRequestV2>, I>>(base?: I): InitiateAttemptRequestV2;
38
+ fromPartial<I extends Exact<DeepPartial<InitiateAttemptRequestV2>, I>>(object: I): InitiateAttemptRequestV2;
31
39
  };
32
- export declare const response: {
33
- encode(message: response, writer?: _m0.Writer): _m0.Writer;
34
- decode(input: _m0.Reader | Uint8Array, length?: number): response;
35
- fromJSON(object: any): response;
36
- toJSON(message: response): unknown;
37
- create<I extends Exact<DeepPartial<response>, I>>(base?: I): response;
38
- fromPartial<I extends Exact<DeepPartial<response>, I>>(object: I): response;
40
+ export declare const InitiateAttemptResponseV2: {
41
+ encode(message: InitiateAttemptResponseV2, writer?: _m0.Writer): _m0.Writer;
42
+ decode(input: _m0.Reader | Uint8Array, length?: number): InitiateAttemptResponseV2;
43
+ fromJSON(object: any): InitiateAttemptResponseV2;
44
+ toJSON(message: InitiateAttemptResponseV2): unknown;
45
+ create<I extends Exact<DeepPartial<InitiateAttemptResponseV2>, I>>(base?: I): InitiateAttemptResponseV2;
46
+ fromPartial<I extends Exact<DeepPartial<InitiateAttemptResponseV2>, I>>(object: I): InitiateAttemptResponseV2;
39
47
  };
40
48
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
41
49
  export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
@@ -8,15 +8,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
8
8
  return (mod && mod.__esModule) ? mod : { "default": mod };
9
9
  };
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.response = exports.request = exports.protobufPackage = void 0;
11
+ exports.InitiateAttemptResponseV2 = exports.InitiateAttemptRequestV2 = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
13
  const long_1 = __importDefault(require("long"));
14
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
15
15
  exports.protobufPackage = "eqxpayments.initiateattemptv2";
16
- function createBaserequest() {
17
- return { checkout_token: "", mode_id: 0, client_attempt_ref: "" };
16
+ function createBaseInitiateAttemptRequestV2() {
17
+ return { checkout_token: "", mode_id: 0, client_attempt_ref: "", bank_code: "" };
18
18
  }
19
- exports.request = {
19
+ exports.InitiateAttemptRequestV2 = {
20
20
  encode(message, writer = minimal_1.default.Writer.create()) {
21
21
  if (message.checkout_token !== "") {
22
22
  writer.uint32(10).string(message.checkout_token);
@@ -27,12 +27,15 @@ exports.request = {
27
27
  if (message.client_attempt_ref !== "") {
28
28
  writer.uint32(26).string(message.client_attempt_ref);
29
29
  }
30
+ if (message.bank_code !== "") {
31
+ writer.uint32(34).string(message.bank_code);
32
+ }
30
33
  return writer;
31
34
  },
32
35
  decode(input, length) {
33
36
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
34
37
  let end = length === undefined ? reader.len : reader.pos + length;
35
- const message = createBaserequest();
38
+ const message = createBaseInitiateAttemptRequestV2();
36
39
  while (reader.pos < end) {
37
40
  const tag = reader.uint32();
38
41
  switch (tag >>> 3) {
@@ -54,6 +57,12 @@ exports.request = {
54
57
  }
55
58
  message.client_attempt_ref = reader.string();
56
59
  continue;
60
+ case 4:
61
+ if (tag !== 34) {
62
+ break;
63
+ }
64
+ message.bank_code = reader.string();
65
+ continue;
57
66
  }
58
67
  if ((tag & 7) === 4 || tag === 0) {
59
68
  break;
@@ -67,6 +76,7 @@ exports.request = {
67
76
  checkout_token: isSet(object.checkout_token) ? globalThis.String(object.checkout_token) : "",
68
77
  mode_id: isSet(object.mode_id) ? globalThis.Number(object.mode_id) : 0,
69
78
  client_attempt_ref: isSet(object.client_attempt_ref) ? globalThis.String(object.client_attempt_ref) : "",
79
+ bank_code: isSet(object.bank_code) ? globalThis.String(object.bank_code) : "",
70
80
  };
71
81
  },
72
82
  toJSON(message) {
@@ -80,20 +90,24 @@ exports.request = {
80
90
  if (message.client_attempt_ref !== "") {
81
91
  obj.client_attempt_ref = message.client_attempt_ref;
82
92
  }
93
+ if (message.bank_code !== "") {
94
+ obj.bank_code = message.bank_code;
95
+ }
83
96
  return obj;
84
97
  },
85
98
  create(base) {
86
- return exports.request.fromPartial(base ?? {});
99
+ return exports.InitiateAttemptRequestV2.fromPartial(base ?? {});
87
100
  },
88
101
  fromPartial(object) {
89
- const message = createBaserequest();
102
+ const message = createBaseInitiateAttemptRequestV2();
90
103
  message.checkout_token = object.checkout_token ?? "";
91
104
  message.mode_id = object.mode_id ?? 0;
92
105
  message.client_attempt_ref = object.client_attempt_ref ?? "";
106
+ message.bank_code = object.bank_code ?? "";
93
107
  return message;
94
108
  },
95
109
  };
96
- function createBaseresponse() {
110
+ function createBaseInitiateAttemptResponseV2() {
97
111
  return {
98
112
  transaction_id: "",
99
113
  attempt_id: "",
@@ -111,7 +125,7 @@ function createBaseresponse() {
111
125
  state: "",
112
126
  };
113
127
  }
114
- exports.response = {
128
+ exports.InitiateAttemptResponseV2 = {
115
129
  encode(message, writer = minimal_1.default.Writer.create()) {
116
130
  if (message.transaction_id !== "") {
117
131
  writer.uint32(10).string(message.transaction_id);
@@ -160,7 +174,7 @@ exports.response = {
160
174
  decode(input, length) {
161
175
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
162
176
  let end = length === undefined ? reader.len : reader.pos + length;
163
- const message = createBaseresponse();
177
+ const message = createBaseInitiateAttemptResponseV2();
164
178
  while (reader.pos < end) {
165
179
  const tag = reader.uint32();
166
180
  switch (tag >>> 3) {
@@ -321,10 +335,10 @@ exports.response = {
321
335
  return obj;
322
336
  },
323
337
  create(base) {
324
- return exports.response.fromPartial(base ?? {});
338
+ return exports.InitiateAttemptResponseV2.fromPartial(base ?? {});
325
339
  },
326
340
  fromPartial(object) {
327
- const message = createBaseresponse();
341
+ const message = createBaseInitiateAttemptResponseV2();
328
342
  message.transaction_id = object.transaction_id ?? "";
329
343
  message.attempt_id = object.attempt_id ?? "";
330
344
  message.attempt_no = object.attempt_no ?? 0;
@@ -4,10 +4,10 @@ import { request as request63, response as response64 } from "./eqxpayments/crea
4
4
  import { request as request65, response as response66 } from "./eqxpayments/createorderv2";
5
5
  import { createTransactionRequest, createTransactionResponse } from "./eqxpayments/createtransaction";
6
6
  import { request as request9, response as response10 } from "./eqxpayments/fundtransfer";
7
- import { request as request69, response as response70 } from "./eqxpayments/getorderv2";
7
+ import { request as request67, response as response68 } from "./eqxpayments/getorderv2";
8
8
  import { request, response } from "./eqxpayments/getpaymentoptions";
9
9
  import { PaymentTypeRequest, PaymentTypeResponse } from "./eqxpayments/getpaymenttypes";
10
- import { request as request67, response as response68 } from "./eqxpayments/initiateattemptv2";
10
+ import { InitiateAttemptRequestV2, InitiateAttemptResponseV2 } from "./eqxpayments/initiateattemptv2";
11
11
  import { request as request1, response as response2 } from "./eqxpayments/initiatepayment";
12
12
  import { request as request11, response as response12 } from "./eqxpayments/initiaterefund";
13
13
  import { ListCheckoutOptionsRequestV2, ListCheckoutOptionsResponseV2 } from "./eqxpayments/listcheckoutoptionsv2";
@@ -380,19 +380,19 @@ export declare const eqxpaymentsService: {
380
380
  readonly path: "/service.eqxpayments/InitiateAttemptV2";
381
381
  readonly requestStream: false;
382
382
  readonly responseStream: false;
383
- readonly requestSerialize: (value: request67) => Buffer<ArrayBuffer>;
384
- readonly requestDeserialize: (value: Buffer) => request67;
385
- readonly responseSerialize: (value: response68) => Buffer<ArrayBuffer>;
386
- readonly responseDeserialize: (value: Buffer) => response68;
383
+ readonly requestSerialize: (value: InitiateAttemptRequestV2) => Buffer<ArrayBuffer>;
384
+ readonly requestDeserialize: (value: Buffer) => InitiateAttemptRequestV2;
385
+ readonly responseSerialize: (value: InitiateAttemptResponseV2) => Buffer<ArrayBuffer>;
386
+ readonly responseDeserialize: (value: Buffer) => InitiateAttemptResponseV2;
387
387
  };
388
388
  readonly getOrderV2: {
389
389
  readonly path: "/service.eqxpayments/GetOrderV2";
390
390
  readonly requestStream: false;
391
391
  readonly responseStream: false;
392
- readonly requestSerialize: (value: request69) => Buffer<ArrayBuffer>;
393
- readonly requestDeserialize: (value: Buffer) => request69;
394
- readonly responseSerialize: (value: response70) => Buffer<ArrayBuffer>;
395
- readonly responseDeserialize: (value: Buffer) => response70;
392
+ readonly requestSerialize: (value: request67) => Buffer<ArrayBuffer>;
393
+ readonly requestDeserialize: (value: Buffer) => request67;
394
+ readonly responseSerialize: (value: response68) => Buffer<ArrayBuffer>;
395
+ readonly responseDeserialize: (value: Buffer) => response68;
396
396
  };
397
397
  };
398
398
  export interface eqxpaymentsServer extends UntypedServiceImplementation {
@@ -435,8 +435,8 @@ export interface eqxpaymentsServer extends UntypedServiceImplementation {
435
435
  /** V2 APIs */
436
436
  createOrderV2: handleUnaryCall<request65, response66>;
437
437
  listCheckoutOptionsV2: handleUnaryCall<ListCheckoutOptionsRequestV2, ListCheckoutOptionsResponseV2>;
438
- initiateAttemptV2: handleUnaryCall<request67, response68>;
439
- getOrderV2: handleUnaryCall<request69, response70>;
438
+ initiateAttemptV2: handleUnaryCall<InitiateAttemptRequestV2, InitiateAttemptResponseV2>;
439
+ getOrderV2: handleUnaryCall<request67, response68>;
440
440
  }
441
441
  export interface eqxpaymentsClient extends Client {
442
442
  getpaymentoptions(request: request, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
@@ -552,12 +552,12 @@ export interface eqxpaymentsClient extends Client {
552
552
  listCheckoutOptionsV2(request: ListCheckoutOptionsRequestV2, callback: (error: ServiceError | null, response: ListCheckoutOptionsResponseV2) => void): ClientUnaryCall;
553
553
  listCheckoutOptionsV2(request: ListCheckoutOptionsRequestV2, metadata: Metadata, callback: (error: ServiceError | null, response: ListCheckoutOptionsResponseV2) => void): ClientUnaryCall;
554
554
  listCheckoutOptionsV2(request: ListCheckoutOptionsRequestV2, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListCheckoutOptionsResponseV2) => void): ClientUnaryCall;
555
- initiateAttemptV2(request: request67, callback: (error: ServiceError | null, response: response68) => void): ClientUnaryCall;
556
- initiateAttemptV2(request: request67, metadata: Metadata, callback: (error: ServiceError | null, response: response68) => void): ClientUnaryCall;
557
- initiateAttemptV2(request: request67, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response68) => void): ClientUnaryCall;
558
- getOrderV2(request: request69, callback: (error: ServiceError | null, response: response70) => void): ClientUnaryCall;
559
- getOrderV2(request: request69, metadata: Metadata, callback: (error: ServiceError | null, response: response70) => void): ClientUnaryCall;
560
- getOrderV2(request: request69, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response70) => void): ClientUnaryCall;
555
+ initiateAttemptV2(request: InitiateAttemptRequestV2, callback: (error: ServiceError | null, response: InitiateAttemptResponseV2) => void): ClientUnaryCall;
556
+ initiateAttemptV2(request: InitiateAttemptRequestV2, metadata: Metadata, callback: (error: ServiceError | null, response: InitiateAttemptResponseV2) => void): ClientUnaryCall;
557
+ initiateAttemptV2(request: InitiateAttemptRequestV2, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: InitiateAttemptResponseV2) => void): ClientUnaryCall;
558
+ getOrderV2(request: request67, callback: (error: ServiceError | null, response: response68) => void): ClientUnaryCall;
559
+ getOrderV2(request: request67, metadata: Metadata, callback: (error: ServiceError | null, response: response68) => void): ClientUnaryCall;
560
+ getOrderV2(request: request67, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response68) => void): ClientUnaryCall;
561
561
  }
562
562
  export declare const eqxpaymentsClient: {
563
563
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): eqxpaymentsClient;
package/ts/eqxpayments.js CHANGED
@@ -388,10 +388,10 @@ exports.eqxpaymentsService = {
388
388
  path: "/service.eqxpayments/InitiateAttemptV2",
389
389
  requestStream: false,
390
390
  responseStream: false,
391
- requestSerialize: (value) => Buffer.from(initiateattemptv2_1.request.encode(value).finish()),
392
- requestDeserialize: (value) => initiateattemptv2_1.request.decode(value),
393
- responseSerialize: (value) => Buffer.from(initiateattemptv2_1.response.encode(value).finish()),
394
- responseDeserialize: (value) => initiateattemptv2_1.response.decode(value),
391
+ requestSerialize: (value) => Buffer.from(initiateattemptv2_1.InitiateAttemptRequestV2.encode(value).finish()),
392
+ requestDeserialize: (value) => initiateattemptv2_1.InitiateAttemptRequestV2.decode(value),
393
+ responseSerialize: (value) => Buffer.from(initiateattemptv2_1.InitiateAttemptResponseV2.encode(value).finish()),
394
+ responseDeserialize: (value) => initiateattemptv2_1.InitiateAttemptResponseV2.decode(value),
395
395
  },
396
396
  getOrderV2: {
397
397
  path: "/service.eqxpayments/GetOrderV2",