@stashfin/grpc 1.2.229 → 1.2.232

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.229",
3
+ "version": "1.2.232",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -1,7 +1,6 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "growth.checkplanstatus";
3
3
  export interface chrplansstatusrequest {
4
- auth_token: string;
5
4
  }
6
5
  export interface planstatus {
7
6
  planStatus: boolean;
@@ -13,12 +12,12 @@ export interface chrplanstatusresponse {
13
12
  message: string;
14
13
  }
15
14
  export declare const chrplansstatusrequest: {
16
- encode(message: chrplansstatusrequest, writer?: _m0.Writer): _m0.Writer;
15
+ encode(_: chrplansstatusrequest, writer?: _m0.Writer): _m0.Writer;
17
16
  decode(input: _m0.Reader | Uint8Array, length?: number): chrplansstatusrequest;
18
- fromJSON(object: any): chrplansstatusrequest;
19
- toJSON(message: chrplansstatusrequest): unknown;
17
+ fromJSON(_: any): chrplansstatusrequest;
18
+ toJSON(_: chrplansstatusrequest): unknown;
20
19
  create<I extends Exact<DeepPartial<chrplansstatusrequest>, I>>(base?: I): chrplansstatusrequest;
21
- fromPartial<I extends Exact<DeepPartial<chrplansstatusrequest>, I>>(object: I): chrplansstatusrequest;
20
+ fromPartial<I extends Exact<DeepPartial<chrplansstatusrequest>, I>>(_: I): chrplansstatusrequest;
22
21
  };
23
22
  export declare const planstatus: {
24
23
  encode(message: planstatus, writer?: _m0.Writer): _m0.Writer;
@@ -13,13 +13,10 @@ exports.chrplanstatusresponse = exports.planstatus = exports.chrplansstatusreque
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "growth.checkplanstatus";
15
15
  function createBasechrplansstatusrequest() {
16
- return { auth_token: "" };
16
+ return {};
17
17
  }
18
18
  exports.chrplansstatusrequest = {
19
- encode(message, writer = minimal_1.default.Writer.create()) {
20
- if (message.auth_token !== "") {
21
- writer.uint32(10).string(message.auth_token);
22
- }
19
+ encode(_, writer = minimal_1.default.Writer.create()) {
23
20
  return writer;
24
21
  },
25
22
  decode(input, length) {
@@ -29,12 +26,6 @@ exports.chrplansstatusrequest = {
29
26
  while (reader.pos < end) {
30
27
  const tag = reader.uint32();
31
28
  switch (tag >>> 3) {
32
- case 1:
33
- if (tag !== 10) {
34
- break;
35
- }
36
- message.auth_token = reader.string();
37
- continue;
38
29
  }
39
30
  if ((tag & 7) === 4 || tag === 0) {
40
31
  break;
@@ -43,22 +34,18 @@ exports.chrplansstatusrequest = {
43
34
  }
44
35
  return message;
45
36
  },
46
- fromJSON(object) {
47
- return { auth_token: isSet(object.auth_token) ? globalThis.String(object.auth_token) : "" };
37
+ fromJSON(_) {
38
+ return {};
48
39
  },
49
- toJSON(message) {
40
+ toJSON(_) {
50
41
  const obj = {};
51
- if (message.auth_token !== "") {
52
- obj.auth_token = message.auth_token;
53
- }
54
42
  return obj;
55
43
  },
56
44
  create(base) {
57
45
  return exports.chrplansstatusrequest.fromPartial(base ?? {});
58
46
  },
59
- fromPartial(object) {
47
+ fromPartial(_) {
60
48
  const message = createBasechrplansstatusrequest();
61
- message.auth_token = object.auth_token ?? "";
62
49
  return message;
63
50
  },
64
51
  };
@@ -1,7 +1,6 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "growth.getattachplandetails";
3
3
  export interface chrattachplanrequest {
4
- auth_token: string;
5
4
  }
6
5
  export interface plandata {
7
6
  planId: number;
@@ -17,12 +16,12 @@ export interface chrattachplanresponse {
17
16
  message: string;
18
17
  }
19
18
  export declare const chrattachplanrequest: {
20
- encode(message: chrattachplanrequest, writer?: _m0.Writer): _m0.Writer;
19
+ encode(_: chrattachplanrequest, writer?: _m0.Writer): _m0.Writer;
21
20
  decode(input: _m0.Reader | Uint8Array, length?: number): chrattachplanrequest;
22
- fromJSON(object: any): chrattachplanrequest;
23
- toJSON(message: chrattachplanrequest): unknown;
21
+ fromJSON(_: any): chrattachplanrequest;
22
+ toJSON(_: chrattachplanrequest): unknown;
24
23
  create<I extends Exact<DeepPartial<chrattachplanrequest>, I>>(base?: I): chrattachplanrequest;
25
- fromPartial<I extends Exact<DeepPartial<chrattachplanrequest>, I>>(object: I): chrattachplanrequest;
24
+ fromPartial<I extends Exact<DeepPartial<chrattachplanrequest>, I>>(_: I): chrattachplanrequest;
26
25
  };
27
26
  export declare const plandata: {
28
27
  encode(message: plandata, writer?: _m0.Writer): _m0.Writer;
@@ -13,13 +13,10 @@ exports.chrattachplanresponse = exports.plandata = exports.chrattachplanrequest
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "growth.getattachplandetails";
15
15
  function createBasechrattachplanrequest() {
16
- return { auth_token: "" };
16
+ return {};
17
17
  }
18
18
  exports.chrattachplanrequest = {
19
- encode(message, writer = minimal_1.default.Writer.create()) {
20
- if (message.auth_token !== "") {
21
- writer.uint32(10).string(message.auth_token);
22
- }
19
+ encode(_, writer = minimal_1.default.Writer.create()) {
23
20
  return writer;
24
21
  },
25
22
  decode(input, length) {
@@ -29,12 +26,6 @@ exports.chrattachplanrequest = {
29
26
  while (reader.pos < end) {
30
27
  const tag = reader.uint32();
31
28
  switch (tag >>> 3) {
32
- case 1:
33
- if (tag !== 10) {
34
- break;
35
- }
36
- message.auth_token = reader.string();
37
- continue;
38
29
  }
39
30
  if ((tag & 7) === 4 || tag === 0) {
40
31
  break;
@@ -43,22 +34,18 @@ exports.chrattachplanrequest = {
43
34
  }
44
35
  return message;
45
36
  },
46
- fromJSON(object) {
47
- return { auth_token: isSet(object.auth_token) ? globalThis.String(object.auth_token) : "" };
37
+ fromJSON(_) {
38
+ return {};
48
39
  },
49
- toJSON(message) {
40
+ toJSON(_) {
50
41
  const obj = {};
51
- if (message.auth_token !== "") {
52
- obj.auth_token = message.auth_token;
53
- }
54
42
  return obj;
55
43
  },
56
44
  create(base) {
57
45
  return exports.chrattachplanrequest.fromPartial(base ?? {});
58
46
  },
59
- fromPartial(object) {
47
+ fromPartial(_) {
60
48
  const message = createBasechrattachplanrequest();
61
- message.auth_token = object.auth_token ?? "";
62
49
  return message;
63
50
  },
64
51
  };
@@ -1,7 +1,6 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "growth.getchrplans";
3
3
  export interface chrplansrequest {
4
- auth_token: string;
5
4
  }
6
5
  export interface plan {
7
6
  id: number;
@@ -36,12 +35,12 @@ export interface chrplansresponse {
36
35
  message: string;
37
36
  }
38
37
  export declare const chrplansrequest: {
39
- encode(message: chrplansrequest, writer?: _m0.Writer): _m0.Writer;
38
+ encode(_: chrplansrequest, writer?: _m0.Writer): _m0.Writer;
40
39
  decode(input: _m0.Reader | Uint8Array, length?: number): chrplansrequest;
41
- fromJSON(object: any): chrplansrequest;
42
- toJSON(message: chrplansrequest): unknown;
40
+ fromJSON(_: any): chrplansrequest;
41
+ toJSON(_: chrplansrequest): unknown;
43
42
  create<I extends Exact<DeepPartial<chrplansrequest>, I>>(base?: I): chrplansrequest;
44
- fromPartial<I extends Exact<DeepPartial<chrplansrequest>, I>>(object: I): chrplansrequest;
43
+ fromPartial<I extends Exact<DeepPartial<chrplansrequest>, I>>(_: I): chrplansrequest;
45
44
  };
46
45
  export declare const plan: {
47
46
  encode(message: plan, writer?: _m0.Writer): _m0.Writer;
@@ -13,13 +13,10 @@ exports.chrplansresponse = exports.plandetailsdata = exports.feature = exports.p
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "growth.getchrplans";
15
15
  function createBasechrplansrequest() {
16
- return { auth_token: "" };
16
+ return {};
17
17
  }
18
18
  exports.chrplansrequest = {
19
- encode(message, writer = minimal_1.default.Writer.create()) {
20
- if (message.auth_token !== "") {
21
- writer.uint32(10).string(message.auth_token);
22
- }
19
+ encode(_, writer = minimal_1.default.Writer.create()) {
23
20
  return writer;
24
21
  },
25
22
  decode(input, length) {
@@ -29,12 +26,6 @@ exports.chrplansrequest = {
29
26
  while (reader.pos < end) {
30
27
  const tag = reader.uint32();
31
28
  switch (tag >>> 3) {
32
- case 1:
33
- if (tag !== 10) {
34
- break;
35
- }
36
- message.auth_token = reader.string();
37
- continue;
38
29
  }
39
30
  if ((tag & 7) === 4 || tag === 0) {
40
31
  break;
@@ -43,22 +34,18 @@ exports.chrplansrequest = {
43
34
  }
44
35
  return message;
45
36
  },
46
- fromJSON(object) {
47
- return { auth_token: isSet(object.auth_token) ? globalThis.String(object.auth_token) : "" };
37
+ fromJSON(_) {
38
+ return {};
48
39
  },
49
- toJSON(message) {
40
+ toJSON(_) {
50
41
  const obj = {};
51
- if (message.auth_token !== "") {
52
- obj.auth_token = message.auth_token;
53
- }
54
42
  return obj;
55
43
  },
56
44
  create(base) {
57
45
  return exports.chrplansrequest.fromPartial(base ?? {});
58
46
  },
59
- fromPartial(object) {
47
+ fromPartial(_) {
60
48
  const message = createBasechrplansrequest();
61
- message.auth_token = object.auth_token ?? "";
62
49
  return message;
63
50
  },
64
51
  };
@@ -1,9 +1,18 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "growth.getcredithealthreport";
3
3
  export interface credithealthreportrequest {
4
- auth_token: string;
5
4
  refresh_report: boolean;
6
5
  }
6
+ export interface recommendedplan {
7
+ label: string;
8
+ benefits: string[];
9
+ cta_text: string;
10
+ amount: number;
11
+ plan_id: string;
12
+ }
13
+ export interface referandearn {
14
+ referral_amount: string;
15
+ }
7
16
  export interface chrdata {
8
17
  plan_type_text: string;
9
18
  cibil_score: number;
@@ -13,8 +22,10 @@ export interface chrdata {
13
22
  refresh_date: string;
14
23
  refresh_enabled: number;
15
24
  plan_subscription_id: number;
16
- refer_and_earn: string;
17
- recommended_plan: string;
25
+ refer_and_earn?: referandearn | undefined;
26
+ recommended_plan?: recommendedplan | undefined;
27
+ user_state: string;
28
+ recommended_plan_status: boolean;
18
29
  }
19
30
  export interface chrdatawrapper {
20
31
  chr_data: chrdata | undefined;
@@ -33,6 +44,22 @@ export declare const credithealthreportrequest: {
33
44
  create<I extends Exact<DeepPartial<credithealthreportrequest>, I>>(base?: I): credithealthreportrequest;
34
45
  fromPartial<I extends Exact<DeepPartial<credithealthreportrequest>, I>>(object: I): credithealthreportrequest;
35
46
  };
47
+ export declare const recommendedplan: {
48
+ encode(message: recommendedplan, writer?: _m0.Writer): _m0.Writer;
49
+ decode(input: _m0.Reader | Uint8Array, length?: number): recommendedplan;
50
+ fromJSON(object: any): recommendedplan;
51
+ toJSON(message: recommendedplan): unknown;
52
+ create<I extends Exact<DeepPartial<recommendedplan>, I>>(base?: I): recommendedplan;
53
+ fromPartial<I extends Exact<DeepPartial<recommendedplan>, I>>(object: I): recommendedplan;
54
+ };
55
+ export declare const referandearn: {
56
+ encode(message: referandearn, writer?: _m0.Writer): _m0.Writer;
57
+ decode(input: _m0.Reader | Uint8Array, length?: number): referandearn;
58
+ fromJSON(object: any): referandearn;
59
+ toJSON(message: referandearn): unknown;
60
+ create<I extends Exact<DeepPartial<referandearn>, I>>(base?: I): referandearn;
61
+ fromPartial<I extends Exact<DeepPartial<referandearn>, I>>(object: I): referandearn;
62
+ };
36
63
  export declare const chrdata: {
37
64
  encode(message: chrdata, writer?: _m0.Writer): _m0.Writer;
38
65
  decode(input: _m0.Reader | Uint8Array, length?: number): chrdata;
@@ -8,20 +8,17 @@ 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.credithealthreportresponse = exports.chrdatawrapper = exports.chrdata = exports.credithealthreportrequest = exports.protobufPackage = void 0;
11
+ exports.credithealthreportresponse = exports.chrdatawrapper = exports.chrdata = exports.referandearn = exports.recommendedplan = exports.credithealthreportrequest = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "growth.getcredithealthreport";
15
15
  function createBasecredithealthreportrequest() {
16
- return { auth_token: "", refresh_report: false };
16
+ return { refresh_report: false };
17
17
  }
18
18
  exports.credithealthreportrequest = {
19
19
  encode(message, writer = minimal_1.default.Writer.create()) {
20
- if (message.auth_token !== "") {
21
- writer.uint32(10).string(message.auth_token);
22
- }
23
20
  if (message.refresh_report !== false) {
24
- writer.uint32(16).bool(message.refresh_report);
21
+ writer.uint32(8).bool(message.refresh_report);
25
22
  }
26
23
  return writer;
27
24
  },
@@ -29,6 +26,68 @@ exports.credithealthreportrequest = {
29
26
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
30
27
  let end = length === undefined ? reader.len : reader.pos + length;
31
28
  const message = createBasecredithealthreportrequest();
29
+ while (reader.pos < end) {
30
+ const tag = reader.uint32();
31
+ switch (tag >>> 3) {
32
+ case 1:
33
+ if (tag !== 8) {
34
+ break;
35
+ }
36
+ message.refresh_report = reader.bool();
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 { refresh_report: isSet(object.refresh_report) ? globalThis.Boolean(object.refresh_report) : false };
48
+ },
49
+ toJSON(message) {
50
+ const obj = {};
51
+ if (message.refresh_report !== false) {
52
+ obj.refresh_report = message.refresh_report;
53
+ }
54
+ return obj;
55
+ },
56
+ create(base) {
57
+ return exports.credithealthreportrequest.fromPartial(base ?? {});
58
+ },
59
+ fromPartial(object) {
60
+ const message = createBasecredithealthreportrequest();
61
+ message.refresh_report = object.refresh_report ?? false;
62
+ return message;
63
+ },
64
+ };
65
+ function createBaserecommendedplan() {
66
+ return { label: "", benefits: [], cta_text: "", amount: 0, plan_id: "" };
67
+ }
68
+ exports.recommendedplan = {
69
+ encode(message, writer = minimal_1.default.Writer.create()) {
70
+ if (message.label !== "") {
71
+ writer.uint32(10).string(message.label);
72
+ }
73
+ for (const v of message.benefits) {
74
+ writer.uint32(18).string(v);
75
+ }
76
+ if (message.cta_text !== "") {
77
+ writer.uint32(26).string(message.cta_text);
78
+ }
79
+ if (message.amount !== 0) {
80
+ writer.uint32(33).double(message.amount);
81
+ }
82
+ if (message.plan_id !== "") {
83
+ writer.uint32(42).string(message.plan_id);
84
+ }
85
+ return writer;
86
+ },
87
+ decode(input, length) {
88
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
89
+ let end = length === undefined ? reader.len : reader.pos + length;
90
+ const message = createBaserecommendedplan();
32
91
  while (reader.pos < end) {
33
92
  const tag = reader.uint32();
34
93
  switch (tag >>> 3) {
@@ -36,13 +95,31 @@ exports.credithealthreportrequest = {
36
95
  if (tag !== 10) {
37
96
  break;
38
97
  }
39
- message.auth_token = reader.string();
98
+ message.label = reader.string();
40
99
  continue;
41
100
  case 2:
42
- if (tag !== 16) {
101
+ if (tag !== 18) {
43
102
  break;
44
103
  }
45
- message.refresh_report = reader.bool();
104
+ message.benefits.push(reader.string());
105
+ continue;
106
+ case 3:
107
+ if (tag !== 26) {
108
+ break;
109
+ }
110
+ message.cta_text = reader.string();
111
+ continue;
112
+ case 4:
113
+ if (tag !== 33) {
114
+ break;
115
+ }
116
+ message.amount = reader.double();
117
+ continue;
118
+ case 5:
119
+ if (tag !== 42) {
120
+ break;
121
+ }
122
+ message.plan_id = reader.string();
46
123
  continue;
47
124
  }
48
125
  if ((tag & 7) === 4 || tag === 0) {
@@ -54,27 +131,92 @@ exports.credithealthreportrequest = {
54
131
  },
55
132
  fromJSON(object) {
56
133
  return {
57
- auth_token: isSet(object.auth_token) ? globalThis.String(object.auth_token) : "",
58
- refresh_report: isSet(object.refresh_report) ? globalThis.Boolean(object.refresh_report) : false,
134
+ label: isSet(object.label) ? globalThis.String(object.label) : "",
135
+ benefits: globalThis.Array.isArray(object?.benefits) ? object.benefits.map((e) => globalThis.String(e)) : [],
136
+ cta_text: isSet(object.cta_text) ? globalThis.String(object.cta_text) : "",
137
+ amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
138
+ plan_id: isSet(object.plan_id) ? globalThis.String(object.plan_id) : "",
59
139
  };
60
140
  },
61
141
  toJSON(message) {
62
142
  const obj = {};
63
- if (message.auth_token !== "") {
64
- obj.auth_token = message.auth_token;
143
+ if (message.label !== "") {
144
+ obj.label = message.label;
65
145
  }
66
- if (message.refresh_report !== false) {
67
- obj.refresh_report = message.refresh_report;
146
+ if (message.benefits?.length) {
147
+ obj.benefits = message.benefits;
148
+ }
149
+ if (message.cta_text !== "") {
150
+ obj.cta_text = message.cta_text;
151
+ }
152
+ if (message.amount !== 0) {
153
+ obj.amount = message.amount;
154
+ }
155
+ if (message.plan_id !== "") {
156
+ obj.plan_id = message.plan_id;
68
157
  }
69
158
  return obj;
70
159
  },
71
160
  create(base) {
72
- return exports.credithealthreportrequest.fromPartial(base ?? {});
161
+ return exports.recommendedplan.fromPartial(base ?? {});
73
162
  },
74
163
  fromPartial(object) {
75
- const message = createBasecredithealthreportrequest();
76
- message.auth_token = object.auth_token ?? "";
77
- message.refresh_report = object.refresh_report ?? false;
164
+ const message = createBaserecommendedplan();
165
+ message.label = object.label ?? "";
166
+ message.benefits = object.benefits?.map((e) => e) || [];
167
+ message.cta_text = object.cta_text ?? "";
168
+ message.amount = object.amount ?? 0;
169
+ message.plan_id = object.plan_id ?? "";
170
+ return message;
171
+ },
172
+ };
173
+ function createBasereferandearn() {
174
+ return { referral_amount: "" };
175
+ }
176
+ exports.referandearn = {
177
+ encode(message, writer = minimal_1.default.Writer.create()) {
178
+ if (message.referral_amount !== "") {
179
+ writer.uint32(10).string(message.referral_amount);
180
+ }
181
+ return writer;
182
+ },
183
+ decode(input, length) {
184
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
185
+ let end = length === undefined ? reader.len : reader.pos + length;
186
+ const message = createBasereferandearn();
187
+ while (reader.pos < end) {
188
+ const tag = reader.uint32();
189
+ switch (tag >>> 3) {
190
+ case 1:
191
+ if (tag !== 10) {
192
+ break;
193
+ }
194
+ message.referral_amount = reader.string();
195
+ continue;
196
+ }
197
+ if ((tag & 7) === 4 || tag === 0) {
198
+ break;
199
+ }
200
+ reader.skipType(tag & 7);
201
+ }
202
+ return message;
203
+ },
204
+ fromJSON(object) {
205
+ return { referral_amount: isSet(object.referral_amount) ? globalThis.String(object.referral_amount) : "" };
206
+ },
207
+ toJSON(message) {
208
+ const obj = {};
209
+ if (message.referral_amount !== "") {
210
+ obj.referral_amount = message.referral_amount;
211
+ }
212
+ return obj;
213
+ },
214
+ create(base) {
215
+ return exports.referandearn.fromPartial(base ?? {});
216
+ },
217
+ fromPartial(object) {
218
+ const message = createBasereferandearn();
219
+ message.referral_amount = object.referral_amount ?? "";
78
220
  return message;
79
221
  },
80
222
  };
@@ -88,8 +230,10 @@ function createBasechrdata() {
88
230
  refresh_date: "",
89
231
  refresh_enabled: 0,
90
232
  plan_subscription_id: 0,
91
- refer_and_earn: "",
92
- recommended_plan: "",
233
+ refer_and_earn: undefined,
234
+ recommended_plan: undefined,
235
+ user_state: "",
236
+ recommended_plan_status: false,
93
237
  };
94
238
  }
95
239
  exports.chrdata = {
@@ -118,11 +262,17 @@ exports.chrdata = {
118
262
  if (message.plan_subscription_id !== 0) {
119
263
  writer.uint32(64).int32(message.plan_subscription_id);
120
264
  }
121
- if (message.refer_and_earn !== "") {
122
- writer.uint32(74).string(message.refer_and_earn);
265
+ if (message.refer_and_earn !== undefined) {
266
+ exports.referandearn.encode(message.refer_and_earn, writer.uint32(74).fork()).ldelim();
267
+ }
268
+ if (message.recommended_plan !== undefined) {
269
+ exports.recommendedplan.encode(message.recommended_plan, writer.uint32(82).fork()).ldelim();
123
270
  }
124
- if (message.recommended_plan !== "") {
125
- writer.uint32(82).string(message.recommended_plan);
271
+ if (message.user_state !== "") {
272
+ writer.uint32(90).string(message.user_state);
273
+ }
274
+ if (message.recommended_plan_status !== false) {
275
+ writer.uint32(96).bool(message.recommended_plan_status);
126
276
  }
127
277
  return writer;
128
278
  },
@@ -185,13 +335,25 @@ exports.chrdata = {
185
335
  if (tag !== 74) {
186
336
  break;
187
337
  }
188
- message.refer_and_earn = reader.string();
338
+ message.refer_and_earn = exports.referandearn.decode(reader, reader.uint32());
189
339
  continue;
190
340
  case 10:
191
341
  if (tag !== 82) {
192
342
  break;
193
343
  }
194
- message.recommended_plan = reader.string();
344
+ message.recommended_plan = exports.recommendedplan.decode(reader, reader.uint32());
345
+ continue;
346
+ case 11:
347
+ if (tag !== 90) {
348
+ break;
349
+ }
350
+ message.user_state = reader.string();
351
+ continue;
352
+ case 12:
353
+ if (tag !== 96) {
354
+ break;
355
+ }
356
+ message.recommended_plan_status = reader.bool();
195
357
  continue;
196
358
  }
197
359
  if ((tag & 7) === 4 || tag === 0) {
@@ -213,8 +375,12 @@ exports.chrdata = {
213
375
  refresh_date: isSet(object.refresh_date) ? globalThis.String(object.refresh_date) : "",
214
376
  refresh_enabled: isSet(object.refresh_enabled) ? globalThis.Number(object.refresh_enabled) : 0,
215
377
  plan_subscription_id: isSet(object.plan_subscription_id) ? globalThis.Number(object.plan_subscription_id) : 0,
216
- refer_and_earn: isSet(object.refer_and_earn) ? globalThis.String(object.refer_and_earn) : "",
217
- recommended_plan: isSet(object.recommended_plan) ? globalThis.String(object.recommended_plan) : "",
378
+ refer_and_earn: isSet(object.refer_and_earn) ? exports.referandearn.fromJSON(object.refer_and_earn) : undefined,
379
+ recommended_plan: isSet(object.recommended_plan) ? exports.recommendedplan.fromJSON(object.recommended_plan) : undefined,
380
+ user_state: isSet(object.user_state) ? globalThis.String(object.user_state) : "",
381
+ recommended_plan_status: isSet(object.recommended_plan_status)
382
+ ? globalThis.Boolean(object.recommended_plan_status)
383
+ : false,
218
384
  };
219
385
  },
220
386
  toJSON(message) {
@@ -243,11 +409,17 @@ exports.chrdata = {
243
409
  if (message.plan_subscription_id !== 0) {
244
410
  obj.plan_subscription_id = Math.round(message.plan_subscription_id);
245
411
  }
246
- if (message.refer_and_earn !== "") {
247
- obj.refer_and_earn = message.refer_and_earn;
412
+ if (message.refer_and_earn !== undefined) {
413
+ obj.refer_and_earn = exports.referandearn.toJSON(message.refer_and_earn);
414
+ }
415
+ if (message.recommended_plan !== undefined) {
416
+ obj.recommended_plan = exports.recommendedplan.toJSON(message.recommended_plan);
248
417
  }
249
- if (message.recommended_plan !== "") {
250
- obj.recommended_plan = message.recommended_plan;
418
+ if (message.user_state !== "") {
419
+ obj.user_state = message.user_state;
420
+ }
421
+ if (message.recommended_plan_status !== false) {
422
+ obj.recommended_plan_status = message.recommended_plan_status;
251
423
  }
252
424
  return obj;
253
425
  },
@@ -264,8 +436,14 @@ exports.chrdata = {
264
436
  message.refresh_date = object.refresh_date ?? "";
265
437
  message.refresh_enabled = object.refresh_enabled ?? 0;
266
438
  message.plan_subscription_id = object.plan_subscription_id ?? 0;
267
- message.refer_and_earn = object.refer_and_earn ?? "";
268
- message.recommended_plan = object.recommended_plan ?? "";
439
+ message.refer_and_earn = (object.refer_and_earn !== undefined && object.refer_and_earn !== null)
440
+ ? exports.referandearn.fromPartial(object.refer_and_earn)
441
+ : undefined;
442
+ message.recommended_plan = (object.recommended_plan !== undefined && object.recommended_plan !== null)
443
+ ? exports.recommendedplan.fromPartial(object.recommended_plan)
444
+ : undefined;
445
+ message.user_state = object.user_state ?? "";
446
+ message.recommended_plan_status = object.recommended_plan_status ?? false;
269
447
  return message;
270
448
  },
271
449
  };
@@ -1,7 +1,6 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "growth.initiatepayment";
3
3
  export interface initiatepaymentrequest {
4
- auth_token: string;
5
4
  plan_id: number;
6
5
  report_type: string;
7
6
  amount: number;
@@ -14,21 +14,18 @@ const long_1 = __importDefault(require("long"));
14
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
15
15
  exports.protobufPackage = "growth.initiatepayment";
16
16
  function createBaseinitiatepaymentrequest() {
17
- return { auth_token: "", plan_id: 0, report_type: "", amount: 0 };
17
+ return { plan_id: 0, report_type: "", amount: 0 };
18
18
  }
19
19
  exports.initiatepaymentrequest = {
20
20
  encode(message, writer = minimal_1.default.Writer.create()) {
21
- if (message.auth_token !== "") {
22
- writer.uint32(10).string(message.auth_token);
23
- }
24
21
  if (message.plan_id !== 0) {
25
- writer.uint32(16).int32(message.plan_id);
22
+ writer.uint32(8).int32(message.plan_id);
26
23
  }
27
24
  if (message.report_type !== "") {
28
- writer.uint32(26).string(message.report_type);
25
+ writer.uint32(18).string(message.report_type);
29
26
  }
30
27
  if (message.amount !== 0) {
31
- writer.uint32(32).int64(message.amount);
28
+ writer.uint32(24).int64(message.amount);
32
29
  }
33
30
  return writer;
34
31
  },
@@ -40,25 +37,19 @@ exports.initiatepaymentrequest = {
40
37
  const tag = reader.uint32();
41
38
  switch (tag >>> 3) {
42
39
  case 1:
43
- if (tag !== 10) {
44
- break;
45
- }
46
- message.auth_token = reader.string();
47
- continue;
48
- case 2:
49
- if (tag !== 16) {
40
+ if (tag !== 8) {
50
41
  break;
51
42
  }
52
43
  message.plan_id = reader.int32();
53
44
  continue;
54
- case 3:
55
- if (tag !== 26) {
45
+ case 2:
46
+ if (tag !== 18) {
56
47
  break;
57
48
  }
58
49
  message.report_type = reader.string();
59
50
  continue;
60
- case 4:
61
- if (tag !== 32) {
51
+ case 3:
52
+ if (tag !== 24) {
62
53
  break;
63
54
  }
64
55
  message.amount = longToNumber(reader.int64());
@@ -73,7 +64,6 @@ exports.initiatepaymentrequest = {
73
64
  },
74
65
  fromJSON(object) {
75
66
  return {
76
- auth_token: isSet(object.auth_token) ? globalThis.String(object.auth_token) : "",
77
67
  plan_id: isSet(object.plan_id) ? globalThis.Number(object.plan_id) : 0,
78
68
  report_type: isSet(object.report_type) ? globalThis.String(object.report_type) : "",
79
69
  amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
@@ -81,9 +71,6 @@ exports.initiatepaymentrequest = {
81
71
  },
82
72
  toJSON(message) {
83
73
  const obj = {};
84
- if (message.auth_token !== "") {
85
- obj.auth_token = message.auth_token;
86
- }
87
74
  if (message.plan_id !== 0) {
88
75
  obj.plan_id = Math.round(message.plan_id);
89
76
  }
@@ -100,7 +87,6 @@ exports.initiatepaymentrequest = {
100
87
  },
101
88
  fromPartial(object) {
102
89
  const message = createBaseinitiatepaymentrequest();
103
- message.auth_token = object.auth_token ?? "";
104
90
  message.plan_id = object.plan_id ?? 0;
105
91
  message.report_type = object.report_type ?? "";
106
92
  message.amount = object.amount ?? 0;
@@ -4,7 +4,6 @@ export interface loanSummaryRequest {
4
4
  addons: number;
5
5
  amount: number;
6
6
  tenure: number;
7
- emi_amount: number;
8
7
  }
9
8
  export interface loanSummaryResponse {
10
9
  gateway_fees: number;
@@ -13,7 +13,7 @@ exports.loanSummaryResponse = exports.loanSummaryRequest = exports.protobufPacka
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "loans.loansummary";
15
15
  function createBaseloanSummaryRequest() {
16
- return { addons: 0, amount: 0, tenure: 0, emi_amount: 0 };
16
+ return { addons: 0, amount: 0, tenure: 0 };
17
17
  }
18
18
  exports.loanSummaryRequest = {
19
19
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -26,9 +26,6 @@ exports.loanSummaryRequest = {
26
26
  if (message.tenure !== 0) {
27
27
  writer.uint32(24).int32(message.tenure);
28
28
  }
29
- if (message.emi_amount !== 0) {
30
- writer.uint32(32).int32(message.emi_amount);
31
- }
32
29
  return writer;
33
30
  },
34
31
  decode(input, length) {
@@ -56,12 +53,6 @@ exports.loanSummaryRequest = {
56
53
  }
57
54
  message.tenure = reader.int32();
58
55
  continue;
59
- case 4:
60
- if (tag !== 32) {
61
- break;
62
- }
63
- message.emi_amount = reader.int32();
64
- continue;
65
56
  }
66
57
  if ((tag & 7) === 4 || tag === 0) {
67
58
  break;
@@ -75,7 +66,6 @@ exports.loanSummaryRequest = {
75
66
  addons: isSet(object.addons) ? globalThis.Number(object.addons) : 0,
76
67
  amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
77
68
  tenure: isSet(object.tenure) ? globalThis.Number(object.tenure) : 0,
78
- emi_amount: isSet(object.emi_amount) ? globalThis.Number(object.emi_amount) : 0,
79
69
  };
80
70
  },
81
71
  toJSON(message) {
@@ -89,9 +79,6 @@ exports.loanSummaryRequest = {
89
79
  if (message.tenure !== 0) {
90
80
  obj.tenure = Math.round(message.tenure);
91
81
  }
92
- if (message.emi_amount !== 0) {
93
- obj.emi_amount = Math.round(message.emi_amount);
94
- }
95
82
  return obj;
96
83
  },
97
84
  create(base) {
@@ -102,7 +89,6 @@ exports.loanSummaryRequest = {
102
89
  message.addons = object.addons ?? 0;
103
90
  message.amount = object.amount ?? 0;
104
91
  message.tenure = object.tenure ?? 0;
105
- message.emi_amount = object.emi_amount ?? 0;
106
92
  return message;
107
93
  },
108
94
  };
@@ -5,6 +5,8 @@ export interface payNowRequest {
5
5
  mode: string;
6
6
  add_ons: payNowRequest_add_on[];
7
7
  amount: number;
8
+ loan_id: number[];
9
+ installment_id?: number | undefined;
8
10
  }
9
11
  export interface payNowRequest_add_on {
10
12
  type: string;
@@ -14,7 +14,7 @@ const long_1 = __importDefault(require("long"));
14
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
15
15
  exports.protobufPackage = "loans.paynow";
16
16
  function createBasepayNowRequest() {
17
- return { customer_id: 0, mode: "", add_ons: [], amount: 0 };
17
+ return { customer_id: 0, mode: "", add_ons: [], amount: 0, loan_id: [], installment_id: undefined };
18
18
  }
19
19
  exports.payNowRequest = {
20
20
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -30,6 +30,14 @@ exports.payNowRequest = {
30
30
  if (message.amount !== 0) {
31
31
  writer.uint32(32).int32(message.amount);
32
32
  }
33
+ writer.uint32(42).fork();
34
+ for (const v of message.loan_id) {
35
+ writer.int32(v);
36
+ }
37
+ writer.ldelim();
38
+ if (message.installment_id !== undefined) {
39
+ writer.uint32(48).int32(message.installment_id);
40
+ }
33
41
  return writer;
34
42
  },
35
43
  decode(input, length) {
@@ -63,6 +71,25 @@ exports.payNowRequest = {
63
71
  }
64
72
  message.amount = reader.int32();
65
73
  continue;
74
+ case 5:
75
+ if (tag === 40) {
76
+ message.loan_id.push(reader.int32());
77
+ continue;
78
+ }
79
+ if (tag === 42) {
80
+ const end2 = reader.uint32() + reader.pos;
81
+ while (reader.pos < end2) {
82
+ message.loan_id.push(reader.int32());
83
+ }
84
+ continue;
85
+ }
86
+ break;
87
+ case 6:
88
+ if (tag !== 48) {
89
+ break;
90
+ }
91
+ message.installment_id = reader.int32();
92
+ continue;
66
93
  }
67
94
  if ((tag & 7) === 4 || tag === 0) {
68
95
  break;
@@ -79,6 +106,8 @@ exports.payNowRequest = {
79
106
  ? object.add_ons.map((e) => exports.payNowRequest_add_on.fromJSON(e))
80
107
  : [],
81
108
  amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
109
+ loan_id: globalThis.Array.isArray(object?.loan_id) ? object.loan_id.map((e) => globalThis.Number(e)) : [],
110
+ installment_id: isSet(object.installment_id) ? globalThis.Number(object.installment_id) : undefined,
82
111
  };
83
112
  },
84
113
  toJSON(message) {
@@ -95,6 +124,12 @@ exports.payNowRequest = {
95
124
  if (message.amount !== 0) {
96
125
  obj.amount = Math.round(message.amount);
97
126
  }
127
+ if (message.loan_id?.length) {
128
+ obj.loan_id = message.loan_id.map((e) => Math.round(e));
129
+ }
130
+ if (message.installment_id !== undefined) {
131
+ obj.installment_id = Math.round(message.installment_id);
132
+ }
98
133
  return obj;
99
134
  },
100
135
  create(base) {
@@ -106,6 +141,8 @@ exports.payNowRequest = {
106
141
  message.mode = object.mode ?? "";
107
142
  message.add_ons = object.add_ons?.map((e) => exports.payNowRequest_add_on.fromPartial(e)) || [];
108
143
  message.amount = object.amount ?? 0;
144
+ message.loan_id = object.loan_id?.map((e) => e) || [];
145
+ message.installment_id = object.installment_id ?? undefined;
109
146
  return message;
110
147
  },
111
148
  };