@stashfin/grpc 1.0.31 → 1.1.38

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.
Files changed (160) hide show
  1. package/README.md +74 -0
  2. package/package.json +1 -1
  3. package/src/proto/customers/getbankaccountdetails.proto +11 -0
  4. package/src/proto/customers/getbasicinfo.proto +14 -0
  5. package/src/proto/customers/getcustomerbyid.proto +30 -0
  6. package/src/proto/customers/getdashboard.proto +46 -0
  7. package/src/proto/customers/getdashboardmaincard.proto +37 -0
  8. package/src/proto/customers/getprofessionalinfo.proto +13 -0
  9. package/src/proto/customers/getprofile.proto +13 -0
  10. package/src/proto/customers/getstep.proto +32 -0
  11. package/src/proto/customers/profilebasic.proto +14 -0
  12. package/src/proto/customers/profileupdatetnc.proto +11 -0
  13. package/src/proto/customers/sendemailtoken.proto +11 -0
  14. package/src/proto/customers/sendotp.proto +14 -0
  15. package/src/proto/customers/setmpin.proto +12 -0
  16. package/src/proto/customers/step1.proto +32 -0
  17. package/src/proto/customers/step10.proto +34 -0
  18. package/src/proto/customers/step2.proto +28 -0
  19. package/src/proto/customers/step7.proto +29 -0
  20. package/src/proto/customers/step8.proto +30 -0
  21. package/src/proto/customers/step9.proto +36 -0
  22. package/src/proto/customers/stepstatic.proto +27 -0
  23. package/src/proto/customers/verifyemail.proto +11 -0
  24. package/src/proto/customers/verifympin.proto +13 -0
  25. package/src/proto/customers/verifyotp.proto +17 -0
  26. package/src/proto/customers.proto +57 -0
  27. package/src/proto/example.proto +20 -0
  28. package/src/proto/loans/approveloan.proto +15 -0
  29. package/src/proto/loans/banklist.proto +15 -0
  30. package/src/proto/loans/calculateemi.proto +15 -0
  31. package/src/proto/loans/creditlimit.proto +10 -0
  32. package/src/proto/loans/updateinstallments.proto +19 -0
  33. package/src/proto/loans/updateloan.proto +15 -0
  34. package/src/proto/loans.proto +19 -0
  35. package/src/proto/stashcash/creditsc.proto +22 -0
  36. package/src/proto/stashcash/debitsc.proto +27 -0
  37. package/src/proto/stashcash/getscbalance.proto +21 -0
  38. package/src/proto/stashcash/getschistory.proto +35 -0
  39. package/src/proto/stashcash/reversesc.proto +20 -0
  40. package/src/proto/stashcash.proto +17 -0
  41. package/src/ts/customers/getbankaccountdetails.ts +169 -0
  42. package/src/ts/customers/getbasicinfo.ts +215 -0
  43. package/src/ts/customers/getcustomerbyid.ts +475 -0
  44. package/src/ts/customers/getdashboard.ts +711 -0
  45. package/src/ts/customers/getdashboardmaincard.ts +608 -0
  46. package/src/ts/customers/getprofessionalinfo.ts +183 -0
  47. package/src/ts/customers/getprofile.ts +199 -0
  48. package/src/ts/customers/getstep.ts +504 -0
  49. package/src/ts/customers/profilebasic.ts +198 -0
  50. package/src/ts/customers/profileupdatetnc.ts +148 -0
  51. package/src/ts/customers/sendemailtoken.ts +148 -0
  52. package/src/ts/customers/sendotp.ts +202 -0
  53. package/src/ts/customers/setmpin.ts +166 -0
  54. package/src/ts/customers/step1.ts +504 -0
  55. package/src/ts/customers/step10.ts +544 -0
  56. package/src/ts/customers/step2.ts +472 -0
  57. package/src/ts/customers/step7.ts +456 -0
  58. package/src/ts/customers/step8.ts +472 -0
  59. package/src/ts/customers/step9.ts +578 -0
  60. package/src/ts/customers/stepstatic.ts +425 -0
  61. package/src/ts/customers/verifyemail.ts +148 -0
  62. package/src/ts/customers/verifympin.ts +184 -0
  63. package/src/ts/customers/verifyotp.ts +232 -0
  64. package/src/ts/customers.ts +745 -0
  65. package/src/ts/example.ts +294 -0
  66. package/src/ts/google/protobuf/timestamp.ts +223 -0
  67. package/src/ts/loans/approveloan.ts +214 -0
  68. package/src/ts/loans/banklist.ts +248 -0
  69. package/src/ts/loans/calculateemi.ts +182 -0
  70. package/src/ts/loans/creditlimit.ts +151 -0
  71. package/src/ts/loans/updateinstallments.ts +271 -0
  72. package/src/ts/loans/updateloan.ts +214 -0
  73. package/src/ts/loans.ts +195 -0
  74. package/src/ts/stashcash/creditsc.ts +361 -0
  75. package/src/ts/stashcash/debitsc.ts +450 -0
  76. package/src/ts/stashcash/getscbalance.ts +351 -0
  77. package/src/ts/stashcash/getschistory.ts +566 -0
  78. package/src/ts/stashcash/reversesc.ts +329 -0
  79. package/src/ts/stashcash.ts +152 -0
  80. package/tsconfig.json +18 -0
  81. package/ts/customer/getprofile.d.ts +0 -38
  82. package/ts/customer/getprofile.js +0 -162
  83. package/ts/customer/getstep.d.ts +0 -78
  84. package/ts/customer/getstep.js +0 -420
  85. package/ts/customer/profileupdatetnc.d.ts +0 -35
  86. package/ts/customer/profileupdatetnc.js +0 -117
  87. package/ts/customer/sendotp.d.ts +0 -36
  88. package/ts/customer/sendotp.js +0 -133
  89. package/ts/customer/setmpin.d.ts +0 -36
  90. package/ts/customer/setmpin.js +0 -133
  91. package/ts/customer/step1.d.ts +0 -69
  92. package/ts/customer/step1.js +0 -395
  93. package/ts/customer/step10.d.ts +0 -73
  94. package/ts/customer/step10.js +0 -459
  95. package/ts/customer/step2.d.ts +0 -68
  96. package/ts/customer/step2.js +0 -381
  97. package/ts/customer/step7.d.ts +0 -68
  98. package/ts/customer/step7.js +0 -381
  99. package/ts/customer/step8.d.ts +0 -69
  100. package/ts/customer/step8.js +0 -395
  101. package/ts/customer/step9.d.ts +0 -75
  102. package/ts/customer/step9.js +0 -489
  103. package/ts/customer/stepstatic.d.ts +0 -66
  104. package/ts/customer/stepstatic.js +0 -352
  105. package/ts/customer/verifympin.d.ts +0 -37
  106. package/ts/customer/verifympin.js +0 -149
  107. package/ts/customer/verifyotp.d.ts +0 -39
  108. package/ts/customer/verifyotp.js +0 -177
  109. package/ts/customer.d.ts +0 -262
  110. package/ts/customer.js +0 -190
  111. package/ts/customers/getprofile.d.ts +0 -38
  112. package/ts/customers/getprofile.js +0 -162
  113. package/ts/customers/getstep.d.ts +0 -78
  114. package/ts/customers/getstep.js +0 -420
  115. package/ts/customers/profilebasic.d.ts +0 -38
  116. package/ts/customers/profilebasic.js +0 -161
  117. package/ts/customers/profileupdatetnc.d.ts +0 -35
  118. package/ts/customers/profileupdatetnc.js +0 -117
  119. package/ts/customers/sendemailtoken.d.ts +0 -35
  120. package/ts/customers/sendemailtoken.js +0 -117
  121. package/ts/customers/sendotp.d.ts +0 -36
  122. package/ts/customers/sendotp.js +0 -133
  123. package/ts/customers/setmpin.d.ts +0 -36
  124. package/ts/customers/setmpin.js +0 -133
  125. package/ts/customers/step1.d.ts +0 -69
  126. package/ts/customers/step1.js +0 -395
  127. package/ts/customers/step10.d.ts +0 -73
  128. package/ts/customers/step10.js +0 -459
  129. package/ts/customers/step2.d.ts +0 -68
  130. package/ts/customers/step2.js +0 -381
  131. package/ts/customers/step7.d.ts +0 -68
  132. package/ts/customers/step7.js +0 -381
  133. package/ts/customers/step8.d.ts +0 -69
  134. package/ts/customers/step8.js +0 -395
  135. package/ts/customers/step9.d.ts +0 -75
  136. package/ts/customers/step9.js +0 -489
  137. package/ts/customers/stepstatic.d.ts +0 -66
  138. package/ts/customers/stepstatic.js +0 -354
  139. package/ts/customers/verifyemail.d.ts +0 -35
  140. package/ts/customers/verifyemail.js +0 -117
  141. package/ts/customers/verifympin.d.ts +0 -37
  142. package/ts/customers/verifympin.js +0 -149
  143. package/ts/customers/verifyotp.d.ts +0 -39
  144. package/ts/customers/verifyotp.js +0 -177
  145. package/ts/customers.d.ts +0 -304
  146. package/ts/customers.js +0 -220
  147. package/ts/example.d.ts +0 -78
  148. package/ts/example.js +0 -199
  149. package/ts/stashcash/creditsc.d.ts +0 -54
  150. package/ts/stashcash/creditsc.js +0 -301
  151. package/ts/stashcash/debitsc.d.ts +0 -56
  152. package/ts/stashcash/debitsc.js +0 -329
  153. package/ts/stashcash/getscbalance.d.ts +0 -52
  154. package/ts/stashcash/getscbalance.js +0 -271
  155. package/ts/stashcash/getschistory.d.ts +0 -73
  156. package/ts/stashcash/getschistory.js +0 -479
  157. package/ts/stashcash/reversesc.d.ts +0 -52
  158. package/ts/stashcash/reversesc.js +0 -273
  159. package/ts/stashcash.d.ts +0 -84
  160. package/ts/stashcash.js +0 -64
@@ -0,0 +1,711 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v1.181.0
4
+ // protoc v3.20.3
5
+ // source: customers/getdashboard.proto
6
+
7
+ /* eslint-disable */
8
+ import _m0 from "protobufjs/minimal";
9
+
10
+ export const protobufPackage = "customers.getdashboard";
11
+
12
+ export interface getDashboardRequest {
13
+ }
14
+
15
+ export interface getDashboardResponse {
16
+ user_state: string;
17
+ father_name_dialog: boolean;
18
+ current_step: string;
19
+ blocks: Block[];
20
+ }
21
+
22
+ export interface Block {
23
+ block_name: string;
24
+ block_title: string;
25
+ block_code: string;
26
+ block_data: BlockData[];
27
+ }
28
+
29
+ export interface BlockData {
30
+ text: string;
31
+ image_url: string;
32
+ video_url: string;
33
+ video_length: number;
34
+ action_url: string;
35
+ landing_page: string;
36
+ api_mode: string;
37
+ app_version: string;
38
+ old_customers: boolean;
39
+ is_new: boolean;
40
+ action_type: string;
41
+ color1: string;
42
+ color2: string;
43
+ image_trailing: string;
44
+ tag: Tag | undefined;
45
+ overlay_image: string;
46
+ }
47
+
48
+ export interface Tag {
49
+ text: string;
50
+ bg_color: string;
51
+ text_color: string;
52
+ }
53
+
54
+ function createBasegetDashboardRequest(): getDashboardRequest {
55
+ return {};
56
+ }
57
+
58
+ export const getDashboardRequest = {
59
+ encode(_: getDashboardRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
60
+ return writer;
61
+ },
62
+
63
+ decode(input: _m0.Reader | Uint8Array, length?: number): getDashboardRequest {
64
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
65
+ let end = length === undefined ? reader.len : reader.pos + length;
66
+ const message = createBasegetDashboardRequest();
67
+ while (reader.pos < end) {
68
+ const tag = reader.uint32();
69
+ switch (tag >>> 3) {
70
+ }
71
+ if ((tag & 7) === 4 || tag === 0) {
72
+ break;
73
+ }
74
+ reader.skipType(tag & 7);
75
+ }
76
+ return message;
77
+ },
78
+
79
+ fromJSON(_: any): getDashboardRequest {
80
+ return {};
81
+ },
82
+
83
+ toJSON(_: getDashboardRequest): unknown {
84
+ const obj: any = {};
85
+ return obj;
86
+ },
87
+
88
+ create<I extends Exact<DeepPartial<getDashboardRequest>, I>>(base?: I): getDashboardRequest {
89
+ return getDashboardRequest.fromPartial(base ?? ({} as any));
90
+ },
91
+ fromPartial<I extends Exact<DeepPartial<getDashboardRequest>, I>>(_: I): getDashboardRequest {
92
+ const message = createBasegetDashboardRequest();
93
+ return message;
94
+ },
95
+ };
96
+
97
+ function createBasegetDashboardResponse(): getDashboardResponse {
98
+ return { user_state: "", father_name_dialog: false, current_step: "", blocks: [] };
99
+ }
100
+
101
+ export const getDashboardResponse = {
102
+ encode(message: getDashboardResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
103
+ if (message.user_state !== "") {
104
+ writer.uint32(10).string(message.user_state);
105
+ }
106
+ if (message.father_name_dialog !== false) {
107
+ writer.uint32(16).bool(message.father_name_dialog);
108
+ }
109
+ if (message.current_step !== "") {
110
+ writer.uint32(26).string(message.current_step);
111
+ }
112
+ for (const v of message.blocks) {
113
+ Block.encode(v!, writer.uint32(34).fork()).ldelim();
114
+ }
115
+ return writer;
116
+ },
117
+
118
+ decode(input: _m0.Reader | Uint8Array, length?: number): getDashboardResponse {
119
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
120
+ let end = length === undefined ? reader.len : reader.pos + length;
121
+ const message = createBasegetDashboardResponse();
122
+ while (reader.pos < end) {
123
+ const tag = reader.uint32();
124
+ switch (tag >>> 3) {
125
+ case 1:
126
+ if (tag !== 10) {
127
+ break;
128
+ }
129
+
130
+ message.user_state = reader.string();
131
+ continue;
132
+ case 2:
133
+ if (tag !== 16) {
134
+ break;
135
+ }
136
+
137
+ message.father_name_dialog = reader.bool();
138
+ continue;
139
+ case 3:
140
+ if (tag !== 26) {
141
+ break;
142
+ }
143
+
144
+ message.current_step = reader.string();
145
+ continue;
146
+ case 4:
147
+ if (tag !== 34) {
148
+ break;
149
+ }
150
+
151
+ message.blocks.push(Block.decode(reader, reader.uint32()));
152
+ continue;
153
+ }
154
+ if ((tag & 7) === 4 || tag === 0) {
155
+ break;
156
+ }
157
+ reader.skipType(tag & 7);
158
+ }
159
+ return message;
160
+ },
161
+
162
+ fromJSON(object: any): getDashboardResponse {
163
+ return {
164
+ user_state: isSet(object.user_state) ? globalThis.String(object.user_state) : "",
165
+ father_name_dialog: isSet(object.father_name_dialog) ? globalThis.Boolean(object.father_name_dialog) : false,
166
+ current_step: isSet(object.current_step) ? globalThis.String(object.current_step) : "",
167
+ blocks: globalThis.Array.isArray(object?.blocks) ? object.blocks.map((e: any) => Block.fromJSON(e)) : [],
168
+ };
169
+ },
170
+
171
+ toJSON(message: getDashboardResponse): unknown {
172
+ const obj: any = {};
173
+ if (message.user_state !== "") {
174
+ obj.user_state = message.user_state;
175
+ }
176
+ if (message.father_name_dialog !== false) {
177
+ obj.father_name_dialog = message.father_name_dialog;
178
+ }
179
+ if (message.current_step !== "") {
180
+ obj.current_step = message.current_step;
181
+ }
182
+ if (message.blocks?.length) {
183
+ obj.blocks = message.blocks.map((e) => Block.toJSON(e));
184
+ }
185
+ return obj;
186
+ },
187
+
188
+ create<I extends Exact<DeepPartial<getDashboardResponse>, I>>(base?: I): getDashboardResponse {
189
+ return getDashboardResponse.fromPartial(base ?? ({} as any));
190
+ },
191
+ fromPartial<I extends Exact<DeepPartial<getDashboardResponse>, I>>(object: I): getDashboardResponse {
192
+ const message = createBasegetDashboardResponse();
193
+ message.user_state = object.user_state ?? "";
194
+ message.father_name_dialog = object.father_name_dialog ?? false;
195
+ message.current_step = object.current_step ?? "";
196
+ message.blocks = object.blocks?.map((e) => Block.fromPartial(e)) || [];
197
+ return message;
198
+ },
199
+ };
200
+
201
+ function createBaseBlock(): Block {
202
+ return { block_name: "", block_title: "", block_code: "", block_data: [] };
203
+ }
204
+
205
+ export const Block = {
206
+ encode(message: Block, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
207
+ if (message.block_name !== "") {
208
+ writer.uint32(10).string(message.block_name);
209
+ }
210
+ if (message.block_title !== "") {
211
+ writer.uint32(18).string(message.block_title);
212
+ }
213
+ if (message.block_code !== "") {
214
+ writer.uint32(26).string(message.block_code);
215
+ }
216
+ for (const v of message.block_data) {
217
+ BlockData.encode(v!, writer.uint32(34).fork()).ldelim();
218
+ }
219
+ return writer;
220
+ },
221
+
222
+ decode(input: _m0.Reader | Uint8Array, length?: number): Block {
223
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
224
+ let end = length === undefined ? reader.len : reader.pos + length;
225
+ const message = createBaseBlock();
226
+ while (reader.pos < end) {
227
+ const tag = reader.uint32();
228
+ switch (tag >>> 3) {
229
+ case 1:
230
+ if (tag !== 10) {
231
+ break;
232
+ }
233
+
234
+ message.block_name = reader.string();
235
+ continue;
236
+ case 2:
237
+ if (tag !== 18) {
238
+ break;
239
+ }
240
+
241
+ message.block_title = reader.string();
242
+ continue;
243
+ case 3:
244
+ if (tag !== 26) {
245
+ break;
246
+ }
247
+
248
+ message.block_code = reader.string();
249
+ continue;
250
+ case 4:
251
+ if (tag !== 34) {
252
+ break;
253
+ }
254
+
255
+ message.block_data.push(BlockData.decode(reader, reader.uint32()));
256
+ continue;
257
+ }
258
+ if ((tag & 7) === 4 || tag === 0) {
259
+ break;
260
+ }
261
+ reader.skipType(tag & 7);
262
+ }
263
+ return message;
264
+ },
265
+
266
+ fromJSON(object: any): Block {
267
+ return {
268
+ block_name: isSet(object.block_name) ? globalThis.String(object.block_name) : "",
269
+ block_title: isSet(object.block_title) ? globalThis.String(object.block_title) : "",
270
+ block_code: isSet(object.block_code) ? globalThis.String(object.block_code) : "",
271
+ block_data: globalThis.Array.isArray(object?.block_data)
272
+ ? object.block_data.map((e: any) => BlockData.fromJSON(e))
273
+ : [],
274
+ };
275
+ },
276
+
277
+ toJSON(message: Block): unknown {
278
+ const obj: any = {};
279
+ if (message.block_name !== "") {
280
+ obj.block_name = message.block_name;
281
+ }
282
+ if (message.block_title !== "") {
283
+ obj.block_title = message.block_title;
284
+ }
285
+ if (message.block_code !== "") {
286
+ obj.block_code = message.block_code;
287
+ }
288
+ if (message.block_data?.length) {
289
+ obj.block_data = message.block_data.map((e) => BlockData.toJSON(e));
290
+ }
291
+ return obj;
292
+ },
293
+
294
+ create<I extends Exact<DeepPartial<Block>, I>>(base?: I): Block {
295
+ return Block.fromPartial(base ?? ({} as any));
296
+ },
297
+ fromPartial<I extends Exact<DeepPartial<Block>, I>>(object: I): Block {
298
+ const message = createBaseBlock();
299
+ message.block_name = object.block_name ?? "";
300
+ message.block_title = object.block_title ?? "";
301
+ message.block_code = object.block_code ?? "";
302
+ message.block_data = object.block_data?.map((e) => BlockData.fromPartial(e)) || [];
303
+ return message;
304
+ },
305
+ };
306
+
307
+ function createBaseBlockData(): BlockData {
308
+ return {
309
+ text: "",
310
+ image_url: "",
311
+ video_url: "",
312
+ video_length: 0,
313
+ action_url: "",
314
+ landing_page: "",
315
+ api_mode: "",
316
+ app_version: "",
317
+ old_customers: false,
318
+ is_new: false,
319
+ action_type: "",
320
+ color1: "",
321
+ color2: "",
322
+ image_trailing: "",
323
+ tag: undefined,
324
+ overlay_image: "",
325
+ };
326
+ }
327
+
328
+ export const BlockData = {
329
+ encode(message: BlockData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
330
+ if (message.text !== "") {
331
+ writer.uint32(10).string(message.text);
332
+ }
333
+ if (message.image_url !== "") {
334
+ writer.uint32(18).string(message.image_url);
335
+ }
336
+ if (message.video_url !== "") {
337
+ writer.uint32(26).string(message.video_url);
338
+ }
339
+ if (message.video_length !== 0) {
340
+ writer.uint32(32).int32(message.video_length);
341
+ }
342
+ if (message.action_url !== "") {
343
+ writer.uint32(42).string(message.action_url);
344
+ }
345
+ if (message.landing_page !== "") {
346
+ writer.uint32(50).string(message.landing_page);
347
+ }
348
+ if (message.api_mode !== "") {
349
+ writer.uint32(58).string(message.api_mode);
350
+ }
351
+ if (message.app_version !== "") {
352
+ writer.uint32(66).string(message.app_version);
353
+ }
354
+ if (message.old_customers !== false) {
355
+ writer.uint32(72).bool(message.old_customers);
356
+ }
357
+ if (message.is_new !== false) {
358
+ writer.uint32(80).bool(message.is_new);
359
+ }
360
+ if (message.action_type !== "") {
361
+ writer.uint32(90).string(message.action_type);
362
+ }
363
+ if (message.color1 !== "") {
364
+ writer.uint32(98).string(message.color1);
365
+ }
366
+ if (message.color2 !== "") {
367
+ writer.uint32(106).string(message.color2);
368
+ }
369
+ if (message.image_trailing !== "") {
370
+ writer.uint32(114).string(message.image_trailing);
371
+ }
372
+ if (message.tag !== undefined) {
373
+ Tag.encode(message.tag, writer.uint32(122).fork()).ldelim();
374
+ }
375
+ if (message.overlay_image !== "") {
376
+ writer.uint32(130).string(message.overlay_image);
377
+ }
378
+ return writer;
379
+ },
380
+
381
+ decode(input: _m0.Reader | Uint8Array, length?: number): BlockData {
382
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
383
+ let end = length === undefined ? reader.len : reader.pos + length;
384
+ const message = createBaseBlockData();
385
+ while (reader.pos < end) {
386
+ const tag = reader.uint32();
387
+ switch (tag >>> 3) {
388
+ case 1:
389
+ if (tag !== 10) {
390
+ break;
391
+ }
392
+
393
+ message.text = reader.string();
394
+ continue;
395
+ case 2:
396
+ if (tag !== 18) {
397
+ break;
398
+ }
399
+
400
+ message.image_url = reader.string();
401
+ continue;
402
+ case 3:
403
+ if (tag !== 26) {
404
+ break;
405
+ }
406
+
407
+ message.video_url = reader.string();
408
+ continue;
409
+ case 4:
410
+ if (tag !== 32) {
411
+ break;
412
+ }
413
+
414
+ message.video_length = reader.int32();
415
+ continue;
416
+ case 5:
417
+ if (tag !== 42) {
418
+ break;
419
+ }
420
+
421
+ message.action_url = reader.string();
422
+ continue;
423
+ case 6:
424
+ if (tag !== 50) {
425
+ break;
426
+ }
427
+
428
+ message.landing_page = reader.string();
429
+ continue;
430
+ case 7:
431
+ if (tag !== 58) {
432
+ break;
433
+ }
434
+
435
+ message.api_mode = reader.string();
436
+ continue;
437
+ case 8:
438
+ if (tag !== 66) {
439
+ break;
440
+ }
441
+
442
+ message.app_version = reader.string();
443
+ continue;
444
+ case 9:
445
+ if (tag !== 72) {
446
+ break;
447
+ }
448
+
449
+ message.old_customers = reader.bool();
450
+ continue;
451
+ case 10:
452
+ if (tag !== 80) {
453
+ break;
454
+ }
455
+
456
+ message.is_new = reader.bool();
457
+ continue;
458
+ case 11:
459
+ if (tag !== 90) {
460
+ break;
461
+ }
462
+
463
+ message.action_type = reader.string();
464
+ continue;
465
+ case 12:
466
+ if (tag !== 98) {
467
+ break;
468
+ }
469
+
470
+ message.color1 = reader.string();
471
+ continue;
472
+ case 13:
473
+ if (tag !== 106) {
474
+ break;
475
+ }
476
+
477
+ message.color2 = reader.string();
478
+ continue;
479
+ case 14:
480
+ if (tag !== 114) {
481
+ break;
482
+ }
483
+
484
+ message.image_trailing = reader.string();
485
+ continue;
486
+ case 15:
487
+ if (tag !== 122) {
488
+ break;
489
+ }
490
+
491
+ message.tag = Tag.decode(reader, reader.uint32());
492
+ continue;
493
+ case 16:
494
+ if (tag !== 130) {
495
+ break;
496
+ }
497
+
498
+ message.overlay_image = reader.string();
499
+ continue;
500
+ }
501
+ if ((tag & 7) === 4 || tag === 0) {
502
+ break;
503
+ }
504
+ reader.skipType(tag & 7);
505
+ }
506
+ return message;
507
+ },
508
+
509
+ fromJSON(object: any): BlockData {
510
+ return {
511
+ text: isSet(object.text) ? globalThis.String(object.text) : "",
512
+ image_url: isSet(object.image_url) ? globalThis.String(object.image_url) : "",
513
+ video_url: isSet(object.video_url) ? globalThis.String(object.video_url) : "",
514
+ video_length: isSet(object.video_length) ? globalThis.Number(object.video_length) : 0,
515
+ action_url: isSet(object.action_url) ? globalThis.String(object.action_url) : "",
516
+ landing_page: isSet(object.landing_page) ? globalThis.String(object.landing_page) : "",
517
+ api_mode: isSet(object.api_mode) ? globalThis.String(object.api_mode) : "",
518
+ app_version: isSet(object.app_version) ? globalThis.String(object.app_version) : "",
519
+ old_customers: isSet(object.old_customers) ? globalThis.Boolean(object.old_customers) : false,
520
+ is_new: isSet(object.is_new) ? globalThis.Boolean(object.is_new) : false,
521
+ action_type: isSet(object.action_type) ? globalThis.String(object.action_type) : "",
522
+ color1: isSet(object.color1) ? globalThis.String(object.color1) : "",
523
+ color2: isSet(object.color2) ? globalThis.String(object.color2) : "",
524
+ image_trailing: isSet(object.image_trailing) ? globalThis.String(object.image_trailing) : "",
525
+ tag: isSet(object.tag) ? Tag.fromJSON(object.tag) : undefined,
526
+ overlay_image: isSet(object.overlay_image) ? globalThis.String(object.overlay_image) : "",
527
+ };
528
+ },
529
+
530
+ toJSON(message: BlockData): unknown {
531
+ const obj: any = {};
532
+ if (message.text !== "") {
533
+ obj.text = message.text;
534
+ }
535
+ if (message.image_url !== "") {
536
+ obj.image_url = message.image_url;
537
+ }
538
+ if (message.video_url !== "") {
539
+ obj.video_url = message.video_url;
540
+ }
541
+ if (message.video_length !== 0) {
542
+ obj.video_length = Math.round(message.video_length);
543
+ }
544
+ if (message.action_url !== "") {
545
+ obj.action_url = message.action_url;
546
+ }
547
+ if (message.landing_page !== "") {
548
+ obj.landing_page = message.landing_page;
549
+ }
550
+ if (message.api_mode !== "") {
551
+ obj.api_mode = message.api_mode;
552
+ }
553
+ if (message.app_version !== "") {
554
+ obj.app_version = message.app_version;
555
+ }
556
+ if (message.old_customers !== false) {
557
+ obj.old_customers = message.old_customers;
558
+ }
559
+ if (message.is_new !== false) {
560
+ obj.is_new = message.is_new;
561
+ }
562
+ if (message.action_type !== "") {
563
+ obj.action_type = message.action_type;
564
+ }
565
+ if (message.color1 !== "") {
566
+ obj.color1 = message.color1;
567
+ }
568
+ if (message.color2 !== "") {
569
+ obj.color2 = message.color2;
570
+ }
571
+ if (message.image_trailing !== "") {
572
+ obj.image_trailing = message.image_trailing;
573
+ }
574
+ if (message.tag !== undefined) {
575
+ obj.tag = Tag.toJSON(message.tag);
576
+ }
577
+ if (message.overlay_image !== "") {
578
+ obj.overlay_image = message.overlay_image;
579
+ }
580
+ return obj;
581
+ },
582
+
583
+ create<I extends Exact<DeepPartial<BlockData>, I>>(base?: I): BlockData {
584
+ return BlockData.fromPartial(base ?? ({} as any));
585
+ },
586
+ fromPartial<I extends Exact<DeepPartial<BlockData>, I>>(object: I): BlockData {
587
+ const message = createBaseBlockData();
588
+ message.text = object.text ?? "";
589
+ message.image_url = object.image_url ?? "";
590
+ message.video_url = object.video_url ?? "";
591
+ message.video_length = object.video_length ?? 0;
592
+ message.action_url = object.action_url ?? "";
593
+ message.landing_page = object.landing_page ?? "";
594
+ message.api_mode = object.api_mode ?? "";
595
+ message.app_version = object.app_version ?? "";
596
+ message.old_customers = object.old_customers ?? false;
597
+ message.is_new = object.is_new ?? false;
598
+ message.action_type = object.action_type ?? "";
599
+ message.color1 = object.color1 ?? "";
600
+ message.color2 = object.color2 ?? "";
601
+ message.image_trailing = object.image_trailing ?? "";
602
+ message.tag = (object.tag !== undefined && object.tag !== null) ? Tag.fromPartial(object.tag) : undefined;
603
+ message.overlay_image = object.overlay_image ?? "";
604
+ return message;
605
+ },
606
+ };
607
+
608
+ function createBaseTag(): Tag {
609
+ return { text: "", bg_color: "", text_color: "" };
610
+ }
611
+
612
+ export const Tag = {
613
+ encode(message: Tag, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
614
+ if (message.text !== "") {
615
+ writer.uint32(10).string(message.text);
616
+ }
617
+ if (message.bg_color !== "") {
618
+ writer.uint32(18).string(message.bg_color);
619
+ }
620
+ if (message.text_color !== "") {
621
+ writer.uint32(26).string(message.text_color);
622
+ }
623
+ return writer;
624
+ },
625
+
626
+ decode(input: _m0.Reader | Uint8Array, length?: number): Tag {
627
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
628
+ let end = length === undefined ? reader.len : reader.pos + length;
629
+ const message = createBaseTag();
630
+ while (reader.pos < end) {
631
+ const tag = reader.uint32();
632
+ switch (tag >>> 3) {
633
+ case 1:
634
+ if (tag !== 10) {
635
+ break;
636
+ }
637
+
638
+ message.text = reader.string();
639
+ continue;
640
+ case 2:
641
+ if (tag !== 18) {
642
+ break;
643
+ }
644
+
645
+ message.bg_color = reader.string();
646
+ continue;
647
+ case 3:
648
+ if (tag !== 26) {
649
+ break;
650
+ }
651
+
652
+ message.text_color = reader.string();
653
+ continue;
654
+ }
655
+ if ((tag & 7) === 4 || tag === 0) {
656
+ break;
657
+ }
658
+ reader.skipType(tag & 7);
659
+ }
660
+ return message;
661
+ },
662
+
663
+ fromJSON(object: any): Tag {
664
+ return {
665
+ text: isSet(object.text) ? globalThis.String(object.text) : "",
666
+ bg_color: isSet(object.bg_color) ? globalThis.String(object.bg_color) : "",
667
+ text_color: isSet(object.text_color) ? globalThis.String(object.text_color) : "",
668
+ };
669
+ },
670
+
671
+ toJSON(message: Tag): unknown {
672
+ const obj: any = {};
673
+ if (message.text !== "") {
674
+ obj.text = message.text;
675
+ }
676
+ if (message.bg_color !== "") {
677
+ obj.bg_color = message.bg_color;
678
+ }
679
+ if (message.text_color !== "") {
680
+ obj.text_color = message.text_color;
681
+ }
682
+ return obj;
683
+ },
684
+
685
+ create<I extends Exact<DeepPartial<Tag>, I>>(base?: I): Tag {
686
+ return Tag.fromPartial(base ?? ({} as any));
687
+ },
688
+ fromPartial<I extends Exact<DeepPartial<Tag>, I>>(object: I): Tag {
689
+ const message = createBaseTag();
690
+ message.text = object.text ?? "";
691
+ message.bg_color = object.bg_color ?? "";
692
+ message.text_color = object.text_color ?? "";
693
+ return message;
694
+ },
695
+ };
696
+
697
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
698
+
699
+ export type DeepPartial<T> = T extends Builtin ? T
700
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
701
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
702
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
703
+ : Partial<T>;
704
+
705
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
706
+ export type Exact<P, I extends P> = P extends Builtin ? P
707
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
708
+
709
+ function isSet(value: any): boolean {
710
+ return value !== null && value !== undefined;
711
+ }