@stashfin/grpc 1.2.203 → 1.2.205

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.203",
3
+ "version": "1.2.205",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -4,9 +4,9 @@ export interface bankListRequest {
4
4
  }
5
5
  export interface bankListResponse {
6
6
  id: number;
7
- account_number: number;
7
+ account_number: string;
8
8
  bank_name: string;
9
- ifsc_code: number;
9
+ ifsc_code: string;
10
10
  }
11
11
  export declare const bankListRequest: {
12
12
  encode(_: bankListRequest, writer?: _m0.Writer): _m0.Writer;
@@ -50,21 +50,21 @@ exports.bankListRequest = {
50
50
  },
51
51
  };
52
52
  function createBasebankListResponse() {
53
- return { id: 0, account_number: 0, bank_name: "", ifsc_code: 0 };
53
+ return { id: 0, account_number: "", bank_name: "", ifsc_code: "" };
54
54
  }
55
55
  exports.bankListResponse = {
56
56
  encode(message, writer = minimal_1.default.Writer.create()) {
57
57
  if (message.id !== 0) {
58
58
  writer.uint32(8).int32(message.id);
59
59
  }
60
- if (message.account_number !== 0) {
61
- writer.uint32(16).int32(message.account_number);
60
+ if (message.account_number !== "") {
61
+ writer.uint32(18).string(message.account_number);
62
62
  }
63
63
  if (message.bank_name !== "") {
64
64
  writer.uint32(26).string(message.bank_name);
65
65
  }
66
- if (message.ifsc_code !== 0) {
67
- writer.uint32(32).int32(message.ifsc_code);
66
+ if (message.ifsc_code !== "") {
67
+ writer.uint32(34).string(message.ifsc_code);
68
68
  }
69
69
  return writer;
70
70
  },
@@ -82,10 +82,10 @@ exports.bankListResponse = {
82
82
  message.id = reader.int32();
83
83
  continue;
84
84
  case 2:
85
- if (tag !== 16) {
85
+ if (tag !== 18) {
86
86
  break;
87
87
  }
88
- message.account_number = reader.int32();
88
+ message.account_number = reader.string();
89
89
  continue;
90
90
  case 3:
91
91
  if (tag !== 26) {
@@ -94,10 +94,10 @@ exports.bankListResponse = {
94
94
  message.bank_name = reader.string();
95
95
  continue;
96
96
  case 4:
97
- if (tag !== 32) {
97
+ if (tag !== 34) {
98
98
  break;
99
99
  }
100
- message.ifsc_code = reader.int32();
100
+ message.ifsc_code = reader.string();
101
101
  continue;
102
102
  }
103
103
  if ((tag & 7) === 4 || tag === 0) {
@@ -110,9 +110,9 @@ exports.bankListResponse = {
110
110
  fromJSON(object) {
111
111
  return {
112
112
  id: isSet(object.id) ? globalThis.Number(object.id) : 0,
113
- account_number: isSet(object.account_number) ? globalThis.Number(object.account_number) : 0,
113
+ account_number: isSet(object.account_number) ? globalThis.String(object.account_number) : "",
114
114
  bank_name: isSet(object.bank_name) ? globalThis.String(object.bank_name) : "",
115
- ifsc_code: isSet(object.ifsc_code) ? globalThis.Number(object.ifsc_code) : 0,
115
+ ifsc_code: isSet(object.ifsc_code) ? globalThis.String(object.ifsc_code) : "",
116
116
  };
117
117
  },
118
118
  toJSON(message) {
@@ -120,14 +120,14 @@ exports.bankListResponse = {
120
120
  if (message.id !== 0) {
121
121
  obj.id = Math.round(message.id);
122
122
  }
123
- if (message.account_number !== 0) {
124
- obj.account_number = Math.round(message.account_number);
123
+ if (message.account_number !== "") {
124
+ obj.account_number = message.account_number;
125
125
  }
126
126
  if (message.bank_name !== "") {
127
127
  obj.bank_name = message.bank_name;
128
128
  }
129
- if (message.ifsc_code !== 0) {
130
- obj.ifsc_code = Math.round(message.ifsc_code);
129
+ if (message.ifsc_code !== "") {
130
+ obj.ifsc_code = message.ifsc_code;
131
131
  }
132
132
  return obj;
133
133
  },
@@ -137,9 +137,9 @@ exports.bankListResponse = {
137
137
  fromPartial(object) {
138
138
  const message = createBasebankListResponse();
139
139
  message.id = object.id ?? 0;
140
- message.account_number = object.account_number ?? 0;
140
+ message.account_number = object.account_number ?? "";
141
141
  message.bank_name = object.bank_name ?? "";
142
- message.ifsc_code = object.ifsc_code ?? 0;
142
+ message.ifsc_code = object.ifsc_code ?? "";
143
143
  return message;
144
144
  },
145
145
  };
@@ -4,6 +4,8 @@ export interface fcpPaymentRequest {
4
4
  bill_amount: number;
5
5
  customerid: number;
6
6
  loan_id: number;
7
+ payment_id: number;
8
+ mode: string;
7
9
  }
8
10
  export interface fcpPaymentResponse {
9
11
  message: string;
@@ -13,7 +13,7 @@ exports.fcpPaymentResponse = exports.fcpPaymentRequest = exports.protobufPackage
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "loans.fcppayment";
15
15
  function createBasefcpPaymentRequest() {
16
- return { bill_amount: 0, customerid: 0, loan_id: 0 };
16
+ return { bill_amount: 0, customerid: 0, loan_id: 0, payment_id: 0, mode: "" };
17
17
  }
18
18
  exports.fcpPaymentRequest = {
19
19
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -26,6 +26,12 @@ exports.fcpPaymentRequest = {
26
26
  if (message.loan_id !== 0) {
27
27
  writer.uint32(24).int32(message.loan_id);
28
28
  }
29
+ if (message.payment_id !== 0) {
30
+ writer.uint32(32).int32(message.payment_id);
31
+ }
32
+ if (message.mode !== "") {
33
+ writer.uint32(42).string(message.mode);
34
+ }
29
35
  return writer;
30
36
  },
31
37
  decode(input, length) {
@@ -53,6 +59,18 @@ exports.fcpPaymentRequest = {
53
59
  }
54
60
  message.loan_id = reader.int32();
55
61
  continue;
62
+ case 4:
63
+ if (tag !== 32) {
64
+ break;
65
+ }
66
+ message.payment_id = reader.int32();
67
+ continue;
68
+ case 5:
69
+ if (tag !== 42) {
70
+ break;
71
+ }
72
+ message.mode = reader.string();
73
+ continue;
56
74
  }
57
75
  if ((tag & 7) === 4 || tag === 0) {
58
76
  break;
@@ -66,6 +84,8 @@ exports.fcpPaymentRequest = {
66
84
  bill_amount: isSet(object.bill_amount) ? globalThis.Number(object.bill_amount) : 0,
67
85
  customerid: isSet(object.customerid) ? globalThis.Number(object.customerid) : 0,
68
86
  loan_id: isSet(object.loan_id) ? globalThis.Number(object.loan_id) : 0,
87
+ payment_id: isSet(object.payment_id) ? globalThis.Number(object.payment_id) : 0,
88
+ mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
69
89
  };
70
90
  },
71
91
  toJSON(message) {
@@ -79,6 +99,12 @@ exports.fcpPaymentRequest = {
79
99
  if (message.loan_id !== 0) {
80
100
  obj.loan_id = Math.round(message.loan_id);
81
101
  }
102
+ if (message.payment_id !== 0) {
103
+ obj.payment_id = Math.round(message.payment_id);
104
+ }
105
+ if (message.mode !== "") {
106
+ obj.mode = message.mode;
107
+ }
82
108
  return obj;
83
109
  },
84
110
  create(base) {
@@ -89,6 +115,8 @@ exports.fcpPaymentRequest = {
89
115
  message.bill_amount = object.bill_amount ?? 0;
90
116
  message.customerid = object.customerid ?? 0;
91
117
  message.loan_id = object.loan_id ?? 0;
118
+ message.payment_id = object.payment_id ?? 0;
119
+ message.mode = object.mode ?? "";
92
120
  return message;
93
121
  },
94
122
  };
@@ -0,0 +1,39 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "loans.forecloseamount";
3
+ export interface forecloseAmountRequest {
4
+ amount: number;
5
+ customerid: number;
6
+ loan_id: number;
7
+ payment_id: number;
8
+ mode: string;
9
+ }
10
+ export interface forecloseAmountResponse {
11
+ foreclosed_amount: number;
12
+ }
13
+ export declare const forecloseAmountRequest: {
14
+ encode(message: forecloseAmountRequest, writer?: _m0.Writer): _m0.Writer;
15
+ decode(input: _m0.Reader | Uint8Array, length?: number): forecloseAmountRequest;
16
+ fromJSON(object: any): forecloseAmountRequest;
17
+ toJSON(message: forecloseAmountRequest): unknown;
18
+ create<I extends Exact<DeepPartial<forecloseAmountRequest>, I>>(base?: I): forecloseAmountRequest;
19
+ fromPartial<I extends Exact<DeepPartial<forecloseAmountRequest>, I>>(object: I): forecloseAmountRequest;
20
+ };
21
+ export declare const forecloseAmountResponse: {
22
+ encode(message: forecloseAmountResponse, writer?: _m0.Writer): _m0.Writer;
23
+ decode(input: _m0.Reader | Uint8Array, length?: number): forecloseAmountResponse;
24
+ fromJSON(object: any): forecloseAmountResponse;
25
+ toJSON(message: forecloseAmountResponse): unknown;
26
+ create<I extends Exact<DeepPartial<forecloseAmountResponse>, I>>(base?: I): forecloseAmountResponse;
27
+ fromPartial<I extends Exact<DeepPartial<forecloseAmountResponse>, I>>(object: I): forecloseAmountResponse;
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 v5.28.0
6
+ // source: loans/forecloseamount.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.forecloseAmountResponse = exports.forecloseAmountRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "loans.forecloseamount";
15
+ function createBaseforecloseAmountRequest() {
16
+ return { amount: 0, customerid: 0, loan_id: 0, payment_id: 0, mode: "" };
17
+ }
18
+ exports.forecloseAmountRequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.amount !== 0) {
21
+ writer.uint32(8).int32(message.amount);
22
+ }
23
+ if (message.customerid !== 0) {
24
+ writer.uint32(16).int32(message.customerid);
25
+ }
26
+ if (message.loan_id !== 0) {
27
+ writer.uint32(24).int32(message.loan_id);
28
+ }
29
+ if (message.payment_id !== 0) {
30
+ writer.uint32(32).int32(message.payment_id);
31
+ }
32
+ if (message.mode !== "") {
33
+ writer.uint32(42).string(message.mode);
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 = createBaseforecloseAmountRequest();
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.amount = reader.int32();
49
+ continue;
50
+ case 2:
51
+ if (tag !== 16) {
52
+ break;
53
+ }
54
+ message.customerid = reader.int32();
55
+ continue;
56
+ case 3:
57
+ if (tag !== 24) {
58
+ break;
59
+ }
60
+ message.loan_id = reader.int32();
61
+ continue;
62
+ case 4:
63
+ if (tag !== 32) {
64
+ break;
65
+ }
66
+ message.payment_id = reader.int32();
67
+ continue;
68
+ case 5:
69
+ if (tag !== 42) {
70
+ break;
71
+ }
72
+ message.mode = reader.string();
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
+ amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
85
+ customerid: isSet(object.customerid) ? globalThis.Number(object.customerid) : 0,
86
+ loan_id: isSet(object.loan_id) ? globalThis.Number(object.loan_id) : 0,
87
+ payment_id: isSet(object.payment_id) ? globalThis.Number(object.payment_id) : 0,
88
+ mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
89
+ };
90
+ },
91
+ toJSON(message) {
92
+ const obj = {};
93
+ if (message.amount !== 0) {
94
+ obj.amount = Math.round(message.amount);
95
+ }
96
+ if (message.customerid !== 0) {
97
+ obj.customerid = Math.round(message.customerid);
98
+ }
99
+ if (message.loan_id !== 0) {
100
+ obj.loan_id = Math.round(message.loan_id);
101
+ }
102
+ if (message.payment_id !== 0) {
103
+ obj.payment_id = Math.round(message.payment_id);
104
+ }
105
+ if (message.mode !== "") {
106
+ obj.mode = message.mode;
107
+ }
108
+ return obj;
109
+ },
110
+ create(base) {
111
+ return exports.forecloseAmountRequest.fromPartial(base ?? {});
112
+ },
113
+ fromPartial(object) {
114
+ const message = createBaseforecloseAmountRequest();
115
+ message.amount = object.amount ?? 0;
116
+ message.customerid = object.customerid ?? 0;
117
+ message.loan_id = object.loan_id ?? 0;
118
+ message.payment_id = object.payment_id ?? 0;
119
+ message.mode = object.mode ?? "";
120
+ return message;
121
+ },
122
+ };
123
+ function createBaseforecloseAmountResponse() {
124
+ return { foreclosed_amount: 0 };
125
+ }
126
+ exports.forecloseAmountResponse = {
127
+ encode(message, writer = minimal_1.default.Writer.create()) {
128
+ if (message.foreclosed_amount !== 0) {
129
+ writer.uint32(8).int32(message.foreclosed_amount);
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 = createBaseforecloseAmountResponse();
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.foreclosed_amount = 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 { foreclosed_amount: isSet(object.foreclosed_amount) ? globalThis.Number(object.foreclosed_amount) : 0 };
156
+ },
157
+ toJSON(message) {
158
+ const obj = {};
159
+ if (message.foreclosed_amount !== 0) {
160
+ obj.foreclosed_amount = Math.round(message.foreclosed_amount);
161
+ }
162
+ return obj;
163
+ },
164
+ create(base) {
165
+ return exports.forecloseAmountResponse.fromPartial(base ?? {});
166
+ },
167
+ fromPartial(object) {
168
+ const message = createBaseforecloseAmountResponse();
169
+ message.foreclosed_amount = object.foreclosed_amount ?? 0;
170
+ return message;
171
+ },
172
+ };
173
+ function isSet(value) {
174
+ return value !== null && value !== undefined;
175
+ }
@@ -0,0 +1,39 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "loans.foreclosepayment";
3
+ export interface foreclosePaymentRequest {
4
+ amount: number;
5
+ customerid: number;
6
+ loan_id: number;
7
+ payment_id: number;
8
+ mode: string;
9
+ }
10
+ export interface foreclosePaymentResponse {
11
+ message: string;
12
+ }
13
+ export declare const foreclosePaymentRequest: {
14
+ encode(message: foreclosePaymentRequest, writer?: _m0.Writer): _m0.Writer;
15
+ decode(input: _m0.Reader | Uint8Array, length?: number): foreclosePaymentRequest;
16
+ fromJSON(object: any): foreclosePaymentRequest;
17
+ toJSON(message: foreclosePaymentRequest): unknown;
18
+ create<I extends Exact<DeepPartial<foreclosePaymentRequest>, I>>(base?: I): foreclosePaymentRequest;
19
+ fromPartial<I extends Exact<DeepPartial<foreclosePaymentRequest>, I>>(object: I): foreclosePaymentRequest;
20
+ };
21
+ export declare const foreclosePaymentResponse: {
22
+ encode(message: foreclosePaymentResponse, writer?: _m0.Writer): _m0.Writer;
23
+ decode(input: _m0.Reader | Uint8Array, length?: number): foreclosePaymentResponse;
24
+ fromJSON(object: any): foreclosePaymentResponse;
25
+ toJSON(message: foreclosePaymentResponse): unknown;
26
+ create<I extends Exact<DeepPartial<foreclosePaymentResponse>, I>>(base?: I): foreclosePaymentResponse;
27
+ fromPartial<I extends Exact<DeepPartial<foreclosePaymentResponse>, I>>(object: I): foreclosePaymentResponse;
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 v5.28.0
6
+ // source: loans/foreclosepayment.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.foreclosePaymentResponse = exports.foreclosePaymentRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "loans.foreclosepayment";
15
+ function createBaseforeclosePaymentRequest() {
16
+ return { amount: 0, customerid: 0, loan_id: 0, payment_id: 0, mode: "" };
17
+ }
18
+ exports.foreclosePaymentRequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.amount !== 0) {
21
+ writer.uint32(8).int32(message.amount);
22
+ }
23
+ if (message.customerid !== 0) {
24
+ writer.uint32(16).int32(message.customerid);
25
+ }
26
+ if (message.loan_id !== 0) {
27
+ writer.uint32(24).int32(message.loan_id);
28
+ }
29
+ if (message.payment_id !== 0) {
30
+ writer.uint32(32).int32(message.payment_id);
31
+ }
32
+ if (message.mode !== "") {
33
+ writer.uint32(42).string(message.mode);
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 = createBaseforeclosePaymentRequest();
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.amount = reader.int32();
49
+ continue;
50
+ case 2:
51
+ if (tag !== 16) {
52
+ break;
53
+ }
54
+ message.customerid = reader.int32();
55
+ continue;
56
+ case 3:
57
+ if (tag !== 24) {
58
+ break;
59
+ }
60
+ message.loan_id = reader.int32();
61
+ continue;
62
+ case 4:
63
+ if (tag !== 32) {
64
+ break;
65
+ }
66
+ message.payment_id = reader.int32();
67
+ continue;
68
+ case 5:
69
+ if (tag !== 42) {
70
+ break;
71
+ }
72
+ message.mode = reader.string();
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
+ amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
85
+ customerid: isSet(object.customerid) ? globalThis.Number(object.customerid) : 0,
86
+ loan_id: isSet(object.loan_id) ? globalThis.Number(object.loan_id) : 0,
87
+ payment_id: isSet(object.payment_id) ? globalThis.Number(object.payment_id) : 0,
88
+ mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
89
+ };
90
+ },
91
+ toJSON(message) {
92
+ const obj = {};
93
+ if (message.amount !== 0) {
94
+ obj.amount = Math.round(message.amount);
95
+ }
96
+ if (message.customerid !== 0) {
97
+ obj.customerid = Math.round(message.customerid);
98
+ }
99
+ if (message.loan_id !== 0) {
100
+ obj.loan_id = Math.round(message.loan_id);
101
+ }
102
+ if (message.payment_id !== 0) {
103
+ obj.payment_id = Math.round(message.payment_id);
104
+ }
105
+ if (message.mode !== "") {
106
+ obj.mode = message.mode;
107
+ }
108
+ return obj;
109
+ },
110
+ create(base) {
111
+ return exports.foreclosePaymentRequest.fromPartial(base ?? {});
112
+ },
113
+ fromPartial(object) {
114
+ const message = createBaseforeclosePaymentRequest();
115
+ message.amount = object.amount ?? 0;
116
+ message.customerid = object.customerid ?? 0;
117
+ message.loan_id = object.loan_id ?? 0;
118
+ message.payment_id = object.payment_id ?? 0;
119
+ message.mode = object.mode ?? "";
120
+ return message;
121
+ },
122
+ };
123
+ function createBaseforeclosePaymentResponse() {
124
+ return { message: "" };
125
+ }
126
+ exports.foreclosePaymentResponse = {
127
+ encode(message, writer = minimal_1.default.Writer.create()) {
128
+ if (message.message !== "") {
129
+ writer.uint32(10).string(message.message);
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 = createBaseforeclosePaymentResponse();
137
+ while (reader.pos < end) {
138
+ const tag = reader.uint32();
139
+ switch (tag >>> 3) {
140
+ case 1:
141
+ if (tag !== 10) {
142
+ break;
143
+ }
144
+ message.message = reader.string();
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 { message: isSet(object.message) ? globalThis.String(object.message) : "" };
156
+ },
157
+ toJSON(message) {
158
+ const obj = {};
159
+ if (message.message !== "") {
160
+ obj.message = message.message;
161
+ }
162
+ return obj;
163
+ },
164
+ create(base) {
165
+ return exports.foreclosePaymentResponse.fromPartial(base ?? {});
166
+ },
167
+ fromPartial(object) {
168
+ const message = createBaseforeclosePaymentResponse();
169
+ message.message = object.message ?? "";
170
+ return message;
171
+ },
172
+ };
173
+ function isSet(value) {
174
+ return value !== null && value !== undefined;
175
+ }
@@ -20,6 +20,8 @@ export interface getLoanByIdResponse {
20
20
  processing_fee: number;
21
21
  colenderId: number;
22
22
  fees: getLoanByIdResponse_Field | undefined;
23
+ loan_create_date: string;
24
+ net_payable_amount: number;
23
25
  }
24
26
  export interface getLoanByIdResponse_Field {
25
27
  processing_fee: number;
@@ -80,6 +80,8 @@ function createBasegetLoanByIdResponse() {
80
80
  processing_fee: 0,
81
81
  colenderId: 0,
82
82
  fees: undefined,
83
+ loan_create_date: "",
84
+ net_payable_amount: 0,
83
85
  };
84
86
  }
85
87
  exports.getLoanByIdResponse = {
@@ -132,6 +134,12 @@ exports.getLoanByIdResponse = {
132
134
  if (message.fees !== undefined) {
133
135
  exports.getLoanByIdResponse_Field.encode(message.fees, writer.uint32(130).fork()).ldelim();
134
136
  }
137
+ if (message.loan_create_date !== "") {
138
+ writer.uint32(138).string(message.loan_create_date);
139
+ }
140
+ if (message.net_payable_amount !== 0) {
141
+ writer.uint32(144).int32(message.net_payable_amount);
142
+ }
135
143
  return writer;
136
144
  },
137
145
  decode(input, length) {
@@ -237,6 +245,18 @@ exports.getLoanByIdResponse = {
237
245
  }
238
246
  message.fees = exports.getLoanByIdResponse_Field.decode(reader, reader.uint32());
239
247
  continue;
248
+ case 17:
249
+ if (tag !== 138) {
250
+ break;
251
+ }
252
+ message.loan_create_date = reader.string();
253
+ continue;
254
+ case 18:
255
+ if (tag !== 144) {
256
+ break;
257
+ }
258
+ message.net_payable_amount = reader.int32();
259
+ continue;
240
260
  }
241
261
  if ((tag & 7) === 4 || tag === 0) {
242
262
  break;
@@ -265,6 +285,8 @@ exports.getLoanByIdResponse = {
265
285
  processing_fee: isSet(object.processing_fee) ? globalThis.Number(object.processing_fee) : 0,
266
286
  colenderId: isSet(object.colenderId) ? globalThis.Number(object.colenderId) : 0,
267
287
  fees: isSet(object.fees) ? exports.getLoanByIdResponse_Field.fromJSON(object.fees) : undefined,
288
+ loan_create_date: isSet(object.loan_create_date) ? globalThis.String(object.loan_create_date) : "",
289
+ net_payable_amount: isSet(object.net_payable_amount) ? globalThis.Number(object.net_payable_amount) : 0,
268
290
  };
269
291
  },
270
292
  toJSON(message) {
@@ -317,6 +339,12 @@ exports.getLoanByIdResponse = {
317
339
  if (message.fees !== undefined) {
318
340
  obj.fees = exports.getLoanByIdResponse_Field.toJSON(message.fees);
319
341
  }
342
+ if (message.loan_create_date !== "") {
343
+ obj.loan_create_date = message.loan_create_date;
344
+ }
345
+ if (message.net_payable_amount !== 0) {
346
+ obj.net_payable_amount = Math.round(message.net_payable_amount);
347
+ }
320
348
  return obj;
321
349
  },
322
350
  create(base) {
@@ -342,6 +370,8 @@ exports.getLoanByIdResponse = {
342
370
  message.fees = (object.fees !== undefined && object.fees !== null)
343
371
  ? exports.getLoanByIdResponse_Field.fromPartial(object.fees)
344
372
  : undefined;
373
+ message.loan_create_date = object.loan_create_date ?? "";
374
+ message.net_payable_amount = object.net_payable_amount ?? 0;
345
375
  return message;
346
376
  },
347
377
  };
package/ts/loans.d.ts CHANGED
@@ -5,6 +5,8 @@ import { bankListRequest, bankListResponse } from "./loans/banklist";
5
5
  import { calculateEmiRequest, calculateEmiResponse } from "./loans/calculateemi";
6
6
  import { creditLimitRequest, creditLimitResponse } from "./loans/creditlimit";
7
7
  import { fcpPaymentRequest, fcpPaymentResponse } from "./loans/fcppayment";
8
+ import { forecloseAmountRequest, forecloseAmountResponse } from "./loans/forecloseamount";
9
+ import { foreclosePaymentRequest, foreclosePaymentResponse } from "./loans/foreclosepayment";
8
10
  import { futurePaymentMoreDetailsRequest, futurePaymentMoreDetailsResponse } from "./loans/futurepaymentmoredetails";
9
11
  import { getBillDetailsRequest, getBillDetailsResponse } from "./loans/getbilldetails";
10
12
  import { getCustomerLoanStatusRequest, getCustomerLoanStatusResponse } from "./loans/getcustomerloanstatus";
@@ -232,6 +234,24 @@ export declare const loansService: {
232
234
  readonly responseSerialize: (value: fcpPaymentResponse) => Buffer;
233
235
  readonly responseDeserialize: (value: Buffer) => fcpPaymentResponse;
234
236
  };
237
+ readonly forecloseAmount: {
238
+ readonly path: "/service.loans/forecloseAmount";
239
+ readonly requestStream: false;
240
+ readonly responseStream: false;
241
+ readonly requestSerialize: (value: forecloseAmountRequest) => Buffer;
242
+ readonly requestDeserialize: (value: Buffer) => forecloseAmountRequest;
243
+ readonly responseSerialize: (value: forecloseAmountResponse) => Buffer;
244
+ readonly responseDeserialize: (value: Buffer) => forecloseAmountResponse;
245
+ };
246
+ readonly foreclosePayment: {
247
+ readonly path: "/service.loans/foreclosePayment";
248
+ readonly requestStream: false;
249
+ readonly responseStream: false;
250
+ readonly requestSerialize: (value: foreclosePaymentRequest) => Buffer;
251
+ readonly requestDeserialize: (value: Buffer) => foreclosePaymentRequest;
252
+ readonly responseSerialize: (value: foreclosePaymentResponse) => Buffer;
253
+ readonly responseDeserialize: (value: Buffer) => foreclosePaymentResponse;
254
+ };
235
255
  };
236
256
  export interface loansServer extends UntypedServiceImplementation {
237
257
  creditlimit: handleUnaryCall<creditLimitRequest, creditLimitResponse>;
@@ -257,6 +277,8 @@ export interface loansServer extends UntypedServiceImplementation {
257
277
  payNow: handleUnaryCall<payNowRequest, payNowResponse>;
258
278
  amortization: handleUnaryCall<amortizationRequest, amortizationResponse>;
259
279
  fcpPayment: handleUnaryCall<fcpPaymentRequest, fcpPaymentResponse>;
280
+ forecloseAmount: handleUnaryCall<forecloseAmountRequest, forecloseAmountResponse>;
281
+ foreclosePayment: handleUnaryCall<foreclosePaymentRequest, foreclosePaymentResponse>;
260
282
  }
261
283
  export interface loansClient extends Client {
262
284
  creditlimit(request: creditLimitRequest, callback: (error: ServiceError | null, response: creditLimitResponse) => void): ClientUnaryCall;
@@ -328,6 +350,12 @@ export interface loansClient extends Client {
328
350
  fcpPayment(request: fcpPaymentRequest, callback: (error: ServiceError | null, response: fcpPaymentResponse) => void): ClientUnaryCall;
329
351
  fcpPayment(request: fcpPaymentRequest, metadata: Metadata, callback: (error: ServiceError | null, response: fcpPaymentResponse) => void): ClientUnaryCall;
330
352
  fcpPayment(request: fcpPaymentRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: fcpPaymentResponse) => void): ClientUnaryCall;
353
+ forecloseAmount(request: forecloseAmountRequest, callback: (error: ServiceError | null, response: forecloseAmountResponse) => void): ClientUnaryCall;
354
+ forecloseAmount(request: forecloseAmountRequest, metadata: Metadata, callback: (error: ServiceError | null, response: forecloseAmountResponse) => void): ClientUnaryCall;
355
+ forecloseAmount(request: forecloseAmountRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: forecloseAmountResponse) => void): ClientUnaryCall;
356
+ foreclosePayment(request: foreclosePaymentRequest, callback: (error: ServiceError | null, response: foreclosePaymentResponse) => void): ClientUnaryCall;
357
+ foreclosePayment(request: foreclosePaymentRequest, metadata: Metadata, callback: (error: ServiceError | null, response: foreclosePaymentResponse) => void): ClientUnaryCall;
358
+ foreclosePayment(request: foreclosePaymentRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: foreclosePaymentResponse) => void): ClientUnaryCall;
331
359
  }
332
360
  export declare const loansClient: {
333
361
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): loansClient;
package/ts/loans.js CHANGED
@@ -14,6 +14,8 @@ const banklist_1 = require("./loans/banklist");
14
14
  const calculateemi_1 = require("./loans/calculateemi");
15
15
  const creditlimit_1 = require("./loans/creditlimit");
16
16
  const fcppayment_1 = require("./loans/fcppayment");
17
+ const forecloseamount_1 = require("./loans/forecloseamount");
18
+ const foreclosepayment_1 = require("./loans/foreclosepayment");
17
19
  const futurepaymentmoredetails_1 = require("./loans/futurepaymentmoredetails");
18
20
  const getbilldetails_1 = require("./loans/getbilldetails");
19
21
  const getcustomerloanstatus_1 = require("./loans/getcustomerloanstatus");
@@ -240,5 +242,23 @@ exports.loansService = {
240
242
  responseSerialize: (value) => Buffer.from(fcppayment_1.fcpPaymentResponse.encode(value).finish()),
241
243
  responseDeserialize: (value) => fcppayment_1.fcpPaymentResponse.decode(value),
242
244
  },
245
+ forecloseAmount: {
246
+ path: "/service.loans/forecloseAmount",
247
+ requestStream: false,
248
+ responseStream: false,
249
+ requestSerialize: (value) => Buffer.from(forecloseamount_1.forecloseAmountRequest.encode(value).finish()),
250
+ requestDeserialize: (value) => forecloseamount_1.forecloseAmountRequest.decode(value),
251
+ responseSerialize: (value) => Buffer.from(forecloseamount_1.forecloseAmountResponse.encode(value).finish()),
252
+ responseDeserialize: (value) => forecloseamount_1.forecloseAmountResponse.decode(value),
253
+ },
254
+ foreclosePayment: {
255
+ path: "/service.loans/foreclosePayment",
256
+ requestStream: false,
257
+ responseStream: false,
258
+ requestSerialize: (value) => Buffer.from(foreclosepayment_1.foreclosePaymentRequest.encode(value).finish()),
259
+ requestDeserialize: (value) => foreclosepayment_1.foreclosePaymentRequest.decode(value),
260
+ responseSerialize: (value) => Buffer.from(foreclosepayment_1.foreclosePaymentResponse.encode(value).finish()),
261
+ responseDeserialize: (value) => foreclosepayment_1.foreclosePaymentResponse.decode(value),
262
+ },
243
263
  };
244
264
  exports.loansClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.loansService, "service.loans");