@stashfin/grpc 1.2.54 → 1.2.59

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 (216) hide show
  1. package/package.json +3 -3
  2. package/ts/customers/addaddress.d.ts +50 -0
  3. package/ts/customers/addaddress.js +265 -0
  4. package/ts/customers/addbankaccountdetails.d.ts +37 -0
  5. package/ts/customers/addbankaccountdetails.js +147 -0
  6. package/ts/customers/createcustomerreference.d.ts +43 -0
  7. package/ts/customers/createcustomerreference.js +226 -0
  8. package/ts/customers/forgotmpin.d.ts +36 -0
  9. package/ts/customers/forgotmpin.js +133 -0
  10. package/ts/customers/forgotmpinotp.d.ts +34 -0
  11. package/ts/customers/forgotmpinotp.js +104 -0
  12. package/ts/customers/getbankaccountdetails.d.ts +36 -0
  13. package/ts/customers/getbankaccountdetails.js +134 -0
  14. package/ts/customers/getbasicinfo.d.ts +56 -0
  15. package/ts/customers/getbasicinfo.js +323 -0
  16. package/ts/customers/getcities.d.ts +47 -0
  17. package/ts/customers/getcities.js +183 -0
  18. package/ts/customers/getcustomerbyid.d.ts +55 -0
  19. package/ts/customers/getcustomerbyid.js +421 -0
  20. package/ts/customers/getdashboard.d.ts +91 -0
  21. package/ts/customers/getdashboard.js +618 -0
  22. package/ts/customers/getdashboardmaincard.d.ts +69 -0
  23. package/ts/customers/getdashboardmaincard.js +520 -0
  24. package/ts/customers/getkycweburl.d.ts +34 -0
  25. package/ts/customers/getkycweburl.js +104 -0
  26. package/ts/customers/getprofessionalinfo.d.ts +54 -0
  27. package/ts/customers/getprofessionalinfo.js +286 -0
  28. package/ts/customers/getprofile.d.ts +53 -0
  29. package/ts/customers/getprofile.js +282 -0
  30. package/ts/customers/getstates.d.ts +46 -0
  31. package/ts/customers/getstates.js +170 -0
  32. package/ts/customers/getstep.d.ts +69 -0
  33. package/ts/customers/getstep.js +406 -0
  34. package/ts/customers/profilebasic.d.ts +38 -0
  35. package/ts/customers/profilebasic.js +161 -0
  36. package/ts/customers/profileupdatetnc.d.ts +35 -0
  37. package/ts/customers/profileupdatetnc.js +117 -0
  38. package/ts/customers/resetmpin.d.ts +36 -0
  39. package/ts/customers/resetmpin.js +133 -0
  40. package/ts/customers/savebasicdetails.d.ts +47 -0
  41. package/ts/customers/savebasicdetails.js +185 -0
  42. package/ts/customers/saveunlocklimit.d.ts +34 -0
  43. package/ts/customers/saveunlocklimit.js +104 -0
  44. package/ts/customers/sendemailtoken.d.ts +35 -0
  45. package/ts/customers/sendemailtoken.js +117 -0
  46. package/ts/customers/sendotp.d.ts +38 -0
  47. package/ts/customers/sendotp.js +165 -0
  48. package/ts/customers/setmpin.d.ts +36 -0
  49. package/ts/customers/setmpin.js +133 -0
  50. package/ts/customers/step1.d.ts +71 -0
  51. package/ts/customers/step1.js +423 -0
  52. package/ts/customers/step10.d.ts +73 -0
  53. package/ts/customers/step10.js +459 -0
  54. package/ts/customers/step2.d.ts +67 -0
  55. package/ts/customers/step2.js +366 -0
  56. package/ts/customers/step7.d.ts +68 -0
  57. package/ts/customers/step7.js +381 -0
  58. package/ts/customers/step8.d.ts +69 -0
  59. package/ts/customers/step8.js +395 -0
  60. package/ts/customers/step9.d.ts +75 -0
  61. package/ts/customers/step9.js +489 -0
  62. package/ts/customers/stepstatic.d.ts +66 -0
  63. package/ts/customers/stepstatic.js +354 -0
  64. package/ts/customers/updatedigilockertxn.d.ts +37 -0
  65. package/ts/customers/updatedigilockertxn.js +147 -0
  66. package/ts/customers/updatedob.d.ts +35 -0
  67. package/ts/customers/updatedob.js +117 -0
  68. package/ts/customers/updatehypervergetxn.d.ts +36 -0
  69. package/ts/customers/updatehypervergetxn.js +133 -0
  70. package/ts/customers/validatepan.d.ts +45 -0
  71. package/ts/customers/validatepan.js +274 -0
  72. package/ts/customers/verifyemail.d.ts +35 -0
  73. package/ts/customers/verifyemail.js +117 -0
  74. package/ts/customers/verifympin.d.ts +37 -0
  75. package/ts/customers/verifympin.js +149 -0
  76. package/ts/customers/verifyotp.d.ts +41 -0
  77. package/ts/customers/verifyotp.js +205 -0
  78. package/ts/customers.d.ts +596 -0
  79. package/ts/customers.js +428 -0
  80. package/ts/example.d.ts +78 -0
  81. package/ts/example.js +199 -0
  82. package/{src/ts/google/protobuf/timestamp.ts → ts/google/protobuf/timestamp.d.ts} +30 -126
  83. package/ts/google/protobuf/timestamp.js +97 -0
  84. package/ts/loans/approveloan.d.ts +39 -0
  85. package/ts/loans/approveloan.js +175 -0
  86. package/ts/loans/banklist.d.ts +37 -0
  87. package/ts/loans/banklist.js +148 -0
  88. package/ts/loans/calculateemi.d.ts +51 -0
  89. package/ts/loans/calculateemi.js +243 -0
  90. package/ts/loans/creditlimit.d.ts +43 -0
  91. package/ts/loans/creditlimit.js +247 -0
  92. package/ts/loans/restructureloan.d.ts +36 -0
  93. package/ts/loans/restructureloan.js +133 -0
  94. package/ts/loans/transactionlist.d.ts +50 -0
  95. package/ts/loans/transactionlist.js +229 -0
  96. package/ts/loans/updateinstallments.d.ts +42 -0
  97. package/ts/loans/updateinstallments.js +226 -0
  98. package/ts/loans/updateloan.d.ts +39 -0
  99. package/ts/loans/updateloan.js +175 -0
  100. package/ts/loans.d.ts +126 -0
  101. package/ts/loans.js +94 -0
  102. package/ts/stashcash/creditsc.d.ts +54 -0
  103. package/ts/stashcash/creditsc.js +301 -0
  104. package/ts/stashcash/debitsc.d.ts +59 -0
  105. package/ts/stashcash/debitsc.js +380 -0
  106. package/ts/stashcash/getscbalance.d.ts +53 -0
  107. package/ts/stashcash/getscbalance.js +293 -0
  108. package/ts/stashcash/getschistory.d.ts +73 -0
  109. package/ts/stashcash/getschistory.js +479 -0
  110. package/ts/stashcash/reversesc.d.ts +52 -0
  111. package/ts/stashcash/reversesc.js +273 -0
  112. package/ts/stashcash.d.ts +84 -0
  113. package/ts/stashcash.js +64 -0
  114. package/README.md +0 -74
  115. package/src/proto/customers/addaddress.proto +0 -25
  116. package/src/proto/customers/addbankaccountdetails.proto +0 -13
  117. package/src/proto/customers/createcustomerreference.proto +0 -21
  118. package/src/proto/customers/forgotmpin.proto +0 -12
  119. package/src/proto/customers/forgotmpinotp.proto +0 -10
  120. package/src/proto/customers/getbankaccountdetails.proto +0 -11
  121. package/src/proto/customers/getbasicinfo.proto +0 -24
  122. package/src/proto/customers/getcities.proto +0 -16
  123. package/src/proto/customers/getcustomerbyid.proto +0 -31
  124. package/src/proto/customers/getdashboard.proto +0 -47
  125. package/src/proto/customers/getdashboardmaincard.proto +0 -37
  126. package/src/proto/customers/getkycweburl.proto +0 -10
  127. package/src/proto/customers/getprofessionalinfo.proto +0 -22
  128. package/src/proto/customers/getprofile.proto +0 -22
  129. package/src/proto/customers/getstates.proto +0 -15
  130. package/src/proto/customers/getstep.proto +0 -30
  131. package/src/proto/customers/profilebasic.proto +0 -14
  132. package/src/proto/customers/profileupdatetnc.proto +0 -11
  133. package/src/proto/customers/resetmpin.proto +0 -13
  134. package/src/proto/customers/savebasicdetails.proto +0 -16
  135. package/src/proto/customers/saveunlocklimit.proto +0 -10
  136. package/src/proto/customers/sendemailtoken.proto +0 -11
  137. package/src/proto/customers/sendotp.proto +0 -14
  138. package/src/proto/customers/setmpin.proto +0 -12
  139. package/src/proto/customers/step10.proto +0 -34
  140. package/src/proto/customers/step7.proto +0 -29
  141. package/src/proto/customers/step8.proto +0 -30
  142. package/src/proto/customers/step9.proto +0 -36
  143. package/src/proto/customers/stepstatic.proto +0 -27
  144. package/src/proto/customers/updatedigilockertxn.proto +0 -13
  145. package/src/proto/customers/updatedob.proto +0 -13
  146. package/src/proto/customers/updatehypervergetxn.proto +0 -12
  147. package/src/proto/customers/verifyemail.proto +0 -11
  148. package/src/proto/customers/verifympin.proto +0 -13
  149. package/src/proto/customers/verifyotp.proto +0 -17
  150. package/src/proto/customers.proto +0 -83
  151. package/src/proto/example.proto +0 -20
  152. package/src/proto/loans/approveloan.proto +0 -15
  153. package/src/proto/loans/banklist.proto +0 -12
  154. package/src/proto/loans/calculateemi.proto +0 -20
  155. package/src/proto/loans/creditlimit.proto +0 -18
  156. package/src/proto/loans/restructureloan.proto +0 -12
  157. package/src/proto/loans/transactionlist.proto +0 -18
  158. package/src/proto/loans/updateinstallments.proto +0 -19
  159. package/src/proto/loans/updateloan.proto +0 -15
  160. package/src/proto/loans.proto +0 -23
  161. package/src/proto/stashcash/creditsc.proto +0 -22
  162. package/src/proto/stashcash/debitsc.proto +0 -27
  163. package/src/proto/stashcash/getscbalance.proto +0 -21
  164. package/src/proto/stashcash/getschistory.proto +0 -35
  165. package/src/proto/stashcash/reversesc.proto +0 -20
  166. package/src/proto/stashcash.proto +0 -17
  167. package/src/ts/customers/addaddress.ts +0 -310
  168. package/src/ts/customers/addbankaccountdetails.ts +0 -184
  169. package/src/ts/customers/createcustomerreference.ts +0 -276
  170. package/src/ts/customers/getbankaccountdetails.ts +0 -169
  171. package/src/ts/customers/getbasicinfo.ts +0 -385
  172. package/src/ts/customers/getcities.ts +0 -227
  173. package/src/ts/customers/getcustomerbyid.ts +0 -492
  174. package/src/ts/customers/getdashboard.ts +0 -728
  175. package/src/ts/customers/getdashboardmaincard.ts +0 -608
  176. package/src/ts/customers/getkycweburl.ts +0 -133
  177. package/src/ts/customers/getprofessionalinfo.ts +0 -344
  178. package/src/ts/customers/getprofile.ts +0 -338
  179. package/src/ts/customers/getstates.ts +0 -212
  180. package/src/ts/customers/getstep.ts +0 -483
  181. package/src/ts/customers/profilebasic.ts +0 -198
  182. package/src/ts/customers/profileupdatetnc.ts +0 -148
  183. package/src/ts/customers/resetmpin.ts +0 -166
  184. package/src/ts/customers/savebasicdetails.ts +0 -229
  185. package/src/ts/customers/saveunlocklimit.ts +0 -133
  186. package/src/ts/customers/sendemailtoken.ts +0 -148
  187. package/src/ts/customers/sendotp.ts +0 -202
  188. package/src/ts/customers/setmpin.ts +0 -166
  189. package/src/ts/customers/step10.ts +0 -544
  190. package/src/ts/customers/step7.ts +0 -456
  191. package/src/ts/customers/step8.ts +0 -472
  192. package/src/ts/customers/step9.ts +0 -578
  193. package/src/ts/customers/stepstatic.ts +0 -425
  194. package/src/ts/customers/updatedigilockertxn.ts +0 -182
  195. package/src/ts/customers/updatehypervergetxn.ts +0 -166
  196. package/src/ts/customers/verifyemail.ts +0 -148
  197. package/src/ts/customers/verifympin.ts +0 -184
  198. package/src/ts/customers/verifyotp.ts +0 -232
  199. package/src/ts/customers.ts +0 -1038
  200. package/src/ts/example.ts +0 -294
  201. package/src/ts/loans/approveloan.ts +0 -214
  202. package/src/ts/loans/banklist.ts +0 -183
  203. package/src/ts/loans/calculateemi.ts +0 -295
  204. package/src/ts/loans/creditlimit.ts +0 -294
  205. package/src/ts/loans/restructureloan.ts +0 -166
  206. package/src/ts/loans/transactionlist.ts +0 -281
  207. package/src/ts/loans/updateinstallments.ts +0 -271
  208. package/src/ts/loans/updateloan.ts +0 -214
  209. package/src/ts/loans.ts +0 -221
  210. package/src/ts/stashcash/creditsc.ts +0 -361
  211. package/src/ts/stashcash/debitsc.ts +0 -450
  212. package/src/ts/stashcash/getscbalance.ts +0 -351
  213. package/src/ts/stashcash/getschistory.ts +0 -566
  214. package/src/ts/stashcash/reversesc.ts +0 -329
  215. package/src/ts/stashcash.ts +0 -152
  216. package/tsconfig.json +0 -18
@@ -1,728 +0,0 @@
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
- }