@wix/auto_sdk_papyrus_templates 1.0.0

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 (52) hide show
  1. package/build/cjs/index.d.ts +38 -0
  2. package/build/cjs/index.js +620 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1102 -0
  5. package/build/cjs/index.typings.js +511 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +908 -0
  8. package/build/cjs/meta.js +374 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +260 -0
  11. package/build/cjs/schemas.js +386 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +38 -0
  14. package/build/es/index.mjs +586 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +1102 -0
  17. package/build/es/index.typings.mjs +478 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +908 -0
  20. package/build/es/meta.mjs +340 -0
  21. package/build/es/meta.mjs.map +1 -0
  22. package/build/es/package.json +3 -0
  23. package/build/es/schemas.d.mts +260 -0
  24. package/build/es/schemas.mjs +344 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +38 -0
  27. package/build/internal/cjs/index.js +620 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +1102 -0
  30. package/build/internal/cjs/index.typings.js +511 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +908 -0
  33. package/build/internal/cjs/meta.js +374 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +260 -0
  36. package/build/internal/cjs/schemas.js +386 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +38 -0
  39. package/build/internal/es/index.mjs +586 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +1102 -0
  42. package/build/internal/es/index.typings.mjs +478 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +908 -0
  45. package/build/internal/es/meta.mjs +340 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +260 -0
  48. package/build/internal/es/schemas.mjs +344 -0
  49. package/build/internal/es/schemas.mjs.map +1 -0
  50. package/meta/package.json +3 -0
  51. package/package.json +61 -0
  52. package/schemas/package.json +3 -0
@@ -0,0 +1,1102 @@
1
+ import * as _wix_sdk_types from '@wix/sdk-types';
2
+ import { QuerySpec, Query } from '@wix/sdk-types';
3
+
4
+ interface TemplateSettings {
5
+ /**
6
+ * Auto generated ID.
7
+ * @format GUID
8
+ * @readonly
9
+ */
10
+ _id?: string | null;
11
+ /**
12
+ * Wix app definition ID.
13
+ * @minLength 1
14
+ * @maxLength 20
15
+ */
16
+ appSlug?: string | null;
17
+ /**
18
+ * The type of the template.
19
+ * @minLength 1
20
+ * @maxLength 20
21
+ */
22
+ templateType?: string | null;
23
+ /**
24
+ * The id of the template.
25
+ * @minLength 1
26
+ * @maxLength 20
27
+ */
28
+ templateId?: string | null;
29
+ /**
30
+ * Template settings external ID. For example ticket definition ID.
31
+ * Must be unique per tenant where tenant is taken from authorization (wix_app_id + meta_site_id)
32
+ * @minLength 1
33
+ * @maxLength 100
34
+ */
35
+ externalId?: string | null;
36
+ /**
37
+ * Date settings were created.
38
+ * @readonly
39
+ */
40
+ _createdDate?: Date | null;
41
+ /**
42
+ * Date settings were updated.
43
+ * @readonly
44
+ */
45
+ _updatedDate?: Date | null;
46
+ /** @maxSize 10 */
47
+ settingGroups?: SettingsGroup[];
48
+ /** Paper size */
49
+ paperSize?: PaperSizeWithLiterals;
50
+ pageOverflow?: PageOverflowWithLiterals;
51
+ }
52
+ interface TextSetting {
53
+ /**
54
+ * Font family class name
55
+ * @maxLength 20
56
+ */
57
+ fontFamily?: string | null;
58
+ /**
59
+ * Font style class names
60
+ * @maxSize 10
61
+ * @maxLength 20
62
+ */
63
+ fontStyle?: string[];
64
+ /**
65
+ * Text alignment class name
66
+ * @maxLength 20
67
+ */
68
+ textAlignment?: string | null;
69
+ /**
70
+ * Text color hex code
71
+ * @minLength 7
72
+ * @maxLength 7
73
+ */
74
+ textColor?: string | null;
75
+ /**
76
+ * Font size
77
+ * @min 1
78
+ */
79
+ fontSize?: number | null;
80
+ /** Text content setting */
81
+ textContent?: TextContent[];
82
+ }
83
+ interface TextContent {
84
+ /**
85
+ * @minLength 3
86
+ * @maxLength 50
87
+ */
88
+ _id?: string;
89
+ /** @maxLength 500 */
90
+ value?: string | null;
91
+ visible?: boolean;
92
+ }
93
+ interface ImageSetting {
94
+ /** Wix media Image */
95
+ image?: string;
96
+ /** Image resizing mode */
97
+ resize?: ResizeOptionWithLiterals;
98
+ }
99
+ interface FocalPoint {
100
+ /** X-coordinate of the focal point. */
101
+ x?: number;
102
+ /** Y-coordinate of the focal point. */
103
+ y?: number;
104
+ /** crop by height */
105
+ height?: number | null;
106
+ /** crop by width */
107
+ width?: number | null;
108
+ }
109
+ declare enum ResizeOption {
110
+ /** Automatically resizes full image to fit image field */
111
+ FIT = "FIT",
112
+ /** Enables user to manually crop image to fit image field */
113
+ CROP = "CROP"
114
+ }
115
+ /** @enumType */
116
+ type ResizeOptionWithLiterals = ResizeOption | 'FIT' | 'CROP';
117
+ interface SelectSetting {
118
+ /** Selected value */
119
+ value?: string | null;
120
+ /**
121
+ * Color hex code
122
+ * @minLength 7
123
+ * @maxLength 7
124
+ */
125
+ primaryColor?: string | null;
126
+ /**
127
+ * Color hex code
128
+ * @minLength 7
129
+ * @maxLength 7
130
+ */
131
+ secondaryColor?: string | null;
132
+ /** Size */
133
+ size?: number | null;
134
+ }
135
+ interface BackgroundSetting {
136
+ /**
137
+ * Color of the background hex code
138
+ * @minLength 7
139
+ * @maxLength 9
140
+ */
141
+ color?: string | null;
142
+ /** Wix media Image */
143
+ image?: string;
144
+ }
145
+ interface SettingsGroup {
146
+ /**
147
+ * Id of the control group
148
+ * @minLength 5
149
+ * @maxLength 50
150
+ */
151
+ groupId?: string;
152
+ /**
153
+ * Display settings.
154
+ * @maxSize 20
155
+ */
156
+ display?: Record<string, boolean>;
157
+ /**
158
+ * Texts settings.
159
+ * @maxSize 20
160
+ */
161
+ texts?: Record<string, TextSetting>;
162
+ /**
163
+ * Images settings.
164
+ * @maxSize 10
165
+ */
166
+ images?: Record<string, ImageSetting>;
167
+ /**
168
+ * Select option settings.
169
+ * @maxSize 20
170
+ */
171
+ selects?: Record<string, SelectSetting>;
172
+ /**
173
+ * Backgrounds settings.
174
+ * @maxSize 20
175
+ */
176
+ backgrounds?: Record<string, BackgroundSetting>;
177
+ }
178
+ declare enum PaperSize {
179
+ A4_PORTRAIT = "A4_PORTRAIT",
180
+ A4_LANDSCAPE = "A4_LANDSCAPE"
181
+ }
182
+ /** @enumType */
183
+ type PaperSizeWithLiterals = PaperSize | 'A4_PORTRAIT' | 'A4_LANDSCAPE';
184
+ declare enum PageOverflow {
185
+ CONTENT_HIDDEN = "CONTENT_HIDDEN",
186
+ CONTENT_BREAK = "CONTENT_BREAK"
187
+ }
188
+ /** @enumType */
189
+ type PageOverflowWithLiterals = PageOverflow | 'CONTENT_HIDDEN' | 'CONTENT_BREAK';
190
+ interface CreateTemplateSettingsRequest {
191
+ /** Settings to be created. */
192
+ settings?: TemplateSettings;
193
+ }
194
+ interface CreateTemplateSettingsResponse {
195
+ /** Created settings. */
196
+ settings?: TemplateSettings;
197
+ }
198
+ interface BulkCreateTemplateSettingsRequest {
199
+ /**
200
+ * Settings to be created.
201
+ * @minSize 1
202
+ * @maxSize 100
203
+ */
204
+ settings?: TemplateSettings[];
205
+ }
206
+ interface BulkCreateTemplateSettingsResponse {
207
+ /** Created settings */
208
+ settings?: TemplateSettings[];
209
+ }
210
+ interface UpsertTemplateSettingsRequest {
211
+ /** Settings to be upserted. */
212
+ settings?: TemplateSettings;
213
+ }
214
+ interface UpsertTemplateSettingsResponse {
215
+ /** Upserted settings. */
216
+ settings?: TemplateSettings;
217
+ }
218
+ interface GetTemplateSettingsRequest {
219
+ /**
220
+ * Settings ID.
221
+ * @format GUID
222
+ */
223
+ templateSettingsId?: string;
224
+ }
225
+ interface GetTemplateSettingsResponse {
226
+ /** Retrieved settings. */
227
+ settings?: TemplateSettings;
228
+ }
229
+ interface UpdateTemplateSettingsRequest {
230
+ /** Template Settings to be updated. */
231
+ settings?: TemplateSettings;
232
+ }
233
+ interface UpdateTemplateSettingsResponse {
234
+ /** Updated settings. */
235
+ settings?: TemplateSettings;
236
+ }
237
+ interface DeleteTemplateSettingsRequest {
238
+ /**
239
+ * Settings ID.
240
+ * @format GUID
241
+ */
242
+ templateSettingsId?: string;
243
+ }
244
+ interface DeleteTemplateSettingsResponse {
245
+ /** Deleted settings. */
246
+ settings?: TemplateSettings;
247
+ }
248
+ interface QueryTemplateSettingsRequest {
249
+ /** Generic query object. */
250
+ query: QueryV2;
251
+ }
252
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
253
+ /** Paging options to limit and offset the number of items. */
254
+ paging?: Paging;
255
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
256
+ cursorPaging?: CursorPaging;
257
+ /**
258
+ * Filter object.
259
+ *
260
+ * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
261
+ */
262
+ filter?: Record<string, any> | null;
263
+ /**
264
+ * Sort object.
265
+ *
266
+ * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
267
+ */
268
+ sort?: Sorting[];
269
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
270
+ fields?: string[];
271
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
272
+ fieldsets?: string[];
273
+ }
274
+ /** @oneof */
275
+ interface QueryV2PagingMethodOneOf {
276
+ /** Paging options to limit and offset the number of items. */
277
+ paging?: Paging;
278
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
279
+ cursorPaging?: CursorPaging;
280
+ }
281
+ interface Sorting {
282
+ /**
283
+ * Name of the field to sort by.
284
+ * @maxLength 512
285
+ */
286
+ fieldName?: string;
287
+ /** Sort order. */
288
+ order?: SortOrderWithLiterals;
289
+ }
290
+ declare enum SortOrder {
291
+ ASC = "ASC",
292
+ DESC = "DESC"
293
+ }
294
+ /** @enumType */
295
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
296
+ interface Paging {
297
+ /** Number of items to load. */
298
+ limit?: number | null;
299
+ /** Number of items to skip in the current sort order. */
300
+ offset?: number | null;
301
+ }
302
+ interface CursorPaging {
303
+ /**
304
+ * Maximum number of items to return in the results.
305
+ * @max 100
306
+ */
307
+ limit?: number | null;
308
+ /**
309
+ * Pointer to the next or previous page in the list of results.
310
+ *
311
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
312
+ * Not relevant for the first request.
313
+ * @maxLength 16000
314
+ */
315
+ cursor?: string | null;
316
+ }
317
+ interface QueryTemplateSettingsResponse {
318
+ /** Template settings results. */
319
+ settings?: TemplateSettings[];
320
+ /** Query result's metadata. */
321
+ metadata?: PagingMetadataV2;
322
+ }
323
+ interface PagingMetadataV2 {
324
+ /** Number of items returned in the response. */
325
+ count?: number | null;
326
+ /** Offset that was requested. */
327
+ offset?: number | null;
328
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
329
+ total?: number | null;
330
+ /** Flag that indicates the server failed to calculate the `total` field. */
331
+ tooManyToCount?: boolean | null;
332
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
333
+ cursors?: Cursors;
334
+ }
335
+ interface Cursors {
336
+ /**
337
+ * Cursor string pointing to the next page in the list of results.
338
+ * @maxLength 16000
339
+ */
340
+ next?: string | null;
341
+ /**
342
+ * Cursor pointing to the previous page in the list of results.
343
+ * @maxLength 16000
344
+ */
345
+ prev?: string | null;
346
+ }
347
+ interface ResolveTemplateSettingsRequest {
348
+ /**
349
+ * The id of the settings.
350
+ * @format GUID
351
+ */
352
+ templateSettingsId?: string | null;
353
+ /**
354
+ * External ID.
355
+ * @maxLength 100
356
+ */
357
+ templateSettingsExternalId?: string | null;
358
+ /**
359
+ * The type of the template. Used to resolve default settings.
360
+ * @minLength 1
361
+ * @maxLength 20
362
+ */
363
+ templateType: string | null;
364
+ /**
365
+ * Wix app slug.
366
+ * @minLength 1
367
+ * @maxLength 20
368
+ */
369
+ appSlug: string | null;
370
+ /**
371
+ * The id of template.
372
+ * @minLength 1
373
+ * @maxLength 20
374
+ */
375
+ templateId?: string | null;
376
+ }
377
+ interface ResolveTemplateSettingsResponse {
378
+ /** Retrieved settings. */
379
+ settings?: TemplateSettings;
380
+ }
381
+ interface GetTemplateControlsRequest {
382
+ }
383
+ interface GetTemplateControlsResponse {
384
+ templateControls?: TemplateControls;
385
+ }
386
+ interface TemplateControls {
387
+ /**
388
+ * The name of the template
389
+ * @maxLength 50
390
+ */
391
+ templateName?: string;
392
+ /**
393
+ * The controls groups configuration
394
+ * @minSize 1
395
+ * @maxSize 10
396
+ */
397
+ controlGroups?: ControlGroup[];
398
+ }
399
+ /** Represents control groups on the left side of the UI */
400
+ interface ControlGroup {
401
+ /**
402
+ * @minLength 3
403
+ * @maxLength 50
404
+ */
405
+ groupId?: string;
406
+ /**
407
+ * @minLength 3
408
+ * @maxLength 50
409
+ */
410
+ icon?: string;
411
+ /**
412
+ * @minLength 3
413
+ * @maxLength 100
414
+ */
415
+ labelKey?: string;
416
+ /**
417
+ * @minLength 3
418
+ * @maxLength 100
419
+ */
420
+ titleKey?: string;
421
+ /**
422
+ * @minLength 3
423
+ * @maxLength 100
424
+ */
425
+ descriptionKey?: string;
426
+ /** @maxLength 100 */
427
+ linkKey?: string | null;
428
+ /** @maxLength 50 */
429
+ linkUrl?: string | null;
430
+ /** @maxLength 100 */
431
+ tooltipKey?: string | null;
432
+ /**
433
+ * Display controls
434
+ * @maxSize 20
435
+ */
436
+ display?: DisplayControl[];
437
+ /**
438
+ * Text controls
439
+ * @maxSize 20
440
+ */
441
+ texts?: TextControl[];
442
+ /**
443
+ * Image controls
444
+ * @maxSize 10
445
+ */
446
+ images?: ImageControl[];
447
+ /**
448
+ * Select controls
449
+ * @maxSize 20
450
+ */
451
+ selects?: SelectControl[];
452
+ /**
453
+ * Background controls
454
+ * @maxSize 20
455
+ */
456
+ backgrounds?: BackgroundControl[];
457
+ }
458
+ interface DisplayControl {
459
+ /**
460
+ * The id of the setting
461
+ * @maxLength 50
462
+ */
463
+ _id?: string;
464
+ /**
465
+ * Optional label key for translations
466
+ * @maxLength 100
467
+ */
468
+ labelKey?: string | null;
469
+ /** Default setting for this control */
470
+ default?: boolean;
471
+ }
472
+ interface TextControl {
473
+ /**
474
+ * The id of the setting
475
+ * @maxLength 50
476
+ */
477
+ _id?: string;
478
+ /**
479
+ * Optional label key for translations
480
+ * @maxLength 100
481
+ */
482
+ labelKey?: string | null;
483
+ /** Default setting for this control */
484
+ default?: TextSetting;
485
+ /**
486
+ * Text properties
487
+ * @maxSize 5
488
+ */
489
+ textProperties?: TextPropertyControl[];
490
+ /** @maxSize 10 */
491
+ textContent?: TextContentControl[];
492
+ }
493
+ interface TextPropertyControl {
494
+ /**
495
+ * One of "fontFamily", "fontStyle", "fontSize", "textAlignment"
496
+ * @maxLength 15
497
+ */
498
+ type?: string;
499
+ /**
500
+ * Optional label key for translations
501
+ * @maxLength 100
502
+ */
503
+ labelKey?: string | null;
504
+ /**
505
+ * List of possible options. Used for "fontFamily", "fontStyle", "textAlignment"
506
+ * @maxSize 50
507
+ */
508
+ options?: ValueOption[];
509
+ /** Optional range of the value. Used for "fontSize" */
510
+ range?: Range;
511
+ }
512
+ interface ValueOption {
513
+ /**
514
+ * The label key for translations
515
+ * @maxLength 100
516
+ */
517
+ labelKey?: string;
518
+ /**
519
+ * The value
520
+ * @maxLength 20
521
+ */
522
+ value?: string;
523
+ }
524
+ interface Range {
525
+ /** Minimum value. */
526
+ min?: number | null;
527
+ /** Maximum value. */
528
+ max?: number | null;
529
+ }
530
+ interface TextContentControl {
531
+ /**
532
+ * @minLength 3
533
+ * @maxLength 50
534
+ */
535
+ _id?: string;
536
+ /**
537
+ * @minLength 3
538
+ * @maxLength 100
539
+ */
540
+ labelKey?: string | null;
541
+ /** @max 1000 */
542
+ maxLength?: number | null;
543
+ }
544
+ interface ImageControl {
545
+ /**
546
+ * The id of the setting
547
+ * @maxLength 50
548
+ */
549
+ _id?: string;
550
+ /**
551
+ * Optional label key for translations
552
+ * @maxLength 100
553
+ */
554
+ labelKey?: string | null;
555
+ /** Default setting for this control */
556
+ default?: ImageSetting;
557
+ /**
558
+ * Optional description key for translations
559
+ * @maxLength 100
560
+ */
561
+ descriptionKey?: string | null;
562
+ /** Enable logo builder support */
563
+ showLogoBuilder?: boolean;
564
+ }
565
+ interface SelectControl {
566
+ /**
567
+ * The id of the setting
568
+ * @maxLength 50
569
+ */
570
+ _id?: string;
571
+ /**
572
+ * Optional label key for translations
573
+ * @maxLength 100
574
+ */
575
+ labelKey?: string | null;
576
+ /** Default setting for this control */
577
+ default?: SelectSetting;
578
+ /**
579
+ * List of possible options
580
+ * @minSize 1
581
+ * @maxSize 20
582
+ */
583
+ options?: ValueOption[];
584
+ /** Allows to use primary colour setting from template designer */
585
+ showPrimaryColorPicker?: boolean;
586
+ /** Allows to use secondary colour setting from template designer */
587
+ showSecondaryColorPicker?: boolean;
588
+ /** Allows to use size setting from template designer. */
589
+ showSize?: boolean;
590
+ /** Optional range of the size value. */
591
+ sizeRange?: Range;
592
+ }
593
+ interface BackgroundControl {
594
+ /**
595
+ * The id of the setting
596
+ * @maxLength 50
597
+ */
598
+ _id?: string;
599
+ /**
600
+ * Optional label key for translations
601
+ * @maxLength 100
602
+ */
603
+ labelKey?: string | null;
604
+ /** Default setting for this control */
605
+ default?: BackgroundSetting;
606
+ /** Allows to use colour setting from template designer */
607
+ showColorPicker?: boolean;
608
+ /** Allows to use image setting from template designer */
609
+ showImagePicker?: boolean;
610
+ /** Enables background opacity control */
611
+ opacityEnabled?: boolean | null;
612
+ /** Enables background image opacity control */
613
+ imageOpacityEnabled?: boolean | null;
614
+ /**
615
+ * Default media manager folder with background images
616
+ * @maxLength 256
617
+ */
618
+ mediaRootFolder?: string | null;
619
+ }
620
+ interface GetTemplateRegistryRequest {
621
+ }
622
+ interface GetTemplateRegistryResponse {
623
+ templateRegistry?: TemplateRegistry;
624
+ }
625
+ interface TemplateRegistry {
626
+ /**
627
+ * Templates.
628
+ * @minSize 1
629
+ * @maxSize 1000
630
+ */
631
+ templates?: WixAppTemplate[];
632
+ }
633
+ /** Defines a template and it's styles. */
634
+ interface WixAppTemplate {
635
+ /** Wix App Id */
636
+ wixAppId?: string;
637
+ /** App Slug */
638
+ appSlug?: string;
639
+ /**
640
+ * Template type.
641
+ * @minLength 1
642
+ * @maxLength 20
643
+ */
644
+ templateType?: string;
645
+ /**
646
+ * Templates
647
+ * @minSize 1
648
+ * @maxSize 1000
649
+ */
650
+ templates?: TemplateStyle[];
651
+ /**
652
+ * Short artifact name (key from template-statics-config.json.erb)
653
+ * @minLength 3
654
+ * @maxLength 64
655
+ * @format SYSTEM_SLUG
656
+ */
657
+ templateArtifactName?: string | null;
658
+ /**
659
+ * Local path
660
+ * @minLength 1
661
+ * @maxLength 200
662
+ * @readonly
663
+ */
664
+ localPath?: string | null;
665
+ /**
666
+ * Statics URL
667
+ * @minLength 1
668
+ * @maxLength 200
669
+ * @readonly
670
+ */
671
+ staticsUrl?: string | null;
672
+ }
673
+ /**
674
+ * Defines a template style.
675
+ *
676
+ * Path to TemplateControls json file:
677
+ * papyrus-templates-lib/
678
+ * src/
679
+ * templates/
680
+ * {app_slug}/
681
+ * {template_type}/
682
+ * {id}/
683
+ * controls.json
684
+ */
685
+ interface TemplateStyle {
686
+ /**
687
+ * The id of the template.
688
+ * @minLength 1
689
+ * @maxLength 20
690
+ */
691
+ _id?: string;
692
+ /**
693
+ * Determines which template should be used if user did not choose it yet.
694
+ * Only single template per wix_app_id can be default.
695
+ */
696
+ default?: boolean;
697
+ /** Determines if template cannot be selected for a new entity. */
698
+ inactive?: boolean;
699
+ /** Paper size */
700
+ paperSize?: PaperSizeWithLiterals;
701
+ pageOverflow?: PageOverflowWithLiterals;
702
+ }
703
+ interface DomainEvent extends DomainEventBodyOneOf {
704
+ createdEvent?: EntityCreatedEvent;
705
+ updatedEvent?: EntityUpdatedEvent;
706
+ deletedEvent?: EntityDeletedEvent;
707
+ actionEvent?: ActionEvent;
708
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
709
+ _id?: string;
710
+ /**
711
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
712
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
713
+ */
714
+ entityFqdn?: string;
715
+ /**
716
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
717
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
718
+ */
719
+ slug?: string;
720
+ /** ID of the entity associated with the event. */
721
+ entityId?: string;
722
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
723
+ eventTime?: Date | null;
724
+ /**
725
+ * Whether the event was triggered as a result of a privacy regulation application
726
+ * (for example, GDPR).
727
+ */
728
+ triggeredByAnonymizeRequest?: boolean | null;
729
+ /** If present, indicates the action that triggered the event. */
730
+ originatedFrom?: string | null;
731
+ /**
732
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
733
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
734
+ */
735
+ entityEventSequence?: string | null;
736
+ }
737
+ /** @oneof */
738
+ interface DomainEventBodyOneOf {
739
+ createdEvent?: EntityCreatedEvent;
740
+ updatedEvent?: EntityUpdatedEvent;
741
+ deletedEvent?: EntityDeletedEvent;
742
+ actionEvent?: ActionEvent;
743
+ }
744
+ interface EntityCreatedEvent {
745
+ entity?: string;
746
+ }
747
+ interface RestoreInfo {
748
+ deletedDate?: Date | null;
749
+ }
750
+ interface EntityUpdatedEvent {
751
+ /**
752
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
753
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
754
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
755
+ */
756
+ currentEntity?: string;
757
+ }
758
+ interface EntityDeletedEvent {
759
+ /** Entity that was deleted. */
760
+ deletedEntity?: string | null;
761
+ }
762
+ interface ActionEvent {
763
+ body?: string;
764
+ }
765
+ interface MessageEnvelope {
766
+ /**
767
+ * App instance ID.
768
+ * @format GUID
769
+ */
770
+ instanceId?: string | null;
771
+ /**
772
+ * Event type.
773
+ * @maxLength 150
774
+ */
775
+ eventType?: string;
776
+ /** The identification type and identity data. */
777
+ identity?: IdentificationData;
778
+ /** Stringify payload. */
779
+ data?: string;
780
+ /** Details related to the account */
781
+ accountInfo?: AccountInfo;
782
+ }
783
+ interface IdentificationData extends IdentificationDataIdOneOf {
784
+ /**
785
+ * ID of a site visitor that has not logged in to the site.
786
+ * @format GUID
787
+ */
788
+ anonymousVisitorId?: string;
789
+ /**
790
+ * ID of a site visitor that has logged in to the site.
791
+ * @format GUID
792
+ */
793
+ memberId?: string;
794
+ /**
795
+ * ID of a Wix user (site owner, contributor, etc.).
796
+ * @format GUID
797
+ */
798
+ wixUserId?: string;
799
+ /**
800
+ * ID of an app.
801
+ * @format GUID
802
+ */
803
+ appId?: string;
804
+ /** @readonly */
805
+ identityType?: WebhookIdentityTypeWithLiterals;
806
+ }
807
+ /** @oneof */
808
+ interface IdentificationDataIdOneOf {
809
+ /**
810
+ * ID of a site visitor that has not logged in to the site.
811
+ * @format GUID
812
+ */
813
+ anonymousVisitorId?: string;
814
+ /**
815
+ * ID of a site visitor that has logged in to the site.
816
+ * @format GUID
817
+ */
818
+ memberId?: string;
819
+ /**
820
+ * ID of a Wix user (site owner, contributor, etc.).
821
+ * @format GUID
822
+ */
823
+ wixUserId?: string;
824
+ /**
825
+ * ID of an app.
826
+ * @format GUID
827
+ */
828
+ appId?: string;
829
+ }
830
+ declare enum WebhookIdentityType {
831
+ UNKNOWN = "UNKNOWN",
832
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
833
+ MEMBER = "MEMBER",
834
+ WIX_USER = "WIX_USER",
835
+ APP = "APP"
836
+ }
837
+ /** @enumType */
838
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
839
+ interface AccountInfo {
840
+ /**
841
+ * ID of the Wix account associated with the event.
842
+ * @format GUID
843
+ */
844
+ accountId?: string | null;
845
+ /**
846
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
847
+ * @format GUID
848
+ */
849
+ parentAccountId?: string | null;
850
+ /**
851
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
852
+ * @format GUID
853
+ */
854
+ siteId?: string | null;
855
+ }
856
+ /** @docsIgnore */
857
+ type UpsertTemplateSettingsApplicationErrors = {
858
+ code?: 'INVALID_TEMPLATE_SETTINGS';
859
+ description?: string;
860
+ data?: Record<string, any>;
861
+ };
862
+ /** @docsIgnore */
863
+ type ResolveTemplateSettingsApplicationErrors = {
864
+ code?: 'TEMPLATE_NOT_FOUND';
865
+ description?: string;
866
+ data?: Record<string, any>;
867
+ };
868
+ interface BaseEventMetadata {
869
+ /**
870
+ * App instance ID.
871
+ * @format GUID
872
+ */
873
+ instanceId?: string | null;
874
+ /**
875
+ * Event type.
876
+ * @maxLength 150
877
+ */
878
+ eventType?: string;
879
+ /** The identification type and identity data. */
880
+ identity?: IdentificationData;
881
+ /** Details related to the account */
882
+ accountInfo?: AccountInfo;
883
+ }
884
+ interface EventMetadata extends BaseEventMetadata {
885
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
886
+ _id?: string;
887
+ /**
888
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
889
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
890
+ */
891
+ entityFqdn?: string;
892
+ /**
893
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
894
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
895
+ */
896
+ slug?: string;
897
+ /** ID of the entity associated with the event. */
898
+ entityId?: string;
899
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
900
+ eventTime?: Date | null;
901
+ /**
902
+ * Whether the event was triggered as a result of a privacy regulation application
903
+ * (for example, GDPR).
904
+ */
905
+ triggeredByAnonymizeRequest?: boolean | null;
906
+ /** If present, indicates the action that triggered the event. */
907
+ originatedFrom?: string | null;
908
+ /**
909
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
910
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
911
+ */
912
+ entityEventSequence?: string | null;
913
+ accountInfo?: AccountInfoMetadata;
914
+ }
915
+ interface AccountInfoMetadata {
916
+ /** ID of the Wix account associated with the event */
917
+ accountId: string;
918
+ /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
919
+ siteId?: string;
920
+ /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
921
+ parentAccountId?: string;
922
+ }
923
+ interface TemplateSettingsCreatedEnvelope {
924
+ entity: TemplateSettings;
925
+ metadata: EventMetadata;
926
+ }
927
+ /** @webhook
928
+ * @eventType wix.papyrus.v1.template_settings_created
929
+ * @serviceIdentifier wix.papyrus.v1.TemplateSettingsService
930
+ * @slug created
931
+ * @documentationMaturity preview
932
+ */
933
+ declare function onTemplateSettingsCreated(handler: (event: TemplateSettingsCreatedEnvelope) => void | Promise<void>): void;
934
+ interface TemplateSettingsUpdatedEnvelope {
935
+ entity: TemplateSettings;
936
+ metadata: EventMetadata;
937
+ }
938
+ /** @webhook
939
+ * @eventType wix.papyrus.v1.template_settings_updated
940
+ * @serviceIdentifier wix.papyrus.v1.TemplateSettingsService
941
+ * @slug updated
942
+ * @documentationMaturity preview
943
+ */
944
+ declare function onTemplateSettingsUpdated(handler: (event: TemplateSettingsUpdatedEnvelope) => void | Promise<void>): void;
945
+ /**
946
+ * Upsert Template Settings.
947
+ * @public
948
+ * @documentationMaturity preview
949
+ * @requiredField options.settings.appSlug
950
+ * @requiredField options.settings.externalId
951
+ * @requiredField options.settings.templateId
952
+ * @requiredField options.settings.templateType
953
+ * @permissionId PAPYRUS.MANAGE_TEMPLATE_SETTINGS
954
+ * @applicableIdentity APP
955
+ * @fqn wix.papyrus.v1.TemplateSettingsService.UpsertTemplateSettings
956
+ */
957
+ declare function upsertTemplateSettings(options?: UpsertTemplateSettingsOptions): Promise<UpsertTemplateSettingsResponse & {
958
+ __applicationErrorsType?: UpsertTemplateSettingsApplicationErrors;
959
+ }>;
960
+ interface UpsertTemplateSettingsOptions {
961
+ /** Settings to be upserted. */
962
+ settings?: TemplateSettings;
963
+ }
964
+ /**
965
+ * Lists Template Settings.
966
+ * @public
967
+ * @documentationMaturity preview
968
+ * @permissionId PAPYRUS.READ_TEMPLATE_SETTINGS
969
+ * @applicableIdentity APP
970
+ * @fqn wix.papyrus.v1.TemplateSettingsService.QueryTemplateSettings
971
+ */
972
+ declare function queryTemplateSettings(): SettingsQueryBuilder;
973
+ interface QueryCursorResult {
974
+ cursors: Cursors;
975
+ hasNext: () => boolean;
976
+ hasPrev: () => boolean;
977
+ length: number;
978
+ pageSize: number;
979
+ }
980
+ interface SettingsQueryResult extends QueryCursorResult {
981
+ items: TemplateSettings[];
982
+ query: SettingsQueryBuilder;
983
+ next: () => Promise<SettingsQueryResult>;
984
+ prev: () => Promise<SettingsQueryResult>;
985
+ }
986
+ interface SettingsQueryBuilder {
987
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
988
+ * @documentationMaturity preview
989
+ */
990
+ limit: (limit: number) => SettingsQueryBuilder;
991
+ /** @param cursor - A pointer to specific record
992
+ * @documentationMaturity preview
993
+ */
994
+ skipTo: (cursor: string) => SettingsQueryBuilder;
995
+ /** @documentationMaturity preview */
996
+ find: () => Promise<SettingsQueryResult>;
997
+ }
998
+ /**
999
+ * @hidden
1000
+ * @fqn wix.papyrus.v1.TemplateSettingsService.QueryTemplateSettings
1001
+ * @requiredField query
1002
+ */
1003
+ declare function typedQueryTemplateSettings(query: TemplateSettingsQuery): Promise<QueryTemplateSettingsResponse>;
1004
+ interface TemplateSettingsQuerySpec extends QuerySpec {
1005
+ paging: 'cursor';
1006
+ wql: [];
1007
+ }
1008
+ type CommonQueryWithEntityContext = Query<TemplateSettings, TemplateSettingsQuerySpec>;
1009
+ type TemplateSettingsQuery = {
1010
+ /**
1011
+ Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.
1012
+ */
1013
+ cursorPaging?: {
1014
+ /**
1015
+ Maximum number of items to return in the results.
1016
+ @max: 100
1017
+ */
1018
+ limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
1019
+ /**
1020
+ Pointer to the next or previous page in the list of results.
1021
+
1022
+ Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1023
+ Not relevant for the first request.
1024
+ @maxLength: 16000
1025
+ */
1026
+ cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
1027
+ };
1028
+ /**
1029
+ Filter object.
1030
+
1031
+ Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
1032
+ */
1033
+ filter?: CommonQueryWithEntityContext['filter'] | null;
1034
+ /**
1035
+ Sort object.
1036
+
1037
+ Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
1038
+ */
1039
+ sort?: {
1040
+ /**
1041
+ Name of the field to sort by.
1042
+ @maxLength: 512
1043
+ */
1044
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
1045
+ /**
1046
+ Sort order.
1047
+ */
1048
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
1049
+ }[];
1050
+ };
1051
+ declare const utils: {
1052
+ query: {
1053
+ QueryBuilder: () => _wix_sdk_types.QueryBuilder<TemplateSettings, TemplateSettingsQuerySpec, TemplateSettingsQuery>;
1054
+ Filter: _wix_sdk_types.FilterFactory<TemplateSettings, TemplateSettingsQuerySpec>;
1055
+ Sort: _wix_sdk_types.SortFactory<TemplateSettingsQuerySpec>;
1056
+ };
1057
+ };
1058
+ /**
1059
+ * Resolve Template Settings. Returns default Template Settings if it does not exist.
1060
+ * @public
1061
+ * @documentationMaturity preview
1062
+ * @requiredField options.appSlug
1063
+ * @requiredField options.templateType
1064
+ * @permissionId PAPYRUS.READ_TEMPLATE_SETTINGS
1065
+ * @applicableIdentity APP
1066
+ * @fqn wix.papyrus.v1.TemplateSettingsService.ResolveTemplateSettings
1067
+ */
1068
+ declare function resolveTemplateSettings(options?: ResolveTemplateSettingsOptions): Promise<ResolveTemplateSettingsResponse & {
1069
+ __applicationErrorsType?: ResolveTemplateSettingsApplicationErrors;
1070
+ }>;
1071
+ interface ResolveTemplateSettingsOptions {
1072
+ /**
1073
+ * The id of the settings.
1074
+ * @format GUID
1075
+ */
1076
+ templateSettingsId?: string | null;
1077
+ /**
1078
+ * External ID.
1079
+ * @maxLength 100
1080
+ */
1081
+ templateSettingsExternalId?: string | null;
1082
+ /**
1083
+ * The type of the template. Used to resolve default settings.
1084
+ * @minLength 1
1085
+ * @maxLength 20
1086
+ */
1087
+ templateType: string | null;
1088
+ /**
1089
+ * Wix app slug.
1090
+ * @minLength 1
1091
+ * @maxLength 20
1092
+ */
1093
+ appSlug: string | null;
1094
+ /**
1095
+ * The id of template.
1096
+ * @minLength 1
1097
+ * @maxLength 20
1098
+ */
1099
+ templateId?: string | null;
1100
+ }
1101
+
1102
+ export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type BackgroundControl, type BackgroundSetting, type BaseEventMetadata, type BulkCreateTemplateSettingsRequest, type BulkCreateTemplateSettingsResponse, type CommonQueryWithEntityContext, type ControlGroup, type CreateTemplateSettingsRequest, type CreateTemplateSettingsResponse, type CursorPaging, type Cursors, type DeleteTemplateSettingsRequest, type DeleteTemplateSettingsResponse, type DisplayControl, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type FocalPoint, type GetTemplateControlsRequest, type GetTemplateControlsResponse, type GetTemplateRegistryRequest, type GetTemplateRegistryResponse, type GetTemplateSettingsRequest, type GetTemplateSettingsResponse, type IdentificationData, type IdentificationDataIdOneOf, type ImageControl, type ImageSetting, type MessageEnvelope, PageOverflow, type PageOverflowWithLiterals, type Paging, type PagingMetadataV2, PaperSize, type PaperSizeWithLiterals, type QueryTemplateSettingsRequest, type QueryTemplateSettingsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type Range, ResizeOption, type ResizeOptionWithLiterals, type ResolveTemplateSettingsApplicationErrors, type ResolveTemplateSettingsOptions, type ResolveTemplateSettingsRequest, type ResolveTemplateSettingsResponse, type RestoreInfo, type SelectControl, type SelectSetting, type SettingsGroup, type SettingsQueryBuilder, type SettingsQueryResult, SortOrder, type SortOrderWithLiterals, type Sorting, type TemplateControls, type TemplateRegistry, type TemplateSettings, type TemplateSettingsCreatedEnvelope, type TemplateSettingsQuery, type TemplateSettingsQuerySpec, type TemplateSettingsUpdatedEnvelope, type TemplateStyle, type TextContent, type TextContentControl, type TextControl, type TextPropertyControl, type TextSetting, type UpdateTemplateSettingsRequest, type UpdateTemplateSettingsResponse, type UpsertTemplateSettingsApplicationErrors, type UpsertTemplateSettingsOptions, type UpsertTemplateSettingsRequest, type UpsertTemplateSettingsResponse, type ValueOption, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixAppTemplate, onTemplateSettingsCreated, onTemplateSettingsUpdated, queryTemplateSettings, resolveTemplateSettings, typedQueryTemplateSettings, upsertTemplateSettings, utils };