@stashfin/grpc 1.2.207 → 1.2.208

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.207",
3
+ "version": "1.2.208",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -3,7 +3,7 @@ export declare const protobufPackage = "loans.fcppayment";
3
3
  export interface fcpPaymentRequest {
4
4
  bill_amount: number;
5
5
  customerid: number;
6
- loan_id: number;
6
+ loan_id: number[];
7
7
  payment_id: number;
8
8
  mode: string;
9
9
  }
@@ -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, payment_id: 0, mode: "" };
16
+ return { bill_amount: 0, customerid: 0, loan_id: [], payment_id: 0, mode: "" };
17
17
  }
18
18
  exports.fcpPaymentRequest = {
19
19
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -23,9 +23,11 @@ exports.fcpPaymentRequest = {
23
23
  if (message.customerid !== 0) {
24
24
  writer.uint32(16).int32(message.customerid);
25
25
  }
26
- if (message.loan_id !== 0) {
27
- writer.uint32(24).int32(message.loan_id);
26
+ writer.uint32(26).fork();
27
+ for (const v of message.loan_id) {
28
+ writer.int32(v);
28
29
  }
30
+ writer.ldelim();
29
31
  if (message.payment_id !== 0) {
30
32
  writer.uint32(32).int32(message.payment_id);
31
33
  }
@@ -54,11 +56,18 @@ exports.fcpPaymentRequest = {
54
56
  message.customerid = reader.int32();
55
57
  continue;
56
58
  case 3:
57
- if (tag !== 24) {
58
- break;
59
+ if (tag === 24) {
60
+ message.loan_id.push(reader.int32());
61
+ continue;
59
62
  }
60
- message.loan_id = reader.int32();
61
- continue;
63
+ if (tag === 26) {
64
+ const end2 = reader.uint32() + reader.pos;
65
+ while (reader.pos < end2) {
66
+ message.loan_id.push(reader.int32());
67
+ }
68
+ continue;
69
+ }
70
+ break;
62
71
  case 4:
63
72
  if (tag !== 32) {
64
73
  break;
@@ -83,7 +92,7 @@ exports.fcpPaymentRequest = {
83
92
  return {
84
93
  bill_amount: isSet(object.bill_amount) ? globalThis.Number(object.bill_amount) : 0,
85
94
  customerid: isSet(object.customerid) ? globalThis.Number(object.customerid) : 0,
86
- loan_id: isSet(object.loan_id) ? globalThis.Number(object.loan_id) : 0,
95
+ loan_id: globalThis.Array.isArray(object?.loan_id) ? object.loan_id.map((e) => globalThis.Number(e)) : [],
87
96
  payment_id: isSet(object.payment_id) ? globalThis.Number(object.payment_id) : 0,
88
97
  mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
89
98
  };
@@ -96,8 +105,8 @@ exports.fcpPaymentRequest = {
96
105
  if (message.customerid !== 0) {
97
106
  obj.customerid = Math.round(message.customerid);
98
107
  }
99
- if (message.loan_id !== 0) {
100
- obj.loan_id = Math.round(message.loan_id);
108
+ if (message.loan_id?.length) {
109
+ obj.loan_id = message.loan_id.map((e) => Math.round(e));
101
110
  }
102
111
  if (message.payment_id !== 0) {
103
112
  obj.payment_id = Math.round(message.payment_id);
@@ -114,7 +123,7 @@ exports.fcpPaymentRequest = {
114
123
  const message = createBasefcpPaymentRequest();
115
124
  message.bill_amount = object.bill_amount ?? 0;
116
125
  message.customerid = object.customerid ?? 0;
117
- message.loan_id = object.loan_id ?? 0;
126
+ message.loan_id = object.loan_id?.map((e) => e) || [];
118
127
  message.payment_id = object.payment_id ?? 0;
119
128
  message.mode = object.mode ?? "";
120
129
  return message;