@stashfin/grpc 1.2.261 → 1.2.262

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.261",
3
+ "version": "1.2.262",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -0,0 +1,51 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "customers.getpaymentoptions";
3
+ export interface paymentOptionRequest {
4
+ order_id: string;
5
+ }
6
+ export interface paymentOptionResponse {
7
+ options: PaymentOption[];
8
+ }
9
+ export interface PaymentOption {
10
+ modes: string[];
11
+ gateway: string;
12
+ amount: number;
13
+ service_fee: number;
14
+ other_fees: number;
15
+ total_amount: number;
16
+ }
17
+ export declare const paymentOptionRequest: {
18
+ encode(message: paymentOptionRequest, writer?: _m0.Writer): _m0.Writer;
19
+ decode(input: _m0.Reader | Uint8Array, length?: number): paymentOptionRequest;
20
+ fromJSON(object: any): paymentOptionRequest;
21
+ toJSON(message: paymentOptionRequest): unknown;
22
+ create<I extends Exact<DeepPartial<paymentOptionRequest>, I>>(base?: I): paymentOptionRequest;
23
+ fromPartial<I extends Exact<DeepPartial<paymentOptionRequest>, I>>(object: I): paymentOptionRequest;
24
+ };
25
+ export declare const paymentOptionResponse: {
26
+ encode(message: paymentOptionResponse, writer?: _m0.Writer): _m0.Writer;
27
+ decode(input: _m0.Reader | Uint8Array, length?: number): paymentOptionResponse;
28
+ fromJSON(object: any): paymentOptionResponse;
29
+ toJSON(message: paymentOptionResponse): unknown;
30
+ create<I extends Exact<DeepPartial<paymentOptionResponse>, I>>(base?: I): paymentOptionResponse;
31
+ fromPartial<I extends Exact<DeepPartial<paymentOptionResponse>, I>>(object: I): paymentOptionResponse;
32
+ };
33
+ export declare const PaymentOption: {
34
+ encode(message: PaymentOption, writer?: _m0.Writer): _m0.Writer;
35
+ decode(input: _m0.Reader | Uint8Array, length?: number): PaymentOption;
36
+ fromJSON(object: any): PaymentOption;
37
+ toJSON(message: PaymentOption): unknown;
38
+ create<I extends Exact<DeepPartial<PaymentOption>, I>>(base?: I): PaymentOption;
39
+ fromPartial<I extends Exact<DeepPartial<PaymentOption>, I>>(object: I): PaymentOption;
40
+ };
41
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
42
+ 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 {} ? {
43
+ [K in keyof T]?: DeepPartial<T[K]>;
44
+ } : Partial<T>;
45
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
46
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
47
+ [K in keyof P]: Exact<P[K], I[K]>;
48
+ } & {
49
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
50
+ };
51
+ export {};
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v1.181.0
5
+ // protoc v5.28.2
6
+ // source: customers/getpaymentoptions.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.PaymentOption = exports.paymentOptionResponse = exports.paymentOptionRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "customers.getpaymentoptions";
15
+ function createBasepaymentOptionRequest() {
16
+ return { order_id: "" };
17
+ }
18
+ exports.paymentOptionRequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.order_id !== "") {
21
+ writer.uint32(10).string(message.order_id);
22
+ }
23
+ return writer;
24
+ },
25
+ decode(input, length) {
26
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
27
+ let end = length === undefined ? reader.len : reader.pos + length;
28
+ const message = createBasepaymentOptionRequest();
29
+ while (reader.pos < end) {
30
+ const tag = reader.uint32();
31
+ switch (tag >>> 3) {
32
+ case 1:
33
+ if (tag !== 10) {
34
+ break;
35
+ }
36
+ message.order_id = reader.string();
37
+ continue;
38
+ }
39
+ if ((tag & 7) === 4 || tag === 0) {
40
+ break;
41
+ }
42
+ reader.skipType(tag & 7);
43
+ }
44
+ return message;
45
+ },
46
+ fromJSON(object) {
47
+ return { order_id: isSet(object.order_id) ? globalThis.String(object.order_id) : "" };
48
+ },
49
+ toJSON(message) {
50
+ const obj = {};
51
+ if (message.order_id !== "") {
52
+ obj.order_id = message.order_id;
53
+ }
54
+ return obj;
55
+ },
56
+ create(base) {
57
+ return exports.paymentOptionRequest.fromPartial(base ?? {});
58
+ },
59
+ fromPartial(object) {
60
+ const message = createBasepaymentOptionRequest();
61
+ message.order_id = object.order_id ?? "";
62
+ return message;
63
+ },
64
+ };
65
+ function createBasepaymentOptionResponse() {
66
+ return { options: [] };
67
+ }
68
+ exports.paymentOptionResponse = {
69
+ encode(message, writer = minimal_1.default.Writer.create()) {
70
+ for (const v of message.options) {
71
+ exports.PaymentOption.encode(v, writer.uint32(10).fork()).ldelim();
72
+ }
73
+ return writer;
74
+ },
75
+ decode(input, length) {
76
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
77
+ let end = length === undefined ? reader.len : reader.pos + length;
78
+ const message = createBasepaymentOptionResponse();
79
+ while (reader.pos < end) {
80
+ const tag = reader.uint32();
81
+ switch (tag >>> 3) {
82
+ case 1:
83
+ if (tag !== 10) {
84
+ break;
85
+ }
86
+ message.options.push(exports.PaymentOption.decode(reader, reader.uint32()));
87
+ continue;
88
+ }
89
+ if ((tag & 7) === 4 || tag === 0) {
90
+ break;
91
+ }
92
+ reader.skipType(tag & 7);
93
+ }
94
+ return message;
95
+ },
96
+ fromJSON(object) {
97
+ return {
98
+ options: globalThis.Array.isArray(object?.options)
99
+ ? object.options.map((e) => exports.PaymentOption.fromJSON(e))
100
+ : [],
101
+ };
102
+ },
103
+ toJSON(message) {
104
+ const obj = {};
105
+ if (message.options?.length) {
106
+ obj.options = message.options.map((e) => exports.PaymentOption.toJSON(e));
107
+ }
108
+ return obj;
109
+ },
110
+ create(base) {
111
+ return exports.paymentOptionResponse.fromPartial(base ?? {});
112
+ },
113
+ fromPartial(object) {
114
+ const message = createBasepaymentOptionResponse();
115
+ message.options = object.options?.map((e) => exports.PaymentOption.fromPartial(e)) || [];
116
+ return message;
117
+ },
118
+ };
119
+ function createBasePaymentOption() {
120
+ return { modes: [], gateway: "", amount: 0, service_fee: 0, other_fees: 0, total_amount: 0 };
121
+ }
122
+ exports.PaymentOption = {
123
+ encode(message, writer = minimal_1.default.Writer.create()) {
124
+ for (const v of message.modes) {
125
+ writer.uint32(10).string(v);
126
+ }
127
+ if (message.gateway !== "") {
128
+ writer.uint32(18).string(message.gateway);
129
+ }
130
+ if (message.amount !== 0) {
131
+ writer.uint32(25).double(message.amount);
132
+ }
133
+ if (message.service_fee !== 0) {
134
+ writer.uint32(33).double(message.service_fee);
135
+ }
136
+ if (message.other_fees !== 0) {
137
+ writer.uint32(41).double(message.other_fees);
138
+ }
139
+ if (message.total_amount !== 0) {
140
+ writer.uint32(49).double(message.total_amount);
141
+ }
142
+ return writer;
143
+ },
144
+ decode(input, length) {
145
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
146
+ let end = length === undefined ? reader.len : reader.pos + length;
147
+ const message = createBasePaymentOption();
148
+ while (reader.pos < end) {
149
+ const tag = reader.uint32();
150
+ switch (tag >>> 3) {
151
+ case 1:
152
+ if (tag !== 10) {
153
+ break;
154
+ }
155
+ message.modes.push(reader.string());
156
+ continue;
157
+ case 2:
158
+ if (tag !== 18) {
159
+ break;
160
+ }
161
+ message.gateway = reader.string();
162
+ continue;
163
+ case 3:
164
+ if (tag !== 25) {
165
+ break;
166
+ }
167
+ message.amount = reader.double();
168
+ continue;
169
+ case 4:
170
+ if (tag !== 33) {
171
+ break;
172
+ }
173
+ message.service_fee = reader.double();
174
+ continue;
175
+ case 5:
176
+ if (tag !== 41) {
177
+ break;
178
+ }
179
+ message.other_fees = reader.double();
180
+ continue;
181
+ case 6:
182
+ if (tag !== 49) {
183
+ break;
184
+ }
185
+ message.total_amount = reader.double();
186
+ continue;
187
+ }
188
+ if ((tag & 7) === 4 || tag === 0) {
189
+ break;
190
+ }
191
+ reader.skipType(tag & 7);
192
+ }
193
+ return message;
194
+ },
195
+ fromJSON(object) {
196
+ return {
197
+ modes: globalThis.Array.isArray(object?.modes) ? object.modes.map((e) => globalThis.String(e)) : [],
198
+ gateway: isSet(object.gateway) ? globalThis.String(object.gateway) : "",
199
+ amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
200
+ service_fee: isSet(object.service_fee) ? globalThis.Number(object.service_fee) : 0,
201
+ other_fees: isSet(object.other_fees) ? globalThis.Number(object.other_fees) : 0,
202
+ total_amount: isSet(object.total_amount) ? globalThis.Number(object.total_amount) : 0,
203
+ };
204
+ },
205
+ toJSON(message) {
206
+ const obj = {};
207
+ if (message.modes?.length) {
208
+ obj.modes = message.modes;
209
+ }
210
+ if (message.gateway !== "") {
211
+ obj.gateway = message.gateway;
212
+ }
213
+ if (message.amount !== 0) {
214
+ obj.amount = message.amount;
215
+ }
216
+ if (message.service_fee !== 0) {
217
+ obj.service_fee = message.service_fee;
218
+ }
219
+ if (message.other_fees !== 0) {
220
+ obj.other_fees = message.other_fees;
221
+ }
222
+ if (message.total_amount !== 0) {
223
+ obj.total_amount = message.total_amount;
224
+ }
225
+ return obj;
226
+ },
227
+ create(base) {
228
+ return exports.PaymentOption.fromPartial(base ?? {});
229
+ },
230
+ fromPartial(object) {
231
+ const message = createBasePaymentOption();
232
+ message.modes = object.modes?.map((e) => e) || [];
233
+ message.gateway = object.gateway ?? "";
234
+ message.amount = object.amount ?? 0;
235
+ message.service_fee = object.service_fee ?? 0;
236
+ message.other_fees = object.other_fees ?? 0;
237
+ message.total_amount = object.total_amount ?? 0;
238
+ return message;
239
+ },
240
+ };
241
+ function isSet(value) {
242
+ return value !== null && value !== undefined;
243
+ }
package/ts/customers.d.ts CHANGED
@@ -42,6 +42,7 @@ import { getDashboardMainCardRequest, getDashboardMainCardResponse } from "./cus
42
42
  import { getDocumentsRequest, getDocumentsResponse } from "./customers/getdocuments";
43
43
  import { getLimitRequest, getLimitResponse } from "./customers/getlimit";
44
44
  import { getOccupationListRequest, getOccupationListResponse } from "./customers/getoccupationlist";
45
+ import { paymentOptionRequest, paymentOptionResponse } from "./customers/getpaymentoptions";
45
46
  import { getProfessionalInfoRequest, getProfessionalInfoResponse } from "./customers/getprofessionalinfo";
46
47
  import { getCustomerProfileRequest, getCustomerProfileResponse } from "./customers/getprofile";
47
48
  import { getSelfieeTxnIdRequest, getSelfieeTxnIdResponse } from "./customers/getselfieetxnid";
@@ -800,6 +801,15 @@ export declare const customersService: {
800
801
  readonly responseSerialize: (value: updateCategoryResponse) => Buffer;
801
802
  readonly responseDeserialize: (value: Buffer) => updateCategoryResponse;
802
803
  };
804
+ readonly getPaymentOptions: {
805
+ readonly path: "/service.customers/getPaymentOptions";
806
+ readonly requestStream: false;
807
+ readonly responseStream: false;
808
+ readonly requestSerialize: (value: paymentOptionRequest) => Buffer;
809
+ readonly requestDeserialize: (value: Buffer) => paymentOptionRequest;
810
+ readonly responseSerialize: (value: paymentOptionResponse) => Buffer;
811
+ readonly responseDeserialize: (value: Buffer) => paymentOptionResponse;
812
+ };
803
813
  };
804
814
  export interface customersServer extends UntypedServiceImplementation {
805
815
  sendOtp: handleUnaryCall<sendOtpRequest, sendOtpRespone>;
@@ -882,6 +892,7 @@ export interface customersServer extends UntypedServiceImplementation {
882
892
  getFreedomTxnStatus: handleUnaryCall<getFreedomTxnStatusRequest, getFreedomTxnStatusResponse>;
883
893
  updateFreedomTxnStatus: handleUnaryCall<updateFreedomTxnStatusRequest, updateFreedomTxnStatusResponse>;
884
894
  updateCategory: handleUnaryCall<updateCategoryRequest, updateCategoryResponse>;
895
+ getPaymentOptions: handleUnaryCall<paymentOptionRequest, paymentOptionResponse>;
885
896
  }
886
897
  export interface customersClient extends Client {
887
898
  sendOtp(request: sendOtpRequest, callback: (error: ServiceError | null, response: sendOtpRespone) => void): ClientUnaryCall;
@@ -1124,6 +1135,9 @@ export interface customersClient extends Client {
1124
1135
  updateCategory(request: updateCategoryRequest, callback: (error: ServiceError | null, response: updateCategoryResponse) => void): ClientUnaryCall;
1125
1136
  updateCategory(request: updateCategoryRequest, metadata: Metadata, callback: (error: ServiceError | null, response: updateCategoryResponse) => void): ClientUnaryCall;
1126
1137
  updateCategory(request: updateCategoryRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: updateCategoryResponse) => void): ClientUnaryCall;
1138
+ getPaymentOptions(request: paymentOptionRequest, callback: (error: ServiceError | null, response: paymentOptionResponse) => void): ClientUnaryCall;
1139
+ getPaymentOptions(request: paymentOptionRequest, metadata: Metadata, callback: (error: ServiceError | null, response: paymentOptionResponse) => void): ClientUnaryCall;
1140
+ getPaymentOptions(request: paymentOptionRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: paymentOptionResponse) => void): ClientUnaryCall;
1127
1141
  }
1128
1142
  export declare const customersClient: {
1129
1143
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): customersClient;
package/ts/customers.js CHANGED
@@ -51,6 +51,7 @@ const getdashboardmaincard_1 = require("./customers/getdashboardmaincard");
51
51
  const getdocuments_1 = require("./customers/getdocuments");
52
52
  const getlimit_1 = require("./customers/getlimit");
53
53
  const getoccupationlist_1 = require("./customers/getoccupationlist");
54
+ const getpaymentoptions_1 = require("./customers/getpaymentoptions");
54
55
  const getprofessionalinfo_1 = require("./customers/getprofessionalinfo");
55
56
  const getprofile_1 = require("./customers/getprofile");
56
57
  const getselfieetxnid_1 = require("./customers/getselfieetxnid");
@@ -808,5 +809,14 @@ exports.customersService = {
808
809
  responseSerialize: (value) => Buffer.from(updatecategory_1.updateCategoryResponse.encode(value).finish()),
809
810
  responseDeserialize: (value) => updatecategory_1.updateCategoryResponse.decode(value),
810
811
  },
812
+ getPaymentOptions: {
813
+ path: "/service.customers/getPaymentOptions",
814
+ requestStream: false,
815
+ responseStream: false,
816
+ requestSerialize: (value) => Buffer.from(getpaymentoptions_1.paymentOptionRequest.encode(value).finish()),
817
+ requestDeserialize: (value) => getpaymentoptions_1.paymentOptionRequest.decode(value),
818
+ responseSerialize: (value) => Buffer.from(getpaymentoptions_1.paymentOptionResponse.encode(value).finish()),
819
+ responseDeserialize: (value) => getpaymentoptions_1.paymentOptionResponse.decode(value),
820
+ },
811
821
  };
812
822
  exports.customersClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.customersService, "service.customers");
@@ -46,6 +46,7 @@ export interface approveLoanResponse {
46
46
  credit_report_actual_fees: number;
47
47
  plan_id: number;
48
48
  approved_amount: number;
49
+ discount: number;
49
50
  }
50
51
  export declare const approveLoanRequest: {
51
52
  encode(message: approveLoanRequest, writer?: _m0.Writer): _m0.Writer;
@@ -286,6 +286,7 @@ function createBaseapproveLoanResponse() {
286
286
  credit_report_actual_fees: 0,
287
287
  plan_id: 0,
288
288
  approved_amount: 0,
289
+ discount: 0,
289
290
  };
290
291
  }
291
292
  exports.approveLoanResponse = {
@@ -360,7 +361,7 @@ exports.approveLoanResponse = {
360
361
  writer.uint32(186).string(message.bill_card_description);
361
362
  }
362
363
  if (message.apr_value !== 0) {
363
- writer.uint32(192).int32(message.apr_value);
364
+ writer.uint32(197).float(message.apr_value);
364
365
  }
365
366
  if (message.apr_type !== "") {
366
367
  writer.uint32(202).string(message.apr_type);
@@ -380,6 +381,9 @@ exports.approveLoanResponse = {
380
381
  if (message.approved_amount !== 0) {
381
382
  writer.uint32(240).int32(message.approved_amount);
382
383
  }
384
+ if (message.discount !== 0) {
385
+ writer.uint32(248).int32(message.discount);
386
+ }
383
387
  return writer;
384
388
  },
385
389
  decode(input, length) {
@@ -528,10 +532,10 @@ exports.approveLoanResponse = {
528
532
  message.bill_card_description = reader.string();
529
533
  continue;
530
534
  case 24:
531
- if (tag !== 192) {
535
+ if (tag !== 197) {
532
536
  break;
533
537
  }
534
- message.apr_value = reader.int32();
538
+ message.apr_value = reader.float();
535
539
  continue;
536
540
  case 25:
537
541
  if (tag !== 202) {
@@ -569,6 +573,12 @@ exports.approveLoanResponse = {
569
573
  }
570
574
  message.approved_amount = reader.int32();
571
575
  continue;
576
+ case 31:
577
+ if (tag !== 248) {
578
+ break;
579
+ }
580
+ message.discount = reader.int32();
581
+ continue;
572
582
  }
573
583
  if ((tag & 7) === 4 || tag === 0) {
574
584
  break;
@@ -617,6 +627,7 @@ exports.approveLoanResponse = {
617
627
  : 0,
618
628
  plan_id: isSet(object.plan_id) ? globalThis.Number(object.plan_id) : 0,
619
629
  approved_amount: isSet(object.approved_amount) ? globalThis.Number(object.approved_amount) : 0,
630
+ discount: isSet(object.discount) ? globalThis.Number(object.discount) : 0,
620
631
  };
621
632
  },
622
633
  toJSON(message) {
@@ -691,7 +702,7 @@ exports.approveLoanResponse = {
691
702
  obj.bill_card_description = message.bill_card_description;
692
703
  }
693
704
  if (message.apr_value !== 0) {
694
- obj.apr_value = Math.round(message.apr_value);
705
+ obj.apr_value = message.apr_value;
695
706
  }
696
707
  if (message.apr_type !== "") {
697
708
  obj.apr_type = message.apr_type;
@@ -711,6 +722,9 @@ exports.approveLoanResponse = {
711
722
  if (message.approved_amount !== 0) {
712
723
  obj.approved_amount = Math.round(message.approved_amount);
713
724
  }
725
+ if (message.discount !== 0) {
726
+ obj.discount = Math.round(message.discount);
727
+ }
714
728
  return obj;
715
729
  },
716
730
  create(base) {
@@ -748,6 +762,7 @@ exports.approveLoanResponse = {
748
762
  message.credit_report_actual_fees = object.credit_report_actual_fees ?? 0;
749
763
  message.plan_id = object.plan_id ?? 0;
750
764
  message.approved_amount = object.approved_amount ?? 0;
765
+ message.discount = object.discount ?? 0;
751
766
  return message;
752
767
  },
753
768
  };
@@ -22,6 +22,7 @@ export interface getLoanByIdResponse {
22
22
  fees: getLoanByIdResponse_Field | undefined;
23
23
  loan_create_date: string;
24
24
  net_payable_amount: number;
25
+ apr_value: number;
25
26
  }
26
27
  export interface getLoanByIdResponse_Field {
27
28
  processing_fee: number;
@@ -82,6 +82,7 @@ function createBasegetLoanByIdResponse() {
82
82
  fees: undefined,
83
83
  loan_create_date: "",
84
84
  net_payable_amount: 0,
85
+ apr_value: 0,
85
86
  };
86
87
  }
87
88
  exports.getLoanByIdResponse = {
@@ -140,6 +141,9 @@ exports.getLoanByIdResponse = {
140
141
  if (message.net_payable_amount !== 0) {
141
142
  writer.uint32(144).int32(message.net_payable_amount);
142
143
  }
144
+ if (message.apr_value !== 0) {
145
+ writer.uint32(157).float(message.apr_value);
146
+ }
143
147
  return writer;
144
148
  },
145
149
  decode(input, length) {
@@ -257,6 +261,12 @@ exports.getLoanByIdResponse = {
257
261
  }
258
262
  message.net_payable_amount = reader.int32();
259
263
  continue;
264
+ case 19:
265
+ if (tag !== 157) {
266
+ break;
267
+ }
268
+ message.apr_value = reader.float();
269
+ continue;
260
270
  }
261
271
  if ((tag & 7) === 4 || tag === 0) {
262
272
  break;
@@ -287,6 +297,7 @@ exports.getLoanByIdResponse = {
287
297
  fees: isSet(object.fees) ? exports.getLoanByIdResponse_Field.fromJSON(object.fees) : undefined,
288
298
  loan_create_date: isSet(object.loan_create_date) ? globalThis.String(object.loan_create_date) : "",
289
299
  net_payable_amount: isSet(object.net_payable_amount) ? globalThis.Number(object.net_payable_amount) : 0,
300
+ apr_value: isSet(object.apr_value) ? globalThis.Number(object.apr_value) : 0,
290
301
  };
291
302
  },
292
303
  toJSON(message) {
@@ -345,6 +356,9 @@ exports.getLoanByIdResponse = {
345
356
  if (message.net_payable_amount !== 0) {
346
357
  obj.net_payable_amount = Math.round(message.net_payable_amount);
347
358
  }
359
+ if (message.apr_value !== 0) {
360
+ obj.apr_value = message.apr_value;
361
+ }
348
362
  return obj;
349
363
  },
350
364
  create(base) {
@@ -372,6 +386,7 @@ exports.getLoanByIdResponse = {
372
386
  : undefined;
373
387
  message.loan_create_date = object.loan_create_date ?? "";
374
388
  message.net_payable_amount = object.net_payable_amount ?? 0;
389
+ message.apr_value = object.apr_value ?? 0;
375
390
  return message;
376
391
  },
377
392
  };
@@ -36,6 +36,7 @@ export interface loanSummaryResponse {
36
36
  credit_report_actual_fees: number;
37
37
  plan_id: number;
38
38
  approved_amount: number;
39
+ discount: number;
39
40
  }
40
41
  export declare const loanSummaryRequest: {
41
42
  encode(message: loanSummaryRequest, writer?: _m0.Writer): _m0.Writer;
@@ -124,6 +124,7 @@ function createBaseloanSummaryResponse() {
124
124
  credit_report_actual_fees: 0,
125
125
  plan_id: 0,
126
126
  approved_amount: 0,
127
+ discount: 0,
127
128
  };
128
129
  }
129
130
  exports.loanSummaryResponse = {
@@ -198,7 +199,7 @@ exports.loanSummaryResponse = {
198
199
  writer.uint32(186).string(message.bill_card_description);
199
200
  }
200
201
  if (message.apr_value !== 0) {
201
- writer.uint32(192).int32(message.apr_value);
202
+ writer.uint32(197).float(message.apr_value);
202
203
  }
203
204
  if (message.apr_type !== "") {
204
205
  writer.uint32(202).string(message.apr_type);
@@ -218,6 +219,9 @@ exports.loanSummaryResponse = {
218
219
  if (message.approved_amount !== 0) {
219
220
  writer.uint32(240).int32(message.approved_amount);
220
221
  }
222
+ if (message.discount !== 0) {
223
+ writer.uint32(248).int32(message.discount);
224
+ }
221
225
  return writer;
222
226
  },
223
227
  decode(input, length) {
@@ -366,10 +370,10 @@ exports.loanSummaryResponse = {
366
370
  message.bill_card_description = reader.string();
367
371
  continue;
368
372
  case 24:
369
- if (tag !== 192) {
373
+ if (tag !== 197) {
370
374
  break;
371
375
  }
372
- message.apr_value = reader.int32();
376
+ message.apr_value = reader.float();
373
377
  continue;
374
378
  case 25:
375
379
  if (tag !== 202) {
@@ -407,6 +411,12 @@ exports.loanSummaryResponse = {
407
411
  }
408
412
  message.approved_amount = reader.int32();
409
413
  continue;
414
+ case 31:
415
+ if (tag !== 248) {
416
+ break;
417
+ }
418
+ message.discount = reader.int32();
419
+ continue;
410
420
  }
411
421
  if ((tag & 7) === 4 || tag === 0) {
412
422
  break;
@@ -455,6 +465,7 @@ exports.loanSummaryResponse = {
455
465
  : 0,
456
466
  plan_id: isSet(object.plan_id) ? globalThis.Number(object.plan_id) : 0,
457
467
  approved_amount: isSet(object.approved_amount) ? globalThis.Number(object.approved_amount) : 0,
468
+ discount: isSet(object.discount) ? globalThis.Number(object.discount) : 0,
458
469
  };
459
470
  },
460
471
  toJSON(message) {
@@ -529,7 +540,7 @@ exports.loanSummaryResponse = {
529
540
  obj.bill_card_description = message.bill_card_description;
530
541
  }
531
542
  if (message.apr_value !== 0) {
532
- obj.apr_value = Math.round(message.apr_value);
543
+ obj.apr_value = message.apr_value;
533
544
  }
534
545
  if (message.apr_type !== "") {
535
546
  obj.apr_type = message.apr_type;
@@ -549,6 +560,9 @@ exports.loanSummaryResponse = {
549
560
  if (message.approved_amount !== 0) {
550
561
  obj.approved_amount = Math.round(message.approved_amount);
551
562
  }
563
+ if (message.discount !== 0) {
564
+ obj.discount = Math.round(message.discount);
565
+ }
552
566
  return obj;
553
567
  },
554
568
  create(base) {
@@ -586,6 +600,7 @@ exports.loanSummaryResponse = {
586
600
  message.credit_report_actual_fees = object.credit_report_actual_fees ?? 0;
587
601
  message.plan_id = object.plan_id ?? 0;
588
602
  message.approved_amount = object.approved_amount ?? 0;
603
+ message.discount = object.discount ?? 0;
589
604
  return message;
590
605
  },
591
606
  };
@@ -4,10 +4,8 @@ export interface updateInstallmentsRequest {
4
4
  installment_id: number;
5
5
  r_principal: number;
6
6
  r_interest: number;
7
- r_penalty: number;
8
7
  r_pif_principal: number;
9
8
  r_pif_interest: number;
10
- r_pif_penalty: number;
11
9
  amount: number;
12
10
  }
13
11
  export interface updateInstallmentsResponse {
@@ -13,16 +13,7 @@ exports.updateInstallmentsResponse = exports.updateInstallmentsRequest = exports
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "loans.updateinstallments";
15
15
  function createBaseupdateInstallmentsRequest() {
16
- return {
17
- installment_id: 0,
18
- r_principal: 0,
19
- r_interest: 0,
20
- r_penalty: 0,
21
- r_pif_principal: 0,
22
- r_pif_interest: 0,
23
- r_pif_penalty: 0,
24
- amount: 0,
25
- };
16
+ return { installment_id: 0, r_principal: 0, r_interest: 0, r_pif_principal: 0, r_pif_interest: 0, amount: 0 };
26
17
  }
27
18
  exports.updateInstallmentsRequest = {
28
19
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -35,20 +26,14 @@ exports.updateInstallmentsRequest = {
35
26
  if (message.r_interest !== 0) {
36
27
  writer.uint32(24).int32(message.r_interest);
37
28
  }
38
- if (message.r_penalty !== 0) {
39
- writer.uint32(32).int32(message.r_penalty);
40
- }
41
29
  if (message.r_pif_principal !== 0) {
42
- writer.uint32(40).int32(message.r_pif_principal);
30
+ writer.uint32(32).int32(message.r_pif_principal);
43
31
  }
44
32
  if (message.r_pif_interest !== 0) {
45
- writer.uint32(48).int32(message.r_pif_interest);
46
- }
47
- if (message.r_pif_penalty !== 0) {
48
- writer.uint32(56).int32(message.r_pif_penalty);
33
+ writer.uint32(40).int32(message.r_pif_interest);
49
34
  }
50
35
  if (message.amount !== 0) {
51
- writer.uint32(64).int32(message.amount);
36
+ writer.uint32(48).int32(message.amount);
52
37
  }
53
38
  return writer;
54
39
  },
@@ -81,30 +66,18 @@ exports.updateInstallmentsRequest = {
81
66
  if (tag !== 32) {
82
67
  break;
83
68
  }
84
- message.r_penalty = reader.int32();
69
+ message.r_pif_principal = reader.int32();
85
70
  continue;
86
71
  case 5:
87
72
  if (tag !== 40) {
88
73
  break;
89
74
  }
90
- message.r_pif_principal = reader.int32();
75
+ message.r_pif_interest = reader.int32();
91
76
  continue;
92
77
  case 6:
93
78
  if (tag !== 48) {
94
79
  break;
95
80
  }
96
- message.r_pif_interest = reader.int32();
97
- continue;
98
- case 7:
99
- if (tag !== 56) {
100
- break;
101
- }
102
- message.r_pif_penalty = reader.int32();
103
- continue;
104
- case 8:
105
- if (tag !== 64) {
106
- break;
107
- }
108
81
  message.amount = reader.int32();
109
82
  continue;
110
83
  }
@@ -120,10 +93,8 @@ exports.updateInstallmentsRequest = {
120
93
  installment_id: isSet(object.installment_id) ? globalThis.Number(object.installment_id) : 0,
121
94
  r_principal: isSet(object.r_principal) ? globalThis.Number(object.r_principal) : 0,
122
95
  r_interest: isSet(object.r_interest) ? globalThis.Number(object.r_interest) : 0,
123
- r_penalty: isSet(object.r_penalty) ? globalThis.Number(object.r_penalty) : 0,
124
96
  r_pif_principal: isSet(object.r_pif_principal) ? globalThis.Number(object.r_pif_principal) : 0,
125
97
  r_pif_interest: isSet(object.r_pif_interest) ? globalThis.Number(object.r_pif_interest) : 0,
126
- r_pif_penalty: isSet(object.r_pif_penalty) ? globalThis.Number(object.r_pif_penalty) : 0,
127
98
  amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
128
99
  };
129
100
  },
@@ -138,18 +109,12 @@ exports.updateInstallmentsRequest = {
138
109
  if (message.r_interest !== 0) {
139
110
  obj.r_interest = Math.round(message.r_interest);
140
111
  }
141
- if (message.r_penalty !== 0) {
142
- obj.r_penalty = Math.round(message.r_penalty);
143
- }
144
112
  if (message.r_pif_principal !== 0) {
145
113
  obj.r_pif_principal = Math.round(message.r_pif_principal);
146
114
  }
147
115
  if (message.r_pif_interest !== 0) {
148
116
  obj.r_pif_interest = Math.round(message.r_pif_interest);
149
117
  }
150
- if (message.r_pif_penalty !== 0) {
151
- obj.r_pif_penalty = Math.round(message.r_pif_penalty);
152
- }
153
118
  if (message.amount !== 0) {
154
119
  obj.amount = Math.round(message.amount);
155
120
  }
@@ -163,10 +128,8 @@ exports.updateInstallmentsRequest = {
163
128
  message.installment_id = object.installment_id ?? 0;
164
129
  message.r_principal = object.r_principal ?? 0;
165
130
  message.r_interest = object.r_interest ?? 0;
166
- message.r_penalty = object.r_penalty ?? 0;
167
131
  message.r_pif_principal = object.r_pif_principal ?? 0;
168
132
  message.r_pif_interest = object.r_pif_interest ?? 0;
169
- message.r_pif_penalty = object.r_pif_penalty ?? 0;
170
133
  message.amount = object.amount ?? 0;
171
134
  return message;
172
135
  },