@stashfin/grpc 1.5.0 → 1.5.2
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 -0
- package/ts/bbps/processwebhookv2.js +468 -0
- package/ts/bbps.d.ts +21 -7
- package/ts/bbps.js +10 -0
package/package.json
CHANGED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "bbps.processwebhookv2";
|
|
3
|
+
export interface BDTransactionRequest {
|
|
4
|
+
metadata: string;
|
|
5
|
+
}
|
|
6
|
+
export interface TxnResponse {
|
|
7
|
+
id: number;
|
|
8
|
+
customer_id: number;
|
|
9
|
+
utility_name: string;
|
|
10
|
+
provider_name: string;
|
|
11
|
+
/** optional / nullable */
|
|
12
|
+
provider_logo?: string | undefined;
|
|
13
|
+
/** nullable */
|
|
14
|
+
account_no?: string | undefined;
|
|
15
|
+
final_amount: number;
|
|
16
|
+
status: string;
|
|
17
|
+
txn_id: string;
|
|
18
|
+
order_id: string;
|
|
19
|
+
/** optional / nullable */
|
|
20
|
+
bbps_ref_no?: string | undefined;
|
|
21
|
+
/** optional */
|
|
22
|
+
source_ref_no?: string | undefined;
|
|
23
|
+
/** use ISO 8601 string or Timestamp */
|
|
24
|
+
paid_at: string;
|
|
25
|
+
/** optional / nullable */
|
|
26
|
+
biller_status?: string | undefined;
|
|
27
|
+
}
|
|
28
|
+
export interface AuthSessionResponse {
|
|
29
|
+
customer_id: number;
|
|
30
|
+
auth_token?: string | undefined;
|
|
31
|
+
device_id?: string | undefined;
|
|
32
|
+
}
|
|
33
|
+
export interface BDTransactionResponse {
|
|
34
|
+
txnResponse: TxnResponse | undefined;
|
|
35
|
+
authSessionResponse: AuthSessionResponse | undefined;
|
|
36
|
+
}
|
|
37
|
+
export declare const BDTransactionRequest: {
|
|
38
|
+
encode(message: BDTransactionRequest, writer?: _m0.Writer): _m0.Writer;
|
|
39
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BDTransactionRequest;
|
|
40
|
+
fromJSON(object: any): BDTransactionRequest;
|
|
41
|
+
toJSON(message: BDTransactionRequest): unknown;
|
|
42
|
+
create<I extends Exact<DeepPartial<BDTransactionRequest>, I>>(base?: I): BDTransactionRequest;
|
|
43
|
+
fromPartial<I extends Exact<DeepPartial<BDTransactionRequest>, I>>(object: I): BDTransactionRequest;
|
|
44
|
+
};
|
|
45
|
+
export declare const TxnResponse: {
|
|
46
|
+
encode(message: TxnResponse, writer?: _m0.Writer): _m0.Writer;
|
|
47
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): TxnResponse;
|
|
48
|
+
fromJSON(object: any): TxnResponse;
|
|
49
|
+
toJSON(message: TxnResponse): unknown;
|
|
50
|
+
create<I extends Exact<DeepPartial<TxnResponse>, I>>(base?: I): TxnResponse;
|
|
51
|
+
fromPartial<I extends Exact<DeepPartial<TxnResponse>, I>>(object: I): TxnResponse;
|
|
52
|
+
};
|
|
53
|
+
export declare const AuthSessionResponse: {
|
|
54
|
+
encode(message: AuthSessionResponse, writer?: _m0.Writer): _m0.Writer;
|
|
55
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): AuthSessionResponse;
|
|
56
|
+
fromJSON(object: any): AuthSessionResponse;
|
|
57
|
+
toJSON(message: AuthSessionResponse): unknown;
|
|
58
|
+
create<I extends Exact<DeepPartial<AuthSessionResponse>, I>>(base?: I): AuthSessionResponse;
|
|
59
|
+
fromPartial<I extends Exact<DeepPartial<AuthSessionResponse>, I>>(object: I): AuthSessionResponse;
|
|
60
|
+
};
|
|
61
|
+
export declare const BDTransactionResponse: {
|
|
62
|
+
encode(message: BDTransactionResponse, writer?: _m0.Writer): _m0.Writer;
|
|
63
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BDTransactionResponse;
|
|
64
|
+
fromJSON(object: any): BDTransactionResponse;
|
|
65
|
+
toJSON(message: BDTransactionResponse): unknown;
|
|
66
|
+
create<I extends Exact<DeepPartial<BDTransactionResponse>, I>>(base?: I): BDTransactionResponse;
|
|
67
|
+
fromPartial<I extends Exact<DeepPartial<BDTransactionResponse>, I>>(object: I): BDTransactionResponse;
|
|
68
|
+
};
|
|
69
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
70
|
+
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 {} ? {
|
|
71
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
72
|
+
} : Partial<T>;
|
|
73
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
74
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
75
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
76
|
+
} & {
|
|
77
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
78
|
+
};
|
|
79
|
+
export {};
|
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v1.181.2
|
|
5
|
+
// protoc v6.33.0
|
|
6
|
+
// source: bbps/processwebhookv2.proto
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.BDTransactionResponse = exports.AuthSessionResponse = exports.TxnResponse = exports.BDTransactionRequest = exports.protobufPackage = void 0;
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
|
+
exports.protobufPackage = "bbps.processwebhookv2";
|
|
15
|
+
function createBaseBDTransactionRequest() {
|
|
16
|
+
return { metadata: "" };
|
|
17
|
+
}
|
|
18
|
+
exports.BDTransactionRequest = {
|
|
19
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
+
if (message.metadata !== "") {
|
|
21
|
+
writer.uint32(10).string(message.metadata);
|
|
22
|
+
}
|
|
23
|
+
return writer;
|
|
24
|
+
},
|
|
25
|
+
decode(input, length) {
|
|
26
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
27
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
28
|
+
const message = createBaseBDTransactionRequest();
|
|
29
|
+
while (reader.pos < end) {
|
|
30
|
+
const tag = reader.uint32();
|
|
31
|
+
switch (tag >>> 3) {
|
|
32
|
+
case 1:
|
|
33
|
+
if (tag !== 10) {
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
message.metadata = reader.string();
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
reader.skipType(tag & 7);
|
|
43
|
+
}
|
|
44
|
+
return message;
|
|
45
|
+
},
|
|
46
|
+
fromJSON(object) {
|
|
47
|
+
return { metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "" };
|
|
48
|
+
},
|
|
49
|
+
toJSON(message) {
|
|
50
|
+
const obj = {};
|
|
51
|
+
if (message.metadata !== "") {
|
|
52
|
+
obj.metadata = message.metadata;
|
|
53
|
+
}
|
|
54
|
+
return obj;
|
|
55
|
+
},
|
|
56
|
+
create(base) {
|
|
57
|
+
return exports.BDTransactionRequest.fromPartial(base ?? {});
|
|
58
|
+
},
|
|
59
|
+
fromPartial(object) {
|
|
60
|
+
const message = createBaseBDTransactionRequest();
|
|
61
|
+
message.metadata = object.metadata ?? "";
|
|
62
|
+
return message;
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
function createBaseTxnResponse() {
|
|
66
|
+
return {
|
|
67
|
+
id: 0,
|
|
68
|
+
customer_id: 0,
|
|
69
|
+
utility_name: "",
|
|
70
|
+
provider_name: "",
|
|
71
|
+
provider_logo: undefined,
|
|
72
|
+
account_no: undefined,
|
|
73
|
+
final_amount: 0,
|
|
74
|
+
status: "",
|
|
75
|
+
txn_id: "",
|
|
76
|
+
order_id: "",
|
|
77
|
+
bbps_ref_no: undefined,
|
|
78
|
+
source_ref_no: undefined,
|
|
79
|
+
paid_at: "",
|
|
80
|
+
biller_status: undefined,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
exports.TxnResponse = {
|
|
84
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
85
|
+
if (message.id !== 0) {
|
|
86
|
+
writer.uint32(8).int32(message.id);
|
|
87
|
+
}
|
|
88
|
+
if (message.customer_id !== 0) {
|
|
89
|
+
writer.uint32(16).int32(message.customer_id);
|
|
90
|
+
}
|
|
91
|
+
if (message.utility_name !== "") {
|
|
92
|
+
writer.uint32(26).string(message.utility_name);
|
|
93
|
+
}
|
|
94
|
+
if (message.provider_name !== "") {
|
|
95
|
+
writer.uint32(34).string(message.provider_name);
|
|
96
|
+
}
|
|
97
|
+
if (message.provider_logo !== undefined) {
|
|
98
|
+
writer.uint32(42).string(message.provider_logo);
|
|
99
|
+
}
|
|
100
|
+
if (message.account_no !== undefined) {
|
|
101
|
+
writer.uint32(50).string(message.account_no);
|
|
102
|
+
}
|
|
103
|
+
if (message.final_amount !== 0) {
|
|
104
|
+
writer.uint32(57).double(message.final_amount);
|
|
105
|
+
}
|
|
106
|
+
if (message.status !== "") {
|
|
107
|
+
writer.uint32(66).string(message.status);
|
|
108
|
+
}
|
|
109
|
+
if (message.txn_id !== "") {
|
|
110
|
+
writer.uint32(74).string(message.txn_id);
|
|
111
|
+
}
|
|
112
|
+
if (message.order_id !== "") {
|
|
113
|
+
writer.uint32(82).string(message.order_id);
|
|
114
|
+
}
|
|
115
|
+
if (message.bbps_ref_no !== undefined) {
|
|
116
|
+
writer.uint32(90).string(message.bbps_ref_no);
|
|
117
|
+
}
|
|
118
|
+
if (message.source_ref_no !== undefined) {
|
|
119
|
+
writer.uint32(98).string(message.source_ref_no);
|
|
120
|
+
}
|
|
121
|
+
if (message.paid_at !== "") {
|
|
122
|
+
writer.uint32(106).string(message.paid_at);
|
|
123
|
+
}
|
|
124
|
+
if (message.biller_status !== undefined) {
|
|
125
|
+
writer.uint32(114).string(message.biller_status);
|
|
126
|
+
}
|
|
127
|
+
return writer;
|
|
128
|
+
},
|
|
129
|
+
decode(input, length) {
|
|
130
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
131
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
132
|
+
const message = createBaseTxnResponse();
|
|
133
|
+
while (reader.pos < end) {
|
|
134
|
+
const tag = reader.uint32();
|
|
135
|
+
switch (tag >>> 3) {
|
|
136
|
+
case 1:
|
|
137
|
+
if (tag !== 8) {
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
message.id = reader.int32();
|
|
141
|
+
continue;
|
|
142
|
+
case 2:
|
|
143
|
+
if (tag !== 16) {
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
message.customer_id = reader.int32();
|
|
147
|
+
continue;
|
|
148
|
+
case 3:
|
|
149
|
+
if (tag !== 26) {
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
message.utility_name = reader.string();
|
|
153
|
+
continue;
|
|
154
|
+
case 4:
|
|
155
|
+
if (tag !== 34) {
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
message.provider_name = reader.string();
|
|
159
|
+
continue;
|
|
160
|
+
case 5:
|
|
161
|
+
if (tag !== 42) {
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
message.provider_logo = reader.string();
|
|
165
|
+
continue;
|
|
166
|
+
case 6:
|
|
167
|
+
if (tag !== 50) {
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
message.account_no = reader.string();
|
|
171
|
+
continue;
|
|
172
|
+
case 7:
|
|
173
|
+
if (tag !== 57) {
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
message.final_amount = reader.double();
|
|
177
|
+
continue;
|
|
178
|
+
case 8:
|
|
179
|
+
if (tag !== 66) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
message.status = reader.string();
|
|
183
|
+
continue;
|
|
184
|
+
case 9:
|
|
185
|
+
if (tag !== 74) {
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
message.txn_id = reader.string();
|
|
189
|
+
continue;
|
|
190
|
+
case 10:
|
|
191
|
+
if (tag !== 82) {
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
message.order_id = reader.string();
|
|
195
|
+
continue;
|
|
196
|
+
case 11:
|
|
197
|
+
if (tag !== 90) {
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
message.bbps_ref_no = reader.string();
|
|
201
|
+
continue;
|
|
202
|
+
case 12:
|
|
203
|
+
if (tag !== 98) {
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
message.source_ref_no = reader.string();
|
|
207
|
+
continue;
|
|
208
|
+
case 13:
|
|
209
|
+
if (tag !== 106) {
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
message.paid_at = reader.string();
|
|
213
|
+
continue;
|
|
214
|
+
case 14:
|
|
215
|
+
if (tag !== 114) {
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
message.biller_status = reader.string();
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
reader.skipType(tag & 7);
|
|
225
|
+
}
|
|
226
|
+
return message;
|
|
227
|
+
},
|
|
228
|
+
fromJSON(object) {
|
|
229
|
+
return {
|
|
230
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
231
|
+
customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
|
|
232
|
+
utility_name: isSet(object.utility_name) ? globalThis.String(object.utility_name) : "",
|
|
233
|
+
provider_name: isSet(object.provider_name) ? globalThis.String(object.provider_name) : "",
|
|
234
|
+
provider_logo: isSet(object.provider_logo) ? globalThis.String(object.provider_logo) : undefined,
|
|
235
|
+
account_no: isSet(object.account_no) ? globalThis.String(object.account_no) : undefined,
|
|
236
|
+
final_amount: isSet(object.final_amount) ? globalThis.Number(object.final_amount) : 0,
|
|
237
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
238
|
+
txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : "",
|
|
239
|
+
order_id: isSet(object.order_id) ? globalThis.String(object.order_id) : "",
|
|
240
|
+
bbps_ref_no: isSet(object.bbps_ref_no) ? globalThis.String(object.bbps_ref_no) : undefined,
|
|
241
|
+
source_ref_no: isSet(object.source_ref_no) ? globalThis.String(object.source_ref_no) : undefined,
|
|
242
|
+
paid_at: isSet(object.paid_at) ? globalThis.String(object.paid_at) : "",
|
|
243
|
+
biller_status: isSet(object.biller_status) ? globalThis.String(object.biller_status) : undefined,
|
|
244
|
+
};
|
|
245
|
+
},
|
|
246
|
+
toJSON(message) {
|
|
247
|
+
const obj = {};
|
|
248
|
+
if (message.id !== 0) {
|
|
249
|
+
obj.id = Math.round(message.id);
|
|
250
|
+
}
|
|
251
|
+
if (message.customer_id !== 0) {
|
|
252
|
+
obj.customer_id = Math.round(message.customer_id);
|
|
253
|
+
}
|
|
254
|
+
if (message.utility_name !== "") {
|
|
255
|
+
obj.utility_name = message.utility_name;
|
|
256
|
+
}
|
|
257
|
+
if (message.provider_name !== "") {
|
|
258
|
+
obj.provider_name = message.provider_name;
|
|
259
|
+
}
|
|
260
|
+
if (message.provider_logo !== undefined) {
|
|
261
|
+
obj.provider_logo = message.provider_logo;
|
|
262
|
+
}
|
|
263
|
+
if (message.account_no !== undefined) {
|
|
264
|
+
obj.account_no = message.account_no;
|
|
265
|
+
}
|
|
266
|
+
if (message.final_amount !== 0) {
|
|
267
|
+
obj.final_amount = message.final_amount;
|
|
268
|
+
}
|
|
269
|
+
if (message.status !== "") {
|
|
270
|
+
obj.status = message.status;
|
|
271
|
+
}
|
|
272
|
+
if (message.txn_id !== "") {
|
|
273
|
+
obj.txn_id = message.txn_id;
|
|
274
|
+
}
|
|
275
|
+
if (message.order_id !== "") {
|
|
276
|
+
obj.order_id = message.order_id;
|
|
277
|
+
}
|
|
278
|
+
if (message.bbps_ref_no !== undefined) {
|
|
279
|
+
obj.bbps_ref_no = message.bbps_ref_no;
|
|
280
|
+
}
|
|
281
|
+
if (message.source_ref_no !== undefined) {
|
|
282
|
+
obj.source_ref_no = message.source_ref_no;
|
|
283
|
+
}
|
|
284
|
+
if (message.paid_at !== "") {
|
|
285
|
+
obj.paid_at = message.paid_at;
|
|
286
|
+
}
|
|
287
|
+
if (message.biller_status !== undefined) {
|
|
288
|
+
obj.biller_status = message.biller_status;
|
|
289
|
+
}
|
|
290
|
+
return obj;
|
|
291
|
+
},
|
|
292
|
+
create(base) {
|
|
293
|
+
return exports.TxnResponse.fromPartial(base ?? {});
|
|
294
|
+
},
|
|
295
|
+
fromPartial(object) {
|
|
296
|
+
const message = createBaseTxnResponse();
|
|
297
|
+
message.id = object.id ?? 0;
|
|
298
|
+
message.customer_id = object.customer_id ?? 0;
|
|
299
|
+
message.utility_name = object.utility_name ?? "";
|
|
300
|
+
message.provider_name = object.provider_name ?? "";
|
|
301
|
+
message.provider_logo = object.provider_logo ?? undefined;
|
|
302
|
+
message.account_no = object.account_no ?? undefined;
|
|
303
|
+
message.final_amount = object.final_amount ?? 0;
|
|
304
|
+
message.status = object.status ?? "";
|
|
305
|
+
message.txn_id = object.txn_id ?? "";
|
|
306
|
+
message.order_id = object.order_id ?? "";
|
|
307
|
+
message.bbps_ref_no = object.bbps_ref_no ?? undefined;
|
|
308
|
+
message.source_ref_no = object.source_ref_no ?? undefined;
|
|
309
|
+
message.paid_at = object.paid_at ?? "";
|
|
310
|
+
message.biller_status = object.biller_status ?? undefined;
|
|
311
|
+
return message;
|
|
312
|
+
},
|
|
313
|
+
};
|
|
314
|
+
function createBaseAuthSessionResponse() {
|
|
315
|
+
return { customer_id: 0, auth_token: undefined, device_id: undefined };
|
|
316
|
+
}
|
|
317
|
+
exports.AuthSessionResponse = {
|
|
318
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
319
|
+
if (message.customer_id !== 0) {
|
|
320
|
+
writer.uint32(8).int32(message.customer_id);
|
|
321
|
+
}
|
|
322
|
+
if (message.auth_token !== undefined) {
|
|
323
|
+
writer.uint32(18).string(message.auth_token);
|
|
324
|
+
}
|
|
325
|
+
if (message.device_id !== undefined) {
|
|
326
|
+
writer.uint32(26).string(message.device_id);
|
|
327
|
+
}
|
|
328
|
+
return writer;
|
|
329
|
+
},
|
|
330
|
+
decode(input, length) {
|
|
331
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
332
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
333
|
+
const message = createBaseAuthSessionResponse();
|
|
334
|
+
while (reader.pos < end) {
|
|
335
|
+
const tag = reader.uint32();
|
|
336
|
+
switch (tag >>> 3) {
|
|
337
|
+
case 1:
|
|
338
|
+
if (tag !== 8) {
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
message.customer_id = reader.int32();
|
|
342
|
+
continue;
|
|
343
|
+
case 2:
|
|
344
|
+
if (tag !== 18) {
|
|
345
|
+
break;
|
|
346
|
+
}
|
|
347
|
+
message.auth_token = reader.string();
|
|
348
|
+
continue;
|
|
349
|
+
case 3:
|
|
350
|
+
if (tag !== 26) {
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
message.device_id = reader.string();
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
reader.skipType(tag & 7);
|
|
360
|
+
}
|
|
361
|
+
return message;
|
|
362
|
+
},
|
|
363
|
+
fromJSON(object) {
|
|
364
|
+
return {
|
|
365
|
+
customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
|
|
366
|
+
auth_token: isSet(object.auth_token) ? globalThis.String(object.auth_token) : undefined,
|
|
367
|
+
device_id: isSet(object.device_id) ? globalThis.String(object.device_id) : undefined,
|
|
368
|
+
};
|
|
369
|
+
},
|
|
370
|
+
toJSON(message) {
|
|
371
|
+
const obj = {};
|
|
372
|
+
if (message.customer_id !== 0) {
|
|
373
|
+
obj.customer_id = Math.round(message.customer_id);
|
|
374
|
+
}
|
|
375
|
+
if (message.auth_token !== undefined) {
|
|
376
|
+
obj.auth_token = message.auth_token;
|
|
377
|
+
}
|
|
378
|
+
if (message.device_id !== undefined) {
|
|
379
|
+
obj.device_id = message.device_id;
|
|
380
|
+
}
|
|
381
|
+
return obj;
|
|
382
|
+
},
|
|
383
|
+
create(base) {
|
|
384
|
+
return exports.AuthSessionResponse.fromPartial(base ?? {});
|
|
385
|
+
},
|
|
386
|
+
fromPartial(object) {
|
|
387
|
+
const message = createBaseAuthSessionResponse();
|
|
388
|
+
message.customer_id = object.customer_id ?? 0;
|
|
389
|
+
message.auth_token = object.auth_token ?? undefined;
|
|
390
|
+
message.device_id = object.device_id ?? undefined;
|
|
391
|
+
return message;
|
|
392
|
+
},
|
|
393
|
+
};
|
|
394
|
+
function createBaseBDTransactionResponse() {
|
|
395
|
+
return { txnResponse: undefined, authSessionResponse: undefined };
|
|
396
|
+
}
|
|
397
|
+
exports.BDTransactionResponse = {
|
|
398
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
399
|
+
if (message.txnResponse !== undefined) {
|
|
400
|
+
exports.TxnResponse.encode(message.txnResponse, writer.uint32(10).fork()).ldelim();
|
|
401
|
+
}
|
|
402
|
+
if (message.authSessionResponse !== undefined) {
|
|
403
|
+
exports.AuthSessionResponse.encode(message.authSessionResponse, writer.uint32(18).fork()).ldelim();
|
|
404
|
+
}
|
|
405
|
+
return writer;
|
|
406
|
+
},
|
|
407
|
+
decode(input, length) {
|
|
408
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
409
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
410
|
+
const message = createBaseBDTransactionResponse();
|
|
411
|
+
while (reader.pos < end) {
|
|
412
|
+
const tag = reader.uint32();
|
|
413
|
+
switch (tag >>> 3) {
|
|
414
|
+
case 1:
|
|
415
|
+
if (tag !== 10) {
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
message.txnResponse = exports.TxnResponse.decode(reader, reader.uint32());
|
|
419
|
+
continue;
|
|
420
|
+
case 2:
|
|
421
|
+
if (tag !== 18) {
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
message.authSessionResponse = exports.AuthSessionResponse.decode(reader, reader.uint32());
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
reader.skipType(tag & 7);
|
|
431
|
+
}
|
|
432
|
+
return message;
|
|
433
|
+
},
|
|
434
|
+
fromJSON(object) {
|
|
435
|
+
return {
|
|
436
|
+
txnResponse: isSet(object.txnResponse) ? exports.TxnResponse.fromJSON(object.txnResponse) : undefined,
|
|
437
|
+
authSessionResponse: isSet(object.authSessionResponse)
|
|
438
|
+
? exports.AuthSessionResponse.fromJSON(object.authSessionResponse)
|
|
439
|
+
: undefined,
|
|
440
|
+
};
|
|
441
|
+
},
|
|
442
|
+
toJSON(message) {
|
|
443
|
+
const obj = {};
|
|
444
|
+
if (message.txnResponse !== undefined) {
|
|
445
|
+
obj.txnResponse = exports.TxnResponse.toJSON(message.txnResponse);
|
|
446
|
+
}
|
|
447
|
+
if (message.authSessionResponse !== undefined) {
|
|
448
|
+
obj.authSessionResponse = exports.AuthSessionResponse.toJSON(message.authSessionResponse);
|
|
449
|
+
}
|
|
450
|
+
return obj;
|
|
451
|
+
},
|
|
452
|
+
create(base) {
|
|
453
|
+
return exports.BDTransactionResponse.fromPartial(base ?? {});
|
|
454
|
+
},
|
|
455
|
+
fromPartial(object) {
|
|
456
|
+
const message = createBaseBDTransactionResponse();
|
|
457
|
+
message.txnResponse = (object.txnResponse !== undefined && object.txnResponse !== null)
|
|
458
|
+
? exports.TxnResponse.fromPartial(object.txnResponse)
|
|
459
|
+
: undefined;
|
|
460
|
+
message.authSessionResponse = (object.authSessionResponse !== undefined && object.authSessionResponse !== null)
|
|
461
|
+
? exports.AuthSessionResponse.fromPartial(object.authSessionResponse)
|
|
462
|
+
: undefined;
|
|
463
|
+
return message;
|
|
464
|
+
},
|
|
465
|
+
};
|
|
466
|
+
function isSet(value) {
|
|
467
|
+
return value !== null && value !== undefined;
|
|
468
|
+
}
|
package/ts/bbps.d.ts
CHANGED
|
@@ -4,8 +4,9 @@ import { getAllCategoryRequest, getAllCategoryResponse } from "./bbps/getallcate
|
|
|
4
4
|
import { BillFetchRequest, BillFetchResponse } from "./bbps/getbillforreminder";
|
|
5
5
|
import { getBillsRequest, getBillsResponse } from "./bbps/getbills";
|
|
6
6
|
import { getOrderDetailsRequest, getOrderDetailsResponse } from "./bbps/getorderdetails";
|
|
7
|
-
import { BDTransactionRequest as
|
|
7
|
+
import { BDTransactionRequest as BDTransactionRequest3, BDTransactionResponse as BDTransactionResponse4 } from "./bbps/processdecryptedrudata";
|
|
8
8
|
import { BDTransactionRequest, BDTransactionResponse } from "./bbps/processwebhook";
|
|
9
|
+
import { BDTransactionRequest as BDTransactionRequest1, BDTransactionResponse as BDTransactionResponse2 } from "./bbps/processwebhookv2";
|
|
9
10
|
import { BillTransactionUpdateEvent, StatusResponse } from "./bbps/sendremindercall";
|
|
10
11
|
import { updateTxnsStatusRequest, updateTxnsStatusResponse } from "./bbps/updatetxnsstatus";
|
|
11
12
|
export declare const protobufPackage = "service";
|
|
@@ -29,8 +30,8 @@ export declare const bbpsService: {
|
|
|
29
30
|
readonly responseSerialize: (value: BDTransactionResponse) => Buffer<ArrayBuffer>;
|
|
30
31
|
readonly responseDeserialize: (value: Buffer) => BDTransactionResponse;
|
|
31
32
|
};
|
|
32
|
-
readonly
|
|
33
|
-
readonly path: "/service.bbps/
|
|
33
|
+
readonly processWebhookv2: {
|
|
34
|
+
readonly path: "/service.bbps/processWebhookv2";
|
|
34
35
|
readonly requestStream: false;
|
|
35
36
|
readonly responseStream: false;
|
|
36
37
|
readonly requestSerialize: (value: BDTransactionRequest1) => Buffer<ArrayBuffer>;
|
|
@@ -38,6 +39,15 @@ export declare const bbpsService: {
|
|
|
38
39
|
readonly responseSerialize: (value: BDTransactionResponse2) => Buffer<ArrayBuffer>;
|
|
39
40
|
readonly responseDeserialize: (value: Buffer) => BDTransactionResponse2;
|
|
40
41
|
};
|
|
42
|
+
readonly processDecryptedRuData: {
|
|
43
|
+
readonly path: "/service.bbps/processDecryptedRUData";
|
|
44
|
+
readonly requestStream: false;
|
|
45
|
+
readonly responseStream: false;
|
|
46
|
+
readonly requestSerialize: (value: BDTransactionRequest3) => Buffer<ArrayBuffer>;
|
|
47
|
+
readonly requestDeserialize: (value: Buffer) => BDTransactionRequest3;
|
|
48
|
+
readonly responseSerialize: (value: BDTransactionResponse4) => Buffer<ArrayBuffer>;
|
|
49
|
+
readonly responseDeserialize: (value: Buffer) => BDTransactionResponse4;
|
|
50
|
+
};
|
|
41
51
|
readonly getAllBbpsTnxs: {
|
|
42
52
|
readonly path: "/service.bbps/getAllBbpsTnxs";
|
|
43
53
|
readonly requestStream: false;
|
|
@@ -96,7 +106,8 @@ export declare const bbpsService: {
|
|
|
96
106
|
export interface bbpsServer extends UntypedServiceImplementation {
|
|
97
107
|
getBillList: handleUnaryCall<getBillsRequest, getBillsResponse>;
|
|
98
108
|
processWebhook: handleUnaryCall<BDTransactionRequest, BDTransactionResponse>;
|
|
99
|
-
|
|
109
|
+
processWebhookv2: handleUnaryCall<BDTransactionRequest1, BDTransactionResponse2>;
|
|
110
|
+
processDecryptedRuData: handleUnaryCall<BDTransactionRequest3, BDTransactionResponse4>;
|
|
100
111
|
getAllBbpsTnxs: handleUnaryCall<getAllBbpsTnxRequest, getAllBbpsTnxResponse>;
|
|
101
112
|
getAllBbpsCategory: handleUnaryCall<getAllCategoryRequest, getAllCategoryResponse>;
|
|
102
113
|
updateBbpsTxnsStatus: handleUnaryCall<updateTxnsStatusRequest, updateTxnsStatusResponse>;
|
|
@@ -111,9 +122,12 @@ export interface bbpsClient extends Client {
|
|
|
111
122
|
processWebhook(request: BDTransactionRequest, callback: (error: ServiceError | null, response: BDTransactionResponse) => void): ClientUnaryCall;
|
|
112
123
|
processWebhook(request: BDTransactionRequest, metadata: Metadata, callback: (error: ServiceError | null, response: BDTransactionResponse) => void): ClientUnaryCall;
|
|
113
124
|
processWebhook(request: BDTransactionRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: BDTransactionResponse) => void): ClientUnaryCall;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
processWebhookv2(request: BDTransactionRequest1, callback: (error: ServiceError | null, response: BDTransactionResponse2) => void): ClientUnaryCall;
|
|
126
|
+
processWebhookv2(request: BDTransactionRequest1, metadata: Metadata, callback: (error: ServiceError | null, response: BDTransactionResponse2) => void): ClientUnaryCall;
|
|
127
|
+
processWebhookv2(request: BDTransactionRequest1, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: BDTransactionResponse2) => void): ClientUnaryCall;
|
|
128
|
+
processDecryptedRuData(request: BDTransactionRequest3, callback: (error: ServiceError | null, response: BDTransactionResponse4) => void): ClientUnaryCall;
|
|
129
|
+
processDecryptedRuData(request: BDTransactionRequest3, metadata: Metadata, callback: (error: ServiceError | null, response: BDTransactionResponse4) => void): ClientUnaryCall;
|
|
130
|
+
processDecryptedRuData(request: BDTransactionRequest3, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: BDTransactionResponse4) => void): ClientUnaryCall;
|
|
117
131
|
getAllBbpsTnxs(request: getAllBbpsTnxRequest, callback: (error: ServiceError | null, response: getAllBbpsTnxResponse) => void): ClientUnaryCall;
|
|
118
132
|
getAllBbpsTnxs(request: getAllBbpsTnxRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getAllBbpsTnxResponse) => void): ClientUnaryCall;
|
|
119
133
|
getAllBbpsTnxs(request: getAllBbpsTnxRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getAllBbpsTnxResponse) => void): ClientUnaryCall;
|
package/ts/bbps.js
CHANGED
|
@@ -15,6 +15,7 @@ const getbills_1 = require("./bbps/getbills");
|
|
|
15
15
|
const getorderdetails_1 = require("./bbps/getorderdetails");
|
|
16
16
|
const processdecryptedrudata_1 = require("./bbps/processdecryptedrudata");
|
|
17
17
|
const processwebhook_1 = require("./bbps/processwebhook");
|
|
18
|
+
const processwebhookv2_1 = require("./bbps/processwebhookv2");
|
|
18
19
|
const sendremindercall_1 = require("./bbps/sendremindercall");
|
|
19
20
|
const updatetxnsstatus_1 = require("./bbps/updatetxnsstatus");
|
|
20
21
|
exports.protobufPackage = "service";
|
|
@@ -37,6 +38,15 @@ exports.bbpsService = {
|
|
|
37
38
|
responseSerialize: (value) => Buffer.from(processwebhook_1.BDTransactionResponse.encode(value).finish()),
|
|
38
39
|
responseDeserialize: (value) => processwebhook_1.BDTransactionResponse.decode(value),
|
|
39
40
|
},
|
|
41
|
+
processWebhookv2: {
|
|
42
|
+
path: "/service.bbps/processWebhookv2",
|
|
43
|
+
requestStream: false,
|
|
44
|
+
responseStream: false,
|
|
45
|
+
requestSerialize: (value) => Buffer.from(processwebhookv2_1.BDTransactionRequest.encode(value).finish()),
|
|
46
|
+
requestDeserialize: (value) => processwebhookv2_1.BDTransactionRequest.decode(value),
|
|
47
|
+
responseSerialize: (value) => Buffer.from(processwebhookv2_1.BDTransactionResponse.encode(value).finish()),
|
|
48
|
+
responseDeserialize: (value) => processwebhookv2_1.BDTransactionResponse.decode(value),
|
|
49
|
+
},
|
|
40
50
|
processDecryptedRuData: {
|
|
41
51
|
path: "/service.bbps/processDecryptedRUData",
|
|
42
52
|
requestStream: false,
|