@stashfin/grpc 1.5.2 → 1.5.3
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/bbps/processwebhookv2.d.ts +79 -1
- package/ts/bbps/processwebhookv2.js +716 -9
package/package.json
CHANGED
|
@@ -1,7 +1,53 @@
|
|
|
1
1
|
import _m0 from "protobufjs/minimal";
|
|
2
2
|
export declare const protobufPackage = "bbps.processwebhookv2";
|
|
3
|
+
export interface PaymentDetails {
|
|
4
|
+
method: string;
|
|
5
|
+
pg_txn_id: string;
|
|
6
|
+
bank_ref_no?: string | undefined;
|
|
7
|
+
settled_at?: string | undefined;
|
|
8
|
+
remitter_name?: string | undefined;
|
|
9
|
+
upi_vpa?: string | undefined;
|
|
10
|
+
upi_masked_vpa?: string | undefined;
|
|
11
|
+
txn_process_type?: string | undefined;
|
|
12
|
+
bank_id?: string | undefined;
|
|
13
|
+
payment_category?: string | undefined;
|
|
14
|
+
item_code?: string | undefined;
|
|
15
|
+
additional_info: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface PaymentDetails_AdditionalInfoEntry {
|
|
20
|
+
key: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}
|
|
3
23
|
export interface BDTransactionRequest {
|
|
4
|
-
|
|
24
|
+
event_type: string;
|
|
25
|
+
transaction_id: number;
|
|
26
|
+
subscriber_id: string;
|
|
27
|
+
order_ref: string;
|
|
28
|
+
amount_minor: number;
|
|
29
|
+
charged_total_minor: number;
|
|
30
|
+
currency: string;
|
|
31
|
+
status: string;
|
|
32
|
+
final: boolean;
|
|
33
|
+
transaction_date: string;
|
|
34
|
+
payment_details: PaymentDetails | undefined;
|
|
35
|
+
customer_ctx: {
|
|
36
|
+
[key: string]: string;
|
|
37
|
+
};
|
|
38
|
+
metadata: {
|
|
39
|
+
[key: string]: string;
|
|
40
|
+
};
|
|
41
|
+
timestamp: string;
|
|
42
|
+
signature: string;
|
|
43
|
+
}
|
|
44
|
+
export interface BDTransactionRequest_CustomerCtxEntry {
|
|
45
|
+
key: string;
|
|
46
|
+
value: string;
|
|
47
|
+
}
|
|
48
|
+
export interface BDTransactionRequest_MetadataEntry {
|
|
49
|
+
key: string;
|
|
50
|
+
value: string;
|
|
5
51
|
}
|
|
6
52
|
export interface TxnResponse {
|
|
7
53
|
id: number;
|
|
@@ -34,6 +80,22 @@ export interface BDTransactionResponse {
|
|
|
34
80
|
txnResponse: TxnResponse | undefined;
|
|
35
81
|
authSessionResponse: AuthSessionResponse | undefined;
|
|
36
82
|
}
|
|
83
|
+
export declare const PaymentDetails: {
|
|
84
|
+
encode(message: PaymentDetails, writer?: _m0.Writer): _m0.Writer;
|
|
85
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): PaymentDetails;
|
|
86
|
+
fromJSON(object: any): PaymentDetails;
|
|
87
|
+
toJSON(message: PaymentDetails): unknown;
|
|
88
|
+
create<I extends Exact<DeepPartial<PaymentDetails>, I>>(base?: I): PaymentDetails;
|
|
89
|
+
fromPartial<I extends Exact<DeepPartial<PaymentDetails>, I>>(object: I): PaymentDetails;
|
|
90
|
+
};
|
|
91
|
+
export declare const PaymentDetails_AdditionalInfoEntry: {
|
|
92
|
+
encode(message: PaymentDetails_AdditionalInfoEntry, writer?: _m0.Writer): _m0.Writer;
|
|
93
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): PaymentDetails_AdditionalInfoEntry;
|
|
94
|
+
fromJSON(object: any): PaymentDetails_AdditionalInfoEntry;
|
|
95
|
+
toJSON(message: PaymentDetails_AdditionalInfoEntry): unknown;
|
|
96
|
+
create<I extends Exact<DeepPartial<PaymentDetails_AdditionalInfoEntry>, I>>(base?: I): PaymentDetails_AdditionalInfoEntry;
|
|
97
|
+
fromPartial<I extends Exact<DeepPartial<PaymentDetails_AdditionalInfoEntry>, I>>(object: I): PaymentDetails_AdditionalInfoEntry;
|
|
98
|
+
};
|
|
37
99
|
export declare const BDTransactionRequest: {
|
|
38
100
|
encode(message: BDTransactionRequest, writer?: _m0.Writer): _m0.Writer;
|
|
39
101
|
decode(input: _m0.Reader | Uint8Array, length?: number): BDTransactionRequest;
|
|
@@ -42,6 +104,22 @@ export declare const BDTransactionRequest: {
|
|
|
42
104
|
create<I extends Exact<DeepPartial<BDTransactionRequest>, I>>(base?: I): BDTransactionRequest;
|
|
43
105
|
fromPartial<I extends Exact<DeepPartial<BDTransactionRequest>, I>>(object: I): BDTransactionRequest;
|
|
44
106
|
};
|
|
107
|
+
export declare const BDTransactionRequest_CustomerCtxEntry: {
|
|
108
|
+
encode(message: BDTransactionRequest_CustomerCtxEntry, writer?: _m0.Writer): _m0.Writer;
|
|
109
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BDTransactionRequest_CustomerCtxEntry;
|
|
110
|
+
fromJSON(object: any): BDTransactionRequest_CustomerCtxEntry;
|
|
111
|
+
toJSON(message: BDTransactionRequest_CustomerCtxEntry): unknown;
|
|
112
|
+
create<I extends Exact<DeepPartial<BDTransactionRequest_CustomerCtxEntry>, I>>(base?: I): BDTransactionRequest_CustomerCtxEntry;
|
|
113
|
+
fromPartial<I extends Exact<DeepPartial<BDTransactionRequest_CustomerCtxEntry>, I>>(object: I): BDTransactionRequest_CustomerCtxEntry;
|
|
114
|
+
};
|
|
115
|
+
export declare const BDTransactionRequest_MetadataEntry: {
|
|
116
|
+
encode(message: BDTransactionRequest_MetadataEntry, writer?: _m0.Writer): _m0.Writer;
|
|
117
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BDTransactionRequest_MetadataEntry;
|
|
118
|
+
fromJSON(object: any): BDTransactionRequest_MetadataEntry;
|
|
119
|
+
toJSON(message: BDTransactionRequest_MetadataEntry): unknown;
|
|
120
|
+
create<I extends Exact<DeepPartial<BDTransactionRequest_MetadataEntry>, I>>(base?: I): BDTransactionRequest_MetadataEntry;
|
|
121
|
+
fromPartial<I extends Exact<DeepPartial<BDTransactionRequest_MetadataEntry>, I>>(object: I): BDTransactionRequest_MetadataEntry;
|
|
122
|
+
};
|
|
45
123
|
export declare const TxnResponse: {
|
|
46
124
|
encode(message: TxnResponse, writer?: _m0.Writer): _m0.Writer;
|
|
47
125
|
decode(input: _m0.Reader | Uint8Array, length?: number): TxnResponse;
|
|
@@ -8,17 +8,380 @@ 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.BDTransactionResponse = exports.AuthSessionResponse = exports.TxnResponse = exports.BDTransactionRequest = exports.protobufPackage = void 0;
|
|
11
|
+
exports.BDTransactionResponse = exports.AuthSessionResponse = exports.TxnResponse = exports.BDTransactionRequest_MetadataEntry = exports.BDTransactionRequest_CustomerCtxEntry = exports.BDTransactionRequest = exports.PaymentDetails_AdditionalInfoEntry = exports.PaymentDetails = exports.protobufPackage = void 0;
|
|
12
12
|
/* eslint-disable */
|
|
13
|
+
const long_1 = __importDefault(require("long"));
|
|
13
14
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
15
|
exports.protobufPackage = "bbps.processwebhookv2";
|
|
16
|
+
function createBasePaymentDetails() {
|
|
17
|
+
return {
|
|
18
|
+
method: "",
|
|
19
|
+
pg_txn_id: "",
|
|
20
|
+
bank_ref_no: undefined,
|
|
21
|
+
settled_at: undefined,
|
|
22
|
+
remitter_name: undefined,
|
|
23
|
+
upi_vpa: undefined,
|
|
24
|
+
upi_masked_vpa: undefined,
|
|
25
|
+
txn_process_type: undefined,
|
|
26
|
+
bank_id: undefined,
|
|
27
|
+
payment_category: undefined,
|
|
28
|
+
item_code: undefined,
|
|
29
|
+
additional_info: {},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
exports.PaymentDetails = {
|
|
33
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
34
|
+
if (message.method !== "") {
|
|
35
|
+
writer.uint32(10).string(message.method);
|
|
36
|
+
}
|
|
37
|
+
if (message.pg_txn_id !== "") {
|
|
38
|
+
writer.uint32(18).string(message.pg_txn_id);
|
|
39
|
+
}
|
|
40
|
+
if (message.bank_ref_no !== undefined) {
|
|
41
|
+
writer.uint32(26).string(message.bank_ref_no);
|
|
42
|
+
}
|
|
43
|
+
if (message.settled_at !== undefined) {
|
|
44
|
+
writer.uint32(34).string(message.settled_at);
|
|
45
|
+
}
|
|
46
|
+
if (message.remitter_name !== undefined) {
|
|
47
|
+
writer.uint32(42).string(message.remitter_name);
|
|
48
|
+
}
|
|
49
|
+
if (message.upi_vpa !== undefined) {
|
|
50
|
+
writer.uint32(50).string(message.upi_vpa);
|
|
51
|
+
}
|
|
52
|
+
if (message.upi_masked_vpa !== undefined) {
|
|
53
|
+
writer.uint32(58).string(message.upi_masked_vpa);
|
|
54
|
+
}
|
|
55
|
+
if (message.txn_process_type !== undefined) {
|
|
56
|
+
writer.uint32(66).string(message.txn_process_type);
|
|
57
|
+
}
|
|
58
|
+
if (message.bank_id !== undefined) {
|
|
59
|
+
writer.uint32(74).string(message.bank_id);
|
|
60
|
+
}
|
|
61
|
+
if (message.payment_category !== undefined) {
|
|
62
|
+
writer.uint32(82).string(message.payment_category);
|
|
63
|
+
}
|
|
64
|
+
if (message.item_code !== undefined) {
|
|
65
|
+
writer.uint32(90).string(message.item_code);
|
|
66
|
+
}
|
|
67
|
+
Object.entries(message.additional_info).forEach(([key, value]) => {
|
|
68
|
+
exports.PaymentDetails_AdditionalInfoEntry.encode({ key: key, value }, writer.uint32(98).fork()).ldelim();
|
|
69
|
+
});
|
|
70
|
+
return writer;
|
|
71
|
+
},
|
|
72
|
+
decode(input, length) {
|
|
73
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
74
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
75
|
+
const message = createBasePaymentDetails();
|
|
76
|
+
while (reader.pos < end) {
|
|
77
|
+
const tag = reader.uint32();
|
|
78
|
+
switch (tag >>> 3) {
|
|
79
|
+
case 1:
|
|
80
|
+
if (tag !== 10) {
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
message.method = reader.string();
|
|
84
|
+
continue;
|
|
85
|
+
case 2:
|
|
86
|
+
if (tag !== 18) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
message.pg_txn_id = reader.string();
|
|
90
|
+
continue;
|
|
91
|
+
case 3:
|
|
92
|
+
if (tag !== 26) {
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
message.bank_ref_no = reader.string();
|
|
96
|
+
continue;
|
|
97
|
+
case 4:
|
|
98
|
+
if (tag !== 34) {
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
message.settled_at = reader.string();
|
|
102
|
+
continue;
|
|
103
|
+
case 5:
|
|
104
|
+
if (tag !== 42) {
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
message.remitter_name = reader.string();
|
|
108
|
+
continue;
|
|
109
|
+
case 6:
|
|
110
|
+
if (tag !== 50) {
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
message.upi_vpa = reader.string();
|
|
114
|
+
continue;
|
|
115
|
+
case 7:
|
|
116
|
+
if (tag !== 58) {
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
message.upi_masked_vpa = reader.string();
|
|
120
|
+
continue;
|
|
121
|
+
case 8:
|
|
122
|
+
if (tag !== 66) {
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
message.txn_process_type = reader.string();
|
|
126
|
+
continue;
|
|
127
|
+
case 9:
|
|
128
|
+
if (tag !== 74) {
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
message.bank_id = reader.string();
|
|
132
|
+
continue;
|
|
133
|
+
case 10:
|
|
134
|
+
if (tag !== 82) {
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
message.payment_category = reader.string();
|
|
138
|
+
continue;
|
|
139
|
+
case 11:
|
|
140
|
+
if (tag !== 90) {
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
message.item_code = reader.string();
|
|
144
|
+
continue;
|
|
145
|
+
case 12:
|
|
146
|
+
if (tag !== 98) {
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
const entry12 = exports.PaymentDetails_AdditionalInfoEntry.decode(reader, reader.uint32());
|
|
150
|
+
if (entry12.value !== undefined) {
|
|
151
|
+
message.additional_info[entry12.key] = entry12.value;
|
|
152
|
+
}
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
reader.skipType(tag & 7);
|
|
159
|
+
}
|
|
160
|
+
return message;
|
|
161
|
+
},
|
|
162
|
+
fromJSON(object) {
|
|
163
|
+
return {
|
|
164
|
+
method: isSet(object.method) ? globalThis.String(object.method) : "",
|
|
165
|
+
pg_txn_id: isSet(object.pg_txn_id) ? globalThis.String(object.pg_txn_id) : "",
|
|
166
|
+
bank_ref_no: isSet(object.bank_ref_no) ? globalThis.String(object.bank_ref_no) : undefined,
|
|
167
|
+
settled_at: isSet(object.settled_at) ? globalThis.String(object.settled_at) : undefined,
|
|
168
|
+
remitter_name: isSet(object.remitter_name) ? globalThis.String(object.remitter_name) : undefined,
|
|
169
|
+
upi_vpa: isSet(object.upi_vpa) ? globalThis.String(object.upi_vpa) : undefined,
|
|
170
|
+
upi_masked_vpa: isSet(object.upi_masked_vpa) ? globalThis.String(object.upi_masked_vpa) : undefined,
|
|
171
|
+
txn_process_type: isSet(object.txn_process_type) ? globalThis.String(object.txn_process_type) : undefined,
|
|
172
|
+
bank_id: isSet(object.bank_id) ? globalThis.String(object.bank_id) : undefined,
|
|
173
|
+
payment_category: isSet(object.payment_category) ? globalThis.String(object.payment_category) : undefined,
|
|
174
|
+
item_code: isSet(object.item_code) ? globalThis.String(object.item_code) : undefined,
|
|
175
|
+
additional_info: isObject(object.additional_info)
|
|
176
|
+
? Object.entries(object.additional_info).reduce((acc, [key, value]) => {
|
|
177
|
+
acc[key] = String(value);
|
|
178
|
+
return acc;
|
|
179
|
+
}, {})
|
|
180
|
+
: {},
|
|
181
|
+
};
|
|
182
|
+
},
|
|
183
|
+
toJSON(message) {
|
|
184
|
+
const obj = {};
|
|
185
|
+
if (message.method !== "") {
|
|
186
|
+
obj.method = message.method;
|
|
187
|
+
}
|
|
188
|
+
if (message.pg_txn_id !== "") {
|
|
189
|
+
obj.pg_txn_id = message.pg_txn_id;
|
|
190
|
+
}
|
|
191
|
+
if (message.bank_ref_no !== undefined) {
|
|
192
|
+
obj.bank_ref_no = message.bank_ref_no;
|
|
193
|
+
}
|
|
194
|
+
if (message.settled_at !== undefined) {
|
|
195
|
+
obj.settled_at = message.settled_at;
|
|
196
|
+
}
|
|
197
|
+
if (message.remitter_name !== undefined) {
|
|
198
|
+
obj.remitter_name = message.remitter_name;
|
|
199
|
+
}
|
|
200
|
+
if (message.upi_vpa !== undefined) {
|
|
201
|
+
obj.upi_vpa = message.upi_vpa;
|
|
202
|
+
}
|
|
203
|
+
if (message.upi_masked_vpa !== undefined) {
|
|
204
|
+
obj.upi_masked_vpa = message.upi_masked_vpa;
|
|
205
|
+
}
|
|
206
|
+
if (message.txn_process_type !== undefined) {
|
|
207
|
+
obj.txn_process_type = message.txn_process_type;
|
|
208
|
+
}
|
|
209
|
+
if (message.bank_id !== undefined) {
|
|
210
|
+
obj.bank_id = message.bank_id;
|
|
211
|
+
}
|
|
212
|
+
if (message.payment_category !== undefined) {
|
|
213
|
+
obj.payment_category = message.payment_category;
|
|
214
|
+
}
|
|
215
|
+
if (message.item_code !== undefined) {
|
|
216
|
+
obj.item_code = message.item_code;
|
|
217
|
+
}
|
|
218
|
+
if (message.additional_info) {
|
|
219
|
+
const entries = Object.entries(message.additional_info);
|
|
220
|
+
if (entries.length > 0) {
|
|
221
|
+
obj.additional_info = {};
|
|
222
|
+
entries.forEach(([k, v]) => {
|
|
223
|
+
obj.additional_info[k] = v;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return obj;
|
|
228
|
+
},
|
|
229
|
+
create(base) {
|
|
230
|
+
return exports.PaymentDetails.fromPartial(base ?? {});
|
|
231
|
+
},
|
|
232
|
+
fromPartial(object) {
|
|
233
|
+
const message = createBasePaymentDetails();
|
|
234
|
+
message.method = object.method ?? "";
|
|
235
|
+
message.pg_txn_id = object.pg_txn_id ?? "";
|
|
236
|
+
message.bank_ref_no = object.bank_ref_no ?? undefined;
|
|
237
|
+
message.settled_at = object.settled_at ?? undefined;
|
|
238
|
+
message.remitter_name = object.remitter_name ?? undefined;
|
|
239
|
+
message.upi_vpa = object.upi_vpa ?? undefined;
|
|
240
|
+
message.upi_masked_vpa = object.upi_masked_vpa ?? undefined;
|
|
241
|
+
message.txn_process_type = object.txn_process_type ?? undefined;
|
|
242
|
+
message.bank_id = object.bank_id ?? undefined;
|
|
243
|
+
message.payment_category = object.payment_category ?? undefined;
|
|
244
|
+
message.item_code = object.item_code ?? undefined;
|
|
245
|
+
message.additional_info = Object.entries(object.additional_info ?? {}).reduce((acc, [key, value]) => {
|
|
246
|
+
if (value !== undefined) {
|
|
247
|
+
acc[key] = globalThis.String(value);
|
|
248
|
+
}
|
|
249
|
+
return acc;
|
|
250
|
+
}, {});
|
|
251
|
+
return message;
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
function createBasePaymentDetails_AdditionalInfoEntry() {
|
|
255
|
+
return { key: "", value: "" };
|
|
256
|
+
}
|
|
257
|
+
exports.PaymentDetails_AdditionalInfoEntry = {
|
|
258
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
259
|
+
if (message.key !== "") {
|
|
260
|
+
writer.uint32(10).string(message.key);
|
|
261
|
+
}
|
|
262
|
+
if (message.value !== "") {
|
|
263
|
+
writer.uint32(18).string(message.value);
|
|
264
|
+
}
|
|
265
|
+
return writer;
|
|
266
|
+
},
|
|
267
|
+
decode(input, length) {
|
|
268
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
269
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
270
|
+
const message = createBasePaymentDetails_AdditionalInfoEntry();
|
|
271
|
+
while (reader.pos < end) {
|
|
272
|
+
const tag = reader.uint32();
|
|
273
|
+
switch (tag >>> 3) {
|
|
274
|
+
case 1:
|
|
275
|
+
if (tag !== 10) {
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
message.key = reader.string();
|
|
279
|
+
continue;
|
|
280
|
+
case 2:
|
|
281
|
+
if (tag !== 18) {
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
message.value = reader.string();
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
reader.skipType(tag & 7);
|
|
291
|
+
}
|
|
292
|
+
return message;
|
|
293
|
+
},
|
|
294
|
+
fromJSON(object) {
|
|
295
|
+
return {
|
|
296
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
297
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
298
|
+
};
|
|
299
|
+
},
|
|
300
|
+
toJSON(message) {
|
|
301
|
+
const obj = {};
|
|
302
|
+
if (message.key !== "") {
|
|
303
|
+
obj.key = message.key;
|
|
304
|
+
}
|
|
305
|
+
if (message.value !== "") {
|
|
306
|
+
obj.value = message.value;
|
|
307
|
+
}
|
|
308
|
+
return obj;
|
|
309
|
+
},
|
|
310
|
+
create(base) {
|
|
311
|
+
return exports.PaymentDetails_AdditionalInfoEntry.fromPartial(base ?? {});
|
|
312
|
+
},
|
|
313
|
+
fromPartial(object) {
|
|
314
|
+
const message = createBasePaymentDetails_AdditionalInfoEntry();
|
|
315
|
+
message.key = object.key ?? "";
|
|
316
|
+
message.value = object.value ?? "";
|
|
317
|
+
return message;
|
|
318
|
+
},
|
|
319
|
+
};
|
|
15
320
|
function createBaseBDTransactionRequest() {
|
|
16
|
-
return {
|
|
321
|
+
return {
|
|
322
|
+
event_type: "",
|
|
323
|
+
transaction_id: 0,
|
|
324
|
+
subscriber_id: "",
|
|
325
|
+
order_ref: "",
|
|
326
|
+
amount_minor: 0,
|
|
327
|
+
charged_total_minor: 0,
|
|
328
|
+
currency: "",
|
|
329
|
+
status: "",
|
|
330
|
+
final: false,
|
|
331
|
+
transaction_date: "",
|
|
332
|
+
payment_details: undefined,
|
|
333
|
+
customer_ctx: {},
|
|
334
|
+
metadata: {},
|
|
335
|
+
timestamp: "",
|
|
336
|
+
signature: "",
|
|
337
|
+
};
|
|
17
338
|
}
|
|
18
339
|
exports.BDTransactionRequest = {
|
|
19
340
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
-
if (message.
|
|
21
|
-
writer.uint32(10).string(message.
|
|
341
|
+
if (message.event_type !== "") {
|
|
342
|
+
writer.uint32(10).string(message.event_type);
|
|
343
|
+
}
|
|
344
|
+
if (message.transaction_id !== 0) {
|
|
345
|
+
writer.uint32(16).int32(message.transaction_id);
|
|
346
|
+
}
|
|
347
|
+
if (message.subscriber_id !== "") {
|
|
348
|
+
writer.uint32(26).string(message.subscriber_id);
|
|
349
|
+
}
|
|
350
|
+
if (message.order_ref !== "") {
|
|
351
|
+
writer.uint32(34).string(message.order_ref);
|
|
352
|
+
}
|
|
353
|
+
if (message.amount_minor !== 0) {
|
|
354
|
+
writer.uint32(40).int64(message.amount_minor);
|
|
355
|
+
}
|
|
356
|
+
if (message.charged_total_minor !== 0) {
|
|
357
|
+
writer.uint32(48).int64(message.charged_total_minor);
|
|
358
|
+
}
|
|
359
|
+
if (message.currency !== "") {
|
|
360
|
+
writer.uint32(58).string(message.currency);
|
|
361
|
+
}
|
|
362
|
+
if (message.status !== "") {
|
|
363
|
+
writer.uint32(66).string(message.status);
|
|
364
|
+
}
|
|
365
|
+
if (message.final !== false) {
|
|
366
|
+
writer.uint32(72).bool(message.final);
|
|
367
|
+
}
|
|
368
|
+
if (message.transaction_date !== "") {
|
|
369
|
+
writer.uint32(82).string(message.transaction_date);
|
|
370
|
+
}
|
|
371
|
+
if (message.payment_details !== undefined) {
|
|
372
|
+
exports.PaymentDetails.encode(message.payment_details, writer.uint32(90).fork()).ldelim();
|
|
373
|
+
}
|
|
374
|
+
Object.entries(message.customer_ctx).forEach(([key, value]) => {
|
|
375
|
+
exports.BDTransactionRequest_CustomerCtxEntry.encode({ key: key, value }, writer.uint32(98).fork()).ldelim();
|
|
376
|
+
});
|
|
377
|
+
Object.entries(message.metadata).forEach(([key, value]) => {
|
|
378
|
+
exports.BDTransactionRequest_MetadataEntry.encode({ key: key, value }, writer.uint32(106).fork()).ldelim();
|
|
379
|
+
});
|
|
380
|
+
if (message.timestamp !== "") {
|
|
381
|
+
writer.uint32(114).string(message.timestamp);
|
|
382
|
+
}
|
|
383
|
+
if (message.signature !== "") {
|
|
384
|
+
writer.uint32(122).string(message.signature);
|
|
22
385
|
}
|
|
23
386
|
return writer;
|
|
24
387
|
},
|
|
@@ -33,7 +396,97 @@ exports.BDTransactionRequest = {
|
|
|
33
396
|
if (tag !== 10) {
|
|
34
397
|
break;
|
|
35
398
|
}
|
|
36
|
-
message.
|
|
399
|
+
message.event_type = reader.string();
|
|
400
|
+
continue;
|
|
401
|
+
case 2:
|
|
402
|
+
if (tag !== 16) {
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
message.transaction_id = reader.int32();
|
|
406
|
+
continue;
|
|
407
|
+
case 3:
|
|
408
|
+
if (tag !== 26) {
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
message.subscriber_id = reader.string();
|
|
412
|
+
continue;
|
|
413
|
+
case 4:
|
|
414
|
+
if (tag !== 34) {
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
417
|
+
message.order_ref = reader.string();
|
|
418
|
+
continue;
|
|
419
|
+
case 5:
|
|
420
|
+
if (tag !== 40) {
|
|
421
|
+
break;
|
|
422
|
+
}
|
|
423
|
+
message.amount_minor = longToNumber(reader.int64());
|
|
424
|
+
continue;
|
|
425
|
+
case 6:
|
|
426
|
+
if (tag !== 48) {
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
message.charged_total_minor = longToNumber(reader.int64());
|
|
430
|
+
continue;
|
|
431
|
+
case 7:
|
|
432
|
+
if (tag !== 58) {
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
|
+
message.currency = reader.string();
|
|
436
|
+
continue;
|
|
437
|
+
case 8:
|
|
438
|
+
if (tag !== 66) {
|
|
439
|
+
break;
|
|
440
|
+
}
|
|
441
|
+
message.status = reader.string();
|
|
442
|
+
continue;
|
|
443
|
+
case 9:
|
|
444
|
+
if (tag !== 72) {
|
|
445
|
+
break;
|
|
446
|
+
}
|
|
447
|
+
message.final = reader.bool();
|
|
448
|
+
continue;
|
|
449
|
+
case 10:
|
|
450
|
+
if (tag !== 82) {
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
message.transaction_date = reader.string();
|
|
454
|
+
continue;
|
|
455
|
+
case 11:
|
|
456
|
+
if (tag !== 90) {
|
|
457
|
+
break;
|
|
458
|
+
}
|
|
459
|
+
message.payment_details = exports.PaymentDetails.decode(reader, reader.uint32());
|
|
460
|
+
continue;
|
|
461
|
+
case 12:
|
|
462
|
+
if (tag !== 98) {
|
|
463
|
+
break;
|
|
464
|
+
}
|
|
465
|
+
const entry12 = exports.BDTransactionRequest_CustomerCtxEntry.decode(reader, reader.uint32());
|
|
466
|
+
if (entry12.value !== undefined) {
|
|
467
|
+
message.customer_ctx[entry12.key] = entry12.value;
|
|
468
|
+
}
|
|
469
|
+
continue;
|
|
470
|
+
case 13:
|
|
471
|
+
if (tag !== 106) {
|
|
472
|
+
break;
|
|
473
|
+
}
|
|
474
|
+
const entry13 = exports.BDTransactionRequest_MetadataEntry.decode(reader, reader.uint32());
|
|
475
|
+
if (entry13.value !== undefined) {
|
|
476
|
+
message.metadata[entry13.key] = entry13.value;
|
|
477
|
+
}
|
|
478
|
+
continue;
|
|
479
|
+
case 14:
|
|
480
|
+
if (tag !== 114) {
|
|
481
|
+
break;
|
|
482
|
+
}
|
|
483
|
+
message.timestamp = reader.string();
|
|
484
|
+
continue;
|
|
485
|
+
case 15:
|
|
486
|
+
if (tag !== 122) {
|
|
487
|
+
break;
|
|
488
|
+
}
|
|
489
|
+
message.signature = reader.string();
|
|
37
490
|
continue;
|
|
38
491
|
}
|
|
39
492
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -44,12 +497,92 @@ exports.BDTransactionRequest = {
|
|
|
44
497
|
return message;
|
|
45
498
|
},
|
|
46
499
|
fromJSON(object) {
|
|
47
|
-
return {
|
|
500
|
+
return {
|
|
501
|
+
event_type: isSet(object.event_type) ? globalThis.String(object.event_type) : "",
|
|
502
|
+
transaction_id: isSet(object.transaction_id) ? globalThis.Number(object.transaction_id) : 0,
|
|
503
|
+
subscriber_id: isSet(object.subscriber_id) ? globalThis.String(object.subscriber_id) : "",
|
|
504
|
+
order_ref: isSet(object.order_ref) ? globalThis.String(object.order_ref) : "",
|
|
505
|
+
amount_minor: isSet(object.amount_minor) ? globalThis.Number(object.amount_minor) : 0,
|
|
506
|
+
charged_total_minor: isSet(object.charged_total_minor) ? globalThis.Number(object.charged_total_minor) : 0,
|
|
507
|
+
currency: isSet(object.currency) ? globalThis.String(object.currency) : "",
|
|
508
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
509
|
+
final: isSet(object.final) ? globalThis.Boolean(object.final) : false,
|
|
510
|
+
transaction_date: isSet(object.transaction_date) ? globalThis.String(object.transaction_date) : "",
|
|
511
|
+
payment_details: isSet(object.payment_details) ? exports.PaymentDetails.fromJSON(object.payment_details) : undefined,
|
|
512
|
+
customer_ctx: isObject(object.customer_ctx)
|
|
513
|
+
? Object.entries(object.customer_ctx).reduce((acc, [key, value]) => {
|
|
514
|
+
acc[key] = String(value);
|
|
515
|
+
return acc;
|
|
516
|
+
}, {})
|
|
517
|
+
: {},
|
|
518
|
+
metadata: isObject(object.metadata)
|
|
519
|
+
? Object.entries(object.metadata).reduce((acc, [key, value]) => {
|
|
520
|
+
acc[key] = String(value);
|
|
521
|
+
return acc;
|
|
522
|
+
}, {})
|
|
523
|
+
: {},
|
|
524
|
+
timestamp: isSet(object.timestamp) ? globalThis.String(object.timestamp) : "",
|
|
525
|
+
signature: isSet(object.signature) ? globalThis.String(object.signature) : "",
|
|
526
|
+
};
|
|
48
527
|
},
|
|
49
528
|
toJSON(message) {
|
|
50
529
|
const obj = {};
|
|
51
|
-
if (message.
|
|
52
|
-
obj.
|
|
530
|
+
if (message.event_type !== "") {
|
|
531
|
+
obj.event_type = message.event_type;
|
|
532
|
+
}
|
|
533
|
+
if (message.transaction_id !== 0) {
|
|
534
|
+
obj.transaction_id = Math.round(message.transaction_id);
|
|
535
|
+
}
|
|
536
|
+
if (message.subscriber_id !== "") {
|
|
537
|
+
obj.subscriber_id = message.subscriber_id;
|
|
538
|
+
}
|
|
539
|
+
if (message.order_ref !== "") {
|
|
540
|
+
obj.order_ref = message.order_ref;
|
|
541
|
+
}
|
|
542
|
+
if (message.amount_minor !== 0) {
|
|
543
|
+
obj.amount_minor = Math.round(message.amount_minor);
|
|
544
|
+
}
|
|
545
|
+
if (message.charged_total_minor !== 0) {
|
|
546
|
+
obj.charged_total_minor = Math.round(message.charged_total_minor);
|
|
547
|
+
}
|
|
548
|
+
if (message.currency !== "") {
|
|
549
|
+
obj.currency = message.currency;
|
|
550
|
+
}
|
|
551
|
+
if (message.status !== "") {
|
|
552
|
+
obj.status = message.status;
|
|
553
|
+
}
|
|
554
|
+
if (message.final !== false) {
|
|
555
|
+
obj.final = message.final;
|
|
556
|
+
}
|
|
557
|
+
if (message.transaction_date !== "") {
|
|
558
|
+
obj.transaction_date = message.transaction_date;
|
|
559
|
+
}
|
|
560
|
+
if (message.payment_details !== undefined) {
|
|
561
|
+
obj.payment_details = exports.PaymentDetails.toJSON(message.payment_details);
|
|
562
|
+
}
|
|
563
|
+
if (message.customer_ctx) {
|
|
564
|
+
const entries = Object.entries(message.customer_ctx);
|
|
565
|
+
if (entries.length > 0) {
|
|
566
|
+
obj.customer_ctx = {};
|
|
567
|
+
entries.forEach(([k, v]) => {
|
|
568
|
+
obj.customer_ctx[k] = v;
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
if (message.metadata) {
|
|
573
|
+
const entries = Object.entries(message.metadata);
|
|
574
|
+
if (entries.length > 0) {
|
|
575
|
+
obj.metadata = {};
|
|
576
|
+
entries.forEach(([k, v]) => {
|
|
577
|
+
obj.metadata[k] = v;
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
if (message.timestamp !== "") {
|
|
582
|
+
obj.timestamp = message.timestamp;
|
|
583
|
+
}
|
|
584
|
+
if (message.signature !== "") {
|
|
585
|
+
obj.signature = message.signature;
|
|
53
586
|
}
|
|
54
587
|
return obj;
|
|
55
588
|
},
|
|
@@ -58,7 +591,165 @@ exports.BDTransactionRequest = {
|
|
|
58
591
|
},
|
|
59
592
|
fromPartial(object) {
|
|
60
593
|
const message = createBaseBDTransactionRequest();
|
|
61
|
-
message.
|
|
594
|
+
message.event_type = object.event_type ?? "";
|
|
595
|
+
message.transaction_id = object.transaction_id ?? 0;
|
|
596
|
+
message.subscriber_id = object.subscriber_id ?? "";
|
|
597
|
+
message.order_ref = object.order_ref ?? "";
|
|
598
|
+
message.amount_minor = object.amount_minor ?? 0;
|
|
599
|
+
message.charged_total_minor = object.charged_total_minor ?? 0;
|
|
600
|
+
message.currency = object.currency ?? "";
|
|
601
|
+
message.status = object.status ?? "";
|
|
602
|
+
message.final = object.final ?? false;
|
|
603
|
+
message.transaction_date = object.transaction_date ?? "";
|
|
604
|
+
message.payment_details = (object.payment_details !== undefined && object.payment_details !== null)
|
|
605
|
+
? exports.PaymentDetails.fromPartial(object.payment_details)
|
|
606
|
+
: undefined;
|
|
607
|
+
message.customer_ctx = Object.entries(object.customer_ctx ?? {}).reduce((acc, [key, value]) => {
|
|
608
|
+
if (value !== undefined) {
|
|
609
|
+
acc[key] = globalThis.String(value);
|
|
610
|
+
}
|
|
611
|
+
return acc;
|
|
612
|
+
}, {});
|
|
613
|
+
message.metadata = Object.entries(object.metadata ?? {}).reduce((acc, [key, value]) => {
|
|
614
|
+
if (value !== undefined) {
|
|
615
|
+
acc[key] = globalThis.String(value);
|
|
616
|
+
}
|
|
617
|
+
return acc;
|
|
618
|
+
}, {});
|
|
619
|
+
message.timestamp = object.timestamp ?? "";
|
|
620
|
+
message.signature = object.signature ?? "";
|
|
621
|
+
return message;
|
|
622
|
+
},
|
|
623
|
+
};
|
|
624
|
+
function createBaseBDTransactionRequest_CustomerCtxEntry() {
|
|
625
|
+
return { key: "", value: "" };
|
|
626
|
+
}
|
|
627
|
+
exports.BDTransactionRequest_CustomerCtxEntry = {
|
|
628
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
629
|
+
if (message.key !== "") {
|
|
630
|
+
writer.uint32(10).string(message.key);
|
|
631
|
+
}
|
|
632
|
+
if (message.value !== "") {
|
|
633
|
+
writer.uint32(18).string(message.value);
|
|
634
|
+
}
|
|
635
|
+
return writer;
|
|
636
|
+
},
|
|
637
|
+
decode(input, length) {
|
|
638
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
639
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
640
|
+
const message = createBaseBDTransactionRequest_CustomerCtxEntry();
|
|
641
|
+
while (reader.pos < end) {
|
|
642
|
+
const tag = reader.uint32();
|
|
643
|
+
switch (tag >>> 3) {
|
|
644
|
+
case 1:
|
|
645
|
+
if (tag !== 10) {
|
|
646
|
+
break;
|
|
647
|
+
}
|
|
648
|
+
message.key = reader.string();
|
|
649
|
+
continue;
|
|
650
|
+
case 2:
|
|
651
|
+
if (tag !== 18) {
|
|
652
|
+
break;
|
|
653
|
+
}
|
|
654
|
+
message.value = reader.string();
|
|
655
|
+
continue;
|
|
656
|
+
}
|
|
657
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
658
|
+
break;
|
|
659
|
+
}
|
|
660
|
+
reader.skipType(tag & 7);
|
|
661
|
+
}
|
|
662
|
+
return message;
|
|
663
|
+
},
|
|
664
|
+
fromJSON(object) {
|
|
665
|
+
return {
|
|
666
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
667
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
668
|
+
};
|
|
669
|
+
},
|
|
670
|
+
toJSON(message) {
|
|
671
|
+
const obj = {};
|
|
672
|
+
if (message.key !== "") {
|
|
673
|
+
obj.key = message.key;
|
|
674
|
+
}
|
|
675
|
+
if (message.value !== "") {
|
|
676
|
+
obj.value = message.value;
|
|
677
|
+
}
|
|
678
|
+
return obj;
|
|
679
|
+
},
|
|
680
|
+
create(base) {
|
|
681
|
+
return exports.BDTransactionRequest_CustomerCtxEntry.fromPartial(base ?? {});
|
|
682
|
+
},
|
|
683
|
+
fromPartial(object) {
|
|
684
|
+
const message = createBaseBDTransactionRequest_CustomerCtxEntry();
|
|
685
|
+
message.key = object.key ?? "";
|
|
686
|
+
message.value = object.value ?? "";
|
|
687
|
+
return message;
|
|
688
|
+
},
|
|
689
|
+
};
|
|
690
|
+
function createBaseBDTransactionRequest_MetadataEntry() {
|
|
691
|
+
return { key: "", value: "" };
|
|
692
|
+
}
|
|
693
|
+
exports.BDTransactionRequest_MetadataEntry = {
|
|
694
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
695
|
+
if (message.key !== "") {
|
|
696
|
+
writer.uint32(10).string(message.key);
|
|
697
|
+
}
|
|
698
|
+
if (message.value !== "") {
|
|
699
|
+
writer.uint32(18).string(message.value);
|
|
700
|
+
}
|
|
701
|
+
return writer;
|
|
702
|
+
},
|
|
703
|
+
decode(input, length) {
|
|
704
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
705
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
706
|
+
const message = createBaseBDTransactionRequest_MetadataEntry();
|
|
707
|
+
while (reader.pos < end) {
|
|
708
|
+
const tag = reader.uint32();
|
|
709
|
+
switch (tag >>> 3) {
|
|
710
|
+
case 1:
|
|
711
|
+
if (tag !== 10) {
|
|
712
|
+
break;
|
|
713
|
+
}
|
|
714
|
+
message.key = reader.string();
|
|
715
|
+
continue;
|
|
716
|
+
case 2:
|
|
717
|
+
if (tag !== 18) {
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
message.value = reader.string();
|
|
721
|
+
continue;
|
|
722
|
+
}
|
|
723
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
724
|
+
break;
|
|
725
|
+
}
|
|
726
|
+
reader.skipType(tag & 7);
|
|
727
|
+
}
|
|
728
|
+
return message;
|
|
729
|
+
},
|
|
730
|
+
fromJSON(object) {
|
|
731
|
+
return {
|
|
732
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
733
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
734
|
+
};
|
|
735
|
+
},
|
|
736
|
+
toJSON(message) {
|
|
737
|
+
const obj = {};
|
|
738
|
+
if (message.key !== "") {
|
|
739
|
+
obj.key = message.key;
|
|
740
|
+
}
|
|
741
|
+
if (message.value !== "") {
|
|
742
|
+
obj.value = message.value;
|
|
743
|
+
}
|
|
744
|
+
return obj;
|
|
745
|
+
},
|
|
746
|
+
create(base) {
|
|
747
|
+
return exports.BDTransactionRequest_MetadataEntry.fromPartial(base ?? {});
|
|
748
|
+
},
|
|
749
|
+
fromPartial(object) {
|
|
750
|
+
const message = createBaseBDTransactionRequest_MetadataEntry();
|
|
751
|
+
message.key = object.key ?? "";
|
|
752
|
+
message.value = object.value ?? "";
|
|
62
753
|
return message;
|
|
63
754
|
},
|
|
64
755
|
};
|
|
@@ -463,6 +1154,22 @@ exports.BDTransactionResponse = {
|
|
|
463
1154
|
return message;
|
|
464
1155
|
},
|
|
465
1156
|
};
|
|
1157
|
+
function longToNumber(long) {
|
|
1158
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
1159
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1160
|
+
}
|
|
1161
|
+
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
1162
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1163
|
+
}
|
|
1164
|
+
return long.toNumber();
|
|
1165
|
+
}
|
|
1166
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
1167
|
+
minimal_1.default.util.Long = long_1.default;
|
|
1168
|
+
minimal_1.default.configure();
|
|
1169
|
+
}
|
|
1170
|
+
function isObject(value) {
|
|
1171
|
+
return typeof value === "object" && value !== null;
|
|
1172
|
+
}
|
|
466
1173
|
function isSet(value) {
|
|
467
1174
|
return value !== null && value !== undefined;
|
|
468
1175
|
}
|