@stashfin/grpc 1.2.182 → 1.2.184

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.
Files changed (44) hide show
  1. package/package.json +1 -1
  2. package/ts/customers/getlimit.d.ts +2 -0
  3. package/ts/customers/getlimit.js +29 -1
  4. package/ts/customers/sendemailtoken.d.ts +35 -0
  5. package/ts/customers/{savelimit.js → sendemailtoken.js} +30 -30
  6. package/ts/customers/skipdlrcscreen.d.ts +35 -0
  7. package/ts/customers/skipdlrcscreen.js +117 -0
  8. package/ts/customers/step1.d.ts +69 -0
  9. package/ts/customers/step1.js +395 -0
  10. package/ts/customers/step10.d.ts +73 -0
  11. package/ts/customers/step10.js +459 -0
  12. package/ts/customers/step2.d.ts +68 -0
  13. package/ts/customers/step2.js +381 -0
  14. package/ts/customers/step7.d.ts +68 -0
  15. package/ts/customers/step7.js +381 -0
  16. package/ts/customers/step8.d.ts +69 -0
  17. package/ts/customers/step8.js +395 -0
  18. package/ts/customers/step9.d.ts +75 -0
  19. package/ts/customers/step9.js +489 -0
  20. package/ts/customers/stepstatic.d.ts +66 -0
  21. package/ts/customers/stepstatic.js +354 -0
  22. package/ts/customers/verifyemail.d.ts +35 -0
  23. package/ts/customers/verifyemail.js +117 -0
  24. package/ts/customers.d.ts +0 -28
  25. package/ts/customers.js +0 -20
  26. package/ts/google/protobuf/timestamp.d.ts +127 -0
  27. package/ts/google/protobuf/timestamp.js +97 -0
  28. package/ts/loans/getloanbyid.d.ts +29 -0
  29. package/ts/loans/getloanbyid.js +209 -1
  30. package/ts/payments/checkpaymentstatus.d.ts +51 -0
  31. package/ts/payments/checkpaymentstatus.js +259 -0
  32. package/ts/payments/getpaymentoptions.d.ts +50 -0
  33. package/ts/payments/getpaymentoptions.js +233 -0
  34. package/ts/payments/initiatepayment.d.ts +67 -0
  35. package/ts/payments/initiatepayment.js +381 -0
  36. package/ts/payments/nachpresentation.d.ts +39 -0
  37. package/ts/payments/nachpresentation.js +191 -0
  38. package/ts/payments/nachregistration.d.ts +51 -0
  39. package/ts/payments/nachregistration.js +257 -0
  40. package/ts/payments.d.ts +42 -211
  41. package/ts/payments.js +28 -1091
  42. package/ts/customers/getappsubmittedscreen.d.ts +0 -50
  43. package/ts/customers/getappsubmittedscreen.js +0 -228
  44. package/ts/customers/savelimit.d.ts +0 -35
@@ -0,0 +1,127 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "google.protobuf";
3
+ /**
4
+ * A Timestamp represents a point in time independent of any time zone or local
5
+ * calendar, encoded as a count of seconds and fractions of seconds at
6
+ * nanosecond resolution. The count is relative to an epoch at UTC midnight on
7
+ * January 1, 1970, in the proleptic Gregorian calendar which extends the
8
+ * Gregorian calendar backwards to year one.
9
+ *
10
+ * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
11
+ * second table is needed for interpretation, using a [24-hour linear
12
+ * smear](https://developers.google.com/time/smear).
13
+ *
14
+ * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
15
+ * restricting to that range, we ensure that we can convert to and from [RFC
16
+ * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
17
+ *
18
+ * # Examples
19
+ *
20
+ * Example 1: Compute Timestamp from POSIX `time()`.
21
+ *
22
+ * Timestamp timestamp;
23
+ * timestamp.set_seconds(time(NULL));
24
+ * timestamp.set_nanos(0);
25
+ *
26
+ * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
27
+ *
28
+ * struct timeval tv;
29
+ * gettimeofday(&tv, NULL);
30
+ *
31
+ * Timestamp timestamp;
32
+ * timestamp.set_seconds(tv.tv_sec);
33
+ * timestamp.set_nanos(tv.tv_usec * 1000);
34
+ *
35
+ * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
36
+ *
37
+ * FILETIME ft;
38
+ * GetSystemTimeAsFileTime(&ft);
39
+ * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
40
+ *
41
+ * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
42
+ * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
43
+ * Timestamp timestamp;
44
+ * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
45
+ * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
46
+ *
47
+ * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
48
+ *
49
+ * long millis = System.currentTimeMillis();
50
+ *
51
+ * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
52
+ * .setNanos((int) ((millis % 1000) * 1000000)).build();
53
+ *
54
+ * Example 5: Compute Timestamp from Java `Instant.now()`.
55
+ *
56
+ * Instant now = Instant.now();
57
+ *
58
+ * Timestamp timestamp =
59
+ * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
60
+ * .setNanos(now.getNano()).build();
61
+ *
62
+ * Example 6: Compute Timestamp from current time in Python.
63
+ *
64
+ * timestamp = Timestamp()
65
+ * timestamp.GetCurrentTime()
66
+ *
67
+ * # JSON Mapping
68
+ *
69
+ * In JSON format, the Timestamp type is encoded as a string in the
70
+ * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
71
+ * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
72
+ * where {year} is always expressed using four digits while {month}, {day},
73
+ * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
74
+ * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
75
+ * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
76
+ * is required. A proto3 JSON serializer should always use UTC (as indicated by
77
+ * "Z") when printing the Timestamp type and a proto3 JSON parser should be
78
+ * able to accept both UTC and other timezones (as indicated by an offset).
79
+ *
80
+ * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
81
+ * 01:30 UTC on January 15, 2017.
82
+ *
83
+ * In JavaScript, one can convert a Date object to this format using the
84
+ * standard
85
+ * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
86
+ * method. In Python, a standard `datetime.datetime` object can be converted
87
+ * to this format using
88
+ * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
89
+ * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
90
+ * the Joda Time's [`ISODateTimeFormat.dateTime()`](
91
+ * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
92
+ * ) to obtain a formatter capable of generating timestamps in this format.
93
+ */
94
+ export interface Timestamp {
95
+ /**
96
+ * Represents seconds of UTC time since Unix epoch
97
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
98
+ * 9999-12-31T23:59:59Z inclusive.
99
+ */
100
+ seconds: number;
101
+ /**
102
+ * Non-negative fractions of a second at nanosecond resolution. Negative
103
+ * second values with fractions must still have non-negative nanos values
104
+ * that count forward in time. Must be from 0 to 999,999,999
105
+ * inclusive.
106
+ */
107
+ nanos: number;
108
+ }
109
+ export declare const Timestamp: {
110
+ encode(message: Timestamp, writer?: _m0.Writer): _m0.Writer;
111
+ decode(input: _m0.Reader | Uint8Array, length?: number): Timestamp;
112
+ fromJSON(object: any): Timestamp;
113
+ toJSON(message: Timestamp): unknown;
114
+ create<I extends Exact<DeepPartial<Timestamp>, I>>(base?: I): Timestamp;
115
+ fromPartial<I extends Exact<DeepPartial<Timestamp>, I>>(object: I): Timestamp;
116
+ };
117
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
118
+ 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 {} ? {
119
+ [K in keyof T]?: DeepPartial<T[K]>;
120
+ } : Partial<T>;
121
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
122
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
123
+ [K in keyof P]: Exact<P[K], I[K]>;
124
+ } & {
125
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
126
+ };
127
+ export {};
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v1.181.0
5
+ // protoc v5.27.3
6
+ // source: google/protobuf/timestamp.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.Timestamp = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const long_1 = __importDefault(require("long"));
14
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
15
+ exports.protobufPackage = "google.protobuf";
16
+ function createBaseTimestamp() {
17
+ return { seconds: 0, nanos: 0 };
18
+ }
19
+ exports.Timestamp = {
20
+ encode(message, writer = minimal_1.default.Writer.create()) {
21
+ if (message.seconds !== 0) {
22
+ writer.uint32(8).int64(message.seconds);
23
+ }
24
+ if (message.nanos !== 0) {
25
+ writer.uint32(16).int32(message.nanos);
26
+ }
27
+ return writer;
28
+ },
29
+ decode(input, length) {
30
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
31
+ let end = length === undefined ? reader.len : reader.pos + length;
32
+ const message = createBaseTimestamp();
33
+ while (reader.pos < end) {
34
+ const tag = reader.uint32();
35
+ switch (tag >>> 3) {
36
+ case 1:
37
+ if (tag !== 8) {
38
+ break;
39
+ }
40
+ message.seconds = longToNumber(reader.int64());
41
+ continue;
42
+ case 2:
43
+ if (tag !== 16) {
44
+ break;
45
+ }
46
+ message.nanos = reader.int32();
47
+ continue;
48
+ }
49
+ if ((tag & 7) === 4 || tag === 0) {
50
+ break;
51
+ }
52
+ reader.skipType(tag & 7);
53
+ }
54
+ return message;
55
+ },
56
+ fromJSON(object) {
57
+ return {
58
+ seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
59
+ nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
60
+ };
61
+ },
62
+ toJSON(message) {
63
+ const obj = {};
64
+ if (message.seconds !== 0) {
65
+ obj.seconds = Math.round(message.seconds);
66
+ }
67
+ if (message.nanos !== 0) {
68
+ obj.nanos = Math.round(message.nanos);
69
+ }
70
+ return obj;
71
+ },
72
+ create(base) {
73
+ return exports.Timestamp.fromPartial(base ?? {});
74
+ },
75
+ fromPartial(object) {
76
+ const message = createBaseTimestamp();
77
+ message.seconds = object.seconds ?? 0;
78
+ message.nanos = object.nanos ?? 0;
79
+ return message;
80
+ },
81
+ };
82
+ function longToNumber(long) {
83
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
84
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
85
+ }
86
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
87
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
88
+ }
89
+ return long.toNumber();
90
+ }
91
+ if (minimal_1.default.util.Long !== long_1.default) {
92
+ minimal_1.default.util.Long = long_1.default;
93
+ minimal_1.default.configure();
94
+ }
95
+ function isSet(value) {
96
+ return value !== null && value !== undefined;
97
+ }
@@ -18,6 +18,19 @@ export interface getLoanByIdResponse {
18
18
  daily_roi: number;
19
19
  approval_date: string;
20
20
  processing_fee: number;
21
+ colenderId: number;
22
+ fees: getLoanByIdResponse_Field | undefined;
23
+ }
24
+ export interface getLoanByIdResponse_Field {
25
+ processing_fee: number;
26
+ txn_fee: number;
27
+ processing_fee_gst: number;
28
+ txn_fee_gst: number;
29
+ addons: getLoanByIdResponse_Field_Field[];
30
+ }
31
+ export interface getLoanByIdResponse_Field_Field {
32
+ name: string;
33
+ amount: number;
21
34
  }
22
35
  export declare const getLoanByIdRequest: {
23
36
  encode(message: getLoanByIdRequest, writer?: _m0.Writer): _m0.Writer;
@@ -35,6 +48,22 @@ export declare const getLoanByIdResponse: {
35
48
  create<I extends Exact<DeepPartial<getLoanByIdResponse>, I>>(base?: I): getLoanByIdResponse;
36
49
  fromPartial<I extends Exact<DeepPartial<getLoanByIdResponse>, I>>(object: I): getLoanByIdResponse;
37
50
  };
51
+ export declare const getLoanByIdResponse_Field: {
52
+ encode(message: getLoanByIdResponse_Field, writer?: _m0.Writer): _m0.Writer;
53
+ decode(input: _m0.Reader | Uint8Array, length?: number): getLoanByIdResponse_Field;
54
+ fromJSON(object: any): getLoanByIdResponse_Field;
55
+ toJSON(message: getLoanByIdResponse_Field): unknown;
56
+ create<I extends Exact<DeepPartial<getLoanByIdResponse_Field>, I>>(base?: I): getLoanByIdResponse_Field;
57
+ fromPartial<I extends Exact<DeepPartial<getLoanByIdResponse_Field>, I>>(object: I): getLoanByIdResponse_Field;
58
+ };
59
+ export declare const getLoanByIdResponse_Field_Field: {
60
+ encode(message: getLoanByIdResponse_Field_Field, writer?: _m0.Writer): _m0.Writer;
61
+ decode(input: _m0.Reader | Uint8Array, length?: number): getLoanByIdResponse_Field_Field;
62
+ fromJSON(object: any): getLoanByIdResponse_Field_Field;
63
+ toJSON(message: getLoanByIdResponse_Field_Field): unknown;
64
+ create<I extends Exact<DeepPartial<getLoanByIdResponse_Field_Field>, I>>(base?: I): getLoanByIdResponse_Field_Field;
65
+ fromPartial<I extends Exact<DeepPartial<getLoanByIdResponse_Field_Field>, I>>(object: I): getLoanByIdResponse_Field_Field;
66
+ };
38
67
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
39
68
  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 {} ? {
40
69
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -8,7 +8,7 @@ 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.getLoanByIdResponse = exports.getLoanByIdRequest = exports.protobufPackage = void 0;
11
+ exports.getLoanByIdResponse_Field_Field = exports.getLoanByIdResponse_Field = exports.getLoanByIdResponse = exports.getLoanByIdRequest = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "loans.getloanbyid";
@@ -78,6 +78,8 @@ function createBasegetLoanByIdResponse() {
78
78
  daily_roi: 0,
79
79
  approval_date: "",
80
80
  processing_fee: 0,
81
+ colenderId: 0,
82
+ fees: undefined,
81
83
  };
82
84
  }
83
85
  exports.getLoanByIdResponse = {
@@ -124,6 +126,12 @@ exports.getLoanByIdResponse = {
124
126
  if (message.processing_fee !== 0) {
125
127
  writer.uint32(112).int32(message.processing_fee);
126
128
  }
129
+ if (message.colenderId !== 0) {
130
+ writer.uint32(120).int32(message.colenderId);
131
+ }
132
+ if (message.fees !== undefined) {
133
+ exports.getLoanByIdResponse_Field.encode(message.fees, writer.uint32(130).fork()).ldelim();
134
+ }
127
135
  return writer;
128
136
  },
129
137
  decode(input, length) {
@@ -217,6 +225,18 @@ exports.getLoanByIdResponse = {
217
225
  }
218
226
  message.processing_fee = reader.int32();
219
227
  continue;
228
+ case 15:
229
+ if (tag !== 120) {
230
+ break;
231
+ }
232
+ message.colenderId = reader.int32();
233
+ continue;
234
+ case 16:
235
+ if (tag !== 130) {
236
+ break;
237
+ }
238
+ message.fees = exports.getLoanByIdResponse_Field.decode(reader, reader.uint32());
239
+ continue;
220
240
  }
221
241
  if ((tag & 7) === 4 || tag === 0) {
222
242
  break;
@@ -243,6 +263,8 @@ exports.getLoanByIdResponse = {
243
263
  daily_roi: isSet(object.daily_roi) ? globalThis.Number(object.daily_roi) : 0,
244
264
  approval_date: isSet(object.approval_date) ? globalThis.String(object.approval_date) : "",
245
265
  processing_fee: isSet(object.processing_fee) ? globalThis.Number(object.processing_fee) : 0,
266
+ colenderId: isSet(object.colenderId) ? globalThis.Number(object.colenderId) : 0,
267
+ fees: isSet(object.fees) ? exports.getLoanByIdResponse_Field.fromJSON(object.fees) : undefined,
246
268
  };
247
269
  },
248
270
  toJSON(message) {
@@ -289,6 +311,12 @@ exports.getLoanByIdResponse = {
289
311
  if (message.processing_fee !== 0) {
290
312
  obj.processing_fee = Math.round(message.processing_fee);
291
313
  }
314
+ if (message.colenderId !== 0) {
315
+ obj.colenderId = Math.round(message.colenderId);
316
+ }
317
+ if (message.fees !== undefined) {
318
+ obj.fees = exports.getLoanByIdResponse_Field.toJSON(message.fees);
319
+ }
292
320
  return obj;
293
321
  },
294
322
  create(base) {
@@ -310,6 +338,186 @@ exports.getLoanByIdResponse = {
310
338
  message.daily_roi = object.daily_roi ?? 0;
311
339
  message.approval_date = object.approval_date ?? "";
312
340
  message.processing_fee = object.processing_fee ?? 0;
341
+ message.colenderId = object.colenderId ?? 0;
342
+ message.fees = (object.fees !== undefined && object.fees !== null)
343
+ ? exports.getLoanByIdResponse_Field.fromPartial(object.fees)
344
+ : undefined;
345
+ return message;
346
+ },
347
+ };
348
+ function createBasegetLoanByIdResponse_Field() {
349
+ return { processing_fee: 0, txn_fee: 0, processing_fee_gst: 0, txn_fee_gst: 0, addons: [] };
350
+ }
351
+ exports.getLoanByIdResponse_Field = {
352
+ encode(message, writer = minimal_1.default.Writer.create()) {
353
+ if (message.processing_fee !== 0) {
354
+ writer.uint32(8).int32(message.processing_fee);
355
+ }
356
+ if (message.txn_fee !== 0) {
357
+ writer.uint32(16).int32(message.txn_fee);
358
+ }
359
+ if (message.processing_fee_gst !== 0) {
360
+ writer.uint32(24).int32(message.processing_fee_gst);
361
+ }
362
+ if (message.txn_fee_gst !== 0) {
363
+ writer.uint32(32).int32(message.txn_fee_gst);
364
+ }
365
+ for (const v of message.addons) {
366
+ exports.getLoanByIdResponse_Field_Field.encode(v, writer.uint32(42).fork()).ldelim();
367
+ }
368
+ return writer;
369
+ },
370
+ decode(input, length) {
371
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
372
+ let end = length === undefined ? reader.len : reader.pos + length;
373
+ const message = createBasegetLoanByIdResponse_Field();
374
+ while (reader.pos < end) {
375
+ const tag = reader.uint32();
376
+ switch (tag >>> 3) {
377
+ case 1:
378
+ if (tag !== 8) {
379
+ break;
380
+ }
381
+ message.processing_fee = reader.int32();
382
+ continue;
383
+ case 2:
384
+ if (tag !== 16) {
385
+ break;
386
+ }
387
+ message.txn_fee = reader.int32();
388
+ continue;
389
+ case 3:
390
+ if (tag !== 24) {
391
+ break;
392
+ }
393
+ message.processing_fee_gst = reader.int32();
394
+ continue;
395
+ case 4:
396
+ if (tag !== 32) {
397
+ break;
398
+ }
399
+ message.txn_fee_gst = reader.int32();
400
+ continue;
401
+ case 5:
402
+ if (tag !== 42) {
403
+ break;
404
+ }
405
+ message.addons.push(exports.getLoanByIdResponse_Field_Field.decode(reader, reader.uint32()));
406
+ continue;
407
+ }
408
+ if ((tag & 7) === 4 || tag === 0) {
409
+ break;
410
+ }
411
+ reader.skipType(tag & 7);
412
+ }
413
+ return message;
414
+ },
415
+ fromJSON(object) {
416
+ return {
417
+ processing_fee: isSet(object.processing_fee) ? globalThis.Number(object.processing_fee) : 0,
418
+ txn_fee: isSet(object.txn_fee) ? globalThis.Number(object.txn_fee) : 0,
419
+ processing_fee_gst: isSet(object.processing_fee_gst) ? globalThis.Number(object.processing_fee_gst) : 0,
420
+ txn_fee_gst: isSet(object.txn_fee_gst) ? globalThis.Number(object.txn_fee_gst) : 0,
421
+ addons: globalThis.Array.isArray(object?.addons)
422
+ ? object.addons.map((e) => exports.getLoanByIdResponse_Field_Field.fromJSON(e))
423
+ : [],
424
+ };
425
+ },
426
+ toJSON(message) {
427
+ const obj = {};
428
+ if (message.processing_fee !== 0) {
429
+ obj.processing_fee = Math.round(message.processing_fee);
430
+ }
431
+ if (message.txn_fee !== 0) {
432
+ obj.txn_fee = Math.round(message.txn_fee);
433
+ }
434
+ if (message.processing_fee_gst !== 0) {
435
+ obj.processing_fee_gst = Math.round(message.processing_fee_gst);
436
+ }
437
+ if (message.txn_fee_gst !== 0) {
438
+ obj.txn_fee_gst = Math.round(message.txn_fee_gst);
439
+ }
440
+ if (message.addons?.length) {
441
+ obj.addons = message.addons.map((e) => exports.getLoanByIdResponse_Field_Field.toJSON(e));
442
+ }
443
+ return obj;
444
+ },
445
+ create(base) {
446
+ return exports.getLoanByIdResponse_Field.fromPartial(base ?? {});
447
+ },
448
+ fromPartial(object) {
449
+ const message = createBasegetLoanByIdResponse_Field();
450
+ message.processing_fee = object.processing_fee ?? 0;
451
+ message.txn_fee = object.txn_fee ?? 0;
452
+ message.processing_fee_gst = object.processing_fee_gst ?? 0;
453
+ message.txn_fee_gst = object.txn_fee_gst ?? 0;
454
+ message.addons = object.addons?.map((e) => exports.getLoanByIdResponse_Field_Field.fromPartial(e)) || [];
455
+ return message;
456
+ },
457
+ };
458
+ function createBasegetLoanByIdResponse_Field_Field() {
459
+ return { name: "", amount: 0 };
460
+ }
461
+ exports.getLoanByIdResponse_Field_Field = {
462
+ encode(message, writer = minimal_1.default.Writer.create()) {
463
+ if (message.name !== "") {
464
+ writer.uint32(10).string(message.name);
465
+ }
466
+ if (message.amount !== 0) {
467
+ writer.uint32(16).int32(message.amount);
468
+ }
469
+ return writer;
470
+ },
471
+ decode(input, length) {
472
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
473
+ let end = length === undefined ? reader.len : reader.pos + length;
474
+ const message = createBasegetLoanByIdResponse_Field_Field();
475
+ while (reader.pos < end) {
476
+ const tag = reader.uint32();
477
+ switch (tag >>> 3) {
478
+ case 1:
479
+ if (tag !== 10) {
480
+ break;
481
+ }
482
+ message.name = reader.string();
483
+ continue;
484
+ case 2:
485
+ if (tag !== 16) {
486
+ break;
487
+ }
488
+ message.amount = reader.int32();
489
+ continue;
490
+ }
491
+ if ((tag & 7) === 4 || tag === 0) {
492
+ break;
493
+ }
494
+ reader.skipType(tag & 7);
495
+ }
496
+ return message;
497
+ },
498
+ fromJSON(object) {
499
+ return {
500
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
501
+ amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
502
+ };
503
+ },
504
+ toJSON(message) {
505
+ const obj = {};
506
+ if (message.name !== "") {
507
+ obj.name = message.name;
508
+ }
509
+ if (message.amount !== 0) {
510
+ obj.amount = Math.round(message.amount);
511
+ }
512
+ return obj;
513
+ },
514
+ create(base) {
515
+ return exports.getLoanByIdResponse_Field_Field.fromPartial(base ?? {});
516
+ },
517
+ fromPartial(object) {
518
+ const message = createBasegetLoanByIdResponse_Field_Field();
519
+ message.name = object.name ?? "";
520
+ message.amount = object.amount ?? 0;
313
521
  return message;
314
522
  },
315
523
  };
@@ -0,0 +1,51 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "payments.checkpaymentstatus";
3
+ export interface request {
4
+ customer_id: number;
5
+ client_id: string;
6
+ external_order_id: string;
7
+ }
8
+ export interface response {
9
+ status: string;
10
+ status_code: number;
11
+ data: response_Data | undefined;
12
+ }
13
+ export interface response_Data {
14
+ payment_status: string;
15
+ external_order_id: string;
16
+ }
17
+ export declare const request: {
18
+ encode(message: request, writer?: _m0.Writer): _m0.Writer;
19
+ decode(input: _m0.Reader | Uint8Array, length?: number): request;
20
+ fromJSON(object: any): request;
21
+ toJSON(message: request): unknown;
22
+ create<I extends Exact<DeepPartial<request>, I>>(base?: I): request;
23
+ fromPartial<I extends Exact<DeepPartial<request>, I>>(object: I): request;
24
+ };
25
+ export declare const response: {
26
+ encode(message: response, writer?: _m0.Writer): _m0.Writer;
27
+ decode(input: _m0.Reader | Uint8Array, length?: number): response;
28
+ fromJSON(object: any): response;
29
+ toJSON(message: response): unknown;
30
+ create<I extends Exact<DeepPartial<response>, I>>(base?: I): response;
31
+ fromPartial<I extends Exact<DeepPartial<response>, I>>(object: I): response;
32
+ };
33
+ export declare const response_Data: {
34
+ encode(message: response_Data, writer?: _m0.Writer): _m0.Writer;
35
+ decode(input: _m0.Reader | Uint8Array, length?: number): response_Data;
36
+ fromJSON(object: any): response_Data;
37
+ toJSON(message: response_Data): unknown;
38
+ create<I extends Exact<DeepPartial<response_Data>, I>>(base?: I): response_Data;
39
+ fromPartial<I extends Exact<DeepPartial<response_Data>, I>>(object: I): response_Data;
40
+ };
41
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
42
+ 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 {} ? {
43
+ [K in keyof T]?: DeepPartial<T[K]>;
44
+ } : Partial<T>;
45
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
46
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
47
+ [K in keyof P]: Exact<P[K], I[K]>;
48
+ } & {
49
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
50
+ };
51
+ export {};