@stashfin/grpc 1.2.51 → 1.2.54

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