@stashfin/grpc 1.2.109 → 1.2.111

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stashfin/grpc",
3
- "version": "1.2.109",
3
+ "version": "1.2.111",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -19,9 +19,7 @@ export interface Report {
19
19
  dpd: DPD | undefined;
20
20
  enquiries: Enquiries | undefined;
21
21
  dpd_char: dpdChar | undefined;
22
- written_off: number;
23
- suit_filled: string;
24
- report_path: string;
22
+ report_path?: string | undefined;
25
23
  }
26
24
  export interface TradeLine {
27
25
  id: number;
@@ -78,15 +76,15 @@ export interface Enquiries {
78
76
  month24: number;
79
77
  }
80
78
  export interface dpdChar {
81
- month1: string;
82
- month3: string;
83
- month6: string;
84
- month9: string;
85
- month12: string;
86
- month15: string;
87
- month18: string;
88
- month21: string;
89
- month24: string;
79
+ month1: boolean;
80
+ month3: boolean;
81
+ month6: boolean;
82
+ month9: boolean;
83
+ month12: boolean;
84
+ month15: boolean;
85
+ month18: boolean;
86
+ month21: boolean;
87
+ month24: boolean;
90
88
  }
91
89
  export declare const bureauRequest: {
92
90
  encode(message: bureauRequest, writer?: _m0.Writer): _m0.Writer;
@@ -196,9 +196,7 @@ function createBaseReport() {
196
196
  dpd: undefined,
197
197
  enquiries: undefined,
198
198
  dpd_char: undefined,
199
- written_off: 0,
200
- suit_filled: "",
201
- report_path: "",
199
+ report_path: undefined,
202
200
  };
203
201
  }
204
202
  exports.Report = {
@@ -224,14 +222,8 @@ exports.Report = {
224
222
  if (message.dpd_char !== undefined) {
225
223
  exports.dpdChar.encode(message.dpd_char, writer.uint32(58).fork()).ldelim();
226
224
  }
227
- if (message.written_off !== 0) {
228
- writer.uint32(64).int32(message.written_off);
229
- }
230
- if (message.suit_filled !== "") {
231
- writer.uint32(74).string(message.suit_filled);
232
- }
233
- if (message.report_path !== "") {
234
- writer.uint32(82).string(message.report_path);
225
+ if (message.report_path !== undefined) {
226
+ writer.uint32(66).string(message.report_path);
235
227
  }
236
228
  return writer;
237
229
  },
@@ -285,19 +277,7 @@ exports.Report = {
285
277
  message.dpd_char = exports.dpdChar.decode(reader, reader.uint32());
286
278
  continue;
287
279
  case 8:
288
- if (tag !== 64) {
289
- break;
290
- }
291
- message.written_off = reader.int32();
292
- continue;
293
- case 9:
294
- if (tag !== 74) {
295
- break;
296
- }
297
- message.suit_filled = reader.string();
298
- continue;
299
- case 10:
300
- if (tag !== 82) {
280
+ if (tag !== 66) {
301
281
  break;
302
282
  }
303
283
  message.report_path = reader.string();
@@ -321,9 +301,7 @@ exports.Report = {
321
301
  dpd: isSet(object.dpd) ? exports.DPD.fromJSON(object.dpd) : undefined,
322
302
  enquiries: isSet(object.enquiries) ? exports.Enquiries.fromJSON(object.enquiries) : undefined,
323
303
  dpd_char: isSet(object.dpd_char) ? exports.dpdChar.fromJSON(object.dpd_char) : undefined,
324
- written_off: isSet(object.written_off) ? globalThis.Number(object.written_off) : 0,
325
- suit_filled: isSet(object.suit_filled) ? globalThis.String(object.suit_filled) : "",
326
- report_path: isSet(object.report_path) ? globalThis.String(object.report_path) : "",
304
+ report_path: isSet(object.report_path) ? globalThis.String(object.report_path) : undefined,
327
305
  };
328
306
  },
329
307
  toJSON(message) {
@@ -349,13 +327,7 @@ exports.Report = {
349
327
  if (message.dpd_char !== undefined) {
350
328
  obj.dpd_char = exports.dpdChar.toJSON(message.dpd_char);
351
329
  }
352
- if (message.written_off !== 0) {
353
- obj.written_off = Math.round(message.written_off);
354
- }
355
- if (message.suit_filled !== "") {
356
- obj.suit_filled = message.suit_filled;
357
- }
358
- if (message.report_path !== "") {
330
+ if (message.report_path !== undefined) {
359
331
  obj.report_path = message.report_path;
360
332
  }
361
333
  return obj;
@@ -376,9 +348,7 @@ exports.Report = {
376
348
  message.dpd_char = (object.dpd_char !== undefined && object.dpd_char !== null)
377
349
  ? exports.dpdChar.fromPartial(object.dpd_char)
378
350
  : undefined;
379
- message.written_off = object.written_off ?? 0;
380
- message.suit_filled = object.suit_filled ?? "";
381
- message.report_path = object.report_path ?? "";
351
+ message.report_path = object.report_path ?? undefined;
382
352
  return message;
383
353
  },
384
354
  };
@@ -1213,45 +1183,45 @@ exports.Enquiries = {
1213
1183
  };
1214
1184
  function createBasedpdChar() {
1215
1185
  return {
1216
- month1: "",
1217
- month3: "",
1218
- month6: "",
1219
- month9: "",
1220
- month12: "",
1221
- month15: "",
1222
- month18: "",
1223
- month21: "",
1224
- month24: "",
1186
+ month1: false,
1187
+ month3: false,
1188
+ month6: false,
1189
+ month9: false,
1190
+ month12: false,
1191
+ month15: false,
1192
+ month18: false,
1193
+ month21: false,
1194
+ month24: false,
1225
1195
  };
1226
1196
  }
1227
1197
  exports.dpdChar = {
1228
1198
  encode(message, writer = minimal_1.default.Writer.create()) {
1229
- if (message.month1 !== "") {
1230
- writer.uint32(10).string(message.month1);
1199
+ if (message.month1 !== false) {
1200
+ writer.uint32(8).bool(message.month1);
1231
1201
  }
1232
- if (message.month3 !== "") {
1233
- writer.uint32(18).string(message.month3);
1202
+ if (message.month3 !== false) {
1203
+ writer.uint32(16).bool(message.month3);
1234
1204
  }
1235
- if (message.month6 !== "") {
1236
- writer.uint32(26).string(message.month6);
1205
+ if (message.month6 !== false) {
1206
+ writer.uint32(24).bool(message.month6);
1237
1207
  }
1238
- if (message.month9 !== "") {
1239
- writer.uint32(34).string(message.month9);
1208
+ if (message.month9 !== false) {
1209
+ writer.uint32(32).bool(message.month9);
1240
1210
  }
1241
- if (message.month12 !== "") {
1242
- writer.uint32(42).string(message.month12);
1211
+ if (message.month12 !== false) {
1212
+ writer.uint32(40).bool(message.month12);
1243
1213
  }
1244
- if (message.month15 !== "") {
1245
- writer.uint32(50).string(message.month15);
1214
+ if (message.month15 !== false) {
1215
+ writer.uint32(48).bool(message.month15);
1246
1216
  }
1247
- if (message.month18 !== "") {
1248
- writer.uint32(58).string(message.month18);
1217
+ if (message.month18 !== false) {
1218
+ writer.uint32(56).bool(message.month18);
1249
1219
  }
1250
- if (message.month21 !== "") {
1251
- writer.uint32(66).string(message.month21);
1220
+ if (message.month21 !== false) {
1221
+ writer.uint32(64).bool(message.month21);
1252
1222
  }
1253
- if (message.month24 !== "") {
1254
- writer.uint32(74).string(message.month24);
1223
+ if (message.month24 !== false) {
1224
+ writer.uint32(72).bool(message.month24);
1255
1225
  }
1256
1226
  return writer;
1257
1227
  },
@@ -1263,58 +1233,58 @@ exports.dpdChar = {
1263
1233
  const tag = reader.uint32();
1264
1234
  switch (tag >>> 3) {
1265
1235
  case 1:
1266
- if (tag !== 10) {
1236
+ if (tag !== 8) {
1267
1237
  break;
1268
1238
  }
1269
- message.month1 = reader.string();
1239
+ message.month1 = reader.bool();
1270
1240
  continue;
1271
1241
  case 2:
1272
- if (tag !== 18) {
1242
+ if (tag !== 16) {
1273
1243
  break;
1274
1244
  }
1275
- message.month3 = reader.string();
1245
+ message.month3 = reader.bool();
1276
1246
  continue;
1277
1247
  case 3:
1278
- if (tag !== 26) {
1248
+ if (tag !== 24) {
1279
1249
  break;
1280
1250
  }
1281
- message.month6 = reader.string();
1251
+ message.month6 = reader.bool();
1282
1252
  continue;
1283
1253
  case 4:
1284
- if (tag !== 34) {
1254
+ if (tag !== 32) {
1285
1255
  break;
1286
1256
  }
1287
- message.month9 = reader.string();
1257
+ message.month9 = reader.bool();
1288
1258
  continue;
1289
1259
  case 5:
1290
- if (tag !== 42) {
1260
+ if (tag !== 40) {
1291
1261
  break;
1292
1262
  }
1293
- message.month12 = reader.string();
1263
+ message.month12 = reader.bool();
1294
1264
  continue;
1295
1265
  case 6:
1296
- if (tag !== 50) {
1266
+ if (tag !== 48) {
1297
1267
  break;
1298
1268
  }
1299
- message.month15 = reader.string();
1269
+ message.month15 = reader.bool();
1300
1270
  continue;
1301
1271
  case 7:
1302
- if (tag !== 58) {
1272
+ if (tag !== 56) {
1303
1273
  break;
1304
1274
  }
1305
- message.month18 = reader.string();
1275
+ message.month18 = reader.bool();
1306
1276
  continue;
1307
1277
  case 8:
1308
- if (tag !== 66) {
1278
+ if (tag !== 64) {
1309
1279
  break;
1310
1280
  }
1311
- message.month21 = reader.string();
1281
+ message.month21 = reader.bool();
1312
1282
  continue;
1313
1283
  case 9:
1314
- if (tag !== 74) {
1284
+ if (tag !== 72) {
1315
1285
  break;
1316
1286
  }
1317
- message.month24 = reader.string();
1287
+ message.month24 = reader.bool();
1318
1288
  continue;
1319
1289
  }
1320
1290
  if ((tag & 7) === 4 || tag === 0) {
@@ -1326,44 +1296,44 @@ exports.dpdChar = {
1326
1296
  },
1327
1297
  fromJSON(object) {
1328
1298
  return {
1329
- month1: isSet(object.month1) ? globalThis.String(object.month1) : "",
1330
- month3: isSet(object.month3) ? globalThis.String(object.month3) : "",
1331
- month6: isSet(object.month6) ? globalThis.String(object.month6) : "",
1332
- month9: isSet(object.month9) ? globalThis.String(object.month9) : "",
1333
- month12: isSet(object.month12) ? globalThis.String(object.month12) : "",
1334
- month15: isSet(object.month15) ? globalThis.String(object.month15) : "",
1335
- month18: isSet(object.month18) ? globalThis.String(object.month18) : "",
1336
- month21: isSet(object.month21) ? globalThis.String(object.month21) : "",
1337
- month24: isSet(object.month24) ? globalThis.String(object.month24) : "",
1299
+ month1: isSet(object.month1) ? globalThis.Boolean(object.month1) : false,
1300
+ month3: isSet(object.month3) ? globalThis.Boolean(object.month3) : false,
1301
+ month6: isSet(object.month6) ? globalThis.Boolean(object.month6) : false,
1302
+ month9: isSet(object.month9) ? globalThis.Boolean(object.month9) : false,
1303
+ month12: isSet(object.month12) ? globalThis.Boolean(object.month12) : false,
1304
+ month15: isSet(object.month15) ? globalThis.Boolean(object.month15) : false,
1305
+ month18: isSet(object.month18) ? globalThis.Boolean(object.month18) : false,
1306
+ month21: isSet(object.month21) ? globalThis.Boolean(object.month21) : false,
1307
+ month24: isSet(object.month24) ? globalThis.Boolean(object.month24) : false,
1338
1308
  };
1339
1309
  },
1340
1310
  toJSON(message) {
1341
1311
  const obj = {};
1342
- if (message.month1 !== "") {
1312
+ if (message.month1 !== false) {
1343
1313
  obj.month1 = message.month1;
1344
1314
  }
1345
- if (message.month3 !== "") {
1315
+ if (message.month3 !== false) {
1346
1316
  obj.month3 = message.month3;
1347
1317
  }
1348
- if (message.month6 !== "") {
1318
+ if (message.month6 !== false) {
1349
1319
  obj.month6 = message.month6;
1350
1320
  }
1351
- if (message.month9 !== "") {
1321
+ if (message.month9 !== false) {
1352
1322
  obj.month9 = message.month9;
1353
1323
  }
1354
- if (message.month12 !== "") {
1324
+ if (message.month12 !== false) {
1355
1325
  obj.month12 = message.month12;
1356
1326
  }
1357
- if (message.month15 !== "") {
1327
+ if (message.month15 !== false) {
1358
1328
  obj.month15 = message.month15;
1359
1329
  }
1360
- if (message.month18 !== "") {
1330
+ if (message.month18 !== false) {
1361
1331
  obj.month18 = message.month18;
1362
1332
  }
1363
- if (message.month21 !== "") {
1333
+ if (message.month21 !== false) {
1364
1334
  obj.month21 = message.month21;
1365
1335
  }
1366
- if (message.month24 !== "") {
1336
+ if (message.month24 !== false) {
1367
1337
  obj.month24 = message.month24;
1368
1338
  }
1369
1339
  return obj;
@@ -1373,15 +1343,15 @@ exports.dpdChar = {
1373
1343
  },
1374
1344
  fromPartial(object) {
1375
1345
  const message = createBasedpdChar();
1376
- message.month1 = object.month1 ?? "";
1377
- message.month3 = object.month3 ?? "";
1378
- message.month6 = object.month6 ?? "";
1379
- message.month9 = object.month9 ?? "";
1380
- message.month12 = object.month12 ?? "";
1381
- message.month15 = object.month15 ?? "";
1382
- message.month18 = object.month18 ?? "";
1383
- message.month21 = object.month21 ?? "";
1384
- message.month24 = object.month24 ?? "";
1346
+ message.month1 = object.month1 ?? false;
1347
+ message.month3 = object.month3 ?? false;
1348
+ message.month6 = object.month6 ?? false;
1349
+ message.month9 = object.month9 ?? false;
1350
+ message.month12 = object.month12 ?? false;
1351
+ message.month15 = object.month15 ?? false;
1352
+ message.month18 = object.month18 ?? false;
1353
+ message.month21 = object.month21 ?? false;
1354
+ message.month24 = object.month24 ?? false;
1385
1355
  return message;
1386
1356
  },
1387
1357
  };
@@ -3,6 +3,7 @@ export declare const protobufPackage = "loans.paymentallocation";
3
3
  export interface paymentAllocationRequest {
4
4
  payment_id: number;
5
5
  amount: number;
6
+ mode: string;
6
7
  }
7
8
  export interface paymentAllocationResponse {
8
9
  message: string;
@@ -13,7 +13,7 @@ exports.paymentAllocationResponse = exports.paymentAllocationRequest = exports.p
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "loans.paymentallocation";
15
15
  function createBasepaymentAllocationRequest() {
16
- return { payment_id: 0, amount: 0 };
16
+ return { payment_id: 0, amount: 0, mode: "" };
17
17
  }
18
18
  exports.paymentAllocationRequest = {
19
19
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -23,6 +23,9 @@ exports.paymentAllocationRequest = {
23
23
  if (message.amount !== 0) {
24
24
  writer.uint32(16).int32(message.amount);
25
25
  }
26
+ if (message.mode !== "") {
27
+ writer.uint32(26).string(message.mode);
28
+ }
26
29
  return writer;
27
30
  },
28
31
  decode(input, length) {
@@ -44,6 +47,12 @@ exports.paymentAllocationRequest = {
44
47
  }
45
48
  message.amount = reader.int32();
46
49
  continue;
50
+ case 3:
51
+ if (tag !== 26) {
52
+ break;
53
+ }
54
+ message.mode = reader.string();
55
+ continue;
47
56
  }
48
57
  if ((tag & 7) === 4 || tag === 0) {
49
58
  break;
@@ -56,6 +65,7 @@ exports.paymentAllocationRequest = {
56
65
  return {
57
66
  payment_id: isSet(object.payment_id) ? globalThis.Number(object.payment_id) : 0,
58
67
  amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
68
+ mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
59
69
  };
60
70
  },
61
71
  toJSON(message) {
@@ -66,6 +76,9 @@ exports.paymentAllocationRequest = {
66
76
  if (message.amount !== 0) {
67
77
  obj.amount = Math.round(message.amount);
68
78
  }
79
+ if (message.mode !== "") {
80
+ obj.mode = message.mode;
81
+ }
69
82
  return obj;
70
83
  },
71
84
  create(base) {
@@ -75,6 +88,7 @@ exports.paymentAllocationRequest = {
75
88
  const message = createBasepaymentAllocationRequest();
76
89
  message.payment_id = object.payment_id ?? 0;
77
90
  message.amount = object.amount ?? 0;
91
+ message.mode = object.mode ?? "";
78
92
  return message;
79
93
  },
80
94
  };
@@ -0,0 +1,47 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "loans.paymenthistory";
3
+ export interface paymentHistoryRequest {
4
+ }
5
+ export interface paymentHistoryResponse {
6
+ data: paymentHistoryResponse_Field[];
7
+ }
8
+ export interface paymentHistoryResponse_Field {
9
+ emi_date: string;
10
+ mode: string;
11
+ amount: number;
12
+ }
13
+ export declare const paymentHistoryRequest: {
14
+ encode(_: paymentHistoryRequest, writer?: _m0.Writer): _m0.Writer;
15
+ decode(input: _m0.Reader | Uint8Array, length?: number): paymentHistoryRequest;
16
+ fromJSON(_: any): paymentHistoryRequest;
17
+ toJSON(_: paymentHistoryRequest): unknown;
18
+ create<I extends Exact<DeepPartial<paymentHistoryRequest>, I>>(base?: I): paymentHistoryRequest;
19
+ fromPartial<I extends Exact<DeepPartial<paymentHistoryRequest>, I>>(_: I): paymentHistoryRequest;
20
+ };
21
+ export declare const paymentHistoryResponse: {
22
+ encode(message: paymentHistoryResponse, writer?: _m0.Writer): _m0.Writer;
23
+ decode(input: _m0.Reader | Uint8Array, length?: number): paymentHistoryResponse;
24
+ fromJSON(object: any): paymentHistoryResponse;
25
+ toJSON(message: paymentHistoryResponse): unknown;
26
+ create<I extends Exact<DeepPartial<paymentHistoryResponse>, I>>(base?: I): paymentHistoryResponse;
27
+ fromPartial<I extends Exact<DeepPartial<paymentHistoryResponse>, I>>(object: I): paymentHistoryResponse;
28
+ };
29
+ export declare const paymentHistoryResponse_Field: {
30
+ encode(message: paymentHistoryResponse_Field, writer?: _m0.Writer): _m0.Writer;
31
+ decode(input: _m0.Reader | Uint8Array, length?: number): paymentHistoryResponse_Field;
32
+ fromJSON(object: any): paymentHistoryResponse_Field;
33
+ toJSON(message: paymentHistoryResponse_Field): unknown;
34
+ create<I extends Exact<DeepPartial<paymentHistoryResponse_Field>, I>>(base?: I): paymentHistoryResponse_Field;
35
+ fromPartial<I extends Exact<DeepPartial<paymentHistoryResponse_Field>, I>>(object: I): paymentHistoryResponse_Field;
36
+ };
37
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
38
+ 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 {} ? {
39
+ [K in keyof T]?: DeepPartial<T[K]>;
40
+ } : Partial<T>;
41
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
42
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
43
+ [K in keyof P]: Exact<P[K], I[K]>;
44
+ } & {
45
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
46
+ };
47
+ export {};
@@ -0,0 +1,188 @@
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: loans/paymenthistory.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.paymentHistoryResponse_Field = exports.paymentHistoryResponse = exports.paymentHistoryRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "loans.paymenthistory";
15
+ function createBasepaymentHistoryRequest() {
16
+ return {};
17
+ }
18
+ exports.paymentHistoryRequest = {
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 = createBasepaymentHistoryRequest();
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.paymentHistoryRequest.fromPartial(base ?? {});
46
+ },
47
+ fromPartial(_) {
48
+ const message = createBasepaymentHistoryRequest();
49
+ return message;
50
+ },
51
+ };
52
+ function createBasepaymentHistoryResponse() {
53
+ return { data: [] };
54
+ }
55
+ exports.paymentHistoryResponse = {
56
+ encode(message, writer = minimal_1.default.Writer.create()) {
57
+ for (const v of message.data) {
58
+ exports.paymentHistoryResponse_Field.encode(v, writer.uint32(10).fork()).ldelim();
59
+ }
60
+ return writer;
61
+ },
62
+ decode(input, length) {
63
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
64
+ let end = length === undefined ? reader.len : reader.pos + length;
65
+ const message = createBasepaymentHistoryResponse();
66
+ while (reader.pos < end) {
67
+ const tag = reader.uint32();
68
+ switch (tag >>> 3) {
69
+ case 1:
70
+ if (tag !== 10) {
71
+ break;
72
+ }
73
+ message.data.push(exports.paymentHistoryResponse_Field.decode(reader, reader.uint32()));
74
+ continue;
75
+ }
76
+ if ((tag & 7) === 4 || tag === 0) {
77
+ break;
78
+ }
79
+ reader.skipType(tag & 7);
80
+ }
81
+ return message;
82
+ },
83
+ fromJSON(object) {
84
+ return {
85
+ data: globalThis.Array.isArray(object?.data)
86
+ ? object.data.map((e) => exports.paymentHistoryResponse_Field.fromJSON(e))
87
+ : [],
88
+ };
89
+ },
90
+ toJSON(message) {
91
+ const obj = {};
92
+ if (message.data?.length) {
93
+ obj.data = message.data.map((e) => exports.paymentHistoryResponse_Field.toJSON(e));
94
+ }
95
+ return obj;
96
+ },
97
+ create(base) {
98
+ return exports.paymentHistoryResponse.fromPartial(base ?? {});
99
+ },
100
+ fromPartial(object) {
101
+ const message = createBasepaymentHistoryResponse();
102
+ message.data = object.data?.map((e) => exports.paymentHistoryResponse_Field.fromPartial(e)) || [];
103
+ return message;
104
+ },
105
+ };
106
+ function createBasepaymentHistoryResponse_Field() {
107
+ return { emi_date: "", mode: "", amount: 0 };
108
+ }
109
+ exports.paymentHistoryResponse_Field = {
110
+ encode(message, writer = minimal_1.default.Writer.create()) {
111
+ if (message.emi_date !== "") {
112
+ writer.uint32(10).string(message.emi_date);
113
+ }
114
+ if (message.mode !== "") {
115
+ writer.uint32(18).string(message.mode);
116
+ }
117
+ if (message.amount !== 0) {
118
+ writer.uint32(24).int32(message.amount);
119
+ }
120
+ return writer;
121
+ },
122
+ decode(input, length) {
123
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
124
+ let end = length === undefined ? reader.len : reader.pos + length;
125
+ const message = createBasepaymentHistoryResponse_Field();
126
+ while (reader.pos < end) {
127
+ const tag = reader.uint32();
128
+ switch (tag >>> 3) {
129
+ case 1:
130
+ if (tag !== 10) {
131
+ break;
132
+ }
133
+ message.emi_date = reader.string();
134
+ continue;
135
+ case 2:
136
+ if (tag !== 18) {
137
+ break;
138
+ }
139
+ message.mode = reader.string();
140
+ continue;
141
+ case 3:
142
+ if (tag !== 24) {
143
+ break;
144
+ }
145
+ message.amount = reader.int32();
146
+ continue;
147
+ }
148
+ if ((tag & 7) === 4 || tag === 0) {
149
+ break;
150
+ }
151
+ reader.skipType(tag & 7);
152
+ }
153
+ return message;
154
+ },
155
+ fromJSON(object) {
156
+ return {
157
+ emi_date: isSet(object.emi_date) ? globalThis.String(object.emi_date) : "",
158
+ mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
159
+ amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
160
+ };
161
+ },
162
+ toJSON(message) {
163
+ const obj = {};
164
+ if (message.emi_date !== "") {
165
+ obj.emi_date = message.emi_date;
166
+ }
167
+ if (message.mode !== "") {
168
+ obj.mode = message.mode;
169
+ }
170
+ if (message.amount !== 0) {
171
+ obj.amount = Math.round(message.amount);
172
+ }
173
+ return obj;
174
+ },
175
+ create(base) {
176
+ return exports.paymentHistoryResponse_Field.fromPartial(base ?? {});
177
+ },
178
+ fromPartial(object) {
179
+ const message = createBasepaymentHistoryResponse_Field();
180
+ message.emi_date = object.emi_date ?? "";
181
+ message.mode = object.mode ?? "";
182
+ message.amount = object.amount ?? 0;
183
+ return message;
184
+ },
185
+ };
186
+ function isSet(value) {
187
+ return value !== null && value !== undefined;
188
+ }
package/ts/loans.d.ts CHANGED
@@ -8,6 +8,7 @@ import { getPendingEmiAmountRequest, getPendingEmiAmountResponse } from "./loans
8
8
  import { getSummaryStaticFieldsRequest, getSummaryStaticFieldsResponse } from "./loans/getsummarystaticfields";
9
9
  import { loanSummaryRequest, loanSummaryResponse } from "./loans/loansummary";
10
10
  import { paymentAllocationRequest, paymentAllocationResponse } from "./loans/paymentallocation";
11
+ import { paymentHistoryRequest, paymentHistoryResponse } from "./loans/paymenthistory";
11
12
  import { restructureLoanRequest, restructureLoanResponse } from "./loans/restructureloan";
12
13
  import { sendEmailRequest, sendEmailResponse } from "./loans/sendemail";
13
14
  import { sendNocEmailRequest, sendNocEmailResponse } from "./loans/sendnocemail";
@@ -152,6 +153,15 @@ export declare const loansService: {
152
153
  readonly responseSerialize: (value: getSummaryStaticFieldsResponse) => Buffer;
153
154
  readonly responseDeserialize: (value: Buffer) => getSummaryStaticFieldsResponse;
154
155
  };
156
+ readonly paymentHistory: {
157
+ readonly path: "/service.loans/paymentHistory";
158
+ readonly requestStream: false;
159
+ readonly responseStream: false;
160
+ readonly requestSerialize: (value: paymentHistoryRequest) => Buffer;
161
+ readonly requestDeserialize: (value: Buffer) => paymentHistoryRequest;
162
+ readonly responseSerialize: (value: paymentHistoryResponse) => Buffer;
163
+ readonly responseDeserialize: (value: Buffer) => paymentHistoryResponse;
164
+ };
155
165
  };
156
166
  export interface loansServer extends UntypedServiceImplementation {
157
167
  creditlimit: handleUnaryCall<creditLimitRequest, creditLimitResponse>;
@@ -169,6 +179,7 @@ export interface loansServer extends UntypedServiceImplementation {
169
179
  sendNocEmail: handleUnaryCall<sendNocEmailRequest, sendNocEmailResponse>;
170
180
  getPendingEmiAmount: handleUnaryCall<getPendingEmiAmountRequest, getPendingEmiAmountResponse>;
171
181
  getSummaryStaticFields: handleUnaryCall<getSummaryStaticFieldsRequest, getSummaryStaticFieldsResponse>;
182
+ paymentHistory: handleUnaryCall<paymentHistoryRequest, paymentHistoryResponse>;
172
183
  }
173
184
  export interface loansClient extends Client {
174
185
  creditlimit(request: creditLimitRequest, callback: (error: ServiceError | null, response: creditLimitResponse) => void): ClientUnaryCall;
@@ -216,6 +227,9 @@ export interface loansClient extends Client {
216
227
  getSummaryStaticFields(request: getSummaryStaticFieldsRequest, callback: (error: ServiceError | null, response: getSummaryStaticFieldsResponse) => void): ClientUnaryCall;
217
228
  getSummaryStaticFields(request: getSummaryStaticFieldsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getSummaryStaticFieldsResponse) => void): ClientUnaryCall;
218
229
  getSummaryStaticFields(request: getSummaryStaticFieldsRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getSummaryStaticFieldsResponse) => void): ClientUnaryCall;
230
+ paymentHistory(request: paymentHistoryRequest, callback: (error: ServiceError | null, response: paymentHistoryResponse) => void): ClientUnaryCall;
231
+ paymentHistory(request: paymentHistoryRequest, metadata: Metadata, callback: (error: ServiceError | null, response: paymentHistoryResponse) => void): ClientUnaryCall;
232
+ paymentHistory(request: paymentHistoryRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: paymentHistoryResponse) => void): ClientUnaryCall;
219
233
  }
220
234
  export declare const loansClient: {
221
235
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): loansClient;
package/ts/loans.js CHANGED
@@ -17,6 +17,7 @@ const getpendingemiamount_1 = require("./loans/getpendingemiamount");
17
17
  const getsummarystaticfields_1 = require("./loans/getsummarystaticfields");
18
18
  const loansummary_1 = require("./loans/loansummary");
19
19
  const paymentallocation_1 = require("./loans/paymentallocation");
20
+ const paymenthistory_1 = require("./loans/paymenthistory");
20
21
  const restructureloan_1 = require("./loans/restructureloan");
21
22
  const sendemail_1 = require("./loans/sendemail");
22
23
  const sendnocemail_1 = require("./loans/sendnocemail");
@@ -160,5 +161,14 @@ exports.loansService = {
160
161
  responseSerialize: (value) => Buffer.from(getsummarystaticfields_1.getSummaryStaticFieldsResponse.encode(value).finish()),
161
162
  responseDeserialize: (value) => getsummarystaticfields_1.getSummaryStaticFieldsResponse.decode(value),
162
163
  },
164
+ paymentHistory: {
165
+ path: "/service.loans/paymentHistory",
166
+ requestStream: false,
167
+ responseStream: false,
168
+ requestSerialize: (value) => Buffer.from(paymenthistory_1.paymentHistoryRequest.encode(value).finish()),
169
+ requestDeserialize: (value) => paymenthistory_1.paymentHistoryRequest.decode(value),
170
+ responseSerialize: (value) => Buffer.from(paymenthistory_1.paymentHistoryResponse.encode(value).finish()),
171
+ responseDeserialize: (value) => paymenthistory_1.paymentHistoryResponse.decode(value),
172
+ },
163
173
  };
164
174
  exports.loansClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.loansService, "service.loans");