@stashfin/grpc 1.2.308 → 1.2.309
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/getchrdetails.d.ts +52 -0
- package/ts/loans/getchrdetails.js +256 -0
- package/ts/loans/loansummary.d.ts +13 -1
- package/ts/loans/loansummary.js +78 -10
- package/ts/loans.d.ts +14 -0
- package/ts/loans.js +10 -0
package/package.json
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "loans.getchrdetails";
|
|
3
|
+
export interface getChrDetailsRequest {
|
|
4
|
+
}
|
|
5
|
+
export interface plandata {
|
|
6
|
+
planId: number;
|
|
7
|
+
amount: number;
|
|
8
|
+
type: string;
|
|
9
|
+
duration: number;
|
|
10
|
+
discount: number;
|
|
11
|
+
}
|
|
12
|
+
export interface getChrDetailsResponse {
|
|
13
|
+
status: string;
|
|
14
|
+
statusCode: number;
|
|
15
|
+
data: plandata | undefined;
|
|
16
|
+
message: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const getChrDetailsRequest: {
|
|
19
|
+
encode(_: getChrDetailsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
20
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): getChrDetailsRequest;
|
|
21
|
+
fromJSON(_: any): getChrDetailsRequest;
|
|
22
|
+
toJSON(_: getChrDetailsRequest): unknown;
|
|
23
|
+
create<I extends Exact<DeepPartial<getChrDetailsRequest>, I>>(base?: I): getChrDetailsRequest;
|
|
24
|
+
fromPartial<I extends Exact<DeepPartial<getChrDetailsRequest>, I>>(_: I): getChrDetailsRequest;
|
|
25
|
+
};
|
|
26
|
+
export declare const plandata: {
|
|
27
|
+
encode(message: plandata, writer?: _m0.Writer): _m0.Writer;
|
|
28
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): plandata;
|
|
29
|
+
fromJSON(object: any): plandata;
|
|
30
|
+
toJSON(message: plandata): unknown;
|
|
31
|
+
create<I extends Exact<DeepPartial<plandata>, I>>(base?: I): plandata;
|
|
32
|
+
fromPartial<I extends Exact<DeepPartial<plandata>, I>>(object: I): plandata;
|
|
33
|
+
};
|
|
34
|
+
export declare const getChrDetailsResponse: {
|
|
35
|
+
encode(message: getChrDetailsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
36
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): getChrDetailsResponse;
|
|
37
|
+
fromJSON(object: any): getChrDetailsResponse;
|
|
38
|
+
toJSON(message: getChrDetailsResponse): unknown;
|
|
39
|
+
create<I extends Exact<DeepPartial<getChrDetailsResponse>, I>>(base?: I): getChrDetailsResponse;
|
|
40
|
+
fromPartial<I extends Exact<DeepPartial<getChrDetailsResponse>, I>>(object: I): getChrDetailsResponse;
|
|
41
|
+
};
|
|
42
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
43
|
+
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 {} ? {
|
|
44
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
45
|
+
} : Partial<T>;
|
|
46
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
47
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
48
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
49
|
+
} & {
|
|
50
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,256 @@
|
|
|
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.28.2
|
|
6
|
+
// source: loans/getchrdetails.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.getChrDetailsResponse = exports.plandata = exports.getChrDetailsRequest = exports.protobufPackage = void 0;
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
|
+
exports.protobufPackage = "loans.getchrdetails";
|
|
15
|
+
function createBasegetChrDetailsRequest() {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
exports.getChrDetailsRequest = {
|
|
19
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
20
|
+
return writer;
|
|
21
|
+
},
|
|
22
|
+
decode(input, length) {
|
|
23
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
24
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
25
|
+
const message = createBasegetChrDetailsRequest();
|
|
26
|
+
while (reader.pos < end) {
|
|
27
|
+
const tag = reader.uint32();
|
|
28
|
+
switch (tag >>> 3) {
|
|
29
|
+
}
|
|
30
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
reader.skipType(tag & 7);
|
|
34
|
+
}
|
|
35
|
+
return message;
|
|
36
|
+
},
|
|
37
|
+
fromJSON(_) {
|
|
38
|
+
return {};
|
|
39
|
+
},
|
|
40
|
+
toJSON(_) {
|
|
41
|
+
const obj = {};
|
|
42
|
+
return obj;
|
|
43
|
+
},
|
|
44
|
+
create(base) {
|
|
45
|
+
return exports.getChrDetailsRequest.fromPartial(base ?? {});
|
|
46
|
+
},
|
|
47
|
+
fromPartial(_) {
|
|
48
|
+
const message = createBasegetChrDetailsRequest();
|
|
49
|
+
return message;
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
function createBaseplandata() {
|
|
53
|
+
return { planId: 0, amount: 0, type: "", duration: 0, discount: 0 };
|
|
54
|
+
}
|
|
55
|
+
exports.plandata = {
|
|
56
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
57
|
+
if (message.planId !== 0) {
|
|
58
|
+
writer.uint32(8).int32(message.planId);
|
|
59
|
+
}
|
|
60
|
+
if (message.amount !== 0) {
|
|
61
|
+
writer.uint32(21).float(message.amount);
|
|
62
|
+
}
|
|
63
|
+
if (message.type !== "") {
|
|
64
|
+
writer.uint32(26).string(message.type);
|
|
65
|
+
}
|
|
66
|
+
if (message.duration !== 0) {
|
|
67
|
+
writer.uint32(32).int32(message.duration);
|
|
68
|
+
}
|
|
69
|
+
if (message.discount !== 0) {
|
|
70
|
+
writer.uint32(45).float(message.discount);
|
|
71
|
+
}
|
|
72
|
+
return writer;
|
|
73
|
+
},
|
|
74
|
+
decode(input, length) {
|
|
75
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
76
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
77
|
+
const message = createBaseplandata();
|
|
78
|
+
while (reader.pos < end) {
|
|
79
|
+
const tag = reader.uint32();
|
|
80
|
+
switch (tag >>> 3) {
|
|
81
|
+
case 1:
|
|
82
|
+
if (tag !== 8) {
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
message.planId = reader.int32();
|
|
86
|
+
continue;
|
|
87
|
+
case 2:
|
|
88
|
+
if (tag !== 21) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
message.amount = reader.float();
|
|
92
|
+
continue;
|
|
93
|
+
case 3:
|
|
94
|
+
if (tag !== 26) {
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
message.type = reader.string();
|
|
98
|
+
continue;
|
|
99
|
+
case 4:
|
|
100
|
+
if (tag !== 32) {
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
message.duration = reader.int32();
|
|
104
|
+
continue;
|
|
105
|
+
case 5:
|
|
106
|
+
if (tag !== 45) {
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
message.discount = reader.float();
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
reader.skipType(tag & 7);
|
|
116
|
+
}
|
|
117
|
+
return message;
|
|
118
|
+
},
|
|
119
|
+
fromJSON(object) {
|
|
120
|
+
return {
|
|
121
|
+
planId: isSet(object.planId) ? globalThis.Number(object.planId) : 0,
|
|
122
|
+
amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
|
|
123
|
+
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
|
124
|
+
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
125
|
+
discount: isSet(object.discount) ? globalThis.Number(object.discount) : 0,
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
toJSON(message) {
|
|
129
|
+
const obj = {};
|
|
130
|
+
if (message.planId !== 0) {
|
|
131
|
+
obj.planId = Math.round(message.planId);
|
|
132
|
+
}
|
|
133
|
+
if (message.amount !== 0) {
|
|
134
|
+
obj.amount = message.amount;
|
|
135
|
+
}
|
|
136
|
+
if (message.type !== "") {
|
|
137
|
+
obj.type = message.type;
|
|
138
|
+
}
|
|
139
|
+
if (message.duration !== 0) {
|
|
140
|
+
obj.duration = Math.round(message.duration);
|
|
141
|
+
}
|
|
142
|
+
if (message.discount !== 0) {
|
|
143
|
+
obj.discount = message.discount;
|
|
144
|
+
}
|
|
145
|
+
return obj;
|
|
146
|
+
},
|
|
147
|
+
create(base) {
|
|
148
|
+
return exports.plandata.fromPartial(base ?? {});
|
|
149
|
+
},
|
|
150
|
+
fromPartial(object) {
|
|
151
|
+
const message = createBaseplandata();
|
|
152
|
+
message.planId = object.planId ?? 0;
|
|
153
|
+
message.amount = object.amount ?? 0;
|
|
154
|
+
message.type = object.type ?? "";
|
|
155
|
+
message.duration = object.duration ?? 0;
|
|
156
|
+
message.discount = object.discount ?? 0;
|
|
157
|
+
return message;
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
function createBasegetChrDetailsResponse() {
|
|
161
|
+
return { status: "", statusCode: 0, data: undefined, message: "" };
|
|
162
|
+
}
|
|
163
|
+
exports.getChrDetailsResponse = {
|
|
164
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
165
|
+
if (message.status !== "") {
|
|
166
|
+
writer.uint32(10).string(message.status);
|
|
167
|
+
}
|
|
168
|
+
if (message.statusCode !== 0) {
|
|
169
|
+
writer.uint32(16).int32(message.statusCode);
|
|
170
|
+
}
|
|
171
|
+
if (message.data !== undefined) {
|
|
172
|
+
exports.plandata.encode(message.data, writer.uint32(26).fork()).ldelim();
|
|
173
|
+
}
|
|
174
|
+
if (message.message !== "") {
|
|
175
|
+
writer.uint32(34).string(message.message);
|
|
176
|
+
}
|
|
177
|
+
return writer;
|
|
178
|
+
},
|
|
179
|
+
decode(input, length) {
|
|
180
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
181
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
182
|
+
const message = createBasegetChrDetailsResponse();
|
|
183
|
+
while (reader.pos < end) {
|
|
184
|
+
const tag = reader.uint32();
|
|
185
|
+
switch (tag >>> 3) {
|
|
186
|
+
case 1:
|
|
187
|
+
if (tag !== 10) {
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
message.status = reader.string();
|
|
191
|
+
continue;
|
|
192
|
+
case 2:
|
|
193
|
+
if (tag !== 16) {
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
message.statusCode = reader.int32();
|
|
197
|
+
continue;
|
|
198
|
+
case 3:
|
|
199
|
+
if (tag !== 26) {
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
message.data = exports.plandata.decode(reader, reader.uint32());
|
|
203
|
+
continue;
|
|
204
|
+
case 4:
|
|
205
|
+
if (tag !== 34) {
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
message.message = reader.string();
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
reader.skipType(tag & 7);
|
|
215
|
+
}
|
|
216
|
+
return message;
|
|
217
|
+
},
|
|
218
|
+
fromJSON(object) {
|
|
219
|
+
return {
|
|
220
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
221
|
+
statusCode: isSet(object.statusCode) ? globalThis.Number(object.statusCode) : 0,
|
|
222
|
+
data: isSet(object.data) ? exports.plandata.fromJSON(object.data) : undefined,
|
|
223
|
+
message: isSet(object.message) ? globalThis.String(object.message) : "",
|
|
224
|
+
};
|
|
225
|
+
},
|
|
226
|
+
toJSON(message) {
|
|
227
|
+
const obj = {};
|
|
228
|
+
if (message.status !== "") {
|
|
229
|
+
obj.status = message.status;
|
|
230
|
+
}
|
|
231
|
+
if (message.statusCode !== 0) {
|
|
232
|
+
obj.statusCode = Math.round(message.statusCode);
|
|
233
|
+
}
|
|
234
|
+
if (message.data !== undefined) {
|
|
235
|
+
obj.data = exports.plandata.toJSON(message.data);
|
|
236
|
+
}
|
|
237
|
+
if (message.message !== "") {
|
|
238
|
+
obj.message = message.message;
|
|
239
|
+
}
|
|
240
|
+
return obj;
|
|
241
|
+
},
|
|
242
|
+
create(base) {
|
|
243
|
+
return exports.getChrDetailsResponse.fromPartial(base ?? {});
|
|
244
|
+
},
|
|
245
|
+
fromPartial(object) {
|
|
246
|
+
const message = createBasegetChrDetailsResponse();
|
|
247
|
+
message.status = object.status ?? "";
|
|
248
|
+
message.statusCode = object.statusCode ?? 0;
|
|
249
|
+
message.data = (object.data !== undefined && object.data !== null) ? exports.plandata.fromPartial(object.data) : undefined;
|
|
250
|
+
message.message = object.message ?? "";
|
|
251
|
+
return message;
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
function isSet(value) {
|
|
255
|
+
return value !== null && value !== undefined;
|
|
256
|
+
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import _m0 from "protobufjs/minimal";
|
|
2
2
|
export declare const protobufPackage = "loans.loansummary";
|
|
3
3
|
export interface loanSummaryRequest {
|
|
4
|
-
addons:
|
|
4
|
+
addons: loanSummaryRequest_Field[];
|
|
5
5
|
amount: number;
|
|
6
6
|
tenure: number;
|
|
7
7
|
}
|
|
8
|
+
export interface loanSummaryRequest_Field {
|
|
9
|
+
name: string;
|
|
10
|
+
amount: number;
|
|
11
|
+
}
|
|
8
12
|
export interface loanSummaryResponse {
|
|
9
13
|
gateway_fees: number;
|
|
10
14
|
striked_gateway_fees: number;
|
|
@@ -46,6 +50,14 @@ export declare const loanSummaryRequest: {
|
|
|
46
50
|
create<I extends Exact<DeepPartial<loanSummaryRequest>, I>>(base?: I): loanSummaryRequest;
|
|
47
51
|
fromPartial<I extends Exact<DeepPartial<loanSummaryRequest>, I>>(object: I): loanSummaryRequest;
|
|
48
52
|
};
|
|
53
|
+
export declare const loanSummaryRequest_Field: {
|
|
54
|
+
encode(message: loanSummaryRequest_Field, writer?: _m0.Writer): _m0.Writer;
|
|
55
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): loanSummaryRequest_Field;
|
|
56
|
+
fromJSON(object: any): loanSummaryRequest_Field;
|
|
57
|
+
toJSON(message: loanSummaryRequest_Field): unknown;
|
|
58
|
+
create<I extends Exact<DeepPartial<loanSummaryRequest_Field>, I>>(base?: I): loanSummaryRequest_Field;
|
|
59
|
+
fromPartial<I extends Exact<DeepPartial<loanSummaryRequest_Field>, I>>(object: I): loanSummaryRequest_Field;
|
|
60
|
+
};
|
|
49
61
|
export declare const loanSummaryResponse: {
|
|
50
62
|
encode(message: loanSummaryResponse, writer?: _m0.Writer): _m0.Writer;
|
|
51
63
|
decode(input: _m0.Reader | Uint8Array, length?: number): loanSummaryResponse;
|
package/ts/loans/loansummary.js
CHANGED
|
@@ -8,17 +8,17 @@ 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.loanSummaryResponse = exports.loanSummaryRequest = exports.protobufPackage = void 0;
|
|
11
|
+
exports.loanSummaryResponse = exports.loanSummaryRequest_Field = exports.loanSummaryRequest = exports.protobufPackage = void 0;
|
|
12
12
|
/* eslint-disable */
|
|
13
13
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
14
|
exports.protobufPackage = "loans.loansummary";
|
|
15
15
|
function createBaseloanSummaryRequest() {
|
|
16
|
-
return { addons:
|
|
16
|
+
return { addons: [], amount: 0, tenure: 0 };
|
|
17
17
|
}
|
|
18
18
|
exports.loanSummaryRequest = {
|
|
19
19
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
-
|
|
21
|
-
writer.uint32(
|
|
20
|
+
for (const v of message.addons) {
|
|
21
|
+
exports.loanSummaryRequest_Field.encode(v, writer.uint32(10).fork()).ldelim();
|
|
22
22
|
}
|
|
23
23
|
if (message.amount !== 0) {
|
|
24
24
|
writer.uint32(16).int32(message.amount);
|
|
@@ -36,10 +36,10 @@ exports.loanSummaryRequest = {
|
|
|
36
36
|
const tag = reader.uint32();
|
|
37
37
|
switch (tag >>> 3) {
|
|
38
38
|
case 1:
|
|
39
|
-
if (tag !==
|
|
39
|
+
if (tag !== 10) {
|
|
40
40
|
break;
|
|
41
41
|
}
|
|
42
|
-
message.addons
|
|
42
|
+
message.addons.push(exports.loanSummaryRequest_Field.decode(reader, reader.uint32()));
|
|
43
43
|
continue;
|
|
44
44
|
case 2:
|
|
45
45
|
if (tag !== 16) {
|
|
@@ -63,15 +63,17 @@ exports.loanSummaryRequest = {
|
|
|
63
63
|
},
|
|
64
64
|
fromJSON(object) {
|
|
65
65
|
return {
|
|
66
|
-
addons:
|
|
66
|
+
addons: globalThis.Array.isArray(object?.addons)
|
|
67
|
+
? object.addons.map((e) => exports.loanSummaryRequest_Field.fromJSON(e))
|
|
68
|
+
: [],
|
|
67
69
|
amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
|
|
68
70
|
tenure: isSet(object.tenure) ? globalThis.Number(object.tenure) : 0,
|
|
69
71
|
};
|
|
70
72
|
},
|
|
71
73
|
toJSON(message) {
|
|
72
74
|
const obj = {};
|
|
73
|
-
if (message.addons
|
|
74
|
-
obj.addons =
|
|
75
|
+
if (message.addons?.length) {
|
|
76
|
+
obj.addons = message.addons.map((e) => exports.loanSummaryRequest_Field.toJSON(e));
|
|
75
77
|
}
|
|
76
78
|
if (message.amount !== 0) {
|
|
77
79
|
obj.amount = Math.round(message.amount);
|
|
@@ -86,12 +88,78 @@ exports.loanSummaryRequest = {
|
|
|
86
88
|
},
|
|
87
89
|
fromPartial(object) {
|
|
88
90
|
const message = createBaseloanSummaryRequest();
|
|
89
|
-
message.addons = object.addons
|
|
91
|
+
message.addons = object.addons?.map((e) => exports.loanSummaryRequest_Field.fromPartial(e)) || [];
|
|
90
92
|
message.amount = object.amount ?? 0;
|
|
91
93
|
message.tenure = object.tenure ?? 0;
|
|
92
94
|
return message;
|
|
93
95
|
},
|
|
94
96
|
};
|
|
97
|
+
function createBaseloanSummaryRequest_Field() {
|
|
98
|
+
return { name: "", amount: 0 };
|
|
99
|
+
}
|
|
100
|
+
exports.loanSummaryRequest_Field = {
|
|
101
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
102
|
+
if (message.name !== "") {
|
|
103
|
+
writer.uint32(10).string(message.name);
|
|
104
|
+
}
|
|
105
|
+
if (message.amount !== 0) {
|
|
106
|
+
writer.uint32(16).int32(message.amount);
|
|
107
|
+
}
|
|
108
|
+
return writer;
|
|
109
|
+
},
|
|
110
|
+
decode(input, length) {
|
|
111
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
112
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
113
|
+
const message = createBaseloanSummaryRequest_Field();
|
|
114
|
+
while (reader.pos < end) {
|
|
115
|
+
const tag = reader.uint32();
|
|
116
|
+
switch (tag >>> 3) {
|
|
117
|
+
case 1:
|
|
118
|
+
if (tag !== 10) {
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
message.name = reader.string();
|
|
122
|
+
continue;
|
|
123
|
+
case 2:
|
|
124
|
+
if (tag !== 16) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
message.amount = reader.int32();
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
reader.skipType(tag & 7);
|
|
134
|
+
}
|
|
135
|
+
return message;
|
|
136
|
+
},
|
|
137
|
+
fromJSON(object) {
|
|
138
|
+
return {
|
|
139
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
140
|
+
amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
|
|
141
|
+
};
|
|
142
|
+
},
|
|
143
|
+
toJSON(message) {
|
|
144
|
+
const obj = {};
|
|
145
|
+
if (message.name !== "") {
|
|
146
|
+
obj.name = message.name;
|
|
147
|
+
}
|
|
148
|
+
if (message.amount !== 0) {
|
|
149
|
+
obj.amount = Math.round(message.amount);
|
|
150
|
+
}
|
|
151
|
+
return obj;
|
|
152
|
+
},
|
|
153
|
+
create(base) {
|
|
154
|
+
return exports.loanSummaryRequest_Field.fromPartial(base ?? {});
|
|
155
|
+
},
|
|
156
|
+
fromPartial(object) {
|
|
157
|
+
const message = createBaseloanSummaryRequest_Field();
|
|
158
|
+
message.name = object.name ?? "";
|
|
159
|
+
message.amount = object.amount ?? 0;
|
|
160
|
+
return message;
|
|
161
|
+
},
|
|
162
|
+
};
|
|
95
163
|
function createBaseloanSummaryResponse() {
|
|
96
164
|
return {
|
|
97
165
|
gateway_fees: 0,
|
package/ts/loans.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { forecloseAmountRequest, forecloseAmountResponse } from "./loans/foreclo
|
|
|
9
9
|
import { foreclosePaymentRequest, foreclosePaymentResponse } from "./loans/foreclosepayment";
|
|
10
10
|
import { futurePaymentMoreDetailsRequest, futurePaymentMoreDetailsResponse } from "./loans/futurepaymentmoredetails";
|
|
11
11
|
import { getBillDetailsRequest, getBillDetailsResponse } from "./loans/getbilldetails";
|
|
12
|
+
import { getChrDetailsRequest, getChrDetailsResponse } from "./loans/getchrdetails";
|
|
12
13
|
import { getCustomerLoanStatusRequest, getCustomerLoanStatusResponse } from "./loans/getcustomerloanstatus";
|
|
13
14
|
import { getLoanByIdRequest, getLoanByIdResponse } from "./loans/getloanbyid";
|
|
14
15
|
import { getNextdueAmountRequest, getNextdueAmountResponse } from "./loans/getnextdueamount";
|
|
@@ -322,6 +323,15 @@ export declare const loansService: {
|
|
|
322
323
|
readonly responseSerialize: (value: getVirtualAccountNumberResponse) => Buffer;
|
|
323
324
|
readonly responseDeserialize: (value: Buffer) => getVirtualAccountNumberResponse;
|
|
324
325
|
};
|
|
326
|
+
readonly getChrDetails: {
|
|
327
|
+
readonly path: "/service.loans/getChrDetails";
|
|
328
|
+
readonly requestStream: false;
|
|
329
|
+
readonly responseStream: false;
|
|
330
|
+
readonly requestSerialize: (value: getChrDetailsRequest) => Buffer;
|
|
331
|
+
readonly requestDeserialize: (value: Buffer) => getChrDetailsRequest;
|
|
332
|
+
readonly responseSerialize: (value: getChrDetailsResponse) => Buffer;
|
|
333
|
+
readonly responseDeserialize: (value: Buffer) => getChrDetailsResponse;
|
|
334
|
+
};
|
|
325
335
|
};
|
|
326
336
|
export interface loansServer extends UntypedServiceImplementation {
|
|
327
337
|
creditlimit: handleUnaryCall<creditLimitRequest, creditLimitResponse>;
|
|
@@ -356,6 +366,7 @@ export interface loansServer extends UntypedServiceImplementation {
|
|
|
356
366
|
updatetransactionstatus: handleUnaryCall<updateTransactionStatusRequest, updateTransactionStatusResponse>;
|
|
357
367
|
getUsedLimit: handleUnaryCall<getUsedLimitfoRequest, getUsedLimitfoResponse>;
|
|
358
368
|
getVirtualAccountNumber: handleUnaryCall<getVirtualAccountNumberRequest, getVirtualAccountNumberResponse>;
|
|
369
|
+
getChrDetails: handleUnaryCall<getChrDetailsRequest, getChrDetailsResponse>;
|
|
359
370
|
}
|
|
360
371
|
export interface loansClient extends Client {
|
|
361
372
|
creditlimit(request: creditLimitRequest, callback: (error: ServiceError | null, response: creditLimitResponse) => void): ClientUnaryCall;
|
|
@@ -454,6 +465,9 @@ export interface loansClient extends Client {
|
|
|
454
465
|
getVirtualAccountNumber(request: getVirtualAccountNumberRequest, callback: (error: ServiceError | null, response: getVirtualAccountNumberResponse) => void): ClientUnaryCall;
|
|
455
466
|
getVirtualAccountNumber(request: getVirtualAccountNumberRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getVirtualAccountNumberResponse) => void): ClientUnaryCall;
|
|
456
467
|
getVirtualAccountNumber(request: getVirtualAccountNumberRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getVirtualAccountNumberResponse) => void): ClientUnaryCall;
|
|
468
|
+
getChrDetails(request: getChrDetailsRequest, callback: (error: ServiceError | null, response: getChrDetailsResponse) => void): ClientUnaryCall;
|
|
469
|
+
getChrDetails(request: getChrDetailsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getChrDetailsResponse) => void): ClientUnaryCall;
|
|
470
|
+
getChrDetails(request: getChrDetailsRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getChrDetailsResponse) => void): ClientUnaryCall;
|
|
457
471
|
}
|
|
458
472
|
export declare const loansClient: {
|
|
459
473
|
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): loansClient;
|
package/ts/loans.js
CHANGED
|
@@ -18,6 +18,7 @@ const forecloseamount_1 = require("./loans/forecloseamount");
|
|
|
18
18
|
const foreclosepayment_1 = require("./loans/foreclosepayment");
|
|
19
19
|
const futurepaymentmoredetails_1 = require("./loans/futurepaymentmoredetails");
|
|
20
20
|
const getbilldetails_1 = require("./loans/getbilldetails");
|
|
21
|
+
const getchrdetails_1 = require("./loans/getchrdetails");
|
|
21
22
|
const getcustomerloanstatus_1 = require("./loans/getcustomerloanstatus");
|
|
22
23
|
const getloanbyid_1 = require("./loans/getloanbyid");
|
|
23
24
|
const getnextdueamount_1 = require("./loans/getnextdueamount");
|
|
@@ -330,5 +331,14 @@ exports.loansService = {
|
|
|
330
331
|
responseSerialize: (value) => Buffer.from(getvirtualaccountnumber_1.getVirtualAccountNumberResponse.encode(value).finish()),
|
|
331
332
|
responseDeserialize: (value) => getvirtualaccountnumber_1.getVirtualAccountNumberResponse.decode(value),
|
|
332
333
|
},
|
|
334
|
+
getChrDetails: {
|
|
335
|
+
path: "/service.loans/getChrDetails",
|
|
336
|
+
requestStream: false,
|
|
337
|
+
responseStream: false,
|
|
338
|
+
requestSerialize: (value) => Buffer.from(getchrdetails_1.getChrDetailsRequest.encode(value).finish()),
|
|
339
|
+
requestDeserialize: (value) => getchrdetails_1.getChrDetailsRequest.decode(value),
|
|
340
|
+
responseSerialize: (value) => Buffer.from(getchrdetails_1.getChrDetailsResponse.encode(value).finish()),
|
|
341
|
+
responseDeserialize: (value) => getchrdetails_1.getChrDetailsResponse.decode(value),
|
|
342
|
+
},
|
|
333
343
|
};
|
|
334
344
|
exports.loansClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.loansService, "service.loans");
|