@stashfin/grpc 1.2.596 → 1.2.597

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.596",
3
+ "version": "1.2.597",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -2,6 +2,7 @@ import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "banking.aa.getaasupport";
3
3
  export interface getAASupportRequest {
4
4
  bank_id: string;
5
+ customer_id: number;
5
6
  }
6
7
  export interface getAASupportResponse {
7
8
  success?: boolean | undefined;
@@ -10,16 +10,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.getAASupportResponse = exports.getAASupportRequest = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
+ const long_1 = __importDefault(require("long"));
13
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
15
  exports.protobufPackage = "banking.aa.getaasupport";
15
16
  function createBasegetAASupportRequest() {
16
- return { bank_id: "" };
17
+ return { bank_id: "", customer_id: 0 };
17
18
  }
18
19
  exports.getAASupportRequest = {
19
20
  encode(message, writer = minimal_1.default.Writer.create()) {
20
21
  if (message.bank_id !== "") {
21
22
  writer.uint32(10).string(message.bank_id);
22
23
  }
24
+ if (message.customer_id !== 0) {
25
+ writer.uint32(16).int64(message.customer_id);
26
+ }
23
27
  return writer;
24
28
  },
25
29
  decode(input, length) {
@@ -35,6 +39,12 @@ exports.getAASupportRequest = {
35
39
  }
36
40
  message.bank_id = reader.string();
37
41
  continue;
42
+ case 2:
43
+ if (tag !== 16) {
44
+ break;
45
+ }
46
+ message.customer_id = longToNumber(reader.int64());
47
+ continue;
38
48
  }
39
49
  if ((tag & 7) === 4 || tag === 0) {
40
50
  break;
@@ -44,13 +54,19 @@ exports.getAASupportRequest = {
44
54
  return message;
45
55
  },
46
56
  fromJSON(object) {
47
- return { bank_id: isSet(object.bank_id) ? globalThis.String(object.bank_id) : "" };
57
+ return {
58
+ bank_id: isSet(object.bank_id) ? globalThis.String(object.bank_id) : "",
59
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
60
+ };
48
61
  },
49
62
  toJSON(message) {
50
63
  const obj = {};
51
64
  if (message.bank_id !== "") {
52
65
  obj.bank_id = message.bank_id;
53
66
  }
67
+ if (message.customer_id !== 0) {
68
+ obj.customer_id = Math.round(message.customer_id);
69
+ }
54
70
  return obj;
55
71
  },
56
72
  create(base) {
@@ -59,6 +75,7 @@ exports.getAASupportRequest = {
59
75
  fromPartial(object) {
60
76
  const message = createBasegetAASupportRequest();
61
77
  message.bank_id = object.bank_id ?? "";
78
+ message.customer_id = object.customer_id ?? 0;
62
79
  return message;
63
80
  },
64
81
  };
@@ -156,6 +173,19 @@ exports.getAASupportResponse = {
156
173
  return message;
157
174
  },
158
175
  };
176
+ function longToNumber(long) {
177
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
178
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
179
+ }
180
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
181
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
182
+ }
183
+ return long.toNumber();
184
+ }
185
+ if (minimal_1.default.util.Long !== long_1.default) {
186
+ minimal_1.default.util.Long = long_1.default;
187
+ minimal_1.default.configure();
188
+ }
159
189
  function isSet(value) {
160
190
  return value !== null && value !== undefined;
161
191
  }
@@ -4,6 +4,7 @@ export interface initiateRequest {
4
4
  loan_id: number;
5
5
  journey_type: string;
6
6
  fip_ids: string[];
7
+ customer_id: number;
7
8
  }
8
9
  export interface initiateResponse {
9
10
  success?: boolean | undefined;
@@ -14,7 +14,7 @@ const long_1 = __importDefault(require("long"));
14
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
15
15
  exports.protobufPackage = "banking.aa.initiate";
16
16
  function createBaseinitiateRequest() {
17
- return { loan_id: 0, journey_type: "", fip_ids: [] };
17
+ return { loan_id: 0, journey_type: "", fip_ids: [], customer_id: 0 };
18
18
  }
19
19
  exports.initiateRequest = {
20
20
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -27,6 +27,9 @@ exports.initiateRequest = {
27
27
  for (const v of message.fip_ids) {
28
28
  writer.uint32(26).string(v);
29
29
  }
30
+ if (message.customer_id !== 0) {
31
+ writer.uint32(32).int64(message.customer_id);
32
+ }
30
33
  return writer;
31
34
  },
32
35
  decode(input, length) {
@@ -54,6 +57,12 @@ exports.initiateRequest = {
54
57
  }
55
58
  message.fip_ids.push(reader.string());
56
59
  continue;
60
+ case 4:
61
+ if (tag !== 32) {
62
+ break;
63
+ }
64
+ message.customer_id = longToNumber(reader.int64());
65
+ continue;
57
66
  }
58
67
  if ((tag & 7) === 4 || tag === 0) {
59
68
  break;
@@ -67,6 +76,7 @@ exports.initiateRequest = {
67
76
  loan_id: isSet(object.loan_id) ? globalThis.Number(object.loan_id) : 0,
68
77
  journey_type: isSet(object.journey_type) ? globalThis.String(object.journey_type) : "",
69
78
  fip_ids: globalThis.Array.isArray(object?.fip_ids) ? object.fip_ids.map((e) => globalThis.String(e)) : [],
79
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
70
80
  };
71
81
  },
72
82
  toJSON(message) {
@@ -80,6 +90,9 @@ exports.initiateRequest = {
80
90
  if (message.fip_ids?.length) {
81
91
  obj.fip_ids = message.fip_ids;
82
92
  }
93
+ if (message.customer_id !== 0) {
94
+ obj.customer_id = Math.round(message.customer_id);
95
+ }
83
96
  return obj;
84
97
  },
85
98
  create(base) {
@@ -90,6 +103,7 @@ exports.initiateRequest = {
90
103
  message.loan_id = object.loan_id ?? 0;
91
104
  message.journey_type = object.journey_type ?? "";
92
105
  message.fip_ids = object.fip_ids?.map((e) => e) || [];
106
+ message.customer_id = object.customer_id ?? 0;
93
107
  return message;
94
108
  },
95
109
  };