@stashfin/grpc 1.3.5 → 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 +1 -1
- package/ts/eqxpayments/initiateattemptv2.d.ts +24 -16
- package/ts/eqxpayments/initiateattemptv2.js +26 -12
- package/ts/eqxpayments/listcheckoutoptionsv2.d.ts +53 -16
- package/ts/eqxpayments/listcheckoutoptionsv2.js +123 -11
- package/ts/eqxpayments.d.ts +27 -27
- package/ts/eqxpayments.js +8 -8
package/package.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import _m0 from "protobufjs/minimal";
|
|
2
2
|
export declare const protobufPackage = "eqxpayments.initiateattemptv2";
|
|
3
|
-
export interface
|
|
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
|
|
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
|
|
25
|
-
encode(message:
|
|
26
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
27
|
-
fromJSON(object: any):
|
|
28
|
-
toJSON(message:
|
|
29
|
-
create<I extends Exact<DeepPartial<
|
|
30
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
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
|
|
33
|
-
encode(message:
|
|
34
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
35
|
-
fromJSON(object: any):
|
|
36
|
-
toJSON(message:
|
|
37
|
-
create<I extends Exact<DeepPartial<
|
|
38
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
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.
|
|
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
|
|
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.
|
|
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 =
|
|
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.
|
|
99
|
+
return exports.InitiateAttemptRequestV2.fromPartial(base ?? {});
|
|
87
100
|
},
|
|
88
101
|
fromPartial(object) {
|
|
89
|
-
const message =
|
|
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
|
|
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.
|
|
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 =
|
|
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.
|
|
338
|
+
return exports.InitiateAttemptResponseV2.fromPartial(base ?? {});
|
|
325
339
|
},
|
|
326
340
|
fromPartial(object) {
|
|
327
|
-
const message =
|
|
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;
|
|
@@ -1,27 +1,64 @@
|
|
|
1
1
|
import _m0 from "protobufjs/minimal";
|
|
2
2
|
export declare const protobufPackage = "eqxpayments.listcheckoutoptionsv2";
|
|
3
|
+
/** Reference for banks the user can pick when mode is NETBANKING. */
|
|
4
|
+
export interface BankInfo {
|
|
5
|
+
/** e.g., "HDFC" */
|
|
6
|
+
code: string;
|
|
7
|
+
/** e.g., "HDFC Bank" */
|
|
8
|
+
label: string;
|
|
9
|
+
/** CDN URL to SVG/PNG */
|
|
10
|
+
logo_url: string;
|
|
11
|
+
}
|
|
3
12
|
export interface MoneyQuote {
|
|
13
|
+
/** Which paymode this quote is for */
|
|
4
14
|
mode_code: string;
|
|
15
|
+
/** FK -> payment_mode_v2.id */
|
|
5
16
|
mode_id: number;
|
|
17
|
+
/** Amounts (in minor units, e.g., paise) */
|
|
6
18
|
base_amount: number;
|
|
19
|
+
/** computed convenience/processing fee */
|
|
7
20
|
ccf_minor: number;
|
|
21
|
+
/** GST on CCF */
|
|
8
22
|
gst_minor: number;
|
|
23
|
+
/** base + ccf + gst (rounded to paise) */
|
|
9
24
|
final_amount: number;
|
|
25
|
+
/** UI helpers */
|
|
10
26
|
pricing_model: string;
|
|
27
|
+
/** from SPMC */
|
|
11
28
|
enabled: boolean;
|
|
29
|
+
/** from SPMC */
|
|
12
30
|
ui_order: number;
|
|
31
|
+
/**
|
|
32
|
+
* NETBANKING ONLY: Allowed banks for this subscriber/mode (route ∩ vendor support)
|
|
33
|
+
* Omitted/empty for non-NETBANKING modes.
|
|
34
|
+
*/
|
|
35
|
+
allowed_banks: BankInfo[];
|
|
36
|
+
/** Optional: hash of sorted bank codes for client caching/memoization */
|
|
37
|
+
banks_version: string;
|
|
13
38
|
}
|
|
14
|
-
export interface
|
|
39
|
+
export interface ListCheckoutOptionsRequestV2 {
|
|
40
|
+
/** JWT/hash returned by CreateOrderV2. Server validates and loads tx. */
|
|
15
41
|
checkout_token: string;
|
|
16
42
|
}
|
|
17
|
-
export interface
|
|
43
|
+
export interface ListCheckoutOptionsResponseV2 {
|
|
18
44
|
transaction_id: string;
|
|
19
45
|
subscriber_id: string;
|
|
20
46
|
order_ref: string;
|
|
47
|
+
/** One quote per enabled paymode (sorted by ui_order) */
|
|
21
48
|
options: MoneyQuote[];
|
|
49
|
+
/** Quote metadata */
|
|
22
50
|
quote_version: string;
|
|
51
|
+
/** ISO-8601 UTC timestamp */
|
|
23
52
|
expires_at: string;
|
|
24
53
|
}
|
|
54
|
+
export declare const BankInfo: {
|
|
55
|
+
encode(message: BankInfo, writer?: _m0.Writer): _m0.Writer;
|
|
56
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BankInfo;
|
|
57
|
+
fromJSON(object: any): BankInfo;
|
|
58
|
+
toJSON(message: BankInfo): unknown;
|
|
59
|
+
create<I extends Exact<DeepPartial<BankInfo>, I>>(base?: I): BankInfo;
|
|
60
|
+
fromPartial<I extends Exact<DeepPartial<BankInfo>, I>>(object: I): BankInfo;
|
|
61
|
+
};
|
|
25
62
|
export declare const MoneyQuote: {
|
|
26
63
|
encode(message: MoneyQuote, writer?: _m0.Writer): _m0.Writer;
|
|
27
64
|
decode(input: _m0.Reader | Uint8Array, length?: number): MoneyQuote;
|
|
@@ -30,21 +67,21 @@ export declare const MoneyQuote: {
|
|
|
30
67
|
create<I extends Exact<DeepPartial<MoneyQuote>, I>>(base?: I): MoneyQuote;
|
|
31
68
|
fromPartial<I extends Exact<DeepPartial<MoneyQuote>, I>>(object: I): MoneyQuote;
|
|
32
69
|
};
|
|
33
|
-
export declare const
|
|
34
|
-
encode(message:
|
|
35
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
36
|
-
fromJSON(object: any):
|
|
37
|
-
toJSON(message:
|
|
38
|
-
create<I extends Exact<DeepPartial<
|
|
39
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
70
|
+
export declare const ListCheckoutOptionsRequestV2: {
|
|
71
|
+
encode(message: ListCheckoutOptionsRequestV2, writer?: _m0.Writer): _m0.Writer;
|
|
72
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ListCheckoutOptionsRequestV2;
|
|
73
|
+
fromJSON(object: any): ListCheckoutOptionsRequestV2;
|
|
74
|
+
toJSON(message: ListCheckoutOptionsRequestV2): unknown;
|
|
75
|
+
create<I extends Exact<DeepPartial<ListCheckoutOptionsRequestV2>, I>>(base?: I): ListCheckoutOptionsRequestV2;
|
|
76
|
+
fromPartial<I extends Exact<DeepPartial<ListCheckoutOptionsRequestV2>, I>>(object: I): ListCheckoutOptionsRequestV2;
|
|
40
77
|
};
|
|
41
|
-
export declare const
|
|
42
|
-
encode(message:
|
|
43
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
44
|
-
fromJSON(object: any):
|
|
45
|
-
toJSON(message:
|
|
46
|
-
create<I extends Exact<DeepPartial<
|
|
47
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
78
|
+
export declare const ListCheckoutOptionsResponseV2: {
|
|
79
|
+
encode(message: ListCheckoutOptionsResponseV2, writer?: _m0.Writer): _m0.Writer;
|
|
80
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ListCheckoutOptionsResponseV2;
|
|
81
|
+
fromJSON(object: any): ListCheckoutOptionsResponseV2;
|
|
82
|
+
toJSON(message: ListCheckoutOptionsResponseV2): unknown;
|
|
83
|
+
create<I extends Exact<DeepPartial<ListCheckoutOptionsResponseV2>, I>>(base?: I): ListCheckoutOptionsResponseV2;
|
|
84
|
+
fromPartial<I extends Exact<DeepPartial<ListCheckoutOptionsResponseV2>, I>>(object: I): ListCheckoutOptionsResponseV2;
|
|
48
85
|
};
|
|
49
86
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
50
87
|
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,11 +8,91 @@ 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.
|
|
11
|
+
exports.ListCheckoutOptionsResponseV2 = exports.ListCheckoutOptionsRequestV2 = exports.MoneyQuote = exports.BankInfo = 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.listcheckoutoptionsv2";
|
|
16
|
+
function createBaseBankInfo() {
|
|
17
|
+
return { code: "", label: "", logo_url: "" };
|
|
18
|
+
}
|
|
19
|
+
exports.BankInfo = {
|
|
20
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
21
|
+
if (message.code !== "") {
|
|
22
|
+
writer.uint32(10).string(message.code);
|
|
23
|
+
}
|
|
24
|
+
if (message.label !== "") {
|
|
25
|
+
writer.uint32(18).string(message.label);
|
|
26
|
+
}
|
|
27
|
+
if (message.logo_url !== "") {
|
|
28
|
+
writer.uint32(26).string(message.logo_url);
|
|
29
|
+
}
|
|
30
|
+
return writer;
|
|
31
|
+
},
|
|
32
|
+
decode(input, length) {
|
|
33
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
34
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
35
|
+
const message = createBaseBankInfo();
|
|
36
|
+
while (reader.pos < end) {
|
|
37
|
+
const tag = reader.uint32();
|
|
38
|
+
switch (tag >>> 3) {
|
|
39
|
+
case 1:
|
|
40
|
+
if (tag !== 10) {
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
message.code = reader.string();
|
|
44
|
+
continue;
|
|
45
|
+
case 2:
|
|
46
|
+
if (tag !== 18) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
message.label = reader.string();
|
|
50
|
+
continue;
|
|
51
|
+
case 3:
|
|
52
|
+
if (tag !== 26) {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
message.logo_url = reader.string();
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
reader.skipType(tag & 7);
|
|
62
|
+
}
|
|
63
|
+
return message;
|
|
64
|
+
},
|
|
65
|
+
fromJSON(object) {
|
|
66
|
+
return {
|
|
67
|
+
code: isSet(object.code) ? globalThis.String(object.code) : "",
|
|
68
|
+
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
69
|
+
logo_url: isSet(object.logo_url) ? globalThis.String(object.logo_url) : "",
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
toJSON(message) {
|
|
73
|
+
const obj = {};
|
|
74
|
+
if (message.code !== "") {
|
|
75
|
+
obj.code = message.code;
|
|
76
|
+
}
|
|
77
|
+
if (message.label !== "") {
|
|
78
|
+
obj.label = message.label;
|
|
79
|
+
}
|
|
80
|
+
if (message.logo_url !== "") {
|
|
81
|
+
obj.logo_url = message.logo_url;
|
|
82
|
+
}
|
|
83
|
+
return obj;
|
|
84
|
+
},
|
|
85
|
+
create(base) {
|
|
86
|
+
return exports.BankInfo.fromPartial(base ?? {});
|
|
87
|
+
},
|
|
88
|
+
fromPartial(object) {
|
|
89
|
+
const message = createBaseBankInfo();
|
|
90
|
+
message.code = object.code ?? "";
|
|
91
|
+
message.label = object.label ?? "";
|
|
92
|
+
message.logo_url = object.logo_url ?? "";
|
|
93
|
+
return message;
|
|
94
|
+
},
|
|
95
|
+
};
|
|
16
96
|
function createBaseMoneyQuote() {
|
|
17
97
|
return {
|
|
18
98
|
mode_code: "",
|
|
@@ -24,6 +104,8 @@ function createBaseMoneyQuote() {
|
|
|
24
104
|
pricing_model: "",
|
|
25
105
|
enabled: false,
|
|
26
106
|
ui_order: 0,
|
|
107
|
+
allowed_banks: [],
|
|
108
|
+
banks_version: "",
|
|
27
109
|
};
|
|
28
110
|
}
|
|
29
111
|
exports.MoneyQuote = {
|
|
@@ -55,6 +137,12 @@ exports.MoneyQuote = {
|
|
|
55
137
|
if (message.ui_order !== 0) {
|
|
56
138
|
writer.uint32(72).int32(message.ui_order);
|
|
57
139
|
}
|
|
140
|
+
for (const v of message.allowed_banks) {
|
|
141
|
+
exports.BankInfo.encode(v, writer.uint32(82).fork()).ldelim();
|
|
142
|
+
}
|
|
143
|
+
if (message.banks_version !== "") {
|
|
144
|
+
writer.uint32(90).string(message.banks_version);
|
|
145
|
+
}
|
|
58
146
|
return writer;
|
|
59
147
|
},
|
|
60
148
|
decode(input, length) {
|
|
@@ -118,6 +206,18 @@ exports.MoneyQuote = {
|
|
|
118
206
|
}
|
|
119
207
|
message.ui_order = reader.int32();
|
|
120
208
|
continue;
|
|
209
|
+
case 10:
|
|
210
|
+
if (tag !== 82) {
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
message.allowed_banks.push(exports.BankInfo.decode(reader, reader.uint32()));
|
|
214
|
+
continue;
|
|
215
|
+
case 11:
|
|
216
|
+
if (tag !== 90) {
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
message.banks_version = reader.string();
|
|
220
|
+
continue;
|
|
121
221
|
}
|
|
122
222
|
if ((tag & 7) === 4 || tag === 0) {
|
|
123
223
|
break;
|
|
@@ -137,6 +237,10 @@ exports.MoneyQuote = {
|
|
|
137
237
|
pricing_model: isSet(object.pricing_model) ? globalThis.String(object.pricing_model) : "",
|
|
138
238
|
enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
|
|
139
239
|
ui_order: isSet(object.ui_order) ? globalThis.Number(object.ui_order) : 0,
|
|
240
|
+
allowed_banks: globalThis.Array.isArray(object?.allowed_banks)
|
|
241
|
+
? object.allowed_banks.map((e) => exports.BankInfo.fromJSON(e))
|
|
242
|
+
: [],
|
|
243
|
+
banks_version: isSet(object.banks_version) ? globalThis.String(object.banks_version) : "",
|
|
140
244
|
};
|
|
141
245
|
},
|
|
142
246
|
toJSON(message) {
|
|
@@ -168,6 +272,12 @@ exports.MoneyQuote = {
|
|
|
168
272
|
if (message.ui_order !== 0) {
|
|
169
273
|
obj.ui_order = Math.round(message.ui_order);
|
|
170
274
|
}
|
|
275
|
+
if (message.allowed_banks?.length) {
|
|
276
|
+
obj.allowed_banks = message.allowed_banks.map((e) => exports.BankInfo.toJSON(e));
|
|
277
|
+
}
|
|
278
|
+
if (message.banks_version !== "") {
|
|
279
|
+
obj.banks_version = message.banks_version;
|
|
280
|
+
}
|
|
171
281
|
return obj;
|
|
172
282
|
},
|
|
173
283
|
create(base) {
|
|
@@ -184,13 +294,15 @@ exports.MoneyQuote = {
|
|
|
184
294
|
message.pricing_model = object.pricing_model ?? "";
|
|
185
295
|
message.enabled = object.enabled ?? false;
|
|
186
296
|
message.ui_order = object.ui_order ?? 0;
|
|
297
|
+
message.allowed_banks = object.allowed_banks?.map((e) => exports.BankInfo.fromPartial(e)) || [];
|
|
298
|
+
message.banks_version = object.banks_version ?? "";
|
|
187
299
|
return message;
|
|
188
300
|
},
|
|
189
301
|
};
|
|
190
|
-
function
|
|
302
|
+
function createBaseListCheckoutOptionsRequestV2() {
|
|
191
303
|
return { checkout_token: "" };
|
|
192
304
|
}
|
|
193
|
-
exports.
|
|
305
|
+
exports.ListCheckoutOptionsRequestV2 = {
|
|
194
306
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
195
307
|
if (message.checkout_token !== "") {
|
|
196
308
|
writer.uint32(10).string(message.checkout_token);
|
|
@@ -200,7 +312,7 @@ exports.request = {
|
|
|
200
312
|
decode(input, length) {
|
|
201
313
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
202
314
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
203
|
-
const message =
|
|
315
|
+
const message = createBaseListCheckoutOptionsRequestV2();
|
|
204
316
|
while (reader.pos < end) {
|
|
205
317
|
const tag = reader.uint32();
|
|
206
318
|
switch (tag >>> 3) {
|
|
@@ -229,18 +341,18 @@ exports.request = {
|
|
|
229
341
|
return obj;
|
|
230
342
|
},
|
|
231
343
|
create(base) {
|
|
232
|
-
return exports.
|
|
344
|
+
return exports.ListCheckoutOptionsRequestV2.fromPartial(base ?? {});
|
|
233
345
|
},
|
|
234
346
|
fromPartial(object) {
|
|
235
|
-
const message =
|
|
347
|
+
const message = createBaseListCheckoutOptionsRequestV2();
|
|
236
348
|
message.checkout_token = object.checkout_token ?? "";
|
|
237
349
|
return message;
|
|
238
350
|
},
|
|
239
351
|
};
|
|
240
|
-
function
|
|
352
|
+
function createBaseListCheckoutOptionsResponseV2() {
|
|
241
353
|
return { transaction_id: "", subscriber_id: "", order_ref: "", options: [], quote_version: "", expires_at: "" };
|
|
242
354
|
}
|
|
243
|
-
exports.
|
|
355
|
+
exports.ListCheckoutOptionsResponseV2 = {
|
|
244
356
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
245
357
|
if (message.transaction_id !== "") {
|
|
246
358
|
writer.uint32(10).string(message.transaction_id);
|
|
@@ -265,7 +377,7 @@ exports.response = {
|
|
|
265
377
|
decode(input, length) {
|
|
266
378
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
267
379
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
268
|
-
const message =
|
|
380
|
+
const message = createBaseListCheckoutOptionsResponseV2();
|
|
269
381
|
while (reader.pos < end) {
|
|
270
382
|
const tag = reader.uint32();
|
|
271
383
|
switch (tag >>> 3) {
|
|
@@ -346,10 +458,10 @@ exports.response = {
|
|
|
346
458
|
return obj;
|
|
347
459
|
},
|
|
348
460
|
create(base) {
|
|
349
|
-
return exports.
|
|
461
|
+
return exports.ListCheckoutOptionsResponseV2.fromPartial(base ?? {});
|
|
350
462
|
},
|
|
351
463
|
fromPartial(object) {
|
|
352
|
-
const message =
|
|
464
|
+
const message = createBaseListCheckoutOptionsResponseV2();
|
|
353
465
|
message.transaction_id = object.transaction_id ?? "";
|
|
354
466
|
message.subscriber_id = object.subscriber_id ?? "";
|
|
355
467
|
message.order_ref = object.order_ref ?? "";
|
package/ts/eqxpayments.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ 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
|
|
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 {
|
|
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
|
-
import {
|
|
13
|
+
import { ListCheckoutOptionsRequestV2, ListCheckoutOptionsResponseV2 } from "./eqxpayments/listcheckoutoptionsv2";
|
|
14
14
|
import { request as request27, response as response28 } from "./eqxpayments/merchants_create";
|
|
15
15
|
import { request as request33, response as response34 } from "./eqxpayments/merchants_credentials_rotate";
|
|
16
16
|
import { request as request29, response as response30 } from "./eqxpayments/merchants_get";
|
|
@@ -371,28 +371,28 @@ export declare const eqxpaymentsService: {
|
|
|
371
371
|
readonly path: "/service.eqxpayments/ListCheckoutOptionsV2";
|
|
372
372
|
readonly requestStream: false;
|
|
373
373
|
readonly responseStream: false;
|
|
374
|
-
readonly requestSerialize: (value:
|
|
375
|
-
readonly requestDeserialize: (value: Buffer) =>
|
|
376
|
-
readonly responseSerialize: (value:
|
|
377
|
-
readonly responseDeserialize: (value: Buffer) =>
|
|
374
|
+
readonly requestSerialize: (value: ListCheckoutOptionsRequestV2) => Buffer<ArrayBuffer>;
|
|
375
|
+
readonly requestDeserialize: (value: Buffer) => ListCheckoutOptionsRequestV2;
|
|
376
|
+
readonly responseSerialize: (value: ListCheckoutOptionsResponseV2) => Buffer<ArrayBuffer>;
|
|
377
|
+
readonly responseDeserialize: (value: Buffer) => ListCheckoutOptionsResponseV2;
|
|
378
378
|
};
|
|
379
379
|
readonly initiateAttemptV2: {
|
|
380
380
|
readonly path: "/service.eqxpayments/InitiateAttemptV2";
|
|
381
381
|
readonly requestStream: false;
|
|
382
382
|
readonly responseStream: false;
|
|
383
|
-
readonly requestSerialize: (value:
|
|
384
|
-
readonly requestDeserialize: (value: Buffer) =>
|
|
385
|
-
readonly responseSerialize: (value:
|
|
386
|
-
readonly responseDeserialize: (value: Buffer) =>
|
|
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:
|
|
393
|
-
readonly requestDeserialize: (value: Buffer) =>
|
|
394
|
-
readonly responseSerialize: (value:
|
|
395
|
-
readonly responseDeserialize: (value: Buffer) =>
|
|
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 {
|
|
@@ -434,9 +434,9 @@ export interface eqxpaymentsServer extends UntypedServiceImplementation {
|
|
|
434
434
|
createorder: handleUnaryCall<request63, response64>;
|
|
435
435
|
/** V2 APIs */
|
|
436
436
|
createOrderV2: handleUnaryCall<request65, response66>;
|
|
437
|
-
listCheckoutOptionsV2: handleUnaryCall<
|
|
438
|
-
initiateAttemptV2: handleUnaryCall<
|
|
439
|
-
getOrderV2: handleUnaryCall<
|
|
437
|
+
listCheckoutOptionsV2: handleUnaryCall<ListCheckoutOptionsRequestV2, ListCheckoutOptionsResponseV2>;
|
|
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;
|
|
@@ -549,15 +549,15 @@ export interface eqxpaymentsClient extends Client {
|
|
|
549
549
|
createOrderV2(request: request65, callback: (error: ServiceError | null, response: response66) => void): ClientUnaryCall;
|
|
550
550
|
createOrderV2(request: request65, metadata: Metadata, callback: (error: ServiceError | null, response: response66) => void): ClientUnaryCall;
|
|
551
551
|
createOrderV2(request: request65, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response66) => void): ClientUnaryCall;
|
|
552
|
-
listCheckoutOptionsV2(request:
|
|
553
|
-
listCheckoutOptionsV2(request:
|
|
554
|
-
listCheckoutOptionsV2(request:
|
|
555
|
-
initiateAttemptV2(request:
|
|
556
|
-
initiateAttemptV2(request:
|
|
557
|
-
initiateAttemptV2(request:
|
|
558
|
-
getOrderV2(request:
|
|
559
|
-
getOrderV2(request:
|
|
560
|
-
getOrderV2(request:
|
|
552
|
+
listCheckoutOptionsV2(request: ListCheckoutOptionsRequestV2, callback: (error: ServiceError | null, response: ListCheckoutOptionsResponseV2) => void): ClientUnaryCall;
|
|
553
|
+
listCheckoutOptionsV2(request: ListCheckoutOptionsRequestV2, metadata: Metadata, callback: (error: ServiceError | null, response: ListCheckoutOptionsResponseV2) => void): ClientUnaryCall;
|
|
554
|
+
listCheckoutOptionsV2(request: ListCheckoutOptionsRequestV2, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListCheckoutOptionsResponseV2) => 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
|
@@ -379,19 +379,19 @@ exports.eqxpaymentsService = {
|
|
|
379
379
|
path: "/service.eqxpayments/ListCheckoutOptionsV2",
|
|
380
380
|
requestStream: false,
|
|
381
381
|
responseStream: false,
|
|
382
|
-
requestSerialize: (value) => Buffer.from(listcheckoutoptionsv2_1.
|
|
383
|
-
requestDeserialize: (value) => listcheckoutoptionsv2_1.
|
|
384
|
-
responseSerialize: (value) => Buffer.from(listcheckoutoptionsv2_1.
|
|
385
|
-
responseDeserialize: (value) => listcheckoutoptionsv2_1.
|
|
382
|
+
requestSerialize: (value) => Buffer.from(listcheckoutoptionsv2_1.ListCheckoutOptionsRequestV2.encode(value).finish()),
|
|
383
|
+
requestDeserialize: (value) => listcheckoutoptionsv2_1.ListCheckoutOptionsRequestV2.decode(value),
|
|
384
|
+
responseSerialize: (value) => Buffer.from(listcheckoutoptionsv2_1.ListCheckoutOptionsResponseV2.encode(value).finish()),
|
|
385
|
+
responseDeserialize: (value) => listcheckoutoptionsv2_1.ListCheckoutOptionsResponseV2.decode(value),
|
|
386
386
|
},
|
|
387
387
|
initiateAttemptV2: {
|
|
388
388
|
path: "/service.eqxpayments/InitiateAttemptV2",
|
|
389
389
|
requestStream: false,
|
|
390
390
|
responseStream: false,
|
|
391
|
-
requestSerialize: (value) => Buffer.from(initiateattemptv2_1.
|
|
392
|
-
requestDeserialize: (value) => initiateattemptv2_1.
|
|
393
|
-
responseSerialize: (value) => Buffer.from(initiateattemptv2_1.
|
|
394
|
-
responseDeserialize: (value) => initiateattemptv2_1.
|
|
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",
|