@stashfin/grpc 1.2.182 → 1.2.183
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/loans/getloanbyid.d.ts +29 -0
- package/ts/loans/getloanbyid.js +209 -1
package/package.json
CHANGED
|
@@ -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]>;
|
package/ts/loans/getloanbyid.js
CHANGED
|
@@ -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
|
};
|