@stashfin/grpc 1.2.353 → 1.2.355

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.353",
3
+ "version": "1.2.355",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@grpc/grpc-js": "^1.10.9",
17
17
  "@protobuf-ts/protoc": "^2.9.4",
18
- "@stashfin/grpc": "^1.2.338",
18
+ "@stashfin/grpc": "^1.2.353",
19
19
  "@types/long": "^5.0.0",
20
20
  "long": "^5.2.3"
21
21
  },
@@ -1,13 +1,23 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "customers.cb.insurancedetails";
3
+ export interface Offer {
4
+ title: string;
5
+ description: string;
6
+ icon_url: string;
7
+ }
3
8
  export interface insuranceDetailsRequest {
4
9
  }
5
10
  export interface insuranceDetailsResponse {
6
- monthly_entertainment_pack: string;
7
- doctor_on_call: string;
8
- lost_stolen_card_services: string;
9
- free_govt_id_replacement: string;
11
+ offers: Offer[];
10
12
  }
13
+ export declare const Offer: {
14
+ encode(message: Offer, writer?: _m0.Writer): _m0.Writer;
15
+ decode(input: _m0.Reader | Uint8Array, length?: number): Offer;
16
+ fromJSON(object: any): Offer;
17
+ toJSON(message: Offer): unknown;
18
+ create<I extends Exact<DeepPartial<Offer>, I>>(base?: I): Offer;
19
+ fromPartial<I extends Exact<DeepPartial<Offer>, I>>(object: I): Offer;
20
+ };
11
21
  export declare const insuranceDetailsRequest: {
12
22
  encode(_: insuranceDetailsRequest, writer?: _m0.Writer): _m0.Writer;
13
23
  decode(input: _m0.Reader | Uint8Array, length?: number): insuranceDetailsRequest;
@@ -8,10 +8,90 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
8
8
  return (mod && mod.__esModule) ? mod : { "default": mod };
9
9
  };
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.insuranceDetailsResponse = exports.insuranceDetailsRequest = exports.protobufPackage = void 0;
11
+ exports.insuranceDetailsResponse = exports.insuranceDetailsRequest = exports.Offer = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "customers.cb.insurancedetails";
15
+ function createBaseOffer() {
16
+ return { title: "", description: "", icon_url: "" };
17
+ }
18
+ exports.Offer = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.title !== "") {
21
+ writer.uint32(10).string(message.title);
22
+ }
23
+ if (message.description !== "") {
24
+ writer.uint32(18).string(message.description);
25
+ }
26
+ if (message.icon_url !== "") {
27
+ writer.uint32(26).string(message.icon_url);
28
+ }
29
+ return writer;
30
+ },
31
+ decode(input, length) {
32
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
33
+ let end = length === undefined ? reader.len : reader.pos + length;
34
+ const message = createBaseOffer();
35
+ while (reader.pos < end) {
36
+ const tag = reader.uint32();
37
+ switch (tag >>> 3) {
38
+ case 1:
39
+ if (tag !== 10) {
40
+ break;
41
+ }
42
+ message.title = reader.string();
43
+ continue;
44
+ case 2:
45
+ if (tag !== 18) {
46
+ break;
47
+ }
48
+ message.description = reader.string();
49
+ continue;
50
+ case 3:
51
+ if (tag !== 26) {
52
+ break;
53
+ }
54
+ message.icon_url = reader.string();
55
+ continue;
56
+ }
57
+ if ((tag & 7) === 4 || tag === 0) {
58
+ break;
59
+ }
60
+ reader.skipType(tag & 7);
61
+ }
62
+ return message;
63
+ },
64
+ fromJSON(object) {
65
+ return {
66
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
67
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
68
+ icon_url: isSet(object.icon_url) ? globalThis.String(object.icon_url) : "",
69
+ };
70
+ },
71
+ toJSON(message) {
72
+ const obj = {};
73
+ if (message.title !== "") {
74
+ obj.title = message.title;
75
+ }
76
+ if (message.description !== "") {
77
+ obj.description = message.description;
78
+ }
79
+ if (message.icon_url !== "") {
80
+ obj.icon_url = message.icon_url;
81
+ }
82
+ return obj;
83
+ },
84
+ create(base) {
85
+ return exports.Offer.fromPartial(base ?? {});
86
+ },
87
+ fromPartial(object) {
88
+ const message = createBaseOffer();
89
+ message.title = object.title ?? "";
90
+ message.description = object.description ?? "";
91
+ message.icon_url = object.icon_url ?? "";
92
+ return message;
93
+ },
94
+ };
15
95
  function createBaseinsuranceDetailsRequest() {
16
96
  return {};
17
97
  }
@@ -50,26 +130,12 @@ exports.insuranceDetailsRequest = {
50
130
  },
51
131
  };
52
132
  function createBaseinsuranceDetailsResponse() {
53
- return {
54
- monthly_entertainment_pack: "",
55
- doctor_on_call: "",
56
- lost_stolen_card_services: "",
57
- free_govt_id_replacement: "",
58
- };
133
+ return { offers: [] };
59
134
  }
60
135
  exports.insuranceDetailsResponse = {
61
136
  encode(message, writer = minimal_1.default.Writer.create()) {
62
- if (message.monthly_entertainment_pack !== "") {
63
- writer.uint32(10).string(message.monthly_entertainment_pack);
64
- }
65
- if (message.doctor_on_call !== "") {
66
- writer.uint32(18).string(message.doctor_on_call);
67
- }
68
- if (message.lost_stolen_card_services !== "") {
69
- writer.uint32(26).string(message.lost_stolen_card_services);
70
- }
71
- if (message.free_govt_id_replacement !== "") {
72
- writer.uint32(34).string(message.free_govt_id_replacement);
137
+ for (const v of message.offers) {
138
+ exports.Offer.encode(v, writer.uint32(10).fork()).ldelim();
73
139
  }
74
140
  return writer;
75
141
  },
@@ -84,25 +150,7 @@ exports.insuranceDetailsResponse = {
84
150
  if (tag !== 10) {
85
151
  break;
86
152
  }
87
- message.monthly_entertainment_pack = reader.string();
88
- continue;
89
- case 2:
90
- if (tag !== 18) {
91
- break;
92
- }
93
- message.doctor_on_call = reader.string();
94
- continue;
95
- case 3:
96
- if (tag !== 26) {
97
- break;
98
- }
99
- message.lost_stolen_card_services = reader.string();
100
- continue;
101
- case 4:
102
- if (tag !== 34) {
103
- break;
104
- }
105
- message.free_govt_id_replacement = reader.string();
153
+ message.offers.push(exports.Offer.decode(reader, reader.uint32()));
106
154
  continue;
107
155
  }
108
156
  if ((tag & 7) === 4 || tag === 0) {
@@ -113,32 +161,12 @@ exports.insuranceDetailsResponse = {
113
161
  return message;
114
162
  },
115
163
  fromJSON(object) {
116
- return {
117
- monthly_entertainment_pack: isSet(object.monthly_entertainment_pack)
118
- ? globalThis.String(object.monthly_entertainment_pack)
119
- : "",
120
- doctor_on_call: isSet(object.doctor_on_call) ? globalThis.String(object.doctor_on_call) : "",
121
- lost_stolen_card_services: isSet(object.lost_stolen_card_services)
122
- ? globalThis.String(object.lost_stolen_card_services)
123
- : "",
124
- free_govt_id_replacement: isSet(object.free_govt_id_replacement)
125
- ? globalThis.String(object.free_govt_id_replacement)
126
- : "",
127
- };
164
+ return { offers: globalThis.Array.isArray(object?.offers) ? object.offers.map((e) => exports.Offer.fromJSON(e)) : [] };
128
165
  },
129
166
  toJSON(message) {
130
167
  const obj = {};
131
- if (message.monthly_entertainment_pack !== "") {
132
- obj.monthly_entertainment_pack = message.monthly_entertainment_pack;
133
- }
134
- if (message.doctor_on_call !== "") {
135
- obj.doctor_on_call = message.doctor_on_call;
136
- }
137
- if (message.lost_stolen_card_services !== "") {
138
- obj.lost_stolen_card_services = message.lost_stolen_card_services;
139
- }
140
- if (message.free_govt_id_replacement !== "") {
141
- obj.free_govt_id_replacement = message.free_govt_id_replacement;
168
+ if (message.offers?.length) {
169
+ obj.offers = message.offers.map((e) => exports.Offer.toJSON(e));
142
170
  }
143
171
  return obj;
144
172
  },
@@ -147,10 +175,7 @@ exports.insuranceDetailsResponse = {
147
175
  },
148
176
  fromPartial(object) {
149
177
  const message = createBaseinsuranceDetailsResponse();
150
- message.monthly_entertainment_pack = object.monthly_entertainment_pack ?? "";
151
- message.doctor_on_call = object.doctor_on_call ?? "";
152
- message.lost_stolen_card_services = object.lost_stolen_card_services ?? "";
153
- message.free_govt_id_replacement = object.free_govt_id_replacement ?? "";
178
+ message.offers = object.offers?.map((e) => exports.Offer.fromPartial(e)) || [];
154
179
  return message;
155
180
  },
156
181
  };
@@ -88,6 +88,7 @@ export interface getCustomerByIdResponse {
88
88
  journey_sequence: string;
89
89
  va_number: string;
90
90
  sanctioned_amount: number;
91
+ limit_option: number;
91
92
  }
92
93
  export interface Address {
93
94
  house_flat_no?: string | undefined;
@@ -149,6 +149,7 @@ function createBasegetCustomerByIdResponse() {
149
149
  journey_sequence: "",
150
150
  va_number: "",
151
151
  sanctioned_amount: 0,
152
+ limit_option: 0,
152
153
  };
153
154
  }
154
155
  exports.getCustomerByIdResponse = {
@@ -405,6 +406,9 @@ exports.getCustomerByIdResponse = {
405
406
  if (message.sanctioned_amount !== 0) {
406
407
  writer.uint32(685).float(message.sanctioned_amount);
407
408
  }
409
+ if (message.limit_option !== 0) {
410
+ writer.uint32(693).float(message.limit_option);
411
+ }
408
412
  return writer;
409
413
  },
410
414
  decode(input, length) {
@@ -918,6 +922,12 @@ exports.getCustomerByIdResponse = {
918
922
  }
919
923
  message.sanctioned_amount = reader.float();
920
924
  continue;
925
+ case 86:
926
+ if (tag !== 693) {
927
+ break;
928
+ }
929
+ message.limit_option = reader.float();
930
+ continue;
921
931
  }
922
932
  if ((tag & 7) === 4 || tag === 0) {
923
933
  break;
@@ -1012,6 +1022,7 @@ exports.getCustomerByIdResponse = {
1012
1022
  journey_sequence: isSet(object.journey_sequence) ? globalThis.String(object.journey_sequence) : "",
1013
1023
  va_number: isSet(object.va_number) ? globalThis.String(object.va_number) : "",
1014
1024
  sanctioned_amount: isSet(object.sanctioned_amount) ? globalThis.Number(object.sanctioned_amount) : 0,
1025
+ limit_option: isSet(object.limit_option) ? globalThis.Number(object.limit_option) : 0,
1015
1026
  };
1016
1027
  },
1017
1028
  toJSON(message) {
@@ -1268,6 +1279,9 @@ exports.getCustomerByIdResponse = {
1268
1279
  if (message.sanctioned_amount !== 0) {
1269
1280
  obj.sanctioned_amount = message.sanctioned_amount;
1270
1281
  }
1282
+ if (message.limit_option !== 0) {
1283
+ obj.limit_option = message.limit_option;
1284
+ }
1271
1285
  return obj;
1272
1286
  },
1273
1287
  create(base) {
@@ -1367,6 +1381,7 @@ exports.getCustomerByIdResponse = {
1367
1381
  message.journey_sequence = object.journey_sequence ?? "";
1368
1382
  message.va_number = object.va_number ?? "";
1369
1383
  message.sanctioned_amount = object.sanctioned_amount ?? 0;
1384
+ message.limit_option = object.limit_option ?? 0;
1370
1385
  return message;
1371
1386
  },
1372
1387
  };