@stashfin/grpc 1.2.5 → 1.2.6
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/customers/getcustomerbyid.d.ts +50 -0
- package/ts/customers/getcustomerbyid.js +346 -0
- package/ts/customers/getdashboard.d.ts +90 -0
- package/ts/customers/getdashboard.js +603 -0
- package/ts/customers/getdashboardmaincard.d.ts +69 -0
- package/ts/customers/getdashboardmaincard.js +520 -0
- package/ts/customers.d.ts +42 -0
- package/ts/customers.js +30 -0
- package/ts/google/protobuf/timestamp.d.ts +127 -0
- package/ts/google/protobuf/timestamp.js +97 -0
- package/ts/loans/approveloan.d.ts +39 -0
- package/ts/loans/approveloan.js +175 -0
- package/ts/loans/banklist.d.ts +13 -1
- package/ts/loans/banklist.js +88 -20
- package/ts/loans/calculateemi.d.ts +0 -11
- package/ts/loans/calculateemi.js +17 -71
- package/ts/loans/updateinstallments.d.ts +38 -0
- package/ts/loans/updateinstallments.js +161 -0
- package/ts/loans/updateloan.d.ts +39 -0
- package/ts/loans/updateloan.js +175 -0
- package/ts/loans.d.ts +42 -0
- package/ts/loans.js +30 -0
- package/ts/stashcash/debitsc.d.ts +2 -1
- package/ts/stashcash/debitsc.js +24 -9
package/ts/loans/calculateemi.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.
|
|
11
|
+
exports.calculateEmiResponse = exports.calculateEmiRequest = exports.protobufPackage = void 0;
|
|
12
12
|
/* eslint-disable */
|
|
13
13
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
14
|
exports.protobufPackage = "loans.calculateemi";
|
|
@@ -63,15 +63,18 @@ exports.calculateEmiRequest = {
|
|
|
63
63
|
},
|
|
64
64
|
};
|
|
65
65
|
function createBasecalculateEmiResponse() {
|
|
66
|
-
return { disbursal_amount: 0,
|
|
66
|
+
return { disbursal_amount: 0, tenure: 0, thirdparty_amount: 0 };
|
|
67
67
|
}
|
|
68
68
|
exports.calculateEmiResponse = {
|
|
69
69
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
70
70
|
if (message.disbursal_amount !== 0) {
|
|
71
71
|
writer.uint32(8).int32(message.disbursal_amount);
|
|
72
72
|
}
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
if (message.tenure !== 0) {
|
|
74
|
+
writer.uint32(16).int32(message.tenure);
|
|
75
|
+
}
|
|
76
|
+
if (message.thirdparty_amount !== 0) {
|
|
77
|
+
writer.uint32(24).int32(message.thirdparty_amount);
|
|
75
78
|
}
|
|
76
79
|
return writer;
|
|
77
80
|
},
|
|
@@ -89,75 +92,13 @@ exports.calculateEmiResponse = {
|
|
|
89
92
|
message.disbursal_amount = reader.int32();
|
|
90
93
|
continue;
|
|
91
94
|
case 2:
|
|
92
|
-
if (tag !==
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
message.emi_calculation.push(exports.calculateEmiResponse_Field.decode(reader, reader.uint32()));
|
|
96
|
-
continue;
|
|
97
|
-
}
|
|
98
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
reader.skipType(tag & 7);
|
|
102
|
-
}
|
|
103
|
-
return message;
|
|
104
|
-
},
|
|
105
|
-
fromJSON(object) {
|
|
106
|
-
return {
|
|
107
|
-
disbursal_amount: isSet(object.disbursal_amount) ? globalThis.Number(object.disbursal_amount) : 0,
|
|
108
|
-
emi_calculation: globalThis.Array.isArray(object?.emi_calculation)
|
|
109
|
-
? object.emi_calculation.map((e) => exports.calculateEmiResponse_Field.fromJSON(e))
|
|
110
|
-
: [],
|
|
111
|
-
};
|
|
112
|
-
},
|
|
113
|
-
toJSON(message) {
|
|
114
|
-
const obj = {};
|
|
115
|
-
if (message.disbursal_amount !== 0) {
|
|
116
|
-
obj.disbursal_amount = Math.round(message.disbursal_amount);
|
|
117
|
-
}
|
|
118
|
-
if (message.emi_calculation?.length) {
|
|
119
|
-
obj.emi_calculation = message.emi_calculation.map((e) => exports.calculateEmiResponse_Field.toJSON(e));
|
|
120
|
-
}
|
|
121
|
-
return obj;
|
|
122
|
-
},
|
|
123
|
-
create(base) {
|
|
124
|
-
return exports.calculateEmiResponse.fromPartial(base ?? {});
|
|
125
|
-
},
|
|
126
|
-
fromPartial(object) {
|
|
127
|
-
const message = createBasecalculateEmiResponse();
|
|
128
|
-
message.disbursal_amount = object.disbursal_amount ?? 0;
|
|
129
|
-
message.emi_calculation = object.emi_calculation?.map((e) => exports.calculateEmiResponse_Field.fromPartial(e)) || [];
|
|
130
|
-
return message;
|
|
131
|
-
},
|
|
132
|
-
};
|
|
133
|
-
function createBasecalculateEmiResponse_Field() {
|
|
134
|
-
return { tenure: 0, thirdparty_amount: 0 };
|
|
135
|
-
}
|
|
136
|
-
exports.calculateEmiResponse_Field = {
|
|
137
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
138
|
-
if (message.tenure !== 0) {
|
|
139
|
-
writer.uint32(8).int32(message.tenure);
|
|
140
|
-
}
|
|
141
|
-
if (message.thirdparty_amount !== 0) {
|
|
142
|
-
writer.uint32(16).int32(message.thirdparty_amount);
|
|
143
|
-
}
|
|
144
|
-
return writer;
|
|
145
|
-
},
|
|
146
|
-
decode(input, length) {
|
|
147
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
148
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
149
|
-
const message = createBasecalculateEmiResponse_Field();
|
|
150
|
-
while (reader.pos < end) {
|
|
151
|
-
const tag = reader.uint32();
|
|
152
|
-
switch (tag >>> 3) {
|
|
153
|
-
case 1:
|
|
154
|
-
if (tag !== 8) {
|
|
95
|
+
if (tag !== 16) {
|
|
155
96
|
break;
|
|
156
97
|
}
|
|
157
98
|
message.tenure = reader.int32();
|
|
158
99
|
continue;
|
|
159
|
-
case
|
|
160
|
-
if (tag !==
|
|
100
|
+
case 3:
|
|
101
|
+
if (tag !== 24) {
|
|
161
102
|
break;
|
|
162
103
|
}
|
|
163
104
|
message.thirdparty_amount = reader.int32();
|
|
@@ -172,12 +113,16 @@ exports.calculateEmiResponse_Field = {
|
|
|
172
113
|
},
|
|
173
114
|
fromJSON(object) {
|
|
174
115
|
return {
|
|
116
|
+
disbursal_amount: isSet(object.disbursal_amount) ? globalThis.Number(object.disbursal_amount) : 0,
|
|
175
117
|
tenure: isSet(object.tenure) ? globalThis.Number(object.tenure) : 0,
|
|
176
118
|
thirdparty_amount: isSet(object.thirdparty_amount) ? globalThis.Number(object.thirdparty_amount) : 0,
|
|
177
119
|
};
|
|
178
120
|
},
|
|
179
121
|
toJSON(message) {
|
|
180
122
|
const obj = {};
|
|
123
|
+
if (message.disbursal_amount !== 0) {
|
|
124
|
+
obj.disbursal_amount = Math.round(message.disbursal_amount);
|
|
125
|
+
}
|
|
181
126
|
if (message.tenure !== 0) {
|
|
182
127
|
obj.tenure = Math.round(message.tenure);
|
|
183
128
|
}
|
|
@@ -187,10 +132,11 @@ exports.calculateEmiResponse_Field = {
|
|
|
187
132
|
return obj;
|
|
188
133
|
},
|
|
189
134
|
create(base) {
|
|
190
|
-
return exports.
|
|
135
|
+
return exports.calculateEmiResponse.fromPartial(base ?? {});
|
|
191
136
|
},
|
|
192
137
|
fromPartial(object) {
|
|
193
|
-
const message =
|
|
138
|
+
const message = createBasecalculateEmiResponse();
|
|
139
|
+
message.disbursal_amount = object.disbursal_amount ?? 0;
|
|
194
140
|
message.tenure = object.tenure ?? 0;
|
|
195
141
|
message.thirdparty_amount = object.thirdparty_amount ?? 0;
|
|
196
142
|
return message;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "loans.updateinstallments";
|
|
3
|
+
export interface updateInstallmentsRequest {
|
|
4
|
+
installment_id: number;
|
|
5
|
+
r_principal: number;
|
|
6
|
+
r_interest: number;
|
|
7
|
+
r_penalty: number;
|
|
8
|
+
}
|
|
9
|
+
export interface updateInstallmentsResponse {
|
|
10
|
+
id: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const updateInstallmentsRequest: {
|
|
13
|
+
encode(message: updateInstallmentsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
14
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): updateInstallmentsRequest;
|
|
15
|
+
fromJSON(object: any): updateInstallmentsRequest;
|
|
16
|
+
toJSON(message: updateInstallmentsRequest): unknown;
|
|
17
|
+
create<I extends Exact<DeepPartial<updateInstallmentsRequest>, I>>(base?: I): updateInstallmentsRequest;
|
|
18
|
+
fromPartial<I extends Exact<DeepPartial<updateInstallmentsRequest>, I>>(object: I): updateInstallmentsRequest;
|
|
19
|
+
};
|
|
20
|
+
export declare const updateInstallmentsResponse: {
|
|
21
|
+
encode(message: updateInstallmentsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
22
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): updateInstallmentsResponse;
|
|
23
|
+
fromJSON(object: any): updateInstallmentsResponse;
|
|
24
|
+
toJSON(message: updateInstallmentsResponse): unknown;
|
|
25
|
+
create<I extends Exact<DeepPartial<updateInstallmentsResponse>, I>>(base?: I): updateInstallmentsResponse;
|
|
26
|
+
fromPartial<I extends Exact<DeepPartial<updateInstallmentsResponse>, I>>(object: I): updateInstallmentsResponse;
|
|
27
|
+
};
|
|
28
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
29
|
+
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 {} ? {
|
|
30
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
31
|
+
} : Partial<T>;
|
|
32
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
33
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
34
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
35
|
+
} & {
|
|
36
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,161 @@
|
|
|
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 v3.20.3
|
|
6
|
+
// source: loans/updateinstallments.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.updateInstallmentsResponse = exports.updateInstallmentsRequest = exports.protobufPackage = void 0;
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
|
+
exports.protobufPackage = "loans.updateinstallments";
|
|
15
|
+
function createBaseupdateInstallmentsRequest() {
|
|
16
|
+
return { installment_id: 0, r_principal: 0, r_interest: 0, r_penalty: 0 };
|
|
17
|
+
}
|
|
18
|
+
exports.updateInstallmentsRequest = {
|
|
19
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
+
if (message.installment_id !== 0) {
|
|
21
|
+
writer.uint32(8).int32(message.installment_id);
|
|
22
|
+
}
|
|
23
|
+
if (message.r_principal !== 0) {
|
|
24
|
+
writer.uint32(16).int32(message.r_principal);
|
|
25
|
+
}
|
|
26
|
+
if (message.r_interest !== 0) {
|
|
27
|
+
writer.uint32(24).int32(message.r_interest);
|
|
28
|
+
}
|
|
29
|
+
if (message.r_penalty !== 0) {
|
|
30
|
+
writer.uint32(32).int32(message.r_penalty);
|
|
31
|
+
}
|
|
32
|
+
return writer;
|
|
33
|
+
},
|
|
34
|
+
decode(input, length) {
|
|
35
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
36
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
37
|
+
const message = createBaseupdateInstallmentsRequest();
|
|
38
|
+
while (reader.pos < end) {
|
|
39
|
+
const tag = reader.uint32();
|
|
40
|
+
switch (tag >>> 3) {
|
|
41
|
+
case 1:
|
|
42
|
+
if (tag !== 8) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
message.installment_id = reader.int32();
|
|
46
|
+
continue;
|
|
47
|
+
case 2:
|
|
48
|
+
if (tag !== 16) {
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
message.r_principal = reader.int32();
|
|
52
|
+
continue;
|
|
53
|
+
case 3:
|
|
54
|
+
if (tag !== 24) {
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
message.r_interest = reader.int32();
|
|
58
|
+
continue;
|
|
59
|
+
case 4:
|
|
60
|
+
if (tag !== 32) {
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
message.r_penalty = reader.int32();
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
reader.skipType(tag & 7);
|
|
70
|
+
}
|
|
71
|
+
return message;
|
|
72
|
+
},
|
|
73
|
+
fromJSON(object) {
|
|
74
|
+
return {
|
|
75
|
+
installment_id: isSet(object.installment_id) ? globalThis.Number(object.installment_id) : 0,
|
|
76
|
+
r_principal: isSet(object.r_principal) ? globalThis.Number(object.r_principal) : 0,
|
|
77
|
+
r_interest: isSet(object.r_interest) ? globalThis.Number(object.r_interest) : 0,
|
|
78
|
+
r_penalty: isSet(object.r_penalty) ? globalThis.Number(object.r_penalty) : 0,
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
toJSON(message) {
|
|
82
|
+
const obj = {};
|
|
83
|
+
if (message.installment_id !== 0) {
|
|
84
|
+
obj.installment_id = Math.round(message.installment_id);
|
|
85
|
+
}
|
|
86
|
+
if (message.r_principal !== 0) {
|
|
87
|
+
obj.r_principal = Math.round(message.r_principal);
|
|
88
|
+
}
|
|
89
|
+
if (message.r_interest !== 0) {
|
|
90
|
+
obj.r_interest = Math.round(message.r_interest);
|
|
91
|
+
}
|
|
92
|
+
if (message.r_penalty !== 0) {
|
|
93
|
+
obj.r_penalty = Math.round(message.r_penalty);
|
|
94
|
+
}
|
|
95
|
+
return obj;
|
|
96
|
+
},
|
|
97
|
+
create(base) {
|
|
98
|
+
return exports.updateInstallmentsRequest.fromPartial(base ?? {});
|
|
99
|
+
},
|
|
100
|
+
fromPartial(object) {
|
|
101
|
+
const message = createBaseupdateInstallmentsRequest();
|
|
102
|
+
message.installment_id = object.installment_id ?? 0;
|
|
103
|
+
message.r_principal = object.r_principal ?? 0;
|
|
104
|
+
message.r_interest = object.r_interest ?? 0;
|
|
105
|
+
message.r_penalty = object.r_penalty ?? 0;
|
|
106
|
+
return message;
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
function createBaseupdateInstallmentsResponse() {
|
|
110
|
+
return { id: 0 };
|
|
111
|
+
}
|
|
112
|
+
exports.updateInstallmentsResponse = {
|
|
113
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
114
|
+
if (message.id !== 0) {
|
|
115
|
+
writer.uint32(8).int32(message.id);
|
|
116
|
+
}
|
|
117
|
+
return writer;
|
|
118
|
+
},
|
|
119
|
+
decode(input, length) {
|
|
120
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
121
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
122
|
+
const message = createBaseupdateInstallmentsResponse();
|
|
123
|
+
while (reader.pos < end) {
|
|
124
|
+
const tag = reader.uint32();
|
|
125
|
+
switch (tag >>> 3) {
|
|
126
|
+
case 1:
|
|
127
|
+
if (tag !== 8) {
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
message.id = reader.int32();
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
reader.skipType(tag & 7);
|
|
137
|
+
}
|
|
138
|
+
return message;
|
|
139
|
+
},
|
|
140
|
+
fromJSON(object) {
|
|
141
|
+
return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
|
|
142
|
+
},
|
|
143
|
+
toJSON(message) {
|
|
144
|
+
const obj = {};
|
|
145
|
+
if (message.id !== 0) {
|
|
146
|
+
obj.id = Math.round(message.id);
|
|
147
|
+
}
|
|
148
|
+
return obj;
|
|
149
|
+
},
|
|
150
|
+
create(base) {
|
|
151
|
+
return exports.updateInstallmentsResponse.fromPartial(base ?? {});
|
|
152
|
+
},
|
|
153
|
+
fromPartial(object) {
|
|
154
|
+
const message = createBaseupdateInstallmentsResponse();
|
|
155
|
+
message.id = object.id ?? 0;
|
|
156
|
+
return message;
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
function isSet(value) {
|
|
160
|
+
return value !== null && value !== undefined;
|
|
161
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "loans.updateloan";
|
|
3
|
+
export interface updateLoanRequest {
|
|
4
|
+
loan_id: number;
|
|
5
|
+
status: string;
|
|
6
|
+
disbursal_amount: number;
|
|
7
|
+
disbursal_mode: string;
|
|
8
|
+
is_auto_processing: number;
|
|
9
|
+
}
|
|
10
|
+
export interface updateLoanResponse {
|
|
11
|
+
id: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const updateLoanRequest: {
|
|
14
|
+
encode(message: updateLoanRequest, writer?: _m0.Writer): _m0.Writer;
|
|
15
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): updateLoanRequest;
|
|
16
|
+
fromJSON(object: any): updateLoanRequest;
|
|
17
|
+
toJSON(message: updateLoanRequest): unknown;
|
|
18
|
+
create<I extends Exact<DeepPartial<updateLoanRequest>, I>>(base?: I): updateLoanRequest;
|
|
19
|
+
fromPartial<I extends Exact<DeepPartial<updateLoanRequest>, I>>(object: I): updateLoanRequest;
|
|
20
|
+
};
|
|
21
|
+
export declare const updateLoanResponse: {
|
|
22
|
+
encode(message: updateLoanResponse, writer?: _m0.Writer): _m0.Writer;
|
|
23
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): updateLoanResponse;
|
|
24
|
+
fromJSON(object: any): updateLoanResponse;
|
|
25
|
+
toJSON(message: updateLoanResponse): unknown;
|
|
26
|
+
create<I extends Exact<DeepPartial<updateLoanResponse>, I>>(base?: I): updateLoanResponse;
|
|
27
|
+
fromPartial<I extends Exact<DeepPartial<updateLoanResponse>, I>>(object: I): updateLoanResponse;
|
|
28
|
+
};
|
|
29
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
30
|
+
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 {} ? {
|
|
31
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
32
|
+
} : Partial<T>;
|
|
33
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
34
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
35
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
36
|
+
} & {
|
|
37
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,175 @@
|
|
|
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 v3.20.3
|
|
6
|
+
// source: loans/updateloan.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.updateLoanResponse = exports.updateLoanRequest = exports.protobufPackage = void 0;
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
|
+
exports.protobufPackage = "loans.updateloan";
|
|
15
|
+
function createBaseupdateLoanRequest() {
|
|
16
|
+
return { loan_id: 0, status: "", disbursal_amount: 0, disbursal_mode: "", is_auto_processing: 0 };
|
|
17
|
+
}
|
|
18
|
+
exports.updateLoanRequest = {
|
|
19
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
+
if (message.loan_id !== 0) {
|
|
21
|
+
writer.uint32(8).int32(message.loan_id);
|
|
22
|
+
}
|
|
23
|
+
if (message.status !== "") {
|
|
24
|
+
writer.uint32(18).string(message.status);
|
|
25
|
+
}
|
|
26
|
+
if (message.disbursal_amount !== 0) {
|
|
27
|
+
writer.uint32(24).int32(message.disbursal_amount);
|
|
28
|
+
}
|
|
29
|
+
if (message.disbursal_mode !== "") {
|
|
30
|
+
writer.uint32(34).string(message.disbursal_mode);
|
|
31
|
+
}
|
|
32
|
+
if (message.is_auto_processing !== 0) {
|
|
33
|
+
writer.uint32(40).int32(message.is_auto_processing);
|
|
34
|
+
}
|
|
35
|
+
return writer;
|
|
36
|
+
},
|
|
37
|
+
decode(input, length) {
|
|
38
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
39
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
40
|
+
const message = createBaseupdateLoanRequest();
|
|
41
|
+
while (reader.pos < end) {
|
|
42
|
+
const tag = reader.uint32();
|
|
43
|
+
switch (tag >>> 3) {
|
|
44
|
+
case 1:
|
|
45
|
+
if (tag !== 8) {
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
message.loan_id = reader.int32();
|
|
49
|
+
continue;
|
|
50
|
+
case 2:
|
|
51
|
+
if (tag !== 18) {
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
message.status = reader.string();
|
|
55
|
+
continue;
|
|
56
|
+
case 3:
|
|
57
|
+
if (tag !== 24) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
message.disbursal_amount = reader.int32();
|
|
61
|
+
continue;
|
|
62
|
+
case 4:
|
|
63
|
+
if (tag !== 34) {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
message.disbursal_mode = reader.string();
|
|
67
|
+
continue;
|
|
68
|
+
case 5:
|
|
69
|
+
if (tag !== 40) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
message.is_auto_processing = reader.int32();
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
reader.skipType(tag & 7);
|
|
79
|
+
}
|
|
80
|
+
return message;
|
|
81
|
+
},
|
|
82
|
+
fromJSON(object) {
|
|
83
|
+
return {
|
|
84
|
+
loan_id: isSet(object.loan_id) ? globalThis.Number(object.loan_id) : 0,
|
|
85
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
86
|
+
disbursal_amount: isSet(object.disbursal_amount) ? globalThis.Number(object.disbursal_amount) : 0,
|
|
87
|
+
disbursal_mode: isSet(object.disbursal_mode) ? globalThis.String(object.disbursal_mode) : "",
|
|
88
|
+
is_auto_processing: isSet(object.is_auto_processing) ? globalThis.Number(object.is_auto_processing) : 0,
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
toJSON(message) {
|
|
92
|
+
const obj = {};
|
|
93
|
+
if (message.loan_id !== 0) {
|
|
94
|
+
obj.loan_id = Math.round(message.loan_id);
|
|
95
|
+
}
|
|
96
|
+
if (message.status !== "") {
|
|
97
|
+
obj.status = message.status;
|
|
98
|
+
}
|
|
99
|
+
if (message.disbursal_amount !== 0) {
|
|
100
|
+
obj.disbursal_amount = Math.round(message.disbursal_amount);
|
|
101
|
+
}
|
|
102
|
+
if (message.disbursal_mode !== "") {
|
|
103
|
+
obj.disbursal_mode = message.disbursal_mode;
|
|
104
|
+
}
|
|
105
|
+
if (message.is_auto_processing !== 0) {
|
|
106
|
+
obj.is_auto_processing = Math.round(message.is_auto_processing);
|
|
107
|
+
}
|
|
108
|
+
return obj;
|
|
109
|
+
},
|
|
110
|
+
create(base) {
|
|
111
|
+
return exports.updateLoanRequest.fromPartial(base ?? {});
|
|
112
|
+
},
|
|
113
|
+
fromPartial(object) {
|
|
114
|
+
const message = createBaseupdateLoanRequest();
|
|
115
|
+
message.loan_id = object.loan_id ?? 0;
|
|
116
|
+
message.status = object.status ?? "";
|
|
117
|
+
message.disbursal_amount = object.disbursal_amount ?? 0;
|
|
118
|
+
message.disbursal_mode = object.disbursal_mode ?? "";
|
|
119
|
+
message.is_auto_processing = object.is_auto_processing ?? 0;
|
|
120
|
+
return message;
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
function createBaseupdateLoanResponse() {
|
|
124
|
+
return { id: 0 };
|
|
125
|
+
}
|
|
126
|
+
exports.updateLoanResponse = {
|
|
127
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
128
|
+
if (message.id !== 0) {
|
|
129
|
+
writer.uint32(8).int32(message.id);
|
|
130
|
+
}
|
|
131
|
+
return writer;
|
|
132
|
+
},
|
|
133
|
+
decode(input, length) {
|
|
134
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
135
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
136
|
+
const message = createBaseupdateLoanResponse();
|
|
137
|
+
while (reader.pos < end) {
|
|
138
|
+
const tag = reader.uint32();
|
|
139
|
+
switch (tag >>> 3) {
|
|
140
|
+
case 1:
|
|
141
|
+
if (tag !== 8) {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
message.id = reader.int32();
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
reader.skipType(tag & 7);
|
|
151
|
+
}
|
|
152
|
+
return message;
|
|
153
|
+
},
|
|
154
|
+
fromJSON(object) {
|
|
155
|
+
return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
|
|
156
|
+
},
|
|
157
|
+
toJSON(message) {
|
|
158
|
+
const obj = {};
|
|
159
|
+
if (message.id !== 0) {
|
|
160
|
+
obj.id = Math.round(message.id);
|
|
161
|
+
}
|
|
162
|
+
return obj;
|
|
163
|
+
},
|
|
164
|
+
create(base) {
|
|
165
|
+
return exports.updateLoanResponse.fromPartial(base ?? {});
|
|
166
|
+
},
|
|
167
|
+
fromPartial(object) {
|
|
168
|
+
const message = createBaseupdateLoanResponse();
|
|
169
|
+
message.id = object.id ?? 0;
|
|
170
|
+
return message;
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
function isSet(value) {
|
|
174
|
+
return value !== null && value !== undefined;
|
|
175
|
+
}
|
package/ts/loans.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
2
|
+
import { approveLoanRequest, approveLoanResponse } from "./loans/approveloan";
|
|
2
3
|
import { bankListRequest, bankListResponse } from "./loans/banklist";
|
|
3
4
|
import { calculateEmiRequest, calculateEmiResponse } from "./loans/calculateemi";
|
|
4
5
|
import { creditLimitRequest, creditLimitResponse } from "./loans/creditlimit";
|
|
6
|
+
import { updateInstallmentsRequest, updateInstallmentsResponse } from "./loans/updateinstallments";
|
|
7
|
+
import { updateLoanRequest, updateLoanResponse } from "./loans/updateloan";
|
|
5
8
|
export declare const protobufPackage = "service";
|
|
6
9
|
export type loansService = typeof loansService;
|
|
7
10
|
export declare const loansService: {
|
|
@@ -32,11 +35,41 @@ export declare const loansService: {
|
|
|
32
35
|
readonly responseSerialize: (value: bankListResponse) => Buffer;
|
|
33
36
|
readonly responseDeserialize: (value: Buffer) => bankListResponse;
|
|
34
37
|
};
|
|
38
|
+
readonly approveLoan: {
|
|
39
|
+
readonly path: "/service.loans/approveLoan";
|
|
40
|
+
readonly requestStream: false;
|
|
41
|
+
readonly responseStream: false;
|
|
42
|
+
readonly requestSerialize: (value: approveLoanRequest) => Buffer;
|
|
43
|
+
readonly requestDeserialize: (value: Buffer) => approveLoanRequest;
|
|
44
|
+
readonly responseSerialize: (value: approveLoanResponse) => Buffer;
|
|
45
|
+
readonly responseDeserialize: (value: Buffer) => approveLoanResponse;
|
|
46
|
+
};
|
|
47
|
+
readonly updateloan: {
|
|
48
|
+
readonly path: "/service.loans/updateloan";
|
|
49
|
+
readonly requestStream: false;
|
|
50
|
+
readonly responseStream: false;
|
|
51
|
+
readonly requestSerialize: (value: updateLoanRequest) => Buffer;
|
|
52
|
+
readonly requestDeserialize: (value: Buffer) => updateLoanRequest;
|
|
53
|
+
readonly responseSerialize: (value: updateLoanResponse) => Buffer;
|
|
54
|
+
readonly responseDeserialize: (value: Buffer) => updateLoanResponse;
|
|
55
|
+
};
|
|
56
|
+
readonly updateInstallments: {
|
|
57
|
+
readonly path: "/service.loans/updateInstallments";
|
|
58
|
+
readonly requestStream: false;
|
|
59
|
+
readonly responseStream: false;
|
|
60
|
+
readonly requestSerialize: (value: updateInstallmentsRequest) => Buffer;
|
|
61
|
+
readonly requestDeserialize: (value: Buffer) => updateInstallmentsRequest;
|
|
62
|
+
readonly responseSerialize: (value: updateInstallmentsResponse) => Buffer;
|
|
63
|
+
readonly responseDeserialize: (value: Buffer) => updateInstallmentsResponse;
|
|
64
|
+
};
|
|
35
65
|
};
|
|
36
66
|
export interface loansServer extends UntypedServiceImplementation {
|
|
37
67
|
creditlimit: handleUnaryCall<creditLimitRequest, creditLimitResponse>;
|
|
38
68
|
calculateemi: handleUnaryCall<calculateEmiRequest, calculateEmiResponse>;
|
|
39
69
|
banklist: handleUnaryCall<bankListRequest, bankListResponse>;
|
|
70
|
+
approveLoan: handleUnaryCall<approveLoanRequest, approveLoanResponse>;
|
|
71
|
+
updateloan: handleUnaryCall<updateLoanRequest, updateLoanResponse>;
|
|
72
|
+
updateInstallments: handleUnaryCall<updateInstallmentsRequest, updateInstallmentsResponse>;
|
|
40
73
|
}
|
|
41
74
|
export interface loansClient extends Client {
|
|
42
75
|
creditlimit(request: creditLimitRequest, callback: (error: ServiceError | null, response: creditLimitResponse) => void): ClientUnaryCall;
|
|
@@ -48,6 +81,15 @@ export interface loansClient extends Client {
|
|
|
48
81
|
banklist(request: bankListRequest, callback: (error: ServiceError | null, response: bankListResponse) => void): ClientUnaryCall;
|
|
49
82
|
banklist(request: bankListRequest, metadata: Metadata, callback: (error: ServiceError | null, response: bankListResponse) => void): ClientUnaryCall;
|
|
50
83
|
banklist(request: bankListRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: bankListResponse) => void): ClientUnaryCall;
|
|
84
|
+
approveLoan(request: approveLoanRequest, callback: (error: ServiceError | null, response: approveLoanResponse) => void): ClientUnaryCall;
|
|
85
|
+
approveLoan(request: approveLoanRequest, metadata: Metadata, callback: (error: ServiceError | null, response: approveLoanResponse) => void): ClientUnaryCall;
|
|
86
|
+
approveLoan(request: approveLoanRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: approveLoanResponse) => void): ClientUnaryCall;
|
|
87
|
+
updateloan(request: updateLoanRequest, callback: (error: ServiceError | null, response: updateLoanResponse) => void): ClientUnaryCall;
|
|
88
|
+
updateloan(request: updateLoanRequest, metadata: Metadata, callback: (error: ServiceError | null, response: updateLoanResponse) => void): ClientUnaryCall;
|
|
89
|
+
updateloan(request: updateLoanRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: updateLoanResponse) => void): ClientUnaryCall;
|
|
90
|
+
updateInstallments(request: updateInstallmentsRequest, callback: (error: ServiceError | null, response: updateInstallmentsResponse) => void): ClientUnaryCall;
|
|
91
|
+
updateInstallments(request: updateInstallmentsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: updateInstallmentsResponse) => void): ClientUnaryCall;
|
|
92
|
+
updateInstallments(request: updateInstallmentsRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: updateInstallmentsResponse) => void): ClientUnaryCall;
|
|
51
93
|
}
|
|
52
94
|
export declare const loansClient: {
|
|
53
95
|
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): loansClient;
|
package/ts/loans.js
CHANGED
|
@@ -8,9 +8,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
exports.loansClient = exports.loansService = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
11
|
+
const approveloan_1 = require("./loans/approveloan");
|
|
11
12
|
const banklist_1 = require("./loans/banklist");
|
|
12
13
|
const calculateemi_1 = require("./loans/calculateemi");
|
|
13
14
|
const creditlimit_1 = require("./loans/creditlimit");
|
|
15
|
+
const updateinstallments_1 = require("./loans/updateinstallments");
|
|
16
|
+
const updateloan_1 = require("./loans/updateloan");
|
|
14
17
|
exports.protobufPackage = "service";
|
|
15
18
|
exports.loansService = {
|
|
16
19
|
creditlimit: {
|
|
@@ -40,5 +43,32 @@ exports.loansService = {
|
|
|
40
43
|
responseSerialize: (value) => Buffer.from(banklist_1.bankListResponse.encode(value).finish()),
|
|
41
44
|
responseDeserialize: (value) => banklist_1.bankListResponse.decode(value),
|
|
42
45
|
},
|
|
46
|
+
approveLoan: {
|
|
47
|
+
path: "/service.loans/approveLoan",
|
|
48
|
+
requestStream: false,
|
|
49
|
+
responseStream: false,
|
|
50
|
+
requestSerialize: (value) => Buffer.from(approveloan_1.approveLoanRequest.encode(value).finish()),
|
|
51
|
+
requestDeserialize: (value) => approveloan_1.approveLoanRequest.decode(value),
|
|
52
|
+
responseSerialize: (value) => Buffer.from(approveloan_1.approveLoanResponse.encode(value).finish()),
|
|
53
|
+
responseDeserialize: (value) => approveloan_1.approveLoanResponse.decode(value),
|
|
54
|
+
},
|
|
55
|
+
updateloan: {
|
|
56
|
+
path: "/service.loans/updateloan",
|
|
57
|
+
requestStream: false,
|
|
58
|
+
responseStream: false,
|
|
59
|
+
requestSerialize: (value) => Buffer.from(updateloan_1.updateLoanRequest.encode(value).finish()),
|
|
60
|
+
requestDeserialize: (value) => updateloan_1.updateLoanRequest.decode(value),
|
|
61
|
+
responseSerialize: (value) => Buffer.from(updateloan_1.updateLoanResponse.encode(value).finish()),
|
|
62
|
+
responseDeserialize: (value) => updateloan_1.updateLoanResponse.decode(value),
|
|
63
|
+
},
|
|
64
|
+
updateInstallments: {
|
|
65
|
+
path: "/service.loans/updateInstallments",
|
|
66
|
+
requestStream: false,
|
|
67
|
+
responseStream: false,
|
|
68
|
+
requestSerialize: (value) => Buffer.from(updateinstallments_1.updateInstallmentsRequest.encode(value).finish()),
|
|
69
|
+
requestDeserialize: (value) => updateinstallments_1.updateInstallmentsRequest.decode(value),
|
|
70
|
+
responseSerialize: (value) => Buffer.from(updateinstallments_1.updateInstallmentsResponse.encode(value).finish()),
|
|
71
|
+
responseDeserialize: (value) => updateinstallments_1.updateInstallmentsResponse.decode(value),
|
|
72
|
+
},
|
|
43
73
|
};
|
|
44
74
|
exports.loansClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.loansService, "service.loans");
|