@remnawave/backend-contract 2.3.42 → 2.3.44

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 (89) hide show
  1. package/build/backend/api/controllers/index.d.ts +1 -0
  2. package/build/backend/api/controllers/index.d.ts.map +1 -1
  3. package/build/backend/api/controllers/index.js +1 -0
  4. package/build/backend/api/controllers/subscription-page-configs.d.ts +12 -0
  5. package/build/backend/api/controllers/subscription-page-configs.d.ts.map +1 -0
  6. package/build/backend/api/controllers/subscription-page-configs.js +15 -0
  7. package/build/backend/api/controllers-info.d.ts +4 -0
  8. package/build/backend/api/controllers-info.d.ts.map +1 -1
  9. package/build/backend/api/controllers-info.js +4 -0
  10. package/build/backend/api/routes.d.ts +10 -0
  11. package/build/backend/api/routes.d.ts.map +1 -1
  12. package/build/backend/api/routes.js +10 -0
  13. package/build/backend/commands/index.d.ts +1 -0
  14. package/build/backend/commands/index.d.ts.map +1 -1
  15. package/build/backend/commands/index.js +1 -0
  16. package/build/backend/commands/subscription-page-configs/actions/index.d.ts +2 -0
  17. package/build/backend/commands/subscription-page-configs/actions/index.d.ts.map +1 -0
  18. package/build/backend/commands/subscription-page-configs/actions/index.js +17 -0
  19. package/build/backend/commands/subscription-page-configs/actions/reorder.command.d.ts +90 -0
  20. package/build/backend/commands/subscription-page-configs/actions/reorder.command.d.ts.map +1 -0
  21. package/build/backend/commands/subscription-page-configs/actions/reorder.command.js +25 -0
  22. package/build/backend/commands/subscription-page-configs/create-subpage-config.command.d.ts +48 -0
  23. package/build/backend/commands/subscription-page-configs/create-subpage-config.command.d.ts.map +1 -0
  24. package/build/backend/commands/subscription-page-configs/create-subpage-config.command.js +23 -0
  25. package/build/backend/commands/subscription-page-configs/delete-subpage-config.command.d.ts +33 -0
  26. package/build/backend/commands/subscription-page-configs/delete-subpage-config.command.d.ts.map +1 -0
  27. package/build/backend/commands/subscription-page-configs/delete-subpage-config.command.js +20 -0
  28. package/build/backend/commands/subscription-page-configs/get-subpage-config.command.d.ts +48 -0
  29. package/build/backend/commands/subscription-page-configs/get-subpage-config.command.d.ts.map +1 -0
  30. package/build/backend/commands/subscription-page-configs/get-subpage-config.command.js +19 -0
  31. package/build/backend/commands/subscription-page-configs/get-subpage-configs.command.d.ts +65 -0
  32. package/build/backend/commands/subscription-page-configs/get-subpage-configs.command.d.ts.map +1 -0
  33. package/build/backend/commands/subscription-page-configs/get-subpage-configs.command.js +19 -0
  34. package/build/backend/commands/subscription-page-configs/index.d.ts +7 -0
  35. package/build/backend/commands/subscription-page-configs/index.d.ts.map +1 -0
  36. package/build/backend/commands/subscription-page-configs/index.js +22 -0
  37. package/build/backend/commands/subscription-page-configs/update-subpage-config.command.d.ts +54 -0
  38. package/build/backend/commands/subscription-page-configs/update-subpage-config.command.d.ts.map +1 -0
  39. package/build/backend/commands/subscription-page-configs/update-subpage-config.command.js +26 -0
  40. package/build/backend/constants/errors/errors.d.ts +45 -0
  41. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  42. package/build/backend/constants/errors/errors.js +45 -0
  43. package/build/backend/constants/index.d.ts +1 -0
  44. package/build/backend/constants/index.d.ts.map +1 -1
  45. package/build/backend/constants/index.js +1 -0
  46. package/build/backend/constants/subscription-page-config/index.d.ts +2 -0
  47. package/build/backend/constants/subscription-page-config/index.d.ts.map +1 -0
  48. package/build/backend/constants/subscription-page-config/index.js +17 -0
  49. package/build/backend/constants/subscription-page-config/subscription-page-config.contants.d.ts +15 -0
  50. package/build/backend/constants/subscription-page-config/subscription-page-config.contants.d.ts.map +1 -0
  51. package/build/backend/constants/subscription-page-config/subscription-page-config.contants.js +16 -0
  52. package/build/backend/models/index.d.ts +2 -0
  53. package/build/backend/models/index.d.ts.map +1 -1
  54. package/build/backend/models/index.js +2 -0
  55. package/build/backend/models/subscripion-page-config.schema.d.ts +18 -0
  56. package/build/backend/models/subscripion-page-config.schema.d.ts.map +1 -0
  57. package/build/backend/models/subscripion-page-config.schema.js +13 -0
  58. package/build/backend/models/subscription-page-config/index.d.ts +2 -0
  59. package/build/backend/models/subscription-page-config/index.d.ts.map +1 -0
  60. package/build/backend/models/subscription-page-config/index.js +17 -0
  61. package/build/backend/models/subscription-page-config/subscription-page-config.schema.d.ts +644 -0
  62. package/build/backend/models/subscription-page-config/subscription-page-config.schema.d.ts.map +1 -0
  63. package/build/backend/models/subscription-page-config/subscription-page-config.schema.js +57 -0
  64. package/build/backend/models/subscription-page-config/subscription-page-config.validator.d.ts +4 -0
  65. package/build/backend/models/subscription-page-config/subscription-page-config.validator.d.ts.map +1 -0
  66. package/build/backend/models/subscription-page-config/subscription-page-config.validator.js +32 -0
  67. package/build/frontend/api/controllers/index.js +1 -0
  68. package/build/frontend/api/controllers/subscription-page-configs.js +15 -0
  69. package/build/frontend/api/controllers-info.js +4 -0
  70. package/build/frontend/api/routes.js +10 -0
  71. package/build/frontend/commands/index.js +1 -0
  72. package/build/frontend/commands/subscription-page-configs/actions/index.js +17 -0
  73. package/build/frontend/commands/subscription-page-configs/actions/reorder.command.js +25 -0
  74. package/build/frontend/commands/subscription-page-configs/create-subpage-config.command.js +23 -0
  75. package/build/frontend/commands/subscription-page-configs/delete-subpage-config.command.js +20 -0
  76. package/build/frontend/commands/subscription-page-configs/get-subpage-config.command.js +19 -0
  77. package/build/frontend/commands/subscription-page-configs/get-subpage-configs.command.js +19 -0
  78. package/build/frontend/commands/subscription-page-configs/index.js +22 -0
  79. package/build/frontend/commands/subscription-page-configs/update-subpage-config.command.js +26 -0
  80. package/build/frontend/constants/errors/errors.js +45 -0
  81. package/build/frontend/constants/index.js +1 -0
  82. package/build/frontend/constants/subscription-page-config/index.js +17 -0
  83. package/build/frontend/constants/subscription-page-config/subscription-page-config.contants.js +16 -0
  84. package/build/frontend/models/index.js +2 -0
  85. package/build/frontend/models/subscripion-page-config.schema.js +13 -0
  86. package/build/frontend/models/subscription-page-config/index.js +17 -0
  87. package/build/frontend/models/subscription-page-config/subscription-page-config.schema.js +57 -0
  88. package/build/frontend/models/subscription-page-config/subscription-page-config.validator.js +32 -0
  89. package/package.json +1 -1
@@ -0,0 +1,644 @@
1
+ import { z } from 'zod';
2
+ export declare const LocalizedTextSchema: z.ZodObject<{
3
+ en: z.ZodString;
4
+ ru: z.ZodOptional<z.ZodString>;
5
+ zh: z.ZodOptional<z.ZodString>;
6
+ fa: z.ZodOptional<z.ZodString>;
7
+ fr: z.ZodOptional<z.ZodString>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ en: string;
10
+ ru?: string | undefined;
11
+ zh?: string | undefined;
12
+ fa?: string | undefined;
13
+ fr?: string | undefined;
14
+ }, {
15
+ en: string;
16
+ ru?: string | undefined;
17
+ zh?: string | undefined;
18
+ fa?: string | undefined;
19
+ fr?: string | undefined;
20
+ }>;
21
+ export declare const SubscriptionPageRawConfigSchema: z.ZodEffects<z.ZodObject<{
22
+ version: z.ZodNativeEnum<{
23
+ readonly 1: "1";
24
+ }>;
25
+ additionalLocales: z.ZodArray<z.ZodEnum<["ru", "zh", "fa", "fr"]>, "many">;
26
+ brandingSettings: z.ZodObject<{
27
+ title: z.ZodString;
28
+ logoUrl: z.ZodString;
29
+ supportUrl: z.ZodString;
30
+ }, "strip", z.ZodTypeAny, {
31
+ title: string;
32
+ logoUrl: string;
33
+ supportUrl: string;
34
+ }, {
35
+ title: string;
36
+ logoUrl: string;
37
+ supportUrl: string;
38
+ }>;
39
+ platforms: z.ZodRecord<z.ZodNativeEnum<{
40
+ readonly IOS: "ios";
41
+ readonly ANDROID: "android";
42
+ readonly LINUX: "linux";
43
+ readonly MACOS: "macos";
44
+ readonly WINDOWS: "windows";
45
+ readonly ANDROID_TV: "androidTV";
46
+ readonly APPLE_TV: "appleTV";
47
+ }>, z.ZodObject<{
48
+ displayName: z.ZodObject<{
49
+ en: z.ZodString;
50
+ ru: z.ZodOptional<z.ZodString>;
51
+ zh: z.ZodOptional<z.ZodString>;
52
+ fa: z.ZodOptional<z.ZodString>;
53
+ fr: z.ZodOptional<z.ZodString>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ en: string;
56
+ ru?: string | undefined;
57
+ zh?: string | undefined;
58
+ fa?: string | undefined;
59
+ fr?: string | undefined;
60
+ }, {
61
+ en: string;
62
+ ru?: string | undefined;
63
+ zh?: string | undefined;
64
+ fa?: string | undefined;
65
+ fr?: string | undefined;
66
+ }>;
67
+ svgIcon: z.ZodString;
68
+ apps: z.ZodArray<z.ZodObject<{
69
+ id: z.ZodString;
70
+ appSettings: z.ZodObject<{
71
+ name: z.ZodString;
72
+ featured: z.ZodBoolean;
73
+ }, "strip", z.ZodTypeAny, {
74
+ name: string;
75
+ featured: boolean;
76
+ }, {
77
+ name: string;
78
+ featured: boolean;
79
+ }>;
80
+ subscriptionLinkSettings: z.ZodObject<{
81
+ encodeBase64: z.ZodBoolean;
82
+ urlScheme: z.ZodString;
83
+ }, "strip", z.ZodTypeAny, {
84
+ encodeBase64: boolean;
85
+ urlScheme: string;
86
+ }, {
87
+ encodeBase64: boolean;
88
+ urlScheme: string;
89
+ }>;
90
+ blocks: z.ZodArray<z.ZodObject<{
91
+ svgIcon: z.ZodString;
92
+ title: z.ZodObject<{
93
+ en: z.ZodString;
94
+ ru: z.ZodOptional<z.ZodString>;
95
+ zh: z.ZodOptional<z.ZodString>;
96
+ fa: z.ZodOptional<z.ZodString>;
97
+ fr: z.ZodOptional<z.ZodString>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ en: string;
100
+ ru?: string | undefined;
101
+ zh?: string | undefined;
102
+ fa?: string | undefined;
103
+ fr?: string | undefined;
104
+ }, {
105
+ en: string;
106
+ ru?: string | undefined;
107
+ zh?: string | undefined;
108
+ fa?: string | undefined;
109
+ fr?: string | undefined;
110
+ }>;
111
+ description: z.ZodObject<{
112
+ en: z.ZodString;
113
+ ru: z.ZodOptional<z.ZodString>;
114
+ zh: z.ZodOptional<z.ZodString>;
115
+ fa: z.ZodOptional<z.ZodString>;
116
+ fr: z.ZodOptional<z.ZodString>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ en: string;
119
+ ru?: string | undefined;
120
+ zh?: string | undefined;
121
+ fa?: string | undefined;
122
+ fr?: string | undefined;
123
+ }, {
124
+ en: string;
125
+ ru?: string | undefined;
126
+ zh?: string | undefined;
127
+ fa?: string | undefined;
128
+ fr?: string | undefined;
129
+ }>;
130
+ buttons: z.ZodArray<z.ZodObject<{
131
+ link: z.ZodString;
132
+ type: z.ZodEnum<["external", "subscriptionLink"]>;
133
+ text: z.ZodObject<{
134
+ en: z.ZodString;
135
+ ru: z.ZodOptional<z.ZodString>;
136
+ zh: z.ZodOptional<z.ZodString>;
137
+ fa: z.ZodOptional<z.ZodString>;
138
+ fr: z.ZodOptional<z.ZodString>;
139
+ }, "strip", z.ZodTypeAny, {
140
+ en: string;
141
+ ru?: string | undefined;
142
+ zh?: string | undefined;
143
+ fa?: string | undefined;
144
+ fr?: string | undefined;
145
+ }, {
146
+ en: string;
147
+ ru?: string | undefined;
148
+ zh?: string | undefined;
149
+ fa?: string | undefined;
150
+ fr?: string | undefined;
151
+ }>;
152
+ svgIcon: z.ZodString;
153
+ }, "strip", z.ZodTypeAny, {
154
+ type: "external" | "subscriptionLink";
155
+ link: string;
156
+ text: {
157
+ en: string;
158
+ ru?: string | undefined;
159
+ zh?: string | undefined;
160
+ fa?: string | undefined;
161
+ fr?: string | undefined;
162
+ };
163
+ svgIcon: string;
164
+ }, {
165
+ type: "external" | "subscriptionLink";
166
+ link: string;
167
+ text: {
168
+ en: string;
169
+ ru?: string | undefined;
170
+ zh?: string | undefined;
171
+ fa?: string | undefined;
172
+ fr?: string | undefined;
173
+ };
174
+ svgIcon: string;
175
+ }>, "many">;
176
+ }, "strip", z.ZodTypeAny, {
177
+ title: {
178
+ en: string;
179
+ ru?: string | undefined;
180
+ zh?: string | undefined;
181
+ fa?: string | undefined;
182
+ fr?: string | undefined;
183
+ };
184
+ description: {
185
+ en: string;
186
+ ru?: string | undefined;
187
+ zh?: string | undefined;
188
+ fa?: string | undefined;
189
+ fr?: string | undefined;
190
+ };
191
+ svgIcon: string;
192
+ buttons: {
193
+ type: "external" | "subscriptionLink";
194
+ link: string;
195
+ text: {
196
+ en: string;
197
+ ru?: string | undefined;
198
+ zh?: string | undefined;
199
+ fa?: string | undefined;
200
+ fr?: string | undefined;
201
+ };
202
+ svgIcon: string;
203
+ }[];
204
+ }, {
205
+ title: {
206
+ en: string;
207
+ ru?: string | undefined;
208
+ zh?: string | undefined;
209
+ fa?: string | undefined;
210
+ fr?: string | undefined;
211
+ };
212
+ description: {
213
+ en: string;
214
+ ru?: string | undefined;
215
+ zh?: string | undefined;
216
+ fa?: string | undefined;
217
+ fr?: string | undefined;
218
+ };
219
+ svgIcon: string;
220
+ buttons: {
221
+ type: "external" | "subscriptionLink";
222
+ link: string;
223
+ text: {
224
+ en: string;
225
+ ru?: string | undefined;
226
+ zh?: string | undefined;
227
+ fa?: string | undefined;
228
+ fr?: string | undefined;
229
+ };
230
+ svgIcon: string;
231
+ }[];
232
+ }>, "many">;
233
+ }, "strip", z.ZodTypeAny, {
234
+ id: string;
235
+ appSettings: {
236
+ name: string;
237
+ featured: boolean;
238
+ };
239
+ subscriptionLinkSettings: {
240
+ encodeBase64: boolean;
241
+ urlScheme: string;
242
+ };
243
+ blocks: {
244
+ title: {
245
+ en: string;
246
+ ru?: string | undefined;
247
+ zh?: string | undefined;
248
+ fa?: string | undefined;
249
+ fr?: string | undefined;
250
+ };
251
+ description: {
252
+ en: string;
253
+ ru?: string | undefined;
254
+ zh?: string | undefined;
255
+ fa?: string | undefined;
256
+ fr?: string | undefined;
257
+ };
258
+ svgIcon: string;
259
+ buttons: {
260
+ type: "external" | "subscriptionLink";
261
+ link: string;
262
+ text: {
263
+ en: string;
264
+ ru?: string | undefined;
265
+ zh?: string | undefined;
266
+ fa?: string | undefined;
267
+ fr?: string | undefined;
268
+ };
269
+ svgIcon: string;
270
+ }[];
271
+ }[];
272
+ }, {
273
+ id: string;
274
+ appSettings: {
275
+ name: string;
276
+ featured: boolean;
277
+ };
278
+ subscriptionLinkSettings: {
279
+ encodeBase64: boolean;
280
+ urlScheme: string;
281
+ };
282
+ blocks: {
283
+ title: {
284
+ en: string;
285
+ ru?: string | undefined;
286
+ zh?: string | undefined;
287
+ fa?: string | undefined;
288
+ fr?: string | undefined;
289
+ };
290
+ description: {
291
+ en: string;
292
+ ru?: string | undefined;
293
+ zh?: string | undefined;
294
+ fa?: string | undefined;
295
+ fr?: string | undefined;
296
+ };
297
+ svgIcon: string;
298
+ buttons: {
299
+ type: "external" | "subscriptionLink";
300
+ link: string;
301
+ text: {
302
+ en: string;
303
+ ru?: string | undefined;
304
+ zh?: string | undefined;
305
+ fa?: string | undefined;
306
+ fr?: string | undefined;
307
+ };
308
+ svgIcon: string;
309
+ }[];
310
+ }[];
311
+ }>, "many">;
312
+ }, "strip", z.ZodTypeAny, {
313
+ svgIcon: string;
314
+ displayName: {
315
+ en: string;
316
+ ru?: string | undefined;
317
+ zh?: string | undefined;
318
+ fa?: string | undefined;
319
+ fr?: string | undefined;
320
+ };
321
+ apps: {
322
+ id: string;
323
+ appSettings: {
324
+ name: string;
325
+ featured: boolean;
326
+ };
327
+ subscriptionLinkSettings: {
328
+ encodeBase64: boolean;
329
+ urlScheme: string;
330
+ };
331
+ blocks: {
332
+ title: {
333
+ en: string;
334
+ ru?: string | undefined;
335
+ zh?: string | undefined;
336
+ fa?: string | undefined;
337
+ fr?: string | undefined;
338
+ };
339
+ description: {
340
+ en: string;
341
+ ru?: string | undefined;
342
+ zh?: string | undefined;
343
+ fa?: string | undefined;
344
+ fr?: string | undefined;
345
+ };
346
+ svgIcon: string;
347
+ buttons: {
348
+ type: "external" | "subscriptionLink";
349
+ link: string;
350
+ text: {
351
+ en: string;
352
+ ru?: string | undefined;
353
+ zh?: string | undefined;
354
+ fa?: string | undefined;
355
+ fr?: string | undefined;
356
+ };
357
+ svgIcon: string;
358
+ }[];
359
+ }[];
360
+ }[];
361
+ }, {
362
+ svgIcon: string;
363
+ displayName: {
364
+ en: string;
365
+ ru?: string | undefined;
366
+ zh?: string | undefined;
367
+ fa?: string | undefined;
368
+ fr?: string | undefined;
369
+ };
370
+ apps: {
371
+ id: string;
372
+ appSettings: {
373
+ name: string;
374
+ featured: boolean;
375
+ };
376
+ subscriptionLinkSettings: {
377
+ encodeBase64: boolean;
378
+ urlScheme: string;
379
+ };
380
+ blocks: {
381
+ title: {
382
+ en: string;
383
+ ru?: string | undefined;
384
+ zh?: string | undefined;
385
+ fa?: string | undefined;
386
+ fr?: string | undefined;
387
+ };
388
+ description: {
389
+ en: string;
390
+ ru?: string | undefined;
391
+ zh?: string | undefined;
392
+ fa?: string | undefined;
393
+ fr?: string | undefined;
394
+ };
395
+ svgIcon: string;
396
+ buttons: {
397
+ type: "external" | "subscriptionLink";
398
+ link: string;
399
+ text: {
400
+ en: string;
401
+ ru?: string | undefined;
402
+ zh?: string | undefined;
403
+ fa?: string | undefined;
404
+ fr?: string | undefined;
405
+ };
406
+ svgIcon: string;
407
+ }[];
408
+ }[];
409
+ }[];
410
+ }>>;
411
+ }, "strip", z.ZodTypeAny, {
412
+ version: "1";
413
+ brandingSettings: {
414
+ title: string;
415
+ logoUrl: string;
416
+ supportUrl: string;
417
+ };
418
+ additionalLocales: ("ru" | "zh" | "fa" | "fr")[];
419
+ platforms: Partial<Record<"ios" | "android" | "linux" | "macos" | "windows" | "androidTV" | "appleTV", {
420
+ svgIcon: string;
421
+ displayName: {
422
+ en: string;
423
+ ru?: string | undefined;
424
+ zh?: string | undefined;
425
+ fa?: string | undefined;
426
+ fr?: string | undefined;
427
+ };
428
+ apps: {
429
+ id: string;
430
+ appSettings: {
431
+ name: string;
432
+ featured: boolean;
433
+ };
434
+ subscriptionLinkSettings: {
435
+ encodeBase64: boolean;
436
+ urlScheme: string;
437
+ };
438
+ blocks: {
439
+ title: {
440
+ en: string;
441
+ ru?: string | undefined;
442
+ zh?: string | undefined;
443
+ fa?: string | undefined;
444
+ fr?: string | undefined;
445
+ };
446
+ description: {
447
+ en: string;
448
+ ru?: string | undefined;
449
+ zh?: string | undefined;
450
+ fa?: string | undefined;
451
+ fr?: string | undefined;
452
+ };
453
+ svgIcon: string;
454
+ buttons: {
455
+ type: "external" | "subscriptionLink";
456
+ link: string;
457
+ text: {
458
+ en: string;
459
+ ru?: string | undefined;
460
+ zh?: string | undefined;
461
+ fa?: string | undefined;
462
+ fr?: string | undefined;
463
+ };
464
+ svgIcon: string;
465
+ }[];
466
+ }[];
467
+ }[];
468
+ }>>;
469
+ }, {
470
+ version: "1";
471
+ brandingSettings: {
472
+ title: string;
473
+ logoUrl: string;
474
+ supportUrl: string;
475
+ };
476
+ additionalLocales: ("ru" | "zh" | "fa" | "fr")[];
477
+ platforms: Partial<Record<"ios" | "android" | "linux" | "macos" | "windows" | "androidTV" | "appleTV", {
478
+ svgIcon: string;
479
+ displayName: {
480
+ en: string;
481
+ ru?: string | undefined;
482
+ zh?: string | undefined;
483
+ fa?: string | undefined;
484
+ fr?: string | undefined;
485
+ };
486
+ apps: {
487
+ id: string;
488
+ appSettings: {
489
+ name: string;
490
+ featured: boolean;
491
+ };
492
+ subscriptionLinkSettings: {
493
+ encodeBase64: boolean;
494
+ urlScheme: string;
495
+ };
496
+ blocks: {
497
+ title: {
498
+ en: string;
499
+ ru?: string | undefined;
500
+ zh?: string | undefined;
501
+ fa?: string | undefined;
502
+ fr?: string | undefined;
503
+ };
504
+ description: {
505
+ en: string;
506
+ ru?: string | undefined;
507
+ zh?: string | undefined;
508
+ fa?: string | undefined;
509
+ fr?: string | undefined;
510
+ };
511
+ svgIcon: string;
512
+ buttons: {
513
+ type: "external" | "subscriptionLink";
514
+ link: string;
515
+ text: {
516
+ en: string;
517
+ ru?: string | undefined;
518
+ zh?: string | undefined;
519
+ fa?: string | undefined;
520
+ fr?: string | undefined;
521
+ };
522
+ svgIcon: string;
523
+ }[];
524
+ }[];
525
+ }[];
526
+ }>>;
527
+ }>, {
528
+ version: "1";
529
+ brandingSettings: {
530
+ title: string;
531
+ logoUrl: string;
532
+ supportUrl: string;
533
+ };
534
+ additionalLocales: ("ru" | "zh" | "fa" | "fr")[];
535
+ platforms: Partial<Record<"ios" | "android" | "linux" | "macos" | "windows" | "androidTV" | "appleTV", {
536
+ svgIcon: string;
537
+ displayName: {
538
+ en: string;
539
+ ru?: string | undefined;
540
+ zh?: string | undefined;
541
+ fa?: string | undefined;
542
+ fr?: string | undefined;
543
+ };
544
+ apps: {
545
+ id: string;
546
+ appSettings: {
547
+ name: string;
548
+ featured: boolean;
549
+ };
550
+ subscriptionLinkSettings: {
551
+ encodeBase64: boolean;
552
+ urlScheme: string;
553
+ };
554
+ blocks: {
555
+ title: {
556
+ en: string;
557
+ ru?: string | undefined;
558
+ zh?: string | undefined;
559
+ fa?: string | undefined;
560
+ fr?: string | undefined;
561
+ };
562
+ description: {
563
+ en: string;
564
+ ru?: string | undefined;
565
+ zh?: string | undefined;
566
+ fa?: string | undefined;
567
+ fr?: string | undefined;
568
+ };
569
+ svgIcon: string;
570
+ buttons: {
571
+ type: "external" | "subscriptionLink";
572
+ link: string;
573
+ text: {
574
+ en: string;
575
+ ru?: string | undefined;
576
+ zh?: string | undefined;
577
+ fa?: string | undefined;
578
+ fr?: string | undefined;
579
+ };
580
+ svgIcon: string;
581
+ }[];
582
+ }[];
583
+ }[];
584
+ }>>;
585
+ }, {
586
+ version: "1";
587
+ brandingSettings: {
588
+ title: string;
589
+ logoUrl: string;
590
+ supportUrl: string;
591
+ };
592
+ additionalLocales: ("ru" | "zh" | "fa" | "fr")[];
593
+ platforms: Partial<Record<"ios" | "android" | "linux" | "macos" | "windows" | "androidTV" | "appleTV", {
594
+ svgIcon: string;
595
+ displayName: {
596
+ en: string;
597
+ ru?: string | undefined;
598
+ zh?: string | undefined;
599
+ fa?: string | undefined;
600
+ fr?: string | undefined;
601
+ };
602
+ apps: {
603
+ id: string;
604
+ appSettings: {
605
+ name: string;
606
+ featured: boolean;
607
+ };
608
+ subscriptionLinkSettings: {
609
+ encodeBase64: boolean;
610
+ urlScheme: string;
611
+ };
612
+ blocks: {
613
+ title: {
614
+ en: string;
615
+ ru?: string | undefined;
616
+ zh?: string | undefined;
617
+ fa?: string | undefined;
618
+ fr?: string | undefined;
619
+ };
620
+ description: {
621
+ en: string;
622
+ ru?: string | undefined;
623
+ zh?: string | undefined;
624
+ fa?: string | undefined;
625
+ fr?: string | undefined;
626
+ };
627
+ svgIcon: string;
628
+ buttons: {
629
+ type: "external" | "subscriptionLink";
630
+ link: string;
631
+ text: {
632
+ en: string;
633
+ ru?: string | undefined;
634
+ zh?: string | undefined;
635
+ fa?: string | undefined;
636
+ fr?: string | undefined;
637
+ };
638
+ svgIcon: string;
639
+ }[];
640
+ }[];
641
+ }[];
642
+ }>>;
643
+ }>;
644
+ //# sourceMappingURL=subscription-page-config.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-page-config.schema.d.ts","sourceRoot":"","sources":["../../../../models/subscription-page-config/subscription-page-config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;EAM9B,CAAC;AAyCH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAStC,CAAC"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionPageRawConfigSchema = exports.LocalizedTextSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const subscription_page_config_validator_1 = require("./subscription-page-config.validator");
7
+ exports.LocalizedTextSchema = zod_1.z.object({
8
+ en: zod_1.z.string(),
9
+ ru: zod_1.z.string().optional(),
10
+ zh: zod_1.z.string().optional(),
11
+ fa: zod_1.z.string().optional(),
12
+ fr: zod_1.z.string().optional(),
13
+ });
14
+ const ButtonSchema = zod_1.z.object({
15
+ link: zod_1.z.string(),
16
+ type: zod_1.z.enum(['external', 'subscriptionLink']),
17
+ text: exports.LocalizedTextSchema,
18
+ svgIcon: zod_1.z.string(),
19
+ });
20
+ const BlockSchema = zod_1.z.object({
21
+ svgIcon: zod_1.z.string(),
22
+ title: exports.LocalizedTextSchema,
23
+ description: exports.LocalizedTextSchema,
24
+ buttons: zod_1.z.array(ButtonSchema),
25
+ });
26
+ const PlatformAppSchema = zod_1.z.object({
27
+ id: zod_1.z.string(),
28
+ appSettings: zod_1.z.object({
29
+ name: zod_1.z.string(),
30
+ featured: zod_1.z.boolean(),
31
+ }),
32
+ subscriptionLinkSettings: zod_1.z.object({
33
+ encodeBase64: zod_1.z.boolean(),
34
+ urlScheme: zod_1.z.string(),
35
+ }),
36
+ blocks: zod_1.z.array(BlockSchema),
37
+ });
38
+ const PlatformSchema = zod_1.z.object({
39
+ displayName: exports.LocalizedTextSchema,
40
+ svgIcon: zod_1.z.string(),
41
+ apps: zod_1.z.array(PlatformAppSchema),
42
+ });
43
+ const BrandingSettingsSchema = zod_1.z.object({
44
+ title: zod_1.z.string(),
45
+ logoUrl: zod_1.z.string(),
46
+ supportUrl: zod_1.z.string().url(),
47
+ });
48
+ exports.SubscriptionPageRawConfigSchema = zod_1.z
49
+ .object({
50
+ version: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_PAGE_CONFIG_VERSION),
51
+ additionalLocales: zod_1.z.array(zod_1.z.enum(constants_1.SUBSCRIPTION_PAGE_CONFIG_ADDITIONAL_LOCALES)),
52
+ brandingSettings: BrandingSettingsSchema,
53
+ platforms: zod_1.z.record(zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_PAGE_CONFIG_PLATFORM_TYPES), PlatformSchema),
54
+ })
55
+ .superRefine((data, ctx) => {
56
+ (0, subscription_page_config_validator_1.validateLocalizedTexts)(data.platforms, data.additionalLocales, 'platforms', ctx);
57
+ });