@stashfin/grpc 1.2.170 → 1.2.171

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.170",
3
+ "version": "1.2.171",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -1,28 +1,23 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "customers.addmoredetails";
3
- export declare enum OccupationType {
4
- SELF_EMPLOYED = 0,
5
- SALARIED = 1,
6
- UNRECOGNIZED = -1
3
+ export interface RequestBody {
4
+ key: string;
5
+ value: string;
7
6
  }
8
- export declare function occupationTypeFromJSON(object: any): OccupationType;
9
- export declare function occupationTypeToJSON(object: OccupationType): string;
10
7
  export interface addMoreDetailsRequest {
11
- father_name: string;
12
- occupation_type: OccupationType;
13
- current_address: Address | undefined;
14
- is_permanent_address_same: boolean;
15
- permanent_address: Address | undefined;
16
- }
17
- export interface Address {
18
- house_flat_no?: string | undefined;
19
- address_line_1: string;
20
- address_line_2?: string | undefined;
21
- pincode: string;
8
+ request: RequestBody[];
22
9
  }
23
10
  export interface addMoreDetailsResponse {
24
11
  message: string;
25
12
  }
13
+ export declare const RequestBody: {
14
+ encode(message: RequestBody, writer?: _m0.Writer): _m0.Writer;
15
+ decode(input: _m0.Reader | Uint8Array, length?: number): RequestBody;
16
+ fromJSON(object: any): RequestBody;
17
+ toJSON(message: RequestBody): unknown;
18
+ create<I extends Exact<DeepPartial<RequestBody>, I>>(base?: I): RequestBody;
19
+ fromPartial<I extends Exact<DeepPartial<RequestBody>, I>>(object: I): RequestBody;
20
+ };
26
21
  export declare const addMoreDetailsRequest: {
27
22
  encode(message: addMoreDetailsRequest, writer?: _m0.Writer): _m0.Writer;
28
23
  decode(input: _m0.Reader | Uint8Array, length?: number): addMoreDetailsRequest;
@@ -31,14 +26,6 @@ export declare const addMoreDetailsRequest: {
31
26
  create<I extends Exact<DeepPartial<addMoreDetailsRequest>, I>>(base?: I): addMoreDetailsRequest;
32
27
  fromPartial<I extends Exact<DeepPartial<addMoreDetailsRequest>, I>>(object: I): addMoreDetailsRequest;
33
28
  };
34
- export declare const Address: {
35
- encode(message: Address, writer?: _m0.Writer): _m0.Writer;
36
- decode(input: _m0.Reader | Uint8Array, length?: number): Address;
37
- fromJSON(object: any): Address;
38
- toJSON(message: Address): unknown;
39
- create<I extends Exact<DeepPartial<Address>, I>>(base?: I): Address;
40
- fromPartial<I extends Exact<DeepPartial<Address>, I>>(object: I): Address;
41
- };
42
29
  export declare const addMoreDetailsResponse: {
43
30
  encode(message: addMoreDetailsResponse, writer?: _m0.Writer): _m0.Writer;
44
31
  decode(input: _m0.Reader | Uint8Array, length?: number): addMoreDetailsResponse;
@@ -8,75 +8,27 @@ 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.addMoreDetailsResponse = exports.Address = exports.addMoreDetailsRequest = exports.OccupationType = exports.protobufPackage = void 0;
12
- exports.occupationTypeFromJSON = occupationTypeFromJSON;
13
- exports.occupationTypeToJSON = occupationTypeToJSON;
11
+ exports.addMoreDetailsResponse = exports.addMoreDetailsRequest = exports.RequestBody = exports.protobufPackage = void 0;
14
12
  /* eslint-disable */
15
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
16
14
  exports.protobufPackage = "customers.addmoredetails";
17
- var OccupationType;
18
- (function (OccupationType) {
19
- OccupationType[OccupationType["SELF_EMPLOYED"] = 0] = "SELF_EMPLOYED";
20
- OccupationType[OccupationType["SALARIED"] = 1] = "SALARIED";
21
- OccupationType[OccupationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
22
- })(OccupationType || (exports.OccupationType = OccupationType = {}));
23
- function occupationTypeFromJSON(object) {
24
- switch (object) {
25
- case 0:
26
- case "SELF_EMPLOYED":
27
- return OccupationType.SELF_EMPLOYED;
28
- case 1:
29
- case "SALARIED":
30
- return OccupationType.SALARIED;
31
- case -1:
32
- case "UNRECOGNIZED":
33
- default:
34
- return OccupationType.UNRECOGNIZED;
35
- }
15
+ function createBaseRequestBody() {
16
+ return { key: "", value: "" };
36
17
  }
37
- function occupationTypeToJSON(object) {
38
- switch (object) {
39
- case OccupationType.SELF_EMPLOYED:
40
- return "SELF_EMPLOYED";
41
- case OccupationType.SALARIED:
42
- return "SALARIED";
43
- case OccupationType.UNRECOGNIZED:
44
- default:
45
- return "UNRECOGNIZED";
46
- }
47
- }
48
- function createBaseaddMoreDetailsRequest() {
49
- return {
50
- father_name: "",
51
- occupation_type: 0,
52
- current_address: undefined,
53
- is_permanent_address_same: false,
54
- permanent_address: undefined,
55
- };
56
- }
57
- exports.addMoreDetailsRequest = {
18
+ exports.RequestBody = {
58
19
  encode(message, writer = minimal_1.default.Writer.create()) {
59
- if (message.father_name !== "") {
60
- writer.uint32(10).string(message.father_name);
61
- }
62
- if (message.occupation_type !== 0) {
63
- writer.uint32(16).int32(message.occupation_type);
64
- }
65
- if (message.current_address !== undefined) {
66
- exports.Address.encode(message.current_address, writer.uint32(26).fork()).ldelim();
20
+ if (message.key !== "") {
21
+ writer.uint32(10).string(message.key);
67
22
  }
68
- if (message.is_permanent_address_same !== false) {
69
- writer.uint32(32).bool(message.is_permanent_address_same);
70
- }
71
- if (message.permanent_address !== undefined) {
72
- exports.Address.encode(message.permanent_address, writer.uint32(42).fork()).ldelim();
23
+ if (message.value !== "") {
24
+ writer.uint32(18).string(message.value);
73
25
  }
74
26
  return writer;
75
27
  },
76
28
  decode(input, length) {
77
29
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
78
30
  let end = length === undefined ? reader.len : reader.pos + length;
79
- const message = createBaseaddMoreDetailsRequest();
31
+ const message = createBaseRequestBody();
80
32
  while (reader.pos < end) {
81
33
  const tag = reader.uint32();
82
34
  switch (tag >>> 3) {
@@ -84,31 +36,13 @@ exports.addMoreDetailsRequest = {
84
36
  if (tag !== 10) {
85
37
  break;
86
38
  }
87
- message.father_name = reader.string();
39
+ message.key = reader.string();
88
40
  continue;
89
41
  case 2:
90
- if (tag !== 16) {
91
- break;
92
- }
93
- message.occupation_type = reader.int32();
94
- continue;
95
- case 3:
96
- if (tag !== 26) {
97
- break;
98
- }
99
- message.current_address = exports.Address.decode(reader, reader.uint32());
100
- continue;
101
- case 4:
102
- if (tag !== 32) {
103
- break;
104
- }
105
- message.is_permanent_address_same = reader.bool();
106
- continue;
107
- case 5:
108
- if (tag !== 42) {
42
+ if (tag !== 18) {
109
43
  break;
110
44
  }
111
- message.permanent_address = exports.Address.decode(reader, reader.uint32());
45
+ message.value = reader.string();
112
46
  continue;
113
47
  }
114
48
  if ((tag & 7) === 4 || tag === 0) {
@@ -120,74 +54,44 @@ exports.addMoreDetailsRequest = {
120
54
  },
121
55
  fromJSON(object) {
122
56
  return {
123
- father_name: isSet(object.father_name) ? globalThis.String(object.father_name) : "",
124
- occupation_type: isSet(object.occupation_type) ? occupationTypeFromJSON(object.occupation_type) : 0,
125
- current_address: isSet(object.current_address) ? exports.Address.fromJSON(object.current_address) : undefined,
126
- is_permanent_address_same: isSet(object.is_permanent_address_same)
127
- ? globalThis.Boolean(object.is_permanent_address_same)
128
- : false,
129
- permanent_address: isSet(object.permanent_address) ? exports.Address.fromJSON(object.permanent_address) : undefined,
57
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
58
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
130
59
  };
131
60
  },
132
61
  toJSON(message) {
133
62
  const obj = {};
134
- if (message.father_name !== "") {
135
- obj.father_name = message.father_name;
63
+ if (message.key !== "") {
64
+ obj.key = message.key;
136
65
  }
137
- if (message.occupation_type !== 0) {
138
- obj.occupation_type = occupationTypeToJSON(message.occupation_type);
139
- }
140
- if (message.current_address !== undefined) {
141
- obj.current_address = exports.Address.toJSON(message.current_address);
142
- }
143
- if (message.is_permanent_address_same !== false) {
144
- obj.is_permanent_address_same = message.is_permanent_address_same;
145
- }
146
- if (message.permanent_address !== undefined) {
147
- obj.permanent_address = exports.Address.toJSON(message.permanent_address);
66
+ if (message.value !== "") {
67
+ obj.value = message.value;
148
68
  }
149
69
  return obj;
150
70
  },
151
71
  create(base) {
152
- return exports.addMoreDetailsRequest.fromPartial(base ?? {});
72
+ return exports.RequestBody.fromPartial(base ?? {});
153
73
  },
154
74
  fromPartial(object) {
155
- const message = createBaseaddMoreDetailsRequest();
156
- message.father_name = object.father_name ?? "";
157
- message.occupation_type = object.occupation_type ?? 0;
158
- message.current_address = (object.current_address !== undefined && object.current_address !== null)
159
- ? exports.Address.fromPartial(object.current_address)
160
- : undefined;
161
- message.is_permanent_address_same = object.is_permanent_address_same ?? false;
162
- message.permanent_address = (object.permanent_address !== undefined && object.permanent_address !== null)
163
- ? exports.Address.fromPartial(object.permanent_address)
164
- : undefined;
75
+ const message = createBaseRequestBody();
76
+ message.key = object.key ?? "";
77
+ message.value = object.value ?? "";
165
78
  return message;
166
79
  },
167
80
  };
168
- function createBaseAddress() {
169
- return { house_flat_no: undefined, address_line_1: "", address_line_2: undefined, pincode: "" };
81
+ function createBaseaddMoreDetailsRequest() {
82
+ return { request: [] };
170
83
  }
171
- exports.Address = {
84
+ exports.addMoreDetailsRequest = {
172
85
  encode(message, writer = minimal_1.default.Writer.create()) {
173
- if (message.house_flat_no !== undefined) {
174
- writer.uint32(10).string(message.house_flat_no);
175
- }
176
- if (message.address_line_1 !== "") {
177
- writer.uint32(18).string(message.address_line_1);
178
- }
179
- if (message.address_line_2 !== undefined) {
180
- writer.uint32(26).string(message.address_line_2);
181
- }
182
- if (message.pincode !== "") {
183
- writer.uint32(34).string(message.pincode);
86
+ for (const v of message.request) {
87
+ exports.RequestBody.encode(v, writer.uint32(10).fork()).ldelim();
184
88
  }
185
89
  return writer;
186
90
  },
187
91
  decode(input, length) {
188
92
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
189
93
  let end = length === undefined ? reader.len : reader.pos + length;
190
- const message = createBaseAddress();
94
+ const message = createBaseaddMoreDetailsRequest();
191
95
  while (reader.pos < end) {
192
96
  const tag = reader.uint32();
193
97
  switch (tag >>> 3) {
@@ -195,25 +99,7 @@ exports.Address = {
195
99
  if (tag !== 10) {
196
100
  break;
197
101
  }
198
- message.house_flat_no = reader.string();
199
- continue;
200
- case 2:
201
- if (tag !== 18) {
202
- break;
203
- }
204
- message.address_line_1 = reader.string();
205
- continue;
206
- case 3:
207
- if (tag !== 26) {
208
- break;
209
- }
210
- message.address_line_2 = reader.string();
211
- continue;
212
- case 4:
213
- if (tag !== 34) {
214
- break;
215
- }
216
- message.pincode = reader.string();
102
+ message.request.push(exports.RequestBody.decode(reader, reader.uint32()));
217
103
  continue;
218
104
  }
219
105
  if ((tag & 7) === 4 || tag === 0) {
@@ -225,37 +111,22 @@ exports.Address = {
225
111
  },
226
112
  fromJSON(object) {
227
113
  return {
228
- house_flat_no: isSet(object.house_flat_no) ? globalThis.String(object.house_flat_no) : undefined,
229
- address_line_1: isSet(object.address_line_1) ? globalThis.String(object.address_line_1) : "",
230
- address_line_2: isSet(object.address_line_2) ? globalThis.String(object.address_line_2) : undefined,
231
- pincode: isSet(object.pincode) ? globalThis.String(object.pincode) : "",
114
+ request: globalThis.Array.isArray(object?.request) ? object.request.map((e) => exports.RequestBody.fromJSON(e)) : [],
232
115
  };
233
116
  },
234
117
  toJSON(message) {
235
118
  const obj = {};
236
- if (message.house_flat_no !== undefined) {
237
- obj.house_flat_no = message.house_flat_no;
238
- }
239
- if (message.address_line_1 !== "") {
240
- obj.address_line_1 = message.address_line_1;
241
- }
242
- if (message.address_line_2 !== undefined) {
243
- obj.address_line_2 = message.address_line_2;
244
- }
245
- if (message.pincode !== "") {
246
- obj.pincode = message.pincode;
119
+ if (message.request?.length) {
120
+ obj.request = message.request.map((e) => exports.RequestBody.toJSON(e));
247
121
  }
248
122
  return obj;
249
123
  },
250
124
  create(base) {
251
- return exports.Address.fromPartial(base ?? {});
125
+ return exports.addMoreDetailsRequest.fromPartial(base ?? {});
252
126
  },
253
127
  fromPartial(object) {
254
- const message = createBaseAddress();
255
- message.house_flat_no = object.house_flat_no ?? undefined;
256
- message.address_line_1 = object.address_line_1 ?? "";
257
- message.address_line_2 = object.address_line_2 ?? undefined;
258
- message.pincode = object.pincode ?? "";
128
+ const message = createBaseaddMoreDetailsRequest();
129
+ message.request = object.request?.map((e) => exports.RequestBody.fromPartial(e)) || [];
259
130
  return message;
260
131
  },
261
132
  };