@wix/forms 1.0.102 → 1.0.104

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.
@@ -1,3301 +1,8 @@
1
- interface Form {
2
- /**
3
- * Form ID.
4
- * @readonly
5
- */
6
- _id?: string | null;
7
- /** List of form fields that represent input elements. */
8
- fields?: FormField[];
9
- /**
10
- * List of form fields that represent input elements.
11
- * @readonly
12
- */
13
- fieldsV2?: FormFieldV2[];
14
- /** Defines the layout for form fields in each submission step. */
15
- steps?: Step[];
16
- /** Form rules, can be applied to layout and items properties. */
17
- rules?: FormRule[];
18
- /**
19
- * Represents the current state of an item. Each time the item is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision.
20
- * @readonly
21
- */
22
- revision?: string | null;
23
- /**
24
- * Date of creation.
25
- * @readonly
26
- */
27
- _createdDate?: Date;
28
- /**
29
- * Date of last update.
30
- * @readonly
31
- */
32
- _updatedDate?: Date;
33
- /** Properties of the form. */
34
- properties?: FormProperties;
35
- /**
36
- * Fields which were soft deleted.
37
- * @readonly
38
- */
39
- deletedFields?: FormField[];
40
- /**
41
- * List of form fields that represent input elements.
42
- * @readonly
43
- */
44
- deletedFieldsV2?: FormFieldV2[];
45
- /**
46
- * Regular forms can be freely modified.
47
- * Extensions are copied from templates and might have restrictions.
48
- * @readonly
49
- */
50
- kind?: Kind;
51
- /**
52
- * Defines triggers that will be executed after the submission, for the submissions based on this schema.
53
- * Forms provide a set of predefined triggers that allow it to assign specific business cases to created forms.
54
- */
55
- postSubmissionTriggers?: PostSubmissionTriggers;
56
- /** Data extensions ExtendedFields. */
57
- extendedFields?: ExtendedFields$2;
58
- /** Identifies the namespace that the form belongs to. */
59
- namespace?: string;
60
- /**
61
- * Media folder ID.
62
- * @readonly
63
- */
64
- mediaFolderId?: string | null;
65
- /** Rules that limit submissions on this form. */
66
- limitationRule?: LimitationRule;
67
- /**
68
- * Spam filter protection level.
69
- * Default: ADVANCED.
70
- */
71
- spamFilterProtectionLevel?: SpamFilterProtectionLevel;
72
- /** Required indicator properties. */
73
- requiredIndicatorProperties?: RequiredIndicatorProperties;
74
- }
75
- declare enum RequiredIndicator {
76
- UNKNOWN_INDICATOR = "UNKNOWN_INDICATOR",
77
- /** Asterisk (*). */
78
- ASTERISK = "ASTERISK",
79
- /** Text (default: "Required"). */
80
- TEXT = "TEXT",
81
- /** None. */
82
- NONE = "NONE"
83
- }
84
- declare enum RequiredIndicatorPlacement {
85
- UNKNOWN_PLACEMENT = "UNKNOWN_PLACEMENT",
86
- /** After field title. */
87
- AFTER_FIELD_TITLE = "AFTER_FIELD_TITLE",
88
- /** Before field title. */
89
- BEFORE_FIELD_TITLE = "BEFORE_FIELD_TITLE"
90
- }
91
- interface FormField {
92
- /** Item ID. */
93
- _id?: string;
94
- /** Definition of a target where the value of field belongs. */
95
- target?: string | null;
96
- /** Validation of field output value. */
97
- validation?: Validation;
98
- /** Mark the field as containing personal information. This will encrypt user data when storing it. */
99
- pii?: boolean;
100
- /** Whether the field is hidden. */
101
- hidden?: boolean;
102
- /** Field view properties. */
103
- view?: Record<string, any> | null;
104
- /** Details identifying field, which is extension of other entity */
105
- dataExtensionsDetails?: DataExtensionsDetails;
106
- }
107
- interface StringType extends StringTypeFormatOptionsOneOf {
108
- /** DATE format options */
109
- dateOptions?: DateTimeConstraints;
110
- /** DATE_TIME format options */
111
- dateTimeOptions?: DateTimeConstraints;
112
- /** TIME format options */
113
- timeOptions?: DateTimeConstraints;
114
- /** DATE_OPTIONAL_TIME format options */
115
- dateOptionalTimeOptions?: DateTimeConstraints;
116
- /** Minimum length. */
117
- minLength?: number | null;
118
- /** Maximum length. */
119
- maxLength?: number | null;
120
- /** Pattern for a regular expression match. */
121
- pattern?: string | null;
122
- /** Format of a string. */
123
- format?: Format;
124
- /** Custom error messages when validation fails. */
125
- errorMessages?: StringErrorMessages;
126
- /** List of allowed values. */
127
- enum?: string[] | null;
128
- }
129
- /** @oneof */
130
- interface StringTypeFormatOptionsOneOf {
131
- /** DATE format options */
132
- dateOptions?: DateTimeConstraints;
133
- /** DATE_TIME format options */
134
- dateTimeOptions?: DateTimeConstraints;
135
- /** TIME format options */
136
- timeOptions?: DateTimeConstraints;
137
- /** DATE_OPTIONAL_TIME format options */
138
- dateOptionalTimeOptions?: DateTimeConstraints;
139
- }
140
- declare enum Format {
141
- UNDEFINED = "UNDEFINED",
142
- DATE = "DATE",
143
- TIME = "TIME",
144
- DATE_TIME = "DATE_TIME",
145
- EMAIL = "EMAIL",
146
- URL = "URL",
147
- UUID = "UUID",
148
- PHONE = "PHONE",
149
- URI = "URI",
150
- HOSTNAME = "HOSTNAME",
151
- COLOR_HEX = "COLOR_HEX",
152
- CURRENCY = "CURRENCY",
153
- LANGUAGE = "LANGUAGE",
154
- DATE_OPTIONAL_TIME = "DATE_OPTIONAL_TIME"
155
- }
156
- interface StringErrorMessages {
157
- /** Default error message on invalid validation. */
158
- default?: string | null;
159
- }
160
- interface DateTimeConstraints {
161
- /**
162
- * Support static constrains defined as ISO date/time format, as well as
163
- * dynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.
164
- * The dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.
165
- * The regex pattern for dynamic calculations is: \$now([+-]\d{1,2})([yMdmh])
166
- */
167
- minimum?: string | null;
168
- /**
169
- * Support static constrains defined as ISO date/time format, as well as
170
- * dynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.
171
- * The dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.
172
- * The regex pattern for dynamic calculations is: \$now([+-]\d{1,2})([yMdmh])
173
- */
174
- maximum?: string | null;
175
- }
176
- interface NumberType {
177
- /** Inclusive maximum value. */
178
- maximum?: number | null;
179
- /** Inclusive minimum value. */
180
- minimum?: number | null;
181
- /** Multiple of value. */
182
- multipleOf?: number | null;
183
- /** Custom error message when validation fails. */
184
- errorMessages?: NumberErrorMessages;
185
- /** List of allowed values. */
186
- enum?: number[] | null;
187
- }
188
- interface NumberErrorMessages {
189
- /** Default error message on invalid validation. */
190
- default?: string | null;
191
- }
192
- interface IntegerType {
193
- /** Minimum value. */
194
- maximum?: number | null;
195
- /** Maximum value. */
196
- minimum?: number | null;
197
- /** Multiple of value. */
198
- multipleOf?: number | null;
199
- /** Custom error message when validation fails. */
200
- errorMessages?: NumberErrorMessages;
201
- /** List of allowed values. */
202
- enum?: number[] | null;
203
- }
204
- interface BooleanType {
205
- /** Custom error message when validation fails. */
206
- errorMessages?: BooleanErrorMessages;
207
- /** List of allowed values. */
208
- enum?: boolean[];
209
- }
210
- interface BooleanErrorMessages {
211
- /** Default error message on invalid validation. */
212
- default?: string | null;
213
- }
214
- interface ArrayType {
215
- /** Maximum amount of array elements. */
216
- maxItems?: number | null;
217
- /** Minimum amount of array elements. */
218
- minItems?: number | null;
219
- /** Type of items allowed in array. */
220
- items?: ArrayItems;
221
- /** Custom error message when validation fails. */
222
- errorMessages?: ArrayErrorMessages;
223
- }
224
- interface ObjectType {
225
- /** Description of object properties. */
226
- properties?: Record<string, PropertiesType>;
227
- /** Custom error message when validation fails. */
228
- errorMessages?: ObjectErrorMessages;
229
- }
230
- interface PropertiesType extends PropertiesTypePropertiesTypeOneOf {
231
- /** String type validation for property. */
232
- string?: StringType;
233
- /** Number type validation for property. */
234
- number?: NumberType;
235
- /** Boolean type validation for property. */
236
- boolean?: BooleanType;
237
- /** Integer type validation for property. */
238
- integer?: IntegerType;
239
- /** Array type validation for property. */
240
- array?: ArrayType;
241
- /** Whether the property is required. */
242
- required?: boolean;
243
- }
244
- /** @oneof */
245
- interface PropertiesTypePropertiesTypeOneOf {
246
- /** String type validation for property. */
247
- string?: StringType;
248
- /** Number type validation for property. */
249
- number?: NumberType;
250
- /** Boolean type validation for property. */
251
- boolean?: BooleanType;
252
- /** Integer type validation for property. */
253
- integer?: IntegerType;
254
- /** Array type validation for property. */
255
- array?: ArrayType;
256
- }
257
- interface ObjectErrorMessages {
258
- /** Default error message on invalid validation. */
259
- default?: string | null;
260
- }
261
- interface ArrayItems extends ArrayItemsItemsOneOf {
262
- /** String type validation for items. */
263
- string?: StringType;
264
- /** Number type validation for items. */
265
- number?: NumberType;
266
- /** Boolean type validation for items. */
267
- boolean?: BooleanType;
268
- /** Integer type validation for items. */
269
- integer?: IntegerType;
270
- /** Object type validation for items */
271
- object?: ObjectType;
272
- }
273
- /** @oneof */
274
- interface ArrayItemsItemsOneOf {
275
- /** String type validation for items. */
276
- string?: StringType;
277
- /** Number type validation for items. */
278
- number?: NumberType;
279
- /** Boolean type validation for items. */
280
- boolean?: BooleanType;
281
- /** Integer type validation for items. */
282
- integer?: IntegerType;
283
- /** Object type validation for items */
284
- object?: ObjectType;
285
- }
286
- interface ArrayErrorMessages {
287
- /** Default error message on invalid validation. */
288
- default?: string | null;
289
- }
290
- interface PredefinedValidation extends PredefinedValidationFormatOptionsOneOf {
291
- /** Payment input field. */
292
- paymentOptions?: PaymentType;
293
- /** Multiline address validation. */
294
- multilineAddressOptions?: MultilineAddressValidation;
295
- /** Format of predefined validation. */
296
- format?: ValidationFormat;
297
- }
298
- /** @oneof */
299
- interface PredefinedValidationFormatOptionsOneOf {
300
- /** Payment input field. */
301
- paymentOptions?: PaymentType;
302
- /** Multiline address validation. */
303
- multilineAddressOptions?: MultilineAddressValidation;
304
- }
305
- declare enum ValidationFormat {
306
- UNDEFINED = "UNDEFINED",
307
- /** File upload validation. */
308
- WIX_FILE = "WIX_FILE",
309
- /** Payment validation. */
310
- PAYMENT = "PAYMENT",
311
- /** Multiline address. */
312
- MULTILINE_ADDRESS = "MULTILINE_ADDRESS"
313
- }
314
- interface PaymentType {
315
- /** Field mapped to products. */
316
- products?: Product[];
317
- /** Minimum amount of different products. */
318
- minItems?: number | null;
319
- /** Maximum amount of different products. */
320
- maxItems?: number | null;
321
- }
322
- declare enum ProductType {
323
- UNKNOWN = "UNKNOWN",
324
- /** Shippable (physical). */
325
- SHIPPABLE = "SHIPPABLE",
326
- /** Digital. */
327
- DIGITAL = "DIGITAL"
328
- }
329
- declare enum PriceType {
330
- UNKNOWN = "UNKNOWN",
331
- /** Fixed price. */
332
- FIXED_PRICE = "FIXED_PRICE",
333
- /** Dynamic price from price range. */
334
- DYNAMIC_PRICE = "DYNAMIC_PRICE"
335
- }
336
- interface QuantityLimit {
337
- /** Minimum quantity. */
338
- minimum?: number | null;
339
- /** Maximum quantity. */
340
- maximum?: number | null;
341
- }
342
- interface FixedPriceOptions {
343
- /** Fixed price monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). */
344
- price?: string;
345
- }
346
- interface DynamicPriceOptions {
347
- /** Minimal price monetary amount. */
348
- minPrice?: string;
349
- /** Maximal price monetary amount. */
350
- maxPrice?: string | null;
351
- }
352
- interface Product extends ProductPriceOptionsOneOf {
353
- /** Fixed price options. */
354
- fixedPriceOptions?: FixedPriceOptions;
355
- /** Dynamic price options. */
356
- dynamicPriceOptions?: DynamicPriceOptions;
357
- /**
358
- * Product ID.
359
- * @readonly
360
- */
361
- _id?: string;
362
- /** Product type. */
363
- productType?: ProductType;
364
- /** Price type. */
365
- priceType?: PriceType;
366
- /** Quantity limit. */
367
- quantityLimit?: QuantityLimit;
368
- }
369
- /** @oneof */
370
- interface ProductPriceOptionsOneOf {
371
- /** Fixed price options. */
372
- fixedPriceOptions?: FixedPriceOptions;
373
- /** Dynamic price options. */
374
- dynamicPriceOptions?: DynamicPriceOptions;
375
- }
376
- interface MultilineAddressValidation {
377
- /** Allowed countries. No countries treated as all. */
378
- allowedCountries?: string[];
379
- /** Fields overrides. */
380
- fields?: FieldsOverrides;
381
- }
382
- interface FieldOverrides {
383
- /** Whether the field is required. */
384
- required?: boolean;
385
- }
386
- interface FieldsOverrides {
387
- /** Subdivision. */
388
- subdivision?: FieldOverrides;
389
- /** City. */
390
- city?: FieldOverrides;
391
- /** Postal code. */
392
- postalCode?: FieldOverrides;
393
- /** Street name. */
394
- streetName?: FieldOverrides;
395
- /** Street number. */
396
- streetNumber?: FieldOverrides;
397
- /** Address line. */
398
- addressLine?: FieldOverrides;
399
- /** Address line 2. */
400
- addressLine2?: FieldOverrides;
401
- /** Country. */
402
- country?: FieldOverrides;
403
- }
404
- interface Validation extends ValidationValidationOneOf {
405
- /** Validation of string type. */
406
- string?: StringType;
407
- /** Validation of number type. */
408
- number?: NumberType;
409
- /** Validation of integer type. */
410
- integer?: IntegerType;
411
- /** Validation of boolean type. */
412
- boolean?: BooleanType;
413
- /** Validation of array type. */
414
- array?: ArrayType;
415
- /** Validation of object type. */
416
- object?: ObjectType;
417
- /** Predefined validation of specific format */
418
- predefined?: PredefinedValidation;
419
- /** Whether the field is required. */
420
- required?: boolean;
421
- }
422
- /** @oneof */
423
- interface ValidationValidationOneOf {
424
- /** Validation of string type. */
425
- string?: StringType;
426
- /** Validation of number type. */
427
- number?: NumberType;
428
- /** Validation of integer type. */
429
- integer?: IntegerType;
430
- /** Validation of boolean type. */
431
- boolean?: BooleanType;
432
- /** Validation of array type. */
433
- array?: ArrayType;
434
- /** Validation of object type. */
435
- object?: ObjectType;
436
- /** Predefined validation of specific format */
437
- predefined?: PredefinedValidation;
438
- }
439
- interface DataExtensionsDetails {
440
- /** FQDNS which can be extended with this field */
441
- fqdns?: string[];
442
- }
443
- interface FormFieldV2 extends FormFieldV2FieldTypeOptionsOneOf {
444
- /** Field accept input of data */
445
- inputOptions?: InputField;
446
- /** Field for displaying information such as header or text paragraph */
447
- displayOptions?: DisplayField;
448
- /** Submit button of the form */
449
- submitOptions?: SubmitButton;
450
- /** Field id. */
451
- _id?: string;
452
- /**
453
- * Whether the field is hidden.
454
- * Default: false
455
- */
456
- hidden?: boolean;
457
- /** Custom identification of field, can be used to specify exceptional behaviour of client for specific field */
458
- identifier?: string | null;
459
- /**
460
- * Type of the field
461
- * @readonly
462
- */
463
- fieldType?: FieldType;
464
- /** Mapping to contacts, telling to what contact property field input value should be saved. */
465
- contactMapping?: FormFieldContactInfo;
466
- }
467
- /** @oneof */
468
- interface FormFieldV2FieldTypeOptionsOneOf {
469
- /** Field accept input of data */
470
- inputOptions?: InputField;
471
- /** Field for displaying information such as header or text paragraph */
472
- displayOptions?: DisplayField;
473
- /** Submit button of the form */
474
- submitOptions?: SubmitButton;
475
- }
476
- interface InputFieldStringType {
477
- /** Minimum length. */
478
- minLength?: number | null;
479
- /** Maximum length. */
480
- maxLength?: number | null;
481
- /** Pattern for a regular expression match. */
482
- pattern?: string | null;
483
- /** Format of a string. */
484
- format?: FormatEnumFormat;
485
- /** Custom error messages when validation fails. */
486
- errorMessages?: InputFieldStringErrorMessages;
487
- /** List of allowed values. */
488
- enum?: string[] | null;
489
- }
490
- declare enum FormatEnumFormat {
491
- UNDEFINED = "UNDEFINED",
492
- DATE = "DATE",
493
- TIME = "TIME",
494
- DATE_TIME = "DATE_TIME",
495
- EMAIL = "EMAIL",
496
- URL = "URL",
497
- UUID = "UUID",
498
- PHONE = "PHONE",
499
- URI = "URI",
500
- HOSTNAME = "HOSTNAME",
501
- COLOR_HEX = "COLOR_HEX",
502
- CURRENCY = "CURRENCY",
503
- LANGUAGE = "LANGUAGE",
504
- DATE_OPTIONAL_TIME = "DATE_OPTIONAL_TIME"
505
- }
506
- interface InputFieldStringErrorMessages {
507
- /** Default error message on invalid validation. */
508
- default?: string | null;
509
- }
510
- declare enum StringComponentType {
511
- UNKNOWN = "UNKNOWN",
512
- TEXT_INPUT = "TEXT_INPUT",
513
- RADIO_GROUP = "RADIO_GROUP",
514
- DROPDOWN = "DROPDOWN",
515
- DATE_TIME = "DATE_TIME",
516
- PHONE_INPUT = "PHONE_INPUT"
517
- }
518
- interface TextInput {
519
- /** Label of the field */
520
- label?: string | null;
521
- /** Description of the field */
522
- description?: RichContent;
523
- /** Placeholder for the value input */
524
- placeholder?: string | null;
525
- /**
526
- * Flag identifying to hide or not label
527
- * Default: true
528
- */
529
- showLabel?: boolean | null;
530
- }
531
- interface RichContent {
532
- /** Node objects representing a rich content document. */
533
- nodes?: Node[];
534
- /** Object metadata. */
535
- metadata?: Metadata;
536
- /** Global styling for header, paragraph, block quote, and code block nodes in the object. */
537
- documentStyle?: DocumentStyle;
538
- }
539
- interface Node extends NodeDataOneOf {
540
- /** Data for a button node. */
541
- buttonData?: ButtonData;
542
- /** Data for a code block node. */
543
- codeBlockData?: CodeBlockData;
544
- /** Data for a divider node. */
545
- dividerData?: DividerData;
546
- /** Data for a file node. */
547
- fileData?: FileData;
548
- /** Data for a gallery node. */
549
- galleryData?: GalleryData;
550
- /** Data for a GIF node. */
551
- gifData?: GIFData;
552
- /** Data for a heading node. */
553
- headingData?: HeadingData;
554
- /** Data for an embedded HTML node. */
555
- htmlData?: HTMLData;
556
- /** Data for an image node. */
557
- imageData?: ImageData;
558
- /** Data for a link preview node. */
559
- linkPreviewData?: LinkPreviewData;
560
- /** Data for a map node. */
561
- mapData?: MapData;
562
- /** Data for a paragraph node. */
563
- paragraphData?: ParagraphData;
564
- /** Data for a poll node. */
565
- pollData?: PollData;
566
- /** Data for a text node. Used to apply decorations to text. */
567
- textData?: TextData;
568
- /** Data for an app embed node. */
569
- appEmbedData?: AppEmbedData;
570
- /** Data for a video node. */
571
- videoData?: VideoData;
572
- /** Data for an oEmbed node. */
573
- embedData?: EmbedData;
574
- /** Data for a collapsible list node. */
575
- collapsibleListData?: CollapsibleListData;
576
- /** Data for a table node. */
577
- tableData?: TableData;
578
- /** Data for a table cell node. */
579
- tableCellData?: TableCellData;
580
- /** Data for a custom external node. */
581
- externalData?: Record<string, any> | null;
582
- /** Data for an audio node. */
583
- audioData?: AudioData;
584
- /** Data for an ordered list node. */
585
- orderedListData?: OrderedListData;
586
- /** Data for a bulleted list node. */
587
- bulletedListData?: BulletedListData;
588
- /** Data for a block quote node. */
589
- blockquoteData?: BlockquoteData;
590
- /** Node type. Use `APP_EMBED` for nodes that embed content from other Wix apps. Use `EMBED` to embed content in [oEmbed](https://oembed.com/) format. */
591
- type?: NodeType;
592
- /** Node ID. */
593
- _id?: string;
594
- /** A list of child nodes. */
595
- nodes?: Node[];
596
- /** Padding and background color styling for the node. */
597
- style?: NodeStyle;
598
- }
599
- /** @oneof */
600
- interface NodeDataOneOf {
601
- /** Data for a button node. */
602
- buttonData?: ButtonData;
603
- /** Data for a code block node. */
604
- codeBlockData?: CodeBlockData;
605
- /** Data for a divider node. */
606
- dividerData?: DividerData;
607
- /** Data for a file node. */
608
- fileData?: FileData;
609
- /** Data for a gallery node. */
610
- galleryData?: GalleryData;
611
- /** Data for a GIF node. */
612
- gifData?: GIFData;
613
- /** Data for a heading node. */
614
- headingData?: HeadingData;
615
- /** Data for an embedded HTML node. */
616
- htmlData?: HTMLData;
617
- /** Data for an image node. */
618
- imageData?: ImageData;
619
- /** Data for a link preview node. */
620
- linkPreviewData?: LinkPreviewData;
621
- /** Data for a map node. */
622
- mapData?: MapData;
623
- /** Data for a paragraph node. */
624
- paragraphData?: ParagraphData;
625
- /** Data for a poll node. */
626
- pollData?: PollData;
627
- /** Data for a text node. Used to apply decorations to text. */
628
- textData?: TextData;
629
- /** Data for an app embed node. */
630
- appEmbedData?: AppEmbedData;
631
- /** Data for a video node. */
632
- videoData?: VideoData;
633
- /** Data for an oEmbed node. */
634
- embedData?: EmbedData;
635
- /** Data for a collapsible list node. */
636
- collapsibleListData?: CollapsibleListData;
637
- /** Data for a table node. */
638
- tableData?: TableData;
639
- /** Data for a table cell node. */
640
- tableCellData?: TableCellData;
641
- /** Data for a custom external node. */
642
- externalData?: Record<string, any> | null;
643
- /** Data for an audio node. */
644
- audioData?: AudioData;
645
- /** Data for an ordered list node. */
646
- orderedListData?: OrderedListData;
647
- /** Data for a bulleted list node. */
648
- bulletedListData?: BulletedListData;
649
- /** Data for a block quote node. */
650
- blockquoteData?: BlockquoteData;
651
- }
652
- declare enum NodeType {
653
- PARAGRAPH = "PARAGRAPH",
654
- TEXT = "TEXT",
655
- HEADING = "HEADING",
656
- BULLETED_LIST = "BULLETED_LIST",
657
- ORDERED_LIST = "ORDERED_LIST",
658
- LIST_ITEM = "LIST_ITEM",
659
- BLOCKQUOTE = "BLOCKQUOTE",
660
- CODE_BLOCK = "CODE_BLOCK",
661
- VIDEO = "VIDEO",
662
- DIVIDER = "DIVIDER",
663
- FILE = "FILE",
664
- GALLERY = "GALLERY",
665
- GIF = "GIF",
666
- HTML = "HTML",
667
- IMAGE = "IMAGE",
668
- LINK_PREVIEW = "LINK_PREVIEW",
669
- MAP = "MAP",
670
- POLL = "POLL",
671
- APP_EMBED = "APP_EMBED",
672
- BUTTON = "BUTTON",
673
- COLLAPSIBLE_LIST = "COLLAPSIBLE_LIST",
674
- TABLE = "TABLE",
675
- EMBED = "EMBED",
676
- COLLAPSIBLE_ITEM = "COLLAPSIBLE_ITEM",
677
- COLLAPSIBLE_ITEM_TITLE = "COLLAPSIBLE_ITEM_TITLE",
678
- COLLAPSIBLE_ITEM_BODY = "COLLAPSIBLE_ITEM_BODY",
679
- TABLE_CELL = "TABLE_CELL",
680
- TABLE_ROW = "TABLE_ROW",
681
- EXTERNAL = "EXTERNAL",
682
- AUDIO = "AUDIO"
683
- }
684
- interface NodeStyle {
685
- /** The top padding value in pixels. */
686
- paddingTop?: string | null;
687
- /** The bottom padding value in pixels. */
688
- paddingBottom?: string | null;
689
- /** The background color as a hexadecimal value. */
690
- backgroundColor?: string | null;
691
- }
692
- interface ButtonData {
693
- /** Styling for the button's container. */
694
- containerData?: PluginContainerData;
695
- /** The button type. */
696
- type?: ButtonDataType;
697
- /** Styling for the button. */
698
- styles?: Styles;
699
- /** The text to display on the button. */
700
- text?: string | null;
701
- /** Button link details. */
702
- link?: Link;
703
- }
704
- interface Border {
705
- /** Border width in pixels. */
706
- width?: number | null;
707
- /** Border radius in pixels. */
708
- radius?: number | null;
709
- }
710
- interface Colors {
711
- /** The text color as a hexadecimal value. */
712
- text?: string | null;
713
- /** The border color as a hexadecimal value. */
714
- border?: string | null;
715
- /** The background color as a hexadecimal value. */
716
- background?: string | null;
717
- }
718
- interface PluginContainerData {
719
- /** The width of the node when it's displayed. */
720
- width?: PluginContainerDataWidth;
721
- /** The node's alignment within its container. */
722
- alignment?: PluginContainerDataAlignment;
723
- /** Spoiler cover settings for the node. */
724
- spoiler?: Spoiler;
725
- /** The height of the node when it's displayed. */
726
- height?: Height;
727
- /** Sets whether text should wrap around this node when it's displayed. If `textWrap` is `false`, the node takes up the width of its container. Defaults to `true` for all node types except 'DIVIVDER' where it defaults to `false`. */
728
- textWrap?: boolean | null;
729
- }
730
- declare enum WidthType {
731
- /** Width matches the content width */
732
- CONTENT = "CONTENT",
733
- /** Small Width */
734
- SMALL = "SMALL",
735
- /** Width will match the original asset width */
736
- ORIGINAL = "ORIGINAL",
737
- /** coast-to-coast display */
738
- FULL_WIDTH = "FULL_WIDTH"
739
- }
740
- interface PluginContainerDataWidth extends PluginContainerDataWidthDataOneOf {
741
- /**
742
- * One of the following predefined width options:
743
- * `CONTENT`: The width of the container matches the content width.
744
- * `SMALL`: A small width.
745
- * `ORIGINAL`: For `imageData` containers only. The width of the container matches the original image width.
746
- * `FULL_WIDTH`: For `imageData` containers only. The image container takes up the full width of the screen.
747
- */
748
- size?: WidthType;
749
- /** A custom width value in pixels. */
750
- custom?: string | null;
751
- }
752
- /** @oneof */
753
- interface PluginContainerDataWidthDataOneOf {
754
- /**
755
- * One of the following predefined width options:
756
- * `CONTENT`: The width of the container matches the content width.
757
- * `SMALL`: A small width.
758
- * `ORIGINAL`: For `imageData` containers only. The width of the container matches the original image width.
759
- * `FULL_WIDTH`: For `imageData` containers only. The image container takes up the full width of the screen.
760
- */
761
- size?: WidthType;
762
- /** A custom width value in pixels. */
763
- custom?: string | null;
764
- }
765
- declare enum PluginContainerDataAlignment {
766
- /** Center Alignment */
767
- CENTER = "CENTER",
768
- /** Left Alignment */
769
- LEFT = "LEFT",
770
- /** Right Alignment */
771
- RIGHT = "RIGHT"
772
- }
773
- interface Spoiler {
774
- /** Sets whether the spoiler cover is enabled for this node. Defaults to `false`. */
775
- enabled?: boolean | null;
776
- /** The description displayed on top of the spoiler cover. */
777
- description?: string | null;
778
- /** The text for the button used to remove the spoiler cover. */
779
- buttonText?: string | null;
780
- }
781
- interface Height {
782
- /** A custom height value in pixels. */
783
- custom?: string | null;
784
- }
785
- declare enum ButtonDataType {
786
- /** Regular link button */
787
- LINK = "LINK",
788
- /** Triggers custom action that is defined in plugin configuration by the consumer */
789
- ACTION = "ACTION"
790
- }
791
- interface Styles {
792
- /** Border attributes. */
793
- border?: Border;
794
- /** Color attributes. */
795
- colors?: Colors;
796
- }
797
- interface Link extends LinkDataOneOf {
798
- /** The absolute URL for the linked document. */
799
- url?: string;
800
- /** The target node's ID. Used for linking to another node in this object. */
801
- anchor?: string;
802
- /**
803
- * he HTML `target` attribute value for the link. This property defines where the linked document opens as follows:
804
- * `SELF` - Default. Opens the linked document in the same frame as the link.
805
- * `BLANK` - Opens the linked document in a new browser tab or window.
806
- * `PARENT` - Opens the linked document in the link's parent frame.
807
- * `TOP` - Opens the linked document in the full body of the link's browser tab or window.
808
- */
809
- target?: LinkTarget;
810
- /** The HTML `rel` attribute value for the link. This object specifies the relationship between the current document and the linked document. */
811
- rel?: Rel;
812
- /** A serialized object used for a custom or external link panel. */
813
- customData?: string | null;
814
- }
815
- /** @oneof */
816
- interface LinkDataOneOf {
817
- /** The absolute URL for the linked document. */
818
- url?: string;
819
- /** The target node's ID. Used for linking to another node in this object. */
820
- anchor?: string;
821
- }
822
- declare enum LinkTarget {
823
- /** Opens the linked document in the same frame as it was clicked (this is default) */
824
- SELF = "SELF",
825
- /** Opens the linked document in a new window or tab */
826
- BLANK = "BLANK",
827
- /** Opens the linked document in the parent frame */
828
- PARENT = "PARENT",
829
- /** Opens the linked document in the full body of the window */
830
- TOP = "TOP"
831
- }
832
- interface Rel {
833
- /** Indicates to search engine crawlers not to follow the link. Defaults to `false`. */
834
- nofollow?: boolean | null;
835
- /** Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement. Defaults to `false`. */
836
- sponsored?: boolean | null;
837
- /** Indicates that this link is user-generated content and isn't necessarily trusted or endorsed by the page’s author. For example, a link in a fourm post. Defaults to `false`. */
838
- ugc?: boolean | null;
839
- /** Indicates that this link protect referral information from being passed to the target website. */
840
- noreferrer?: boolean | null;
841
- }
842
- interface CodeBlockData {
843
- /** Styling for the code block's text. */
844
- textStyle?: TextStyle;
845
- }
846
- interface TextStyle {
847
- /** Text alignment. Defaults to `AUTO`. */
848
- textAlignment?: TextAlignment;
849
- /** A CSS `line-height` value for the text expressed as a ratio relative to the font size. For example, if the font size is 20px, a `lineHeight` value of `'1.5'`` results in a line height of 30px. */
850
- lineHeight?: string | null;
851
- }
852
- declare enum TextAlignment {
853
- /** browser default, eqivalent to `initial` */
854
- AUTO = "AUTO",
855
- /** Left align */
856
- LEFT = "LEFT",
857
- /** Right align */
858
- RIGHT = "RIGHT",
859
- /** Center align */
860
- CENTER = "CENTER",
861
- /** Text is spaced to line up its left and right edges to the left and right edges of the line box, except for the last line */
862
- JUSTIFY = "JUSTIFY"
863
- }
864
- interface DividerData {
865
- /** Styling for the divider's container. */
866
- containerData?: PluginContainerData;
867
- /** Divider line style. */
868
- lineStyle?: LineStyle;
869
- /** Divider width. */
870
- width?: Width;
871
- /** Divider alignment. */
872
- alignment?: Alignment;
873
- }
874
- declare enum LineStyle {
875
- /** Single Line */
876
- SINGLE = "SINGLE",
877
- /** Double Line */
878
- DOUBLE = "DOUBLE",
879
- /** Dashed Line */
880
- DASHED = "DASHED",
881
- /** Dotted Line */
882
- DOTTED = "DOTTED"
883
- }
884
- declare enum Width {
885
- /** Large line */
886
- LARGE = "LARGE",
887
- /** Medium line */
888
- MEDIUM = "MEDIUM",
889
- /** Small line */
890
- SMALL = "SMALL"
891
- }
892
- declare enum Alignment {
893
- /** Center alignment */
894
- CENTER = "CENTER",
895
- /** Left alignment */
896
- LEFT = "LEFT",
897
- /** Right alignment */
898
- RIGHT = "RIGHT"
899
- }
900
- interface FileData {
901
- /** Styling for the file's container. */
902
- containerData?: PluginContainerData;
903
- /** The source for the file's data. */
904
- src?: FileSource;
905
- /** File name. */
906
- name?: string | null;
907
- /** File type. */
908
- type?: string | null;
909
- /** File size in KB. */
910
- size?: number | null;
911
- /** Settings for PDF files. */
912
- pdfSettings?: PDFSettings;
913
- /** File MIME type. */
914
- mimeType?: string | null;
915
- /** File path. */
916
- path?: string | null;
917
- }
918
- declare enum ViewMode {
919
- /** No PDF view */
920
- NONE = "NONE",
921
- /** Full PDF view */
922
- FULL = "FULL",
923
- /** Mini PDF view */
924
- MINI = "MINI"
925
- }
926
- interface FileSource extends FileSourceDataOneOf {
927
- /** The absolute URL for the file's source. */
928
- url?: string | null;
929
- /**
930
- * Custom ID. Use `id` instead.
931
- * @deprecated
932
- */
933
- custom?: string | null;
934
- /** An ID that's resolved to a URL by a resolver function. */
935
- _id?: string | null;
936
- /** Indicates whether the file's source is private. Defaults to `false`. */
937
- private?: boolean | null;
938
- }
939
- /** @oneof */
940
- interface FileSourceDataOneOf {
941
- /** The absolute URL for the file's source. */
942
- url?: string | null;
943
- /**
944
- * Custom ID. Use `id` instead.
945
- * @deprecated
946
- */
947
- custom?: string | null;
948
- /** An ID that's resolved to a URL by a resolver function. */
949
- _id?: string | null;
950
- }
951
- interface PDFSettings {
952
- /**
953
- * PDF view mode. One of the following:
954
- * `NONE` : The PDF isn't displayed.
955
- * `FULL` : A full page view of the PDF is displayed.
956
- * `MINI` : A mini view of the PDF is displayed.
957
- */
958
- viewMode?: ViewMode;
959
- /** Sets whether the PDF download button is disabled. Defaults to `false`. */
960
- disableDownload?: boolean | null;
961
- /** Sets whether the PDF print button is disabled. Defaults to `false`. */
962
- disablePrint?: boolean | null;
963
- }
964
- interface GalleryData {
965
- /** Styling for the gallery's container. */
966
- containerData?: PluginContainerData;
967
- /** The items in the gallery. */
968
- items?: Item[];
969
- /** Options for defining the gallery's appearance. */
970
- options?: GalleryOptions;
971
- /** Sets whether the gallery's expand button is disabled. Defaults to `false`. */
972
- disableExpand?: boolean | null;
973
- /** Sets whether the gallery's download button is disabled. Defaults to `false`. */
974
- disableDownload?: boolean | null;
975
- }
976
- interface Media {
977
- /** The source for the media's data. */
978
- src?: FileSource;
979
- /** Media width in pixels. */
980
- width?: number | null;
981
- /** Media height in pixels. */
982
- height?: number | null;
983
- /** Media duration in seconds. Only relevant for audio and video files. */
984
- duration?: number | null;
985
- }
986
- interface Image {
987
- /** Image file details. */
988
- media?: Media;
989
- /** Link details for images that are links. */
990
- link?: Link;
991
- }
992
- interface Video {
993
- /** Video file details. */
994
- media?: Media;
995
- /** Video thumbnail file details. */
996
- thumbnail?: Media;
997
- }
998
- interface Item extends ItemDataOneOf {
999
- /** An image item. */
1000
- image?: Image;
1001
- /** A video item. */
1002
- video?: Video;
1003
- /** Item title. */
1004
- title?: string | null;
1005
- /** Item's alternative text. */
1006
- altText?: string | null;
1007
- }
1008
- /** @oneof */
1009
- interface ItemDataOneOf {
1010
- /** An image item. */
1011
- image?: Image;
1012
- /** A video item. */
1013
- video?: Video;
1014
- }
1015
- interface GalleryOptions {
1016
- /** Gallery layout. */
1017
- layout?: Layout;
1018
- /** Styling for gallery items. */
1019
- item?: ItemStyle;
1020
- /** Styling for gallery thumbnail images. */
1021
- thumbnails?: Thumbnails;
1022
- }
1023
- declare enum LayoutType {
1024
- /** Collage type */
1025
- COLLAGE = "COLLAGE",
1026
- /** Masonry type */
1027
- MASONRY = "MASONRY",
1028
- /** Grid type */
1029
- GRID = "GRID",
1030
- /** Thumbnail type */
1031
- THUMBNAIL = "THUMBNAIL",
1032
- /** Slider type */
1033
- SLIDER = "SLIDER",
1034
- /** Slideshow type */
1035
- SLIDESHOW = "SLIDESHOW",
1036
- /** Panorama type */
1037
- PANORAMA = "PANORAMA",
1038
- /** Column type */
1039
- COLUMN = "COLUMN",
1040
- /** Magic type */
1041
- MAGIC = "MAGIC",
1042
- /** Fullsize images type */
1043
- FULLSIZE = "FULLSIZE"
1044
- }
1045
- declare enum Orientation {
1046
- /** Rows Orientation */
1047
- ROWS = "ROWS",
1048
- /** Columns Orientation */
1049
- COLUMNS = "COLUMNS"
1050
- }
1051
- declare enum Crop {
1052
- /** Crop to fill */
1053
- FILL = "FILL",
1054
- /** Crop to fit */
1055
- FIT = "FIT"
1056
- }
1057
- declare enum ThumbnailsAlignment {
1058
- /** Top alignment */
1059
- TOP = "TOP",
1060
- /** Right alignment */
1061
- RIGHT = "RIGHT",
1062
- /** Bottom alignment */
1063
- BOTTOM = "BOTTOM",
1064
- /** Left alignment */
1065
- LEFT = "LEFT",
1066
- /** No thumbnail */
1067
- NONE = "NONE"
1068
- }
1069
- interface Layout {
1070
- /** Gallery layout type. */
1071
- type?: LayoutType;
1072
- /** Sets whether horizontal scroll is enabled. Defaults to `true` unless the layout `type` is set to `GRID` or `COLLAGE`. */
1073
- horizontalScroll?: boolean | null;
1074
- /** Gallery orientation. */
1075
- orientation?: Orientation;
1076
- /** The number of columns to display on full size screens. */
1077
- numberOfColumns?: number | null;
1078
- /** The number of columns to display on mobile screens. */
1079
- mobileNumberOfColumns?: number | null;
1080
- }
1081
- interface ItemStyle {
1082
- /** Desirable dimension for each item in pixels (behvaior changes according to gallery type) */
1083
- targetSize?: number | null;
1084
- /** Item ratio */
1085
- ratio?: number | null;
1086
- /** Sets how item images are cropped. */
1087
- crop?: Crop;
1088
- /** The spacing between items in pixels. */
1089
- spacing?: number | null;
1090
- }
1091
- interface Thumbnails {
1092
- /** Thumbnail alignment. */
1093
- placement?: ThumbnailsAlignment;
1094
- /** Spacing between thumbnails in pixels. */
1095
- spacing?: number | null;
1096
- }
1097
- interface GIFData {
1098
- /** Styling for the GIF's container. */
1099
- containerData?: PluginContainerData;
1100
- /** The source of the full size GIF. */
1101
- original?: GIF;
1102
- /** The source of the downsized GIF. */
1103
- downsized?: GIF;
1104
- /** Height in pixels. */
1105
- height?: number;
1106
- /** Width in pixels. */
1107
- width?: number;
1108
- }
1109
- interface GIF {
1110
- /** GIF format URL. */
1111
- gif?: string | null;
1112
- /** MP4 format URL. */
1113
- mp4?: string | null;
1114
- /** Thumbnail URL. */
1115
- still?: string | null;
1116
- }
1117
- interface HeadingData {
1118
- /** Heading level from 1-6. */
1119
- level?: number;
1120
- /** Styling for the heading text. */
1121
- textStyle?: TextStyle;
1122
- /** Indentation level from 1-4. */
1123
- indentation?: number | null;
1124
- }
1125
- interface HTMLData extends HTMLDataDataOneOf {
1126
- /** The URL for the HTML code for the node. */
1127
- url?: string;
1128
- /** The HTML code for the node. */
1129
- html?: string;
1130
- /**
1131
- * Whether this is an AdSense element. Use `source` instead.
1132
- * @deprecated
1133
- */
1134
- isAdsense?: boolean | null;
1135
- /** Styling for the HTML node's container. */
1136
- containerData?: PluginContainerData;
1137
- /** The type of HTML code. */
1138
- source?: Source;
1139
- }
1140
- /** @oneof */
1141
- interface HTMLDataDataOneOf {
1142
- /** The URL for the HTML code for the node. */
1143
- url?: string;
1144
- /** The HTML code for the node. */
1145
- html?: string;
1146
- /**
1147
- * Whether this is an AdSense element. Use `source` instead.
1148
- * @deprecated
1149
- */
1150
- isAdsense?: boolean | null;
1151
- }
1152
- declare enum Source {
1153
- HTML = "HTML",
1154
- ADSENSE = "ADSENSE"
1155
- }
1156
- interface ImageData {
1157
- /** Styling for the image's container. */
1158
- containerData?: PluginContainerData;
1159
- /** Image file details. */
1160
- image?: Media;
1161
- /** Link details for images that are links. */
1162
- link?: Link;
1163
- /** Sets whether the image expands to full screen when clicked. Defaults to `false`. */
1164
- disableExpand?: boolean | null;
1165
- /** Image's alternative text. */
1166
- altText?: string | null;
1167
- /** Image caption. */
1168
- caption?: string | null;
1169
- /** Sets whether the image's download button is disabled. Defaults to `false`. */
1170
- disableDownload?: boolean | null;
1171
- }
1172
- interface LinkPreviewData {
1173
- /** Styling for the link preview's container. */
1174
- containerData?: PluginContainerData;
1175
- /** Link details. */
1176
- link?: Link;
1177
- /** Preview title. */
1178
- title?: string | null;
1179
- /** Preview thumbnail URL. */
1180
- thumbnailUrl?: string | null;
1181
- /** Preview description. */
1182
- description?: string | null;
1183
- /** The preview content as HTML. */
1184
- html?: string | null;
1185
- }
1186
- interface MapData {
1187
- /** Styling for the map's container. */
1188
- containerData?: PluginContainerData;
1189
- /** Map settings. */
1190
- mapSettings?: MapSettings;
1191
- }
1192
- interface MapSettings {
1193
- /** The address to display on the map. */
1194
- address?: string | null;
1195
- /** Sets whether the map is draggable. */
1196
- draggable?: boolean | null;
1197
- /** Sets whether the location marker is visible. */
1198
- marker?: boolean | null;
1199
- /** Sets whether street view control is enabled. */
1200
- streetViewControl?: boolean | null;
1201
- /** Sets whether zoom control is enabled. */
1202
- zoomControl?: boolean | null;
1203
- /** Location latitude. */
1204
- lat?: number | null;
1205
- /** Location longitude. */
1206
- lng?: number | null;
1207
- /** Location name. */
1208
- locationName?: string | null;
1209
- /** Sets whether view mode control is enabled. */
1210
- viewModeControl?: boolean | null;
1211
- /** Initial zoom value. */
1212
- initialZoom?: number | null;
1213
- /** Map type. `HYBRID` is a combination of the `ROADMAP` and `SATELLITE` map types. */
1214
- mapType?: MapType;
1215
- }
1216
- declare enum MapType {
1217
- /** Roadmap map type */
1218
- ROADMAP = "ROADMAP",
1219
- /** Satellite map type */
1220
- SATELITE = "SATELITE",
1221
- /** Hybrid map type */
1222
- HYBRID = "HYBRID",
1223
- /** Terrain map type */
1224
- TERRAIN = "TERRAIN"
1225
- }
1226
- interface ParagraphData {
1227
- /** Styling for the paragraph text. */
1228
- textStyle?: TextStyle;
1229
- /** Indentation level from 1-4. */
1230
- indentation?: number | null;
1231
- /** Paragraph level */
1232
- level?: number | null;
1233
- }
1234
- interface PollData {
1235
- /** Styling for the poll's container. */
1236
- containerData?: PluginContainerData;
1237
- /** Poll data. */
1238
- poll?: Poll;
1239
- /** Layout settings for the poll and voting options. */
1240
- layout?: PollDataLayout;
1241
- /** Styling for the poll and voting options. */
1242
- design?: Design;
1243
- }
1244
- declare enum ViewRole {
1245
- /** Only Poll creator can view the results */
1246
- CREATOR = "CREATOR",
1247
- /** Anyone who voted can see the results */
1248
- VOTERS = "VOTERS",
1249
- /** Anyone can see the results, even if one didn't vote */
1250
- EVERYONE = "EVERYONE"
1251
- }
1252
- declare enum VoteRole {
1253
- /** Logged in member */
1254
- SITE_MEMBERS = "SITE_MEMBERS",
1255
- /** Anyone */
1256
- ALL = "ALL"
1257
- }
1258
- interface Permissions {
1259
- /** Sets who can view the poll results. */
1260
- view?: ViewRole;
1261
- /** Sets who can vote. */
1262
- vote?: VoteRole;
1263
- /** Sets whether one voter can vote multiple times. Defaults to `false`. */
1264
- allowMultipleVotes?: boolean | null;
1265
- }
1266
- interface PollOption {
1267
- /** Option ID. */
1268
- _id?: string | null;
1269
- /** Option title. */
1270
- title?: string | null;
1271
- /** The image displayed with the option. */
1272
- image?: Media;
1273
- }
1274
- interface Settings {
1275
- /** Permissions settings for voting. */
1276
- permissions?: Permissions;
1277
- /** Sets whether voters are displayed in the vote results. Defaults to `true`. */
1278
- showVoters?: boolean | null;
1279
- /** Sets whether the vote count is displayed. Defaults to `true`. */
1280
- showVotesCount?: boolean | null;
1281
- }
1282
- declare enum PollLayoutType {
1283
- /** List */
1284
- LIST = "LIST",
1285
- /** Grid */
1286
- GRID = "GRID"
1287
- }
1288
- declare enum PollLayoutDirection {
1289
- /** Left-to-right */
1290
- LTR = "LTR",
1291
- /** Right-to-left */
1292
- RTL = "RTL"
1293
- }
1294
- interface PollLayout {
1295
- /** The layout for displaying the voting options. */
1296
- type?: PollLayoutType;
1297
- /** The direction of the text displayed in the voting options. Text can be displayed either right-to-left or left-to-right. */
1298
- direction?: PollLayoutDirection;
1299
- /** Sets whether to display the main poll image. Defaults to `false`. */
1300
- enableImage?: boolean | null;
1301
- }
1302
- interface OptionLayout {
1303
- /** Sets whether to display option images. Defaults to `false`. */
1304
- enableImage?: boolean | null;
1305
- }
1306
- declare enum BackgroundType {
1307
- /** Color background type */
1308
- COLOR = "COLOR",
1309
- /** Image background type */
1310
- IMAGE = "IMAGE",
1311
- /** Gradiant background type */
1312
- GRADIENT = "GRADIENT"
1313
- }
1314
- interface Gradient {
1315
- /** The gradient angle in degrees. */
1316
- angle?: number | null;
1317
- /** The start color as a hexademical value. */
1318
- startColor?: string | null;
1319
- /** The end color as a hexademical value. */
1320
- lastColor?: string | null;
1321
- }
1322
- interface Background extends BackgroundBackgroundOneOf {
1323
- /** The background color as a hexademical value. */
1324
- color?: string | null;
1325
- /** An image to use for the background. */
1326
- image?: Media;
1327
- /** Details for a gradient background. */
1328
- gradient?: Gradient;
1329
- /** Background type. For each option, include the relevant details. */
1330
- type?: BackgroundType;
1331
- }
1332
- /** @oneof */
1333
- interface BackgroundBackgroundOneOf {
1334
- /** The background color as a hexademical value. */
1335
- color?: string | null;
1336
- /** An image to use for the background. */
1337
- image?: Media;
1338
- /** Details for a gradient background. */
1339
- gradient?: Gradient;
1340
- }
1341
- interface PollDesign {
1342
- /** Background styling. */
1343
- background?: Background;
1344
- /** Border radius in pixels. */
1345
- borderRadius?: number | null;
1346
- }
1347
- interface OptionDesign {
1348
- /** Border radius in pixels. */
1349
- borderRadius?: number | null;
1350
- }
1351
- interface Poll {
1352
- /** Poll ID. */
1353
- _id?: string | null;
1354
- /** Poll title. */
1355
- title?: string | null;
1356
- /** Poll creator ID. */
1357
- creatorId?: string | null;
1358
- /** Main poll image. */
1359
- image?: Media;
1360
- /** Voting options. */
1361
- options?: PollOption[];
1362
- /** The poll's permissions and display settings. */
1363
- settings?: Settings;
1364
- }
1365
- interface PollDataLayout {
1366
- /** Poll layout settings. */
1367
- poll?: PollLayout;
1368
- /** Voting otpions layout settings. */
1369
- options?: OptionLayout;
1370
- }
1371
- interface Design {
1372
- /** Styling for the poll. */
1373
- poll?: PollDesign;
1374
- /** Styling for voting options. */
1375
- options?: OptionDesign;
1376
- }
1377
- interface TextData {
1378
- /** The text to apply decorations to. */
1379
- text?: string;
1380
- /** The decorations to apply. */
1381
- decorations?: Decoration[];
1382
- }
1383
- /** Adds appearence changes to text */
1384
- interface Decoration extends DecorationDataOneOf {
1385
- /** Data for an anchor link decoration. */
1386
- anchorData?: AnchorData;
1387
- /** Data for a color decoration. */
1388
- colorData?: ColorData;
1389
- /** Data for an external link decoration. */
1390
- linkData?: LinkData;
1391
- /** Data for a mention decoration. */
1392
- mentionData?: MentionData;
1393
- /** Data for a font size decoration. */
1394
- fontSizeData?: FontSizeData;
1395
- /** Font weight for a bold decoration. */
1396
- fontWeightValue?: number | null;
1397
- /** Data for an italic decoration. Defaults to `true`. */
1398
- italicData?: boolean | null;
1399
- /** Data for an underline decoration. Defaults to `true`. */
1400
- underlineData?: boolean | null;
1401
- /** Data for a spoiler decoration. */
1402
- spoilerData?: SpoilerData;
1403
- /** The type of decoration to apply. */
1404
- type?: DecorationType;
1405
- }
1406
- /** @oneof */
1407
- interface DecorationDataOneOf {
1408
- /** Data for an anchor link decoration. */
1409
- anchorData?: AnchorData;
1410
- /** Data for a color decoration. */
1411
- colorData?: ColorData;
1412
- /** Data for an external link decoration. */
1413
- linkData?: LinkData;
1414
- /** Data for a mention decoration. */
1415
- mentionData?: MentionData;
1416
- /** Data for a font size decoration. */
1417
- fontSizeData?: FontSizeData;
1418
- /** Font weight for a bold decoration. */
1419
- fontWeightValue?: number | null;
1420
- /** Data for an italic decoration. Defaults to `true`. */
1421
- italicData?: boolean | null;
1422
- /** Data for an underline decoration. Defaults to `true`. */
1423
- underlineData?: boolean | null;
1424
- /** Data for a spoiler decoration. */
1425
- spoilerData?: SpoilerData;
1426
- }
1427
- declare enum DecorationType {
1428
- BOLD = "BOLD",
1429
- ITALIC = "ITALIC",
1430
- UNDERLINE = "UNDERLINE",
1431
- SPOILER = "SPOILER",
1432
- ANCHOR = "ANCHOR",
1433
- MENTION = "MENTION",
1434
- LINK = "LINK",
1435
- COLOR = "COLOR",
1436
- FONT_SIZE = "FONT_SIZE",
1437
- EXTERNAL = "EXTERNAL"
1438
- }
1439
- interface AnchorData {
1440
- /** The target node's ID. */
1441
- anchor?: string;
1442
- }
1443
- interface ColorData {
1444
- /** The text's background color as a hexadecimal value. */
1445
- background?: string | null;
1446
- /** The text's foreground color as a hexadecimal value. */
1447
- foreground?: string | null;
1448
- }
1449
- interface LinkData {
1450
- /** Link details. */
1451
- link?: Link;
1452
- }
1453
- interface MentionData {
1454
- /** The mentioned user's name. */
1455
- name?: string;
1456
- /** The version of the user's name that appears after the `@` character in the mention. */
1457
- slug?: string;
1458
- /** Mentioned user's ID. */
1459
- _id?: string | null;
1460
- }
1461
- interface FontSizeData {
1462
- /** The units used for the font size. */
1463
- unit?: FontType;
1464
- /** Font size value. */
1465
- value?: number | null;
1466
- }
1467
- declare enum FontType {
1468
- PX = "PX",
1469
- EM = "EM"
1470
- }
1471
- interface SpoilerData {
1472
- /** Spoiler ID. */
1473
- _id?: string | null;
1474
- }
1475
- interface AppEmbedData extends AppEmbedDataAppDataOneOf {
1476
- /** Data for embedded Wix Bookings content. */
1477
- bookingData?: BookingData;
1478
- /** Data for embedded Wix Events content. */
1479
- eventData?: EventData;
1480
- /** The type of Wix App content being embedded. */
1481
- type?: AppType;
1482
- /** The ID of the embedded content. */
1483
- itemId?: string | null;
1484
- /** The name of the embedded content. */
1485
- name?: string | null;
1486
- /**
1487
- * Deprecated: Use `image` instead.
1488
- * @deprecated
1489
- */
1490
- imageSrc?: string | null;
1491
- /** The URL for the embedded content. */
1492
- url?: string | null;
1493
- /** An image for the embedded content. */
1494
- image?: Media;
1495
- }
1496
- /** @oneof */
1497
- interface AppEmbedDataAppDataOneOf {
1498
- /** Data for embedded Wix Bookings content. */
1499
- bookingData?: BookingData;
1500
- /** Data for embedded Wix Events content. */
1501
- eventData?: EventData;
1502
- }
1503
- declare enum AppType {
1504
- PRODUCT = "PRODUCT",
1505
- EVENT = "EVENT",
1506
- BOOKING = "BOOKING"
1507
- }
1508
- interface BookingData {
1509
- /** Booking duration in minutes. */
1510
- durations?: string | null;
1511
- }
1512
- interface EventData {
1513
- /** Event schedule. */
1514
- scheduling?: string | null;
1515
- /** Event location. */
1516
- location?: string | null;
1517
- }
1518
- interface VideoData {
1519
- /** Styling for the video's container. */
1520
- containerData?: PluginContainerData;
1521
- /** Video details. */
1522
- video?: Media;
1523
- /** Video thumbnail details. */
1524
- thumbnail?: Media;
1525
- /** Sets whether the video's download button is disabled. Defaults to `false`. */
1526
- disableDownload?: boolean | null;
1527
- /** Video title. */
1528
- title?: string | null;
1529
- /** Video options. */
1530
- options?: PlaybackOptions;
1531
- }
1532
- interface PlaybackOptions {
1533
- /** Sets whether the media will automatically start playing. */
1534
- autoPlay?: boolean | null;
1535
- /** Sets whether media's will be looped. */
1536
- playInLoop?: boolean | null;
1537
- /** Sets whether media's controls will be shown. */
1538
- showControls?: boolean | null;
1539
- }
1540
- interface EmbedData {
1541
- /** Styling for the oEmbed node's container. */
1542
- containerData?: PluginContainerData;
1543
- /** An [oEmbed](https://www.oembed.com) object. */
1544
- oembed?: Oembed;
1545
- /** Origin asset source. */
1546
- src?: string | null;
1547
- }
1548
- interface Oembed {
1549
- /** The resource type. */
1550
- type?: string | null;
1551
- /** The width of the resource specified in the `url` property in pixels. */
1552
- width?: number | null;
1553
- /** The height of the resource specified in the `url` property in pixels. */
1554
- height?: number | null;
1555
- /** Resource title. */
1556
- title?: string | null;
1557
- /** The source URL for the resource. */
1558
- url?: string | null;
1559
- /** HTML for embedding a video player. The HTML should have no padding or margins. */
1560
- html?: string | null;
1561
- /** The name of the author or owner of the resource. */
1562
- authorName?: string | null;
1563
- /** The URL for the author or owner of the resource. */
1564
- authorUrl?: string | null;
1565
- /** The name of the resource provider. */
1566
- providerName?: string | null;
1567
- /** The URL for the resource provider. */
1568
- providerUrl?: string | null;
1569
- /** The URL for a thumbnail image for the resource. If this property is defined, `thumbnailWidth` and `thumbnailHeight` must also be defined. */
1570
- thumbnailUrl?: string | null;
1571
- /** The width of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailHeight` must also be defined. */
1572
- thumbnailWidth?: string | null;
1573
- /** The height of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailWidth`must also be defined. */
1574
- thumbnailHeight?: string | null;
1575
- /** The URL for an embedded viedo. */
1576
- videoUrl?: string | null;
1577
- /** The oEmbed version number. This value must be `1.0`. */
1578
- version?: string | null;
1579
- }
1580
- interface CollapsibleListData {
1581
- /** Styling for the collapsible list's container. */
1582
- containerData?: PluginContainerData;
1583
- /** If `true`, only one item can be expanded at a time. Defaults to `false`. */
1584
- expandOnlyOne?: boolean | null;
1585
- /** Sets which items are expanded when the page loads. */
1586
- initialExpandedItems?: InitialExpandedItems;
1587
- /** The direction of the text in the list. Either left-to-right or right-to-left. */
1588
- direction?: Direction;
1589
- /** If `true`, The collapsible item will appear in search results as an FAQ. */
1590
- isQapageData?: boolean | null;
1591
- }
1592
- declare enum InitialExpandedItems {
1593
- /** First item will be expended initally */
1594
- FIRST = "FIRST",
1595
- /** All items will expended initally */
1596
- ALL = "ALL",
1597
- /** All items collapsed initally */
1598
- NONE = "NONE"
1599
- }
1600
- declare enum Direction {
1601
- /** Left-to-right */
1602
- LTR = "LTR",
1603
- /** Right-to-left */
1604
- RTL = "RTL"
1605
- }
1606
- interface TableData {
1607
- /** Styling for the table's container. */
1608
- containerData?: PluginContainerData;
1609
- /** The table's dimensions. */
1610
- dimensions?: Dimensions;
1611
- /**
1612
- * Deprecated: Use `rowHeader` and `columnHeader` instead.
1613
- * @deprecated
1614
- */
1615
- header?: boolean | null;
1616
- /** Sets whether the table's first row is a header. Defaults to `false`. */
1617
- rowHeader?: boolean | null;
1618
- /** Sets whether the table's first column is a header. Defaults to `false`. */
1619
- columnHeader?: boolean | null;
1620
- }
1621
- interface Dimensions {
1622
- /** An array representing relative width of each column in relation to the other columns. */
1623
- colsWidthRatio?: number[];
1624
- /** An array representing the height of each row in pixels. */
1625
- rowsHeight?: number[];
1626
- /** An array representing the minimum width of each column in pixels. */
1627
- colsMinWidth?: number[];
1628
- }
1629
- interface TableCellData {
1630
- /** Styling for the cell's background color and text alignment. */
1631
- cellStyle?: CellStyle;
1632
- /** The cell's border colors. */
1633
- borderColors?: BorderColors;
1634
- }
1635
- declare enum VerticalAlignment {
1636
- /** Top alignment */
1637
- TOP = "TOP",
1638
- /** Middle alignment */
1639
- MIDDLE = "MIDDLE",
1640
- /** Bottom alignment */
1641
- BOTTOM = "BOTTOM"
1642
- }
1643
- interface CellStyle {
1644
- /** Vertical alignment for the cell's text. */
1645
- verticalAlignment?: VerticalAlignment;
1646
- /** Cell background color as a hexadecimal value. */
1647
- backgroundColor?: string | null;
1648
- }
1649
- interface BorderColors {
1650
- /** Left border color as a hexadecimal value. */
1651
- left?: string | null;
1652
- /** Right border color as a hexadecimal value. */
1653
- right?: string | null;
1654
- /** Top border color as a hexadecimal value. */
1655
- top?: string | null;
1656
- /** Bottom border color as a hexadecimal value. */
1657
- bottom?: string | null;
1658
- }
1659
- interface AudioData {
1660
- /** Styling for the audio node's container. */
1661
- containerData?: PluginContainerData;
1662
- /** Audio file details. */
1663
- audio?: Media;
1664
- /** Sets whether the audio node's download button is disabled. Defaults to `false`. */
1665
- disableDownload?: boolean | null;
1666
- /** Cover image. */
1667
- coverImage?: Media;
1668
- /** Track name. */
1669
- name?: string | null;
1670
- /** Author name. */
1671
- authorName?: string | null;
1672
- /** An HTML version of the audio node. */
1673
- html?: string | null;
1674
- }
1675
- interface OrderedListData {
1676
- /** Indentation level from 0-4. */
1677
- indentation?: number;
1678
- /** Offset level from 0-4. */
1679
- offset?: number | null;
1680
- }
1681
- interface BulletedListData {
1682
- /** Indentation level from 0-4. */
1683
- indentation?: number;
1684
- /** Offset level from 0-4. */
1685
- offset?: number | null;
1686
- }
1687
- interface BlockquoteData {
1688
- /** Indentation level from 1-4. */
1689
- indentation?: number;
1690
- }
1691
- interface Metadata {
1692
- /** Schema version. */
1693
- version?: number;
1694
- /**
1695
- * When the object was created.
1696
- * @readonly
1697
- * @deprecated
1698
- */
1699
- createdTimestamp?: Date;
1700
- /**
1701
- * When the object was most recently updated.
1702
- * @deprecated
1703
- */
1704
- updatedTimestamp?: Date;
1705
- /** Object ID. */
1706
- _id?: string | null;
1707
- }
1708
- interface DocumentStyle {
1709
- /** Styling for H1 nodes. */
1710
- headerOne?: TextNodeStyle;
1711
- /** Styling for H2 nodes. */
1712
- headerTwo?: TextNodeStyle;
1713
- /** Styling for H3 nodes. */
1714
- headerThree?: TextNodeStyle;
1715
- /** Styling for H4 nodes. */
1716
- headerFour?: TextNodeStyle;
1717
- /** Styling for H5 nodes. */
1718
- headerFive?: TextNodeStyle;
1719
- /** Styling for H6 nodes. */
1720
- headerSix?: TextNodeStyle;
1721
- /** Styling for paragraph nodes. */
1722
- paragraph?: TextNodeStyle;
1723
- /** Styling for block quote nodes. */
1724
- blockquote?: TextNodeStyle;
1725
- /** Styling for code block nodes. */
1726
- codeBlock?: TextNodeStyle;
1727
- }
1728
- interface TextNodeStyle {
1729
- /** The decorations to apply to the node. */
1730
- decorations?: Decoration[];
1731
- /** Padding and background color for the node. */
1732
- nodeStyle?: NodeStyle;
1733
- /** Line height for text in the node. */
1734
- lineHeight?: string | null;
1735
- }
1736
- interface RadioGroup {
1737
- /** Label of the field */
1738
- label?: string | null;
1739
- /** Description of the field */
1740
- description?: RichContent;
1741
- /**
1742
- * Flag identifying to show option allowing input custom value
1743
- * List of options to select from
1744
- */
1745
- options?: RadioGroupOption[];
1746
- /**
1747
- * Flag identifying to hide or not label
1748
- * Default: true
1749
- */
1750
- showLabel?: boolean | null;
1751
- /** Option which can be specified by UoU, enabled when this object is specified. */
1752
- customOption?: RadioGroupCustomOption;
1753
- }
1754
- interface RadioGroupOption {
1755
- /** Selectable option label */
1756
- label?: string | null;
1757
- /** Selectable option value, which is saved to DB. */
1758
- value?: string | null;
1759
- /** Flag identifying that option should be selected by default */
1760
- default?: boolean;
1761
- /** Option id. Used as binding for translations */
1762
- _id?: string;
1763
- }
1764
- interface RadioGroupCustomOption {
1765
- /** Label of custom option input */
1766
- label?: string | null;
1767
- /** Placeholder of custom option input */
1768
- placeholder?: string | null;
1769
- }
1770
- interface Dropdown {
1771
- /** Label of the field */
1772
- label?: string | null;
1773
- /** Description of the field */
1774
- description?: RichContent;
1775
- /** List of options to select from */
1776
- options?: DropdownOption[];
1777
- /**
1778
- * Flag identifying to hide or not label
1779
- * Default: true
1780
- */
1781
- showLabel?: boolean | null;
1782
- /** Option which can be specified by UoU, enabled when this object is specified. */
1783
- customOption?: DropdownCustomOption;
1784
- /** Placeholder of dropdown input */
1785
- placeholder?: string | null;
1786
- }
1787
- interface DropdownOption {
1788
- /** Selectable option label */
1789
- label?: string | null;
1790
- /** Selectable option value, which is saved to DB. */
1791
- value?: string | null;
1792
- /** Flag identifying that option should be selected by default */
1793
- default?: boolean;
1794
- /** Option id. Used as binding for translations */
1795
- _id?: string;
1796
- }
1797
- interface DropdownCustomOption {
1798
- /** Label of custom option input */
1799
- label?: string | null;
1800
- /** Placeholder of custom option input */
1801
- placeholder?: string | null;
1802
- }
1803
- interface DateTimeInput extends DateTimeInputDateTimeInputTypeOptionsOneOf {
1804
- /** Options specific to the combined Date and Time input type. */
1805
- dateTimeOptions?: DateTimeOptions;
1806
- /** Options specific to the Date-only input type. */
1807
- dateOptions?: DateOptions;
1808
- /** Options specific to the Time-only input type. */
1809
- timeOptions?: TimeOptions;
1810
- /** Options specific to date picker type. */
1811
- datePickerOptions?: DatePickerOptions;
1812
- /** Label of the field. Displayed text for the date/time input. */
1813
- label?: string | null;
1814
- /** Description of the field. Additional information about the date/time input. */
1815
- description?: RichContent;
1816
- /**
1817
- * Flag identifying whether to show or hide the label.
1818
- * Default: true
1819
- */
1820
- showLabel?: boolean | null;
1821
- /**
1822
- * Flag identifying whether to show or hide the placeholder.
1823
- * Default: true
1824
- */
1825
- showPlaceholder?: boolean | null;
1826
- /**
1827
- * Date and/or time input component type
1828
- * @readonly
1829
- */
1830
- dateTimeInputType?: DateTimeInputType;
1831
- }
1832
- /** @oneof */
1833
- interface DateTimeInputDateTimeInputTypeOptionsOneOf {
1834
- /** Options specific to the combined Date and Time input type. */
1835
- dateTimeOptions?: DateTimeOptions;
1836
- /** Options specific to the Date-only input type. */
1837
- dateOptions?: DateOptions;
1838
- /** Options specific to the Time-only input type. */
1839
- timeOptions?: TimeOptions;
1840
- /** Options specific to date picker type. */
1841
- datePickerOptions?: DatePickerOptions;
1842
- }
1843
- declare enum DateFormatPart {
1844
- YEAR = "YEAR",
1845
- MONTH = "MONTH",
1846
- DAY = "DAY"
1847
- }
1848
- declare enum FirstDayOfWeek {
1849
- MONDAY = "MONDAY",
1850
- SUNDAY = "SUNDAY"
1851
- }
1852
- declare enum DateTimeInputType {
1853
- UNKNOWN = "UNKNOWN",
1854
- /** Show date and time input */
1855
- DATE_TIME = "DATE_TIME",
1856
- /** Show only date input */
1857
- DATE = "DATE",
1858
- /** Show only time input */
1859
- TIME = "TIME",
1860
- /** Show date picker input */
1861
- DATE_PICKER = "DATE_PICKER"
1862
- }
1863
- interface DateTimeOptions {
1864
- /** Order of date picking component parts (e.g., YEAR, MONTH, DAY). */
1865
- dateFormatParts?: DateFormatPart[];
1866
- /**
1867
- * Flag indicating whether to use the 24-hour time format.
1868
- * Default: false.
1869
- */
1870
- use24HourFormat?: boolean;
1871
- }
1872
- interface DateOptions {
1873
- /** Order of date picking component parts (e.g., YEAR, MONTH, DAY). */
1874
- dateFormatParts?: DateFormatPart[];
1875
- }
1876
- interface TimeOptions {
1877
- /**
1878
- * Flag indicating whether to use the 24-hour time format.
1879
- * Default: false.
1880
- */
1881
- use24HourFormat?: boolean;
1882
- }
1883
- interface DatePickerOptions {
1884
- /** First day of the week displayed on date picker. */
1885
- firstDayOfWeek?: FirstDayOfWeek;
1886
- }
1887
- interface PhoneInput {
1888
- /** Label of the field */
1889
- label?: string | null;
1890
- /** Description of the field */
1891
- description?: RichContent;
1892
- /** Placeholder for the value input */
1893
- placeholder?: string | null;
1894
- /**
1895
- * Flag identifying to show label or not
1896
- * Default: true
1897
- */
1898
- showLabel?: boolean | null;
1899
- /** Default value of the country code */
1900
- defaultCountryCode?: string | null;
1901
- }
1902
- interface InputFieldNumberType {
1903
- /** Inclusive maximum value. */
1904
- maximum?: number | null;
1905
- /** Inclusive minimum value. */
1906
- minimum?: number | null;
1907
- /** Multiple of value. */
1908
- multipleOf?: number | null;
1909
- /** Custom error message when validation fails. */
1910
- errorMessages?: InputFieldNumberErrorMessages;
1911
- /** List of allowed values. */
1912
- enum?: number[] | null;
1913
- }
1914
- interface InputFieldNumberErrorMessages {
1915
- /** Default error message on invalid validation. */
1916
- default?: string | null;
1917
- }
1918
- declare enum NumberComponentType {
1919
- UNKNOWN = "UNKNOWN",
1920
- NUMBER_INPUT = "NUMBER_INPUT",
1921
- RATING_INPUT = "RATING_INPUT"
1922
- }
1923
- interface NumberInput {
1924
- /** Label of the field */
1925
- label?: string | null;
1926
- /** Description of the field */
1927
- description?: RichContent;
1928
- /** Placeholder for the value input */
1929
- placeholder?: string | null;
1930
- /**
1931
- * Flag identifying to hide or not label
1932
- * Default: true
1933
- */
1934
- showLabel?: boolean | null;
1935
- }
1936
- interface RatingInput {
1937
- /** Label of the field */
1938
- label?: string | null;
1939
- /** Description of the field */
1940
- description?: RichContent;
1941
- /**
1942
- * Flag identifying to hide label or not
1943
- * Default: true
1944
- */
1945
- showLabel?: boolean | null;
1946
- /** Default rating */
1947
- defaultValue?: number | null;
1948
- }
1949
- interface InputFieldBooleanType {
1950
- /** Custom error message when validation fails. */
1951
- errorMessages?: InputFieldBooleanErrorMessages;
1952
- /** List of allowed values. */
1953
- enum?: boolean[];
1954
- }
1955
- interface InputFieldBooleanErrorMessages {
1956
- /** Default error message on invalid validation. */
1957
- default?: string | null;
1958
- }
1959
- declare enum BooleanComponentType {
1960
- UNKNOWN = "UNKNOWN",
1961
- CHECKBOX = "CHECKBOX"
1962
- }
1963
- interface Checkbox {
1964
- /** Label of the field */
1965
- label?: RichContent;
1966
- }
1967
- interface InputFieldArrayType {
1968
- /** Maximum amount of array elements. */
1969
- maxItems?: number | null;
1970
- /** Minimum amount of array elements. */
1971
- minItems?: number | null;
1972
- /** Type of items allowed in array. */
1973
- items?: ArrayTypeArrayItems;
1974
- /** Custom error message when validation fails. */
1975
- errorMessages?: InputFieldArrayErrorMessages;
1976
- }
1977
- declare enum ItemType {
1978
- UNKNOWN = "UNKNOWN",
1979
- STRING = "STRING",
1980
- NUMBER = "NUMBER",
1981
- BOOLEAN = "BOOLEAN",
1982
- INTEGER = "INTEGER",
1983
- OBJECT = "OBJECT"
1984
- }
1985
- interface InputFieldIntegerType {
1986
- /** Maximum value. */
1987
- maximum?: number | null;
1988
- /** Minimum value. */
1989
- minimum?: number | null;
1990
- /** Multiple of value. */
1991
- multipleOf?: number | null;
1992
- /** Custom error message when validation fails. */
1993
- errorMessages?: InputFieldNumberErrorMessages;
1994
- /** List of allowed values. */
1995
- enum?: number[] | null;
1996
- }
1997
- interface InputFieldObjectType {
1998
- /** Description of object properties. */
1999
- properties?: Record<string, ObjectTypePropertiesType>;
2000
- /** Custom error message when validation fails. */
2001
- errorMessages?: InputFieldObjectErrorMessages;
2002
- }
2003
- declare enum PropertiesTypePropertiesType {
2004
- UNKNOWN = "UNKNOWN",
2005
- STRING = "STRING",
2006
- NUMBER = "NUMBER",
2007
- BOOLEAN = "BOOLEAN",
2008
- INTEGER = "INTEGER",
2009
- ARRAY = "ARRAY"
2010
- }
2011
- interface ObjectTypePropertiesType extends ObjectTypePropertiesTypePropertiesTypeOptionsOneOf {
2012
- /** String type validation for property. */
2013
- stringOptions?: InputFieldStringType;
2014
- /** Number type validation for property. */
2015
- numberOptions?: InputFieldNumberType;
2016
- /** Boolean type validation for property. */
2017
- booleanOptions?: InputFieldBooleanType;
2018
- /** Integer type validation for property. */
2019
- integerOptions?: InputFieldIntegerType;
2020
- /** Array type validation for property. */
2021
- arrayOptions?: InputFieldArrayType;
2022
- /**
2023
- * Type of object properties
2024
- * @readonly
2025
- */
2026
- propertiesType?: PropertiesTypePropertiesType;
2027
- /** Whether the property is required. */
2028
- required?: boolean;
2029
- }
2030
- /** @oneof */
2031
- interface ObjectTypePropertiesTypePropertiesTypeOptionsOneOf {
2032
- /** String type validation for property. */
2033
- stringOptions?: InputFieldStringType;
2034
- /** Number type validation for property. */
2035
- numberOptions?: InputFieldNumberType;
2036
- /** Boolean type validation for property. */
2037
- booleanOptions?: InputFieldBooleanType;
2038
- /** Integer type validation for property. */
2039
- integerOptions?: InputFieldIntegerType;
2040
- /** Array type validation for property. */
2041
- arrayOptions?: InputFieldArrayType;
2042
- }
2043
- interface InputFieldObjectErrorMessages {
2044
- /** Default error message on invalid validation. */
2045
- default?: string | null;
2046
- }
2047
- interface ArrayTypeArrayItems extends ArrayTypeArrayItemsItemTypeOptionsOneOf {
2048
- /** String type validation for items. */
2049
- stringOptions?: InputFieldStringType;
2050
- /** Number type validation for items. */
2051
- numberOptions?: InputFieldNumberType;
2052
- /** Boolean type validation for items. */
2053
- booleanOptions?: InputFieldBooleanType;
2054
- /** Integer type validation for items. */
2055
- integerOptions?: InputFieldIntegerType;
2056
- /** Object type validation for items */
2057
- objectOptions?: InputFieldObjectType;
2058
- /**
2059
- * Type of array items
2060
- * @readonly
2061
- */
2062
- itemType?: ItemType;
2063
- }
2064
- /** @oneof */
2065
- interface ArrayTypeArrayItemsItemTypeOptionsOneOf {
2066
- /** String type validation for items. */
2067
- stringOptions?: InputFieldStringType;
2068
- /** Number type validation for items. */
2069
- numberOptions?: InputFieldNumberType;
2070
- /** Boolean type validation for items. */
2071
- booleanOptions?: InputFieldBooleanType;
2072
- /** Integer type validation for items. */
2073
- integerOptions?: InputFieldIntegerType;
2074
- /** Object type validation for items */
2075
- objectOptions?: InputFieldObjectType;
2076
- }
2077
- interface InputFieldArrayErrorMessages {
2078
- /** Default error message on invalid validation. */
2079
- default?: string | null;
2080
- }
2081
- declare enum ComponentType {
2082
- UNKNOWN = "UNKNOWN",
2083
- CHECKBOX_GROUP = "CHECKBOX_GROUP"
2084
- }
2085
- interface CheckboxGroup {
2086
- /** Label of the field */
2087
- label?: string | null;
2088
- /** Description of the field */
2089
- description?: RichContent;
2090
- /** List of options to select from */
2091
- options?: Option[];
2092
- /**
2093
- * Flag identifying to hide or not label
2094
- * Default: true
2095
- */
2096
- showLabel?: boolean | null;
2097
- /** Option which can be specified by UoU, enabled when this object is specified. */
2098
- customOption?: CustomOption;
2099
- }
2100
- interface MediaItem extends MediaItemMediaOneOf {
2101
- /** WixMedia image. */
2102
- image?: string;
2103
- }
2104
- /** @oneof */
2105
- interface MediaItemMediaOneOf {
2106
- /** WixMedia image. */
2107
- image?: string;
2108
- }
2109
- interface Option {
2110
- /** Selectable option label */
2111
- label?: string | null;
2112
- /** Selectable option value, which is saved to DB. */
2113
- value?: any;
2114
- /** Flag identifying that option should be selected by default */
2115
- default?: boolean;
2116
- /** Option id. Used as binding for translations */
2117
- _id?: string;
2118
- /** Media item. Media, associated with option, like image. */
2119
- media?: MediaItem;
2120
- }
2121
- interface CustomOption {
2122
- /** Label of custom option input */
2123
- label?: string | null;
2124
- /** Placeholder of custom option input */
2125
- placeholder?: string | null;
2126
- }
2127
- declare enum WixFileComponentType {
2128
- UNKNOWN = "UNKNOWN",
2129
- FILE_UPLOAD = "FILE_UPLOAD",
2130
- SIGNATURE = "SIGNATURE"
2131
- }
2132
- interface FileUpload {
2133
- /** Selectable option label */
2134
- label?: string | null;
2135
- /** Description of the field */
2136
- description?: RichContent;
2137
- /**
2138
- * Flag identifying to hide or not label
2139
- * Default: true
2140
- */
2141
- showLabel?: boolean | null;
2142
- /** Text on upload button */
2143
- buttonText?: string | null;
2144
- /** Amount of files allowed to upload */
2145
- fileLimit?: number;
2146
- /** Supported file formats for upload */
2147
- uploadFileFormats?: UploadFileFormat[];
2148
- /** Custom text which appears when file is uploaded, if missing file name will be shown */
2149
- explanationText?: string | null;
2150
- }
2151
- declare enum UploadFileFormat {
2152
- UNDEFINED = "UNDEFINED",
2153
- /** Video files */
2154
- VIDEO = "VIDEO",
2155
- /** Image files */
2156
- IMAGE = "IMAGE",
2157
- /** Audio files */
2158
- AUDIO = "AUDIO",
2159
- /** Document files */
2160
- DOCUMENT = "DOCUMENT"
2161
- }
2162
- interface Signature {
2163
- /** Selectable option label */
2164
- label?: string | null;
2165
- /**
2166
- * Flag identifying to hide label or not
2167
- * Default: true
2168
- */
2169
- showLabel?: boolean | null;
2170
- /** Description of the field */
2171
- description?: RichContent;
2172
- /** Is image upload enabled */
2173
- imageUploadEnabled?: boolean;
2174
- }
2175
- declare enum PaymentComponentType {
2176
- UNKNOWN = "UNKNOWN",
2177
- CHECKBOX_GROUP = "CHECKBOX_GROUP",
2178
- DONATION_INPUT = "DONATION_INPUT"
2179
- }
2180
- interface ProductCheckboxGroup {
2181
- /** Label of the field. */
2182
- label?: string | null;
2183
- /** Description of the field. */
2184
- description?: RichContent;
2185
- /** List of options to select from. */
2186
- options?: ProductCheckboxGroupOption[];
2187
- }
2188
- interface ProductCheckboxGroupOption {
2189
- /** Selectable option label. */
2190
- label?: string | null;
2191
- /** Selectable option value, which is saved to DB. Corresponds to product id, found in field's products list. */
2192
- value?: any;
2193
- /** Option id. Used as binding for translations. */
2194
- _id?: string;
2195
- /** Media item. Media, associated with option, like image. */
2196
- media?: MediaItem;
2197
- }
2198
- interface DonationInput {
2199
- /** Label of the field. */
2200
- label?: string | null;
2201
- /** Description of the field. */
2202
- description?: RichContent;
2203
- /** List of options to select from. */
2204
- options?: DonationInputOption[];
2205
- /** Option which can be specified by UoU, enabled when this object is specified. */
2206
- customOption?: CommonCustomOption;
2207
- /**
2208
- * Specifies the number of columns used to display the selections within the component.
2209
- * Default: ONE
2210
- */
2211
- numberOfColumns?: NumberOfColumns;
2212
- /**
2213
- * Flag identifying to hide or not label
2214
- * Default: true
2215
- */
2216
- showLabel?: boolean | null;
2217
- }
2218
- interface DonationInputOption {
2219
- /** Selectable option value, which is saved to DB. Corresponds to product id, found in field's products list. */
2220
- value?: string;
2221
- /** Flag identifying that option should be selected by default */
2222
- default?: boolean;
2223
- }
2224
- interface CommonCustomOption {
2225
- /** Label of custom option input */
2226
- label?: string | null;
2227
- /** Placeholder of custom option input */
2228
- placeholder?: string | null;
2229
- }
2230
- declare enum NumberOfColumns {
2231
- UNKNOWN = "UNKNOWN",
2232
- ONE = "ONE",
2233
- TWO = "TWO",
2234
- THREE = "THREE"
2235
- }
2236
- declare enum MultilineAddressComponentType {
2237
- UNKNOWN = "UNKNOWN",
2238
- MULTILINE_ADDRESS = "MULTILINE_ADDRESS"
2239
- }
2240
- interface MultilineAddress {
2241
- /** Label of the field. */
2242
- label?: string | null;
2243
- /** Description of the field. */
2244
- description?: RichContent;
2245
- /** Show country flags. */
2246
- showCountryFlags?: boolean;
2247
- /** Default country configuration. */
2248
- defaultCountryConfig?: DefaultCountryConfig;
2249
- /** Fields settings. */
2250
- fieldSettings?: FieldsSettings;
2251
- /** Autocomplete enabled for address line field. */
2252
- autocompleteEnabled?: boolean;
2253
- }
2254
- declare enum Type {
2255
- UNKNOWN_DEFAULT_COUNTRY = "UNKNOWN_DEFAULT_COUNTRY",
2256
- /** Country will be determined by customer's IP address. */
2257
- BY_IP = "BY_IP",
2258
- /** Pre-selected default country. */
2259
- COUNTRY = "COUNTRY"
2260
- }
2261
- interface AddressLine2 {
2262
- /** Show address line 2 field. */
2263
- show?: boolean;
2264
- }
2265
- interface DefaultCountryConfig extends DefaultCountryConfigOptionsOneOf {
2266
- /** Country. */
2267
- countryOptions?: string;
2268
- /** Default country type. */
2269
- type?: Type;
2270
- }
2271
- /** @oneof */
2272
- interface DefaultCountryConfigOptionsOneOf {
2273
- /** Country. */
2274
- countryOptions?: string;
2275
- }
2276
- interface FieldsSettings {
2277
- /** Address line 2. */
2278
- addressLine2?: AddressLine2;
2279
- }
2280
- declare enum InputType {
2281
- UNKNOWN = "UNKNOWN",
2282
- STRING = "STRING",
2283
- NUMBER = "NUMBER",
2284
- BOOLEAN = "BOOLEAN",
2285
- ARRAY = "ARRAY",
2286
- OBJECT = "OBJECT",
2287
- WIX_FILE = "WIX_FILE",
2288
- PAYMENT = "PAYMENT",
2289
- MULTILINE_ADDRESS = "MULTILINE_ADDRESS"
2290
- }
2291
- interface _String extends _StringComponentTypeOptionsOneOf {
2292
- /** Text input field */
2293
- textInputOptions?: TextInput;
2294
- /** Selection field as radio group */
2295
- radioGroupOptions?: RadioGroup;
2296
- /** Selection field as drop down */
2297
- dropdownOptions?: Dropdown;
2298
- /** Field for selecting date and/or time */
2299
- dateTimeOptions?: DateTimeInput;
2300
- /** Phone input field */
2301
- phoneInputOptions?: PhoneInput;
2302
- /** Validation of field output value. */
2303
- validation?: InputFieldStringType;
2304
- /**
2305
- * Component type of the string input field
2306
- * @readonly
2307
- */
2308
- componentType?: StringComponentType;
2309
- }
2310
- /** @oneof */
2311
- interface _StringComponentTypeOptionsOneOf {
2312
- /** Text input field */
2313
- textInputOptions?: TextInput;
2314
- /** Selection field as radio group */
2315
- radioGroupOptions?: RadioGroup;
2316
- /** Selection field as drop down */
2317
- dropdownOptions?: Dropdown;
2318
- /** Field for selecting date and/or time */
2319
- dateTimeOptions?: DateTimeInput;
2320
- /** Phone input field */
2321
- phoneInputOptions?: PhoneInput;
2322
- }
2323
- interface _Number extends _NumberComponentTypeOptionsOneOf {
2324
- /** Number value input field */
2325
- numberInputOptions?: NumberInput;
2326
- /** Rating value input field */
2327
- ratingInputOptions?: RatingInput;
2328
- /** Validation of field output value. */
2329
- validation?: InputFieldNumberType;
2330
- /**
2331
- * Component type of the number input field
2332
- * @readonly
2333
- */
2334
- componentType?: NumberComponentType;
2335
- }
2336
- /** @oneof */
2337
- interface _NumberComponentTypeOptionsOneOf {
2338
- /** Number value input field */
2339
- numberInputOptions?: NumberInput;
2340
- /** Rating value input field */
2341
- ratingInputOptions?: RatingInput;
2342
- }
2343
- interface _Boolean extends _BooleanComponentTypeOptionsOneOf {
2344
- /** Checkbox input field */
2345
- checkboxOptions?: Checkbox;
2346
- /** Validation of field output value. */
2347
- validation?: InputFieldBooleanType;
2348
- /**
2349
- * Component type of the boolean input field
2350
- * @readonly
2351
- */
2352
- componentType?: BooleanComponentType;
2353
- }
2354
- /** @oneof */
2355
- interface _BooleanComponentTypeOptionsOneOf {
2356
- /** Checkbox input field */
2357
- checkboxOptions?: Checkbox;
2358
- }
2359
- interface _Array extends _ArrayComponentTypeOptionsOneOf {
2360
- /** Checkbox group input field */
2361
- checkboxGroupOptions?: CheckboxGroup;
2362
- /** Validation of array type. */
2363
- validation?: InputFieldArrayType;
2364
- /**
2365
- * Component type of the array input field
2366
- * @readonly
2367
- */
2368
- componentType?: ComponentType;
2369
- }
2370
- /** @oneof */
2371
- interface _ArrayComponentTypeOptionsOneOf {
2372
- /** Checkbox group input field */
2373
- checkboxGroupOptions?: CheckboxGroup;
2374
- }
2375
- interface _Object extends _ObjectValidationOneOf {
2376
- /** Validation of object type. */
2377
- object?: InputFieldObjectType;
2378
- }
2379
- /** @oneof */
2380
- interface _ObjectValidationOneOf {
2381
- /** Validation of object type. */
2382
- object?: InputFieldObjectType;
2383
- }
2384
- interface WixFile extends WixFileComponentTypeOptionsOneOf {
2385
- /** File upload input field */
2386
- fileUploadOptions?: FileUpload;
2387
- /** Signature input field */
2388
- signatureOptions?: Signature;
2389
- /**
2390
- * Component type of the array input field
2391
- * @readonly
2392
- */
2393
- componentType?: WixFileComponentType;
2394
- }
2395
- /** @oneof */
2396
- interface WixFileComponentTypeOptionsOneOf {
2397
- /** File upload input field */
2398
- fileUploadOptions?: FileUpload;
2399
- /** Signature input field */
2400
- signatureOptions?: Signature;
2401
- }
2402
- interface Payment extends PaymentComponentTypeOptionsOneOf {
2403
- /** Checkbox group input field. */
2404
- checkboxGroupOptions?: ProductCheckboxGroup;
2405
- /** Donation input field. */
2406
- donationInputOptions?: DonationInput;
2407
- /**
2408
- * Component type of the payment input field.
2409
- * @readonly
2410
- */
2411
- componentType?: PaymentComponentType;
2412
- /** Validation of payment type. */
2413
- validation?: PaymentType;
2414
- }
2415
- /** @oneof */
2416
- interface PaymentComponentTypeOptionsOneOf {
2417
- /** Checkbox group input field. */
2418
- checkboxGroupOptions?: ProductCheckboxGroup;
2419
- /** Donation input field. */
2420
- donationInputOptions?: DonationInput;
2421
- }
2422
- interface InputFieldMultilineAddress extends InputFieldMultilineAddressComponentTypeOptionsOneOf {
2423
- /** Multiline address input field. */
2424
- multilineAddressOptions?: MultilineAddress;
2425
- /**
2426
- * Component type of the multiline address field.
2427
- * @readonly
2428
- */
2429
- componentType?: MultilineAddressComponentType;
2430
- /** Validation of multiline address field output value. */
2431
- validation?: MultilineAddressValidation;
2432
- }
2433
- /** @oneof */
2434
- interface InputFieldMultilineAddressComponentTypeOptionsOneOf {
2435
- /** Multiline address input field. */
2436
- multilineAddressOptions?: MultilineAddress;
2437
- }
2438
- interface Header {
2439
- /** Content of the header */
2440
- content?: RichContent;
2441
- }
2442
- interface RichText {
2443
- /** Content of the rich text field */
2444
- content?: RichContent;
2445
- }
2446
- declare enum Target {
2447
- UNDEFINED = "UNDEFINED",
2448
- /** Opened in same browser tab */
2449
- SELF = "SELF",
2450
- /** Url open in new tab */
2451
- BLANK = "BLANK"
2452
- }
2453
- interface ThankYouMessage {
2454
- /** Message show after form submission */
2455
- text?: RichContent;
2456
- /**
2457
- * Duration after how much second it should disappear. If 0, will stay forever.
2458
- * Default: false
2459
- */
2460
- duration?: number | null;
2461
- }
2462
- interface Redirect {
2463
- /** Url to which UoU should be redirected after successful submit of form */
2464
- url?: string | null;
2465
- /** How should url be opened */
2466
- target?: Target;
2467
- }
2468
- declare enum FieldType {
2469
- UNKNOWN = "UNKNOWN",
2470
- INPUT = "INPUT",
2471
- DISPLAY = "DISPLAY",
2472
- SUBMIT = "SUBMIT"
2473
- }
2474
- interface InputField extends InputFieldInputTypeOptionsOneOf {
2475
- /** Input return string as value */
2476
- stringOptions?: _String;
2477
- /** Input return number as value */
2478
- numberOptions?: _Number;
2479
- /** Input return boolean as value */
2480
- booleanOptions?: _Boolean;
2481
- /** Input return array as value */
2482
- arrayOptions?: _Array;
2483
- /** Input return object as value */
2484
- objectOptions?: _Object;
2485
- /** Input return "Wix file" as value */
2486
- wixFileOptions?: WixFile;
2487
- /** Input returns selected products as value. */
2488
- paymentOptions?: Payment;
2489
- /** Input returns multiline address as value. */
2490
- multilineAddressOptions?: InputFieldMultilineAddress;
2491
- /** Definition of a target where the value of field belongs. */
2492
- target?: string | null;
2493
- /**
2494
- * Mark the field as containing personal information. This will encrypt user data when storing it.
2495
- * Default: false
2496
- */
2497
- pii?: boolean;
2498
- /**
2499
- * Whether the field is required.
2500
- * Default: false
2501
- */
2502
- required?: boolean;
2503
- /**
2504
- * Type of the input field
2505
- * @readonly
2506
- */
2507
- inputType?: InputType;
2508
- }
2509
- /** @oneof */
2510
- interface InputFieldInputTypeOptionsOneOf {
2511
- /** Input return string as value */
2512
- stringOptions?: _String;
2513
- /** Input return number as value */
2514
- numberOptions?: _Number;
2515
- /** Input return boolean as value */
2516
- booleanOptions?: _Boolean;
2517
- /** Input return array as value */
2518
- arrayOptions?: _Array;
2519
- /** Input return object as value */
2520
- objectOptions?: _Object;
2521
- /** Input return "Wix file" as value */
2522
- wixFileOptions?: WixFile;
2523
- /** Input returns selected products as value. */
2524
- paymentOptions?: Payment;
2525
- /** Input returns multiline address as value. */
2526
- multilineAddressOptions?: InputFieldMultilineAddress;
2527
- }
2528
- interface DisplayField extends DisplayFieldComponentTypeOneOf {
2529
- /** Header field */
2530
- header?: Header;
2531
- /** Rich text field */
2532
- richText?: RichText;
2533
- }
2534
- /** @oneof */
2535
- interface DisplayFieldComponentTypeOneOf {
2536
- /** Header field */
2537
- header?: Header;
2538
- /** Rich text field */
2539
- richText?: RichText;
2540
- }
2541
- interface SubmitButton extends SubmitButtonSubmitActionOneOf {
2542
- /** Submit action effect is to show message */
2543
- thankYouMessage?: ThankYouMessage;
2544
- /** Submit action effect is to redirect to */
2545
- redirect?: Redirect;
2546
- /** When button is not on last page it behaves as switch between pages page, text of label to go to next page. */
2547
- nextText?: string | null;
2548
- /** When button is not on last page it behaves as switch between pages page, text of label to go to previous page. */
2549
- previousText?: string | null;
2550
- /** Text on the button when button is submitting a form */
2551
- submitText?: string | null;
2552
- }
2553
- /** @oneof */
2554
- interface SubmitButtonSubmitActionOneOf {
2555
- /** Submit action effect is to show message */
2556
- thankYouMessage?: ThankYouMessage;
2557
- /** Submit action effect is to redirect to */
2558
- redirect?: Redirect;
2559
- }
2560
- interface FormFieldContactInfo extends FormFieldContactInfoAdditionalInfoOneOf {
2561
- /** Email info. */
2562
- emailInfo?: EmailInfo;
2563
- /** Phone info. */
2564
- phoneInfo?: PhoneInfo;
2565
- /** Address info. */
2566
- addressInfo?: AddressInfo;
2567
- /** Custom field info. */
2568
- customFieldInfo?: CustomFieldInfo;
2569
- /** Subscription info */
2570
- subscriptionInfo?: SubscriptionInfo;
2571
- /** Field mapped to contacts. */
2572
- contactField?: ContactField;
2573
- }
2574
- /** @oneof */
2575
- interface FormFieldContactInfoAdditionalInfoOneOf {
2576
- /** Email info. */
2577
- emailInfo?: EmailInfo;
2578
- /** Phone info. */
2579
- phoneInfo?: PhoneInfo;
2580
- /** Address info. */
2581
- addressInfo?: AddressInfo;
2582
- /** Custom field info. */
2583
- customFieldInfo?: CustomFieldInfo;
2584
- /** Subscription info */
2585
- subscriptionInfo?: SubscriptionInfo;
2586
- }
2587
- declare enum EmailInfoTag {
2588
- UNTAGGED = "UNTAGGED",
2589
- MAIN = "MAIN"
2590
- }
2591
- declare enum PhoneInfoTag {
2592
- UNTAGGED = "UNTAGGED",
2593
- MAIN = "MAIN"
2594
- }
2595
- declare enum Tag {
2596
- UNTAGGED = "UNTAGGED",
2597
- HOME = "HOME"
2598
- }
2599
- declare enum OptInLevel$1 {
2600
- UNKNOWN = "UNKNOWN",
2601
- SINGLE_CONFIRMATION = "SINGLE_CONFIRMATION",
2602
- DOUBLE_CONFIRMATION = "DOUBLE_CONFIRMATION"
2603
- }
2604
- declare enum ContactField {
2605
- UNDEFINED = "UNDEFINED",
2606
- FIRST_NAME = "FIRST_NAME",
2607
- LAST_NAME = "LAST_NAME",
2608
- COMPANY = "COMPANY",
2609
- POSITION = "POSITION",
2610
- EMAIL = "EMAIL",
2611
- PHONE = "PHONE",
2612
- ADDRESS = "ADDRESS",
2613
- BIRTHDATE = "BIRTHDATE",
2614
- CUSTOM_FIELD = "CUSTOM_FIELD",
2615
- SUBSCRIPTION = "SUBSCRIPTION",
2616
- VAT_ID = "VAT_ID"
2617
- }
2618
- interface EmailInfo {
2619
- /** Email tag. */
2620
- tag?: EmailInfoTag;
2621
- }
2622
- interface PhoneInfo {
2623
- /** Phone tag. */
2624
- tag?: PhoneInfoTag;
2625
- }
2626
- interface AddressInfo {
2627
- /** Address tag. */
2628
- tag?: Tag;
2629
- }
2630
- interface CustomFieldInfo {
2631
- /** Custom field key. */
2632
- key?: string;
2633
- }
2634
- interface SubscriptionInfo {
2635
- /**
2636
- * Subscription consent opt in level, either single or double confirmation.
2637
- * Default: SINGLE_CONFIRMATION
2638
- */
2639
- optInLevel?: OptInLevel$1;
2640
- }
2641
- interface Step {
2642
- /** Step ID. */
2643
- _id?: string;
2644
- /** Name of the step. */
2645
- name?: string | null;
2646
- /** Is step hidden */
2647
- hidden?: boolean;
2648
- /** Form step properties */
2649
- layout?: FormLayout;
2650
- }
2651
- interface FormLayout {
2652
- /** Layout for large break point. */
2653
- large?: BreakPoint;
2654
- /** Layout for medium break point. */
2655
- medium?: BreakPoint;
2656
- /** Layout for small break point. */
2657
- small?: BreakPoint;
2658
- }
2659
- interface BreakPoint {
2660
- /** Description of layouts for items. */
2661
- items?: ItemLayout[];
2662
- /** Amount of columns of layout grid. */
2663
- columns?: number | null;
2664
- /** Row height of layout grid. */
2665
- rowHeight?: number | null;
2666
- /** Description of elements margins. */
2667
- margin?: Margin;
2668
- /** Description of elements paddings. */
2669
- padding?: Margin;
2670
- /** Sections of the layout, which allow manage fields */
2671
- sections?: Section[];
2672
- }
2673
- interface ItemLayout {
2674
- /** Form field reference id. */
2675
- fieldId?: string;
2676
- /** Horizontal coordinate in the grid. */
2677
- row?: number | null;
2678
- /** Vertical coordinate in the grid. */
2679
- column?: number | null;
2680
- /** Height. */
2681
- width?: number | null;
2682
- /** Width. */
2683
- height?: number | null;
2684
- }
2685
- interface Margin {
2686
- /** Horizontal value. */
2687
- horizontal?: number | null;
2688
- /** Vertical value. */
2689
- vertical?: number | null;
2690
- }
2691
- interface Section {
2692
- /** Id of the section */
2693
- _id?: string;
2694
- /** Horizontal coordinate in the grid. */
2695
- row?: number | null;
2696
- /**
2697
- * A list of field identifiers that are permitted to be placed within a section.
2698
- * The section will only accept fields with IDs specified in this list.
2699
- * If the section encounters the $new key within the list,
2700
- * it allows the inclusion of fields not explicitly listed,
2701
- * enabling dynamic addition of new fields.
2702
- */
2703
- allowedFieldIds?: string[];
2704
- }
2705
- interface FormRule {
2706
- /** Id of the rule */
2707
- _id?: string;
2708
- /** Rule on which item properties or layouts will be changed. */
2709
- condition?: Record<string, any> | null;
2710
- /**
2711
- * Form items with defined properties that will be
2712
- * changed when given condition is resolved to true.
2713
- */
2714
- overrides?: FormOverride[];
2715
- /** Name of the rule */
2716
- name?: string | null;
2717
- }
2718
- declare enum OverrideEntityType {
2719
- UNKNOWN = "UNKNOWN",
2720
- FIELD = "FIELD",
2721
- FORM = "FORM",
2722
- NESTED_FORM_FIELD = "NESTED_FORM_FIELD"
2723
- }
2724
- interface FormOverride {
2725
- /** Override entity type. */
2726
- entityType?: OverrideEntityType;
2727
- /** Overridden entity id. Either fieldId, or "{fieldIdWithNestedForm}/{nestedFormFieldId}" */
2728
- entityId?: string | null;
2729
- /** Form entity properties path with new value, that will be changed on condition. */
2730
- valueChanges?: Record<string, any>;
2731
- }
2732
- interface FormProperties {
2733
- /** Form name. */
2734
- name?: string | null;
2735
- /** Identifies if the form is disabled. */
2736
- disabled?: boolean;
2737
- }
2738
- declare enum Kind {
2739
- REGULAR = "REGULAR",
2740
- EXTENSION = "EXTENSION"
2741
- }
2742
- interface PostSubmissionTriggers {
2743
- /** Upserts a contact from the submission data. */
2744
- upsertContact?: UpsertContact;
2745
- }
2746
- interface UpsertContact {
2747
- /** Fields mapping (target field mapped to corresponding contact field). */
2748
- fieldsMapping?: Record<string, FormFieldContactInfo>;
2749
- /**
2750
- * List of contact label keys.
2751
- * [Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list)
2752
- * help categorize contacts.
2753
- */
2754
- labels?: string[];
2755
- }
2756
- interface ExtendedFields$2 {
2757
- /**
2758
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
2759
- * The value of each key is structured according to the schema defined when the extended fields were configured.
2760
- *
2761
- * You can only access fields for which you have the appropriate permissions.
2762
- *
2763
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
2764
- */
2765
- namespaces?: Record<string, Record<string, any>>;
2766
- }
2767
- interface LimitationRule {
2768
- /** Limitation by submission count, disables form when a set amount of submissions is reached. */
2769
- maxAllowedSubmissions?: number | null;
2770
- /** Limitation by submission date, disables form when a set date and time is reached. */
2771
- dateTimeDeadline?: Date;
2772
- }
2773
- declare enum SpamFilterProtectionLevel {
2774
- UNKNOWN = "UNKNOWN",
2775
- /** Spam filter is not used. Form is open for spam submissions. */
2776
- NONE = "NONE",
2777
- /** Spam filter operates in basic mode. Form is open to high risk of spam submissions. */
2778
- BASIC = "BASIC",
2779
- /** Spam filter operates in advanced mode. Form is open to low risk of spam submissions. */
2780
- ADVANCED = "ADVANCED"
2781
- }
2782
- interface RequiredIndicatorProperties {
2783
- /** Required indicator. */
2784
- requiredIndicator?: RequiredIndicator;
2785
- /** Required indicator placement. */
2786
- requiredIndicatorPlacement?: RequiredIndicatorPlacement;
2787
- }
2788
- interface BulkCreateFormResponse {
2789
- /** Created forms with metadata */
2790
- results?: BulkFormResult[];
2791
- /** Metadata of request */
2792
- bulkActionMetadata?: BulkActionMetadata$2;
2793
- }
2794
- interface BulkFormResult {
2795
- /** Created form metadata */
2796
- itemMetadata?: ItemMetadata$2;
2797
- /** Created form */
2798
- item?: Form;
2799
- }
2800
- interface ItemMetadata$2 {
2801
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
2802
- _id?: string | null;
2803
- /** Index of the item within the request array. Allows for correlation between request and response items. */
2804
- originalIndex?: number;
2805
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
2806
- success?: boolean;
2807
- /** Details about the error in case of failure. */
2808
- error?: ApplicationError$2;
2809
- }
2810
- interface ApplicationError$2 {
2811
- /** Error code. */
2812
- code?: string;
2813
- /** Description of the error. */
2814
- description?: string;
2815
- /** Data related to the error. */
2816
- data?: Record<string, any> | null;
2817
- }
2818
- interface BulkActionMetadata$2 {
2819
- /** Number of items that were successfully processed. */
2820
- totalSuccesses?: number;
2821
- /** Number of items that couldn't be processed. */
2822
- totalFailures?: number;
2823
- /** Number of failures without details because detailed failure threshold was exceeded. */
2824
- undetailedFailures?: number;
2825
- }
2826
- interface CloneFormResponse {
2827
- /** The cloned form. */
2828
- form?: Form;
2829
- }
2830
- declare enum Fieldset {
2831
- UNKNOWN = "UNKNOWN",
2832
- /** Includes nested forms when present. */
2833
- NESTED_FORMS = "NESTED_FORMS"
2834
- }
2835
- interface RestoreFromTrashBinResponse {
2836
- /** The restored form. */
2837
- form?: Form;
2838
- }
2839
- interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
2840
- /** 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`. */
2841
- cursorPaging?: CursorPaging$1;
2842
- /**
2843
- * Filter object in the following format:
2844
- * `"filter" : {
2845
- * "fieldName1": "value1",
2846
- * "fieldName2":{"$operator":"value2"}
2847
- * }`
2848
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
2849
- */
2850
- filter?: Record<string, any> | null;
2851
- /**
2852
- * Sort object in the following format:
2853
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
2854
- */
2855
- sort?: Sorting$1[];
2856
- }
2857
- /** @oneof */
2858
- interface CursorQueryPagingMethodOneOf$1 {
2859
- /** 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`. */
2860
- cursorPaging?: CursorPaging$1;
2861
- }
2862
- interface Sorting$1 {
2863
- /** Name of the field to sort by. */
2864
- fieldName?: string;
2865
- /** Sort order. */
2866
- order?: SortOrder$1;
2867
- }
2868
- declare enum SortOrder$1 {
2869
- ASC = "ASC",
2870
- DESC = "DESC"
2871
- }
2872
- interface CursorPaging$1 {
2873
- /** Number of items to load. */
2874
- limit?: number | null;
2875
- /**
2876
- * Pointer to the next or previous page in the list of results.
2877
- *
2878
- * You can get the relevant cursor token
2879
- * from the `pagingMetadata` object in the previous call's response.
2880
- * Not relevant for the first request.
2881
- */
2882
- cursor?: string | null;
2883
- }
2884
- interface CursorPagingMetadata$1 {
2885
- /** Number of items returned in the response. */
2886
- count?: number | null;
2887
- /** Offset that was requested. */
2888
- cursors?: Cursors$2;
2889
- /**
2890
- * Indicates if there are more results after the current page.
2891
- * If `true`, another page of results can be retrieved.
2892
- * If `false`, this is the last page.
2893
- */
2894
- hasNext?: boolean | null;
2895
- }
2896
- interface Cursors$2 {
2897
- /** Cursor pointing to next page in the list of results. */
2898
- next?: string | null;
2899
- /** Cursor pointing to previous page in the list of results. */
2900
- prev?: string | null;
2901
- }
2902
- declare enum CountFormsFieldset {
2903
- UNKNOWN = "UNKNOWN",
2904
- /** Include deleted forms count. */
2905
- DELETED = "DELETED"
2906
- }
2907
- interface CountFormsResponse {
2908
- /** Active forms count. */
2909
- activeCount?: number;
2910
- /** Deleted forms count. */
2911
- deletedCount?: number | null;
2912
- }
2913
- declare enum ListFormsOrder {
2914
- /** Sorting by updated date descending. The default value. */
2915
- UPDATED_DATE_DESC = "UPDATED_DATE_DESC",
2916
- /** Sorting by updated date ascending. */
2917
- UPDATED_DATE_ASC = "UPDATED_DATE_ASC",
2918
- /** Sorting by created date ascending. */
2919
- CREATED_DATE_ASC = "CREATED_DATE_ASC",
2920
- /** Sorting by created date descending. */
2921
- CREATED_DATE_DESC = "CREATED_DATE_DESC",
2922
- /** Sorting by name ascending. */
2923
- NAME_ASC = "NAME_ASC",
2924
- /** Sorting by name descending. */
2925
- NAME_DESC = "NAME_DESC"
2926
- }
2927
- interface ListFormsResponse {
2928
- /** The retrieved forms. */
2929
- forms?: Form[];
2930
- /** Details on the paged set of results returned. */
2931
- pagingMetadata?: CursorPagingMetadata$1;
2932
- }
2933
- interface GetDeletedFormResponse {
2934
- /** The retrieved Form */
2935
- form?: Form;
2936
- }
2937
- interface QueryDeletedFormsResponse {
2938
- /** The retrieved Forms */
2939
- forms?: Form[];
2940
- /** Details on the paged set of results returned. */
2941
- metadata?: CursorPagingMetadata$1;
2942
- }
2943
- declare enum ListDeletedFormsOrder {
2944
- /** Sorting by updated date descending. The default value. */
2945
- UPDATED_DATE_DESC = "UPDATED_DATE_DESC",
2946
- /** Sorting by updated date ascending. */
2947
- UPDATED_DATE_ASC = "UPDATED_DATE_ASC",
2948
- /** Sorting by name ascending. */
2949
- NAME_ASC = "NAME_ASC",
2950
- /** Sorting by name descending. */
2951
- NAME_DESC = "NAME_DESC"
2952
- }
2953
- interface ListDeletedFormsResponse {
2954
- /** The retrieved forms. */
2955
- forms?: Form[];
2956
- /** Details on the paged set of results returned. */
2957
- pagingMetadata?: CursorPagingMetadata$1;
2958
- }
2959
- interface BulkRemoveDeletedFieldResponse {
2960
- /** Form with the deleted fields. */
2961
- form?: Form;
2962
- }
2963
- interface SubmissionKeysPermanentlyDeleted {
2964
- /** Keys which should be deleted */
2965
- keys?: string[] | null;
2966
- }
2967
- interface UpdateExtendedFieldsResponse {
2968
- /** namespace that was updated */
2969
- namespace?: string;
2970
- /** only data from UpdateExtendedFieldsRequest namespace_data */
2971
- namespaceData?: Record<string, any> | null;
2972
- }
2973
- interface IdentificationData$2 extends IdentificationDataIdOneOf$2 {
2974
- /** ID of a site visitor that has not logged in to the site. */
2975
- anonymousVisitorId?: string;
2976
- /** ID of a site visitor that has logged in to the site. */
2977
- memberId?: string;
2978
- /** ID of a Wix user (site owner, contributor, etc.). */
2979
- wixUserId?: string;
2980
- /** ID of an app. */
2981
- appId?: string;
2982
- /** @readonly */
2983
- identityType?: WebhookIdentityType$2;
2984
- }
2985
- /** @oneof */
2986
- interface IdentificationDataIdOneOf$2 {
2987
- /** ID of a site visitor that has not logged in to the site. */
2988
- anonymousVisitorId?: string;
2989
- /** ID of a site visitor that has logged in to the site. */
2990
- memberId?: string;
2991
- /** ID of a Wix user (site owner, contributor, etc.). */
2992
- wixUserId?: string;
2993
- /** ID of an app. */
2994
- appId?: string;
2995
- }
2996
- declare enum WebhookIdentityType$2 {
2997
- UNKNOWN = "UNKNOWN",
2998
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
2999
- MEMBER = "MEMBER",
3000
- WIX_USER = "WIX_USER",
3001
- APP = "APP"
3002
- }
3003
- interface BaseEventMetadata$2 {
3004
- /** App instance ID. */
3005
- instanceId?: string | null;
3006
- /** Event type. */
3007
- eventType?: string;
3008
- /** The identification type and identity data. */
3009
- identity?: IdentificationData$2;
3010
- }
3011
- interface EventMetadata$2 extends BaseEventMetadata$2 {
3012
- /**
3013
- * Unique event ID.
3014
- * Allows clients to ignore duplicate webhooks.
3015
- */
3016
- _id?: string;
3017
- /**
3018
- * Assumes actions are also always typed to an entity_type
3019
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
3020
- */
3021
- entityFqdn?: string;
3022
- /**
3023
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
3024
- * This is although the created/updated/deleted notion is duplication of the oneof types
3025
- * Example: created/updated/deleted/started/completed/email_opened
3026
- */
3027
- slug?: string;
3028
- /** ID of the entity associated with the event. */
3029
- entityId?: string;
3030
- /** Event timestamp. */
3031
- eventTime?: Date;
3032
- /**
3033
- * Whether the event was triggered as a result of a privacy regulation application
3034
- * (for example, GDPR).
3035
- */
3036
- triggeredByAnonymizeRequest?: boolean | null;
3037
- /** If present, indicates the action that triggered the event. */
3038
- originatedFrom?: string | null;
3039
- /**
3040
- * A sequence number defining the order of updates to the underlying entity.
3041
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
3042
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
3043
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
3044
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
3045
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
3046
- */
3047
- entityEventSequence?: string | null;
3048
- }
3049
- interface FormCreatedEnvelope {
3050
- entity: Form;
3051
- metadata: EventMetadata$2;
3052
- }
3053
- interface FormUpdatedEnvelope {
3054
- entity: Form;
3055
- metadata: EventMetadata$2;
3056
- }
3057
- interface FormSubmissionKeysPermanentlyDeletedEnvelope {
3058
- data: SubmissionKeysPermanentlyDeleted;
3059
- metadata: EventMetadata$2;
3060
- }
3061
- interface BulkCreateFormOptions {
3062
- /** Forms to be created. */
3063
- forms?: Form[];
3064
- /** When set, items will be returned on successful create */
3065
- returnEntity?: boolean;
3066
- }
3067
- interface GetFormOptions {
3068
- /**
3069
- * List of additional form fields to include in the response. For example, use the `NESTED_FORMS` fieldset to retrieve the nested forms field in
3070
- * the response in addition to the form’s base fields. Base fields don’t include any of the supported fieldset values. By default
3071
- * only the form’s base fields are returned.
3072
- */
3073
- fieldsets?: Fieldset[];
3074
- }
3075
- interface UpdateForm {
3076
- /**
3077
- * Form ID.
3078
- * @readonly
3079
- */
3080
- _id?: string | null;
3081
- /** List of form fields that represent input elements. */
3082
- fields?: FormField[];
3083
- /**
3084
- * List of form fields that represent input elements.
3085
- * @readonly
3086
- */
3087
- fieldsV2?: FormFieldV2[];
3088
- /** Defines the layout for form fields in each submission step. */
3089
- steps?: Step[];
3090
- /** Form rules, can be applied to layout and items properties. */
3091
- rules?: FormRule[];
3092
- /**
3093
- * Represents the current state of an item. Each time the item is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision.
3094
- * @readonly
3095
- */
3096
- revision?: string | null;
3097
- /**
3098
- * Date of creation.
3099
- * @readonly
3100
- */
3101
- _createdDate?: Date;
3102
- /**
3103
- * Date of last update.
3104
- * @readonly
3105
- */
3106
- _updatedDate?: Date;
3107
- /** Properties of the form. */
3108
- properties?: FormProperties;
3109
- /**
3110
- * Fields which were soft deleted.
3111
- * @readonly
3112
- */
3113
- deletedFields?: FormField[];
3114
- /**
3115
- * List of form fields that represent input elements.
3116
- * @readonly
3117
- */
3118
- deletedFieldsV2?: FormFieldV2[];
3119
- /**
3120
- * Regular forms can be freely modified.
3121
- * Extensions are copied from templates and might have restrictions.
3122
- * @readonly
3123
- */
3124
- kind?: Kind;
3125
- /**
3126
- * Defines triggers that will be executed after the submission, for the submissions based on this schema.
3127
- * Forms provide a set of predefined triggers that allow it to assign specific business cases to created forms.
3128
- */
3129
- postSubmissionTriggers?: PostSubmissionTriggers;
3130
- /** Data extensions ExtendedFields. */
3131
- extendedFields?: ExtendedFields$2;
3132
- /** Identifies the namespace that the form belongs to. */
3133
- namespace?: string;
3134
- /**
3135
- * Media folder ID.
3136
- * @readonly
3137
- */
3138
- mediaFolderId?: string | null;
3139
- /** Rules that limit submissions on this form. */
3140
- limitationRule?: LimitationRule;
3141
- /**
3142
- * Spam filter protection level.
3143
- * Default: ADVANCED.
3144
- */
3145
- spamFilterProtectionLevel?: SpamFilterProtectionLevel;
3146
- /** Required indicator properties. */
3147
- requiredIndicatorProperties?: RequiredIndicatorProperties;
3148
- }
3149
- interface DeleteFormOptions {
3150
- /** The revision of the form. */
3151
- revision?: string;
3152
- /**
3153
- * Delete form bypassing trash-bin.
3154
- * Default: false
3155
- */
3156
- permanent?: boolean;
3157
- }
3158
- interface QueryFormsOptions {
3159
- /**
3160
- * List of additional form fields to include in the response. For example, use the `NESTED_FORMS` fieldset to retrieve the nested forms field in
3161
- * the response in addition to the form’s base fields. Base fields don’t include any of the supported fieldset values. By default
3162
- * only the form’s base fields are returned.
3163
- */
3164
- fieldsets?: Fieldset[] | undefined;
3165
- }
3166
- interface QueryCursorResult$2 {
3167
- cursors: Cursors$2;
3168
- hasNext: () => boolean;
3169
- hasPrev: () => boolean;
3170
- length: number;
3171
- pageSize: number;
3172
- }
3173
- interface FormsQueryResult extends QueryCursorResult$2 {
3174
- items: Form[];
3175
- query: FormsQueryBuilder;
3176
- next: () => Promise<FormsQueryResult>;
3177
- prev: () => Promise<FormsQueryResult>;
3178
- }
3179
- interface FormsQueryBuilder {
3180
- /** @param propertyName - Property whose value is compared with `value`.
3181
- * @param value - Value to compare against.
3182
- * @documentationMaturity preview
3183
- */
3184
- eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'properties.name' | 'properties.disabled' | 'namespace', value: any) => FormsQueryBuilder;
3185
- /** @param propertyName - Property whose value is compared with `value`.
3186
- * @param value - Value to compare against.
3187
- * @documentationMaturity preview
3188
- */
3189
- ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'properties.name' | 'properties.disabled', value: any) => FormsQueryBuilder;
3190
- /** @param propertyName - Property whose value is compared with `value`.
3191
- * @param value - Value to compare against.
3192
- * @documentationMaturity preview
3193
- */
3194
- ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => FormsQueryBuilder;
3195
- /** @param propertyName - Property whose value is compared with `value`.
3196
- * @param value - Value to compare against.
3197
- * @documentationMaturity preview
3198
- */
3199
- gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => FormsQueryBuilder;
3200
- /** @param propertyName - Property whose value is compared with `value`.
3201
- * @param value - Value to compare against.
3202
- * @documentationMaturity preview
3203
- */
3204
- le: (propertyName: '_createdDate' | '_updatedDate', value: any) => FormsQueryBuilder;
3205
- /** @param propertyName - Property whose value is compared with `value`.
3206
- * @param value - Value to compare against.
3207
- * @documentationMaturity preview
3208
- */
3209
- lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => FormsQueryBuilder;
3210
- /** @param propertyName - Property whose value is compared with `string`.
3211
- * @param string - String to compare against. Case-insensitive.
3212
- * @documentationMaturity preview
3213
- */
3214
- startsWith: (propertyName: 'properties.name', value: string) => FormsQueryBuilder;
3215
- /** @documentationMaturity preview */
3216
- in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'properties.name', value: any) => FormsQueryBuilder;
3217
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
3218
- * @documentationMaturity preview
3219
- */
3220
- ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'properties.name' | 'properties.disabled' | 'namespace'>) => FormsQueryBuilder;
3221
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
3222
- * @documentationMaturity preview
3223
- */
3224
- descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'properties.name' | 'properties.disabled' | 'namespace'>) => FormsQueryBuilder;
3225
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
3226
- * @documentationMaturity preview
3227
- */
3228
- limit: (limit: number) => FormsQueryBuilder;
3229
- /** @param cursor - A pointer to specific record
3230
- * @documentationMaturity preview
3231
- */
3232
- skipTo: (cursor: string) => FormsQueryBuilder;
3233
- /** @documentationMaturity preview */
3234
- find: () => Promise<FormsQueryResult>;
3235
- }
3236
- interface CountFormsOptions {
3237
- /** Fieldsets. */
3238
- fieldsets?: CountFormsFieldset[];
3239
- }
3240
- interface ListFormsOptions {
3241
- /** Identifies if the form is disabled. */
3242
- disabled?: boolean | null;
3243
- /**
3244
- * Ordering options.
3245
- *
3246
- * - `UPDATED_DATE_DESC`: Ordered by `updatedDate` in descending order.
3247
- * - `UPDATED_DATE_ASC`: Ordered by `updatedDate` in ascending order.
3248
- * - `CREATED_DATE_ASC`: Ordered by `createdDate` in ascending order.
3249
- * - `CREATED_DATE_DESC`: Ordered by `createdDate` in descending order.
3250
- * - `NAME_ASC`: Ordered by `properties.name` in ascending order.
3251
- * - `NAME_DESC`: Ordered by `properties.name` in descending order.
3252
- *
3253
- * Default: `UPDATED_DATE_DESC`
3254
- */
3255
- order?: ListFormsOrder;
3256
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not filter or `order`. */
3257
- paging?: CursorPaging$1;
3258
- /**
3259
- * List of additional form fields to include in the response. For example, use the `NESTED_FORMS` fieldset to retrieve the nested forms field in
3260
- * the response in addition to the form’s base fields. Base fields don’t include any of the supported fieldset values. By default
3261
- * only the form’s base fields are returned.
3262
- */
3263
- fieldsets?: Fieldset[];
3264
- /** Form ids. */
3265
- formIds?: string[];
3266
- }
3267
- interface ListDeletedFormsOptions {
3268
- /** Identifies if the form is disabled. */
3269
- disabled?: boolean | null;
3270
- /** Form ids. */
3271
- formIds?: string[];
3272
- /**
3273
- * Ordering options.
3274
- *
3275
- * - `UPDATED_DATE_ASC`: Ordered by `updatedDate` in ascending order.
3276
- * - `UPDATED_DATE_DESC`: Ordered by `updatedDate` in descending order.
3277
- * - `NAME_ASC`: Ordered by `properties.name` in ascending order.
3278
- * - `NAME_DESC`: Ordered by `properties.name` in descending order.
3279
- *
3280
- * Default: `UPDATED_DATE_DESC`
3281
- */
3282
- order?: ListDeletedFormsOrder;
3283
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not filter or `order`. */
3284
- paging?: CursorPaging$1;
3285
- }
3286
- interface BulkRemoveDeletedFieldOptions {
3287
- /** Ids of the deleted fields to remove. */
3288
- fieldsIds?: string[];
3289
- }
3290
- interface UpdateExtendedFieldsOptions {
3291
- /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
3292
- namespaceData: Record<string, any> | null;
3293
- }
3294
-
3295
1
  type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
3296
2
  interface HttpClient {
3297
3
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
3298
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
4
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
3299
6
  }
3300
7
  type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
3301
8
  type HttpResponse<T = any> = {
@@ -3335,45 +42,29 @@ declare global {
3335
42
  }
3336
43
  }
3337
44
 
3338
- declare function createForm$1(httpClient: HttpClient): (form: Form) => Promise<Form>;
3339
- declare function bulkCreateForm$1(httpClient: HttpClient): (options?: BulkCreateFormOptions) => Promise<BulkCreateFormResponse>;
3340
- declare function cloneForm$1(httpClient: HttpClient): (formId: string) => Promise<CloneFormResponse>;
3341
- declare function getForm$1(httpClient: HttpClient): (formId: string, options?: GetFormOptions) => Promise<Form>;
3342
- declare function updateForm$1(httpClient: HttpClient): (_id: string | null, form: UpdateForm) => Promise<Form>;
3343
- declare function removeFormFromTrashBin$1(httpClient: HttpClient): (formId: string) => Promise<void>;
3344
- declare function deleteForm$1(httpClient: HttpClient): (formId: string, options?: DeleteFormOptions) => Promise<void>;
3345
- declare function restoreFromTrashBin$1(httpClient: HttpClient): (formId: string) => Promise<RestoreFromTrashBinResponse>;
3346
- declare function queryForms$1(httpClient: HttpClient): (options?: QueryFormsOptions) => FormsQueryBuilder;
3347
- declare function countForms$1(httpClient: HttpClient): (namespace: string, options?: CountFormsOptions) => Promise<CountFormsResponse>;
3348
- declare function listForms$1(httpClient: HttpClient): (namespace: string, options?: ListFormsOptions) => Promise<ListFormsResponse>;
3349
- declare function getDeletedForm$1(httpClient: HttpClient): (formId: string) => Promise<GetDeletedFormResponse>;
3350
- declare function queryDeletedForms$1(httpClient: HttpClient): (query: CursorQuery$1) => Promise<QueryDeletedFormsResponse>;
3351
- declare function listDeletedForms$1(httpClient: HttpClient): (namespace: string, options?: ListDeletedFormsOptions) => Promise<ListDeletedFormsResponse>;
3352
- declare function bulkRemoveDeletedField$1(httpClient: HttpClient): (formId: string, options?: BulkRemoveDeletedFieldOptions) => Promise<BulkRemoveDeletedFieldResponse>;
3353
- declare function updateExtendedFields$1(httpClient: HttpClient): (_id: string, namespace: string, options: UpdateExtendedFieldsOptions) => Promise<UpdateExtendedFieldsResponse>;
3354
- declare const onFormCreated$1: EventDefinition<FormCreatedEnvelope, "wix.forms.v4.form_created">;
3355
- declare const onFormUpdated$1: EventDefinition<FormUpdatedEnvelope, "wix.forms.v4.form_updated">;
3356
- declare const onFormSubmissionKeysPermanentlyDeleted$1: EventDefinition<FormSubmissionKeysPermanentlyDeletedEnvelope, "wix.forms.v4.form_submission_keys_permanently_deleted">;
45
+ declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
46
+
47
+ declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
3357
48
 
3358
- declare const createForm: BuildRESTFunction<typeof createForm$1>;
3359
- declare const bulkCreateForm: BuildRESTFunction<typeof bulkCreateForm$1>;
3360
- declare const cloneForm: BuildRESTFunction<typeof cloneForm$1>;
3361
- declare const getForm: BuildRESTFunction<typeof getForm$1>;
3362
- declare const updateForm: BuildRESTFunction<typeof updateForm$1>;
3363
- declare const removeFormFromTrashBin: BuildRESTFunction<typeof removeFormFromTrashBin$1>;
3364
- declare const deleteForm: BuildRESTFunction<typeof deleteForm$1>;
3365
- declare const restoreFromTrashBin: BuildRESTFunction<typeof restoreFromTrashBin$1>;
3366
- declare const queryForms: BuildRESTFunction<typeof queryForms$1>;
3367
- declare const countForms: BuildRESTFunction<typeof countForms$1>;
3368
- declare const listForms: BuildRESTFunction<typeof listForms$1>;
3369
- declare const getDeletedForm: BuildRESTFunction<typeof getDeletedForm$1>;
3370
- declare const queryDeletedForms: BuildRESTFunction<typeof queryDeletedForms$1>;
3371
- declare const listDeletedForms: BuildRESTFunction<typeof listDeletedForms$1>;
3372
- declare const bulkRemoveDeletedField: BuildRESTFunction<typeof bulkRemoveDeletedField$1>;
3373
- declare const updateExtendedFields: BuildRESTFunction<typeof updateExtendedFields$1>;
3374
- declare const onFormCreated: BuildEventDefinition<typeof onFormCreated$1>;
3375
- declare const onFormUpdated: BuildEventDefinition<typeof onFormUpdated$1>;
3376
- declare const onFormSubmissionKeysPermanentlyDeleted: BuildEventDefinition<typeof onFormSubmissionKeysPermanentlyDeleted$1>;
49
+ declare const createForm: ReturnType<typeof createRESTModule$2<typeof publicCreateForm>>;
50
+ declare const bulkCreateForm: ReturnType<typeof createRESTModule$2<typeof publicBulkCreateForm>>;
51
+ declare const cloneForm: ReturnType<typeof createRESTModule$2<typeof publicCloneForm>>;
52
+ declare const getForm: ReturnType<typeof createRESTModule$2<typeof publicGetForm>>;
53
+ declare const updateForm: ReturnType<typeof createRESTModule$2<typeof publicUpdateForm>>;
54
+ declare const removeFormFromTrashBin: ReturnType<typeof createRESTModule$2<typeof publicRemoveFormFromTrashBin>>;
55
+ declare const deleteForm: ReturnType<typeof createRESTModule$2<typeof publicDeleteForm>>;
56
+ declare const restoreFromTrashBin: ReturnType<typeof createRESTModule$2<typeof publicRestoreFromTrashBin>>;
57
+ declare const queryForms: ReturnType<typeof createRESTModule$2<typeof publicQueryForms>>;
58
+ declare const countForms: ReturnType<typeof createRESTModule$2<typeof publicCountForms>>;
59
+ declare const listForms: ReturnType<typeof createRESTModule$2<typeof publicListForms>>;
60
+ declare const getDeletedForm: ReturnType<typeof createRESTModule$2<typeof publicGetDeletedForm>>;
61
+ declare const queryDeletedForms: ReturnType<typeof createRESTModule$2<typeof publicQueryDeletedForms>>;
62
+ declare const listDeletedForms: ReturnType<typeof createRESTModule$2<typeof publicListDeletedForms>>;
63
+ declare const bulkRemoveDeletedField: ReturnType<typeof createRESTModule$2<typeof publicBulkRemoveDeletedField>>;
64
+ declare const updateExtendedFields: ReturnType<typeof createRESTModule$2<typeof publicUpdateExtendedFields>>;
65
+ declare const onFormCreated: ReturnType<typeof createEventModule$2<typeof publicOnFormCreated>>;
66
+ declare const onFormUpdated: ReturnType<typeof createEventModule$2<typeof publicOnFormUpdated>>;
67
+ declare const onFormSubmissionKeysPermanentlyDeleted: ReturnType<typeof createEventModule$2<typeof publicOnFormSubmissionKeysPermanentlyDeleted>>;
3377
68
 
3378
69
  declare const context$2_bulkCreateForm: typeof bulkCreateForm;
3379
70
  declare const context$2_bulkRemoveDeletedField: typeof bulkRemoveDeletedField;
@@ -3398,496 +89,24 @@ declare namespace context$2 {
3398
89
  export { context$2_bulkCreateForm as bulkCreateForm, context$2_bulkRemoveDeletedField as bulkRemoveDeletedField, context$2_cloneForm as cloneForm, context$2_countForms as countForms, context$2_createForm as createForm, context$2_deleteForm as deleteForm, context$2_getDeletedForm as getDeletedForm, context$2_getForm as getForm, context$2_listDeletedForms as listDeletedForms, context$2_listForms as listForms, context$2_onFormCreated as onFormCreated, context$2_onFormSubmissionKeysPermanentlyDeleted as onFormSubmissionKeysPermanentlyDeleted, context$2_onFormUpdated as onFormUpdated, context$2_queryDeletedForms as queryDeletedForms, context$2_queryForms as queryForms, context$2_removeFormFromTrashBin as removeFormFromTrashBin, context$2_restoreFromTrashBin as restoreFromTrashBin, context$2_updateExtendedFields as updateExtendedFields, context$2_updateForm as updateForm };
3399
90
  }
3400
91
 
3401
- /**
3402
- * FormSpamSubmissionReportReport stores a form submission spam report.
3403
- * It contains submission details as well as report reason.
3404
- */
3405
- interface FormSpamSubmissionReport {
3406
- /**
3407
- * Form spam submission report id.
3408
- * @readonly
3409
- */
3410
- _id?: string | null;
3411
- /** Id of a form to which the form spam submission report belongs. */
3412
- formId?: string;
3413
- /**
3414
- * Form namespace to which the form spam submission report belongs.
3415
- * @readonly
3416
- */
3417
- namespace?: string;
3418
- /** Form submission submitter id. */
3419
- submitter?: Submitter$1;
3420
- /** Submission values where key is a target of a form field and value is a submissions for the given field. */
3421
- submissions?: Record<string, any>;
3422
- /** Identifies the reason why the submission was reported as spam. */
3423
- reportReason?: ReportReason;
3424
- /** Date of submission creation. If a submission was created in the past, pass the original submission creation date. */
3425
- _createdDate?: Date;
3426
- /**
3427
- * Date of form spam submission report creation.
3428
- * @readonly
3429
- */
3430
- reportedDate?: Date;
3431
- /**
3432
- * Date of last update.
3433
- * @readonly
3434
- */
3435
- _updatedDate?: Date;
3436
- /**
3437
- * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision.
3438
- * @readonly
3439
- */
3440
- revision?: string | null;
3441
- /** Data extensions ExtendedFields. */
3442
- extendedFields?: ExtendedFields$1;
3443
- /** Last status of the submission at the time of the report */
3444
- submissionStatusAtReport?: SubmissionStatus$1;
3445
- /** Order details. */
3446
- orderDetails?: OrderDetails$1;
3447
- /**
3448
- * Contact ID. Member who created the submission, or a mapped contact.
3449
- * @readonly
3450
- */
3451
- contactId?: string | null;
3452
- }
3453
- interface Submitter$1 extends SubmitterSubmitterOneOf$1 {
3454
- /** Member ID. */
3455
- memberId?: string | null;
3456
- /** Visitor ID. */
3457
- visitorId?: string | null;
3458
- /** Application ID. */
3459
- applicationId?: string | null;
3460
- /** User ID. */
3461
- userId?: string | null;
3462
- }
3463
- /** @oneof */
3464
- interface SubmitterSubmitterOneOf$1 {
3465
- /** Member ID. */
3466
- memberId?: string | null;
3467
- /** Visitor ID. */
3468
- visitorId?: string | null;
3469
- /** Application ID. */
3470
- applicationId?: string | null;
3471
- /** User ID. */
3472
- userId?: string | null;
3473
- }
3474
- declare enum ReportReason {
3475
- UNKNOWN_REASON = "UNKNOWN_REASON",
3476
- /** An email quota is reached. There were too many submissions in a short time period with the same email. */
3477
- EMAIL_QUOTA_REACHED = "EMAIL_QUOTA_REACHED",
3478
- /** An IP address is is blocklisted. */
3479
- IP_BLOCKLISTED = "IP_BLOCKLISTED",
3480
- /** An email is is blocklisted. */
3481
- EMAIL_BLOCKLISTED = "EMAIL_BLOCKLISTED",
3482
- /** Reported spam by the AI spam detection model. It uses submission text as an input. */
3483
- AI_REPORTED = "AI_REPORTED",
3484
- /** Reported as spam by a submission manager. */
3485
- MANUALLY_REPORTED = "MANUALLY_REPORTED"
3486
- }
3487
- interface ExtendedFields$1 {
3488
- /**
3489
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
3490
- * The value of each key is structured according to the schema defined when the extended fields were configured.
3491
- *
3492
- * You can only access fields for which you have the appropriate permissions.
3493
- *
3494
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
3495
- */
3496
- namespaces?: Record<string, Record<string, any>>;
3497
- }
3498
- declare enum SubmissionStatus$1 {
3499
- UNDEFINED = "UNDEFINED",
3500
- PENDING = "PENDING",
3501
- CONFIRMED = "CONFIRMED",
3502
- PAYMENT_WAITING = "PAYMENT_WAITING",
3503
- PAYMENT_CANCELED = "PAYMENT_CANCELED"
3504
- }
3505
- interface OrderDetails$1 {
3506
- /**
3507
- * ID of the checkout related to submission (applicable if form has payments added).
3508
- * @readonly
3509
- */
3510
- checkoutId?: string;
3511
- }
3512
- /** Form submission that was created or retrieved. */
3513
- interface FormSubmission$1 {
3514
- /**
3515
- * Submission ID.
3516
- * @readonly
3517
- */
3518
- _id?: string | null;
3519
- /** ID of the form which the submission belongs to. */
3520
- formId?: string;
3521
- /**
3522
- * The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace.
3523
- * @readonly
3524
- */
3525
- namespace?: string;
3526
- /**
3527
- * Status of the submission.
3528
- * - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
3529
- * - `PAYMENT_WAITING`: A form submission requiring payment is created.
3530
- * - `PAYMENT_CANCELED`: An order of a form submission is canceled.
3531
- * - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
3532
- */
3533
- status?: SubmissionStatus$1;
3534
- /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
3535
- submissions?: Record<string, any>;
3536
- /**
3537
- * Date and time the form submission was created.
3538
- * @readonly
3539
- */
3540
- _createdDate?: Date;
3541
- /**
3542
- * Date and time the form submission was updated.
3543
- * @readonly
3544
- */
3545
- _updatedDate?: Date;
3546
- /**
3547
- * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
3548
- * @readonly
3549
- */
3550
- revision?: string | null;
3551
- /**
3552
- * ID of the visitor that submitted the form.
3553
- * @readonly
3554
- */
3555
- submitter?: Submitter$1;
3556
- /** Whether a site owner marked a submission as "seen". */
3557
- seen?: boolean;
3558
- /** Data extension object that holds users' and apps' fields. */
3559
- extendedFields?: ExtendedFields$1;
3560
- /**
3561
- * Order details. <br>
3562
- * <b>Note</b>: This object is only applicable when submittng a form in the Wix Payments app.
3563
- */
3564
- orderDetails?: FormSubmissionOrderDetails;
3565
- /**
3566
- * Contact ID. Member who created the submission, or a mapped contact.
3567
- * @readonly
3568
- */
3569
- contactId?: string | null;
3570
- }
3571
- interface FormSubmissionOrderDetails {
3572
- /**
3573
- * ID of the order related to submission (only applicable if a form has payments).
3574
- * @readonly
3575
- */
3576
- orderId?: string | null;
3577
- /**
3578
- * Order number.
3579
- * @readonly
3580
- */
3581
- number?: string | null;
3582
- /**
3583
- * Currency.
3584
- * @readonly
3585
- */
3586
- currency?: string | null;
3587
- /**
3588
- * Item subtotal.
3589
- * @readonly
3590
- */
3591
- itemSubtotal?: string;
3592
- /**
3593
- * ID of the checkout related to submission (only applicable if a form has payments).
3594
- * @readonly
3595
- */
3596
- checkoutId?: string;
3597
- }
3598
- interface CheckForSpamResponse {
3599
- /** Is the submission a spam. */
3600
- spam?: boolean;
3601
- /** Spam report details. Filled when spam == true */
3602
- spamReport?: SpamReport;
3603
- }
3604
- interface SpamReport {
3605
- /** Identifies the reason why the submission was reported as spam. */
3606
- reportReason?: ReportReason;
3607
- }
3608
- interface BulkDeleteFormSpamSubmissionReportResponse {
3609
- /** Results of bulk report delete */
3610
- results?: BulkDeleteFormSpamSubmissionReportResult[];
3611
- /** Metadata of request */
3612
- bulkActionMetadata?: BulkActionMetadata$1;
3613
- }
3614
- interface BulkDeleteFormSpamSubmissionReportResult {
3615
- /** Deleted item metadata */
3616
- itemMetadata?: ItemMetadata$1;
3617
- }
3618
- interface ItemMetadata$1 {
3619
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
3620
- _id?: string | null;
3621
- /** Index of the item within the request array. Allows for correlation between request and response items. */
3622
- originalIndex?: number;
3623
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
3624
- success?: boolean;
3625
- /** Details about the error in case of failure. */
3626
- error?: ApplicationError$1;
3627
- }
3628
- interface ApplicationError$1 {
3629
- /** Error code. */
3630
- code?: string;
3631
- /** Description of the error. */
3632
- description?: string;
3633
- /** Data related to the error. */
3634
- data?: Record<string, any> | null;
3635
- }
3636
- interface BulkActionMetadata$1 {
3637
- /** Number of items that were successfully processed. */
3638
- totalSuccesses?: number;
3639
- /** Number of items that couldn't be processed. */
3640
- totalFailures?: number;
3641
- /** Number of failures without details because detailed failure threshold was exceeded. */
3642
- undetailedFailures?: number;
3643
- }
3644
- interface BulkDeleteFormSpamSubmissionReportByFilterResponse {
3645
- /** Job id of bulk delete form submission report by filter job */
3646
- jobId?: string;
3647
- }
3648
- interface ReportNotSpamSubmissionResponse {
3649
- /** Created form submission. */
3650
- submission?: FormSubmission$1;
3651
- }
3652
- interface BulkReportNotSpamSubmissionResponse {
3653
- /** Info whatever report of specific items was successful */
3654
- results?: BulkReportNotSpamSubmissionResult[];
3655
- /** Metadata of request */
3656
- bulkActionMetadata?: BulkActionMetadata$1;
3657
- }
3658
- interface BulkReportNotSpamSubmissionResult {
3659
- /** Metadata of submission, marked as not spam */
3660
- itemMetadata?: ItemMetadata$1;
3661
- /** Id of related report, which was reported as not spam */
3662
- formSpamSubmissionReportId?: string;
3663
- }
3664
- interface ReportSpamSubmissionResponse {
3665
- /** Created form spam submission report. */
3666
- formSpamSubmissionReport?: FormSpamSubmissionReport;
3667
- }
3668
- interface BulkReportSpamSubmissionResponse {
3669
- /** Created reports with metadata */
3670
- results?: BulkReportSpamSubmissionResult[];
3671
- /** Metadata of request */
3672
- bulkActionMetadata?: BulkActionMetadata$1;
3673
- }
3674
- interface BulkReportSpamSubmissionResult {
3675
- /** Created report metadata */
3676
- itemMetadata?: ItemMetadata$1;
3677
- /** Created report, exists if `returnEntity` was set to `true` in the request */
3678
- item?: FormSpamSubmissionReport;
3679
- }
3680
- interface Cursors$1 {
3681
- /** Cursor pointing to next page in the list of results. */
3682
- next?: string | null;
3683
- /** Cursor pointing to previous page in the list of results. */
3684
- prev?: string | null;
3685
- }
3686
- interface CountFormSpamSubmissionReportsResponse {
3687
- /** Forms submission count. */
3688
- formsSpamSubmissionReportsCount?: FormSpamSubmissionReportsCount[];
3689
- }
3690
- interface FormSpamSubmissionReportsCount {
3691
- /** Form ID. */
3692
- formId?: string;
3693
- /** Total number of submissions. */
3694
- totalCount?: number;
3695
- }
3696
- interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
3697
- /** ID of a site visitor that has not logged in to the site. */
3698
- anonymousVisitorId?: string;
3699
- /** ID of a site visitor that has logged in to the site. */
3700
- memberId?: string;
3701
- /** ID of a Wix user (site owner, contributor, etc.). */
3702
- wixUserId?: string;
3703
- /** ID of an app. */
3704
- appId?: string;
3705
- /** @readonly */
3706
- identityType?: WebhookIdentityType$1;
3707
- }
3708
- /** @oneof */
3709
- interface IdentificationDataIdOneOf$1 {
3710
- /** ID of a site visitor that has not logged in to the site. */
3711
- anonymousVisitorId?: string;
3712
- /** ID of a site visitor that has logged in to the site. */
3713
- memberId?: string;
3714
- /** ID of a Wix user (site owner, contributor, etc.). */
3715
- wixUserId?: string;
3716
- /** ID of an app. */
3717
- appId?: string;
3718
- }
3719
- declare enum WebhookIdentityType$1 {
3720
- UNKNOWN = "UNKNOWN",
3721
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3722
- MEMBER = "MEMBER",
3723
- WIX_USER = "WIX_USER",
3724
- APP = "APP"
3725
- }
3726
- interface BaseEventMetadata$1 {
3727
- /** App instance ID. */
3728
- instanceId?: string | null;
3729
- /** Event type. */
3730
- eventType?: string;
3731
- /** The identification type and identity data. */
3732
- identity?: IdentificationData$1;
3733
- }
3734
- interface EventMetadata$1 extends BaseEventMetadata$1 {
3735
- /**
3736
- * Unique event ID.
3737
- * Allows clients to ignore duplicate webhooks.
3738
- */
3739
- _id?: string;
3740
- /**
3741
- * Assumes actions are also always typed to an entity_type
3742
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
3743
- */
3744
- entityFqdn?: string;
3745
- /**
3746
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
3747
- * This is although the created/updated/deleted notion is duplication of the oneof types
3748
- * Example: created/updated/deleted/started/completed/email_opened
3749
- */
3750
- slug?: string;
3751
- /** ID of the entity associated with the event. */
3752
- entityId?: string;
3753
- /** Event timestamp. */
3754
- eventTime?: Date;
3755
- /**
3756
- * Whether the event was triggered as a result of a privacy regulation application
3757
- * (for example, GDPR).
3758
- */
3759
- triggeredByAnonymizeRequest?: boolean | null;
3760
- /** If present, indicates the action that triggered the event. */
3761
- originatedFrom?: string | null;
3762
- /**
3763
- * A sequence number defining the order of updates to the underlying entity.
3764
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
3765
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
3766
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
3767
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
3768
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
3769
- */
3770
- entityEventSequence?: string | null;
3771
- }
3772
- interface FormSpamSubmissionReportCreatedEnvelope {
3773
- entity: FormSpamSubmissionReport;
3774
- metadata: EventMetadata$1;
3775
- }
3776
- interface FormSpamSubmissionReportDeletedEnvelope {
3777
- entity: FormSpamSubmissionReport;
3778
- metadata: EventMetadata$1;
3779
- }
3780
- interface BulkDeleteFormSpamSubmissionReportOptions {
3781
- /** Ids of the form spam submission reports to delete. */
3782
- formSpamSubmissionReportIds?: string[];
3783
- }
3784
- interface BulkReportNotSpamSubmissionOptions {
3785
- /** Ids of the form spam submission reports to report as not spam. */
3786
- formSpamSubmissionReportIds?: string[];
3787
- }
3788
- interface BulkReportSpamSubmissionOptions {
3789
- /** Ids of the submissions to report as spam. */
3790
- submissionIds: string[];
3791
- /** Identifies the reason why the submission was reported as spam. */
3792
- reportReason: ReportReason;
3793
- /** When set, items will be returned on successful report */
3794
- returnEntity?: boolean;
3795
- }
3796
- interface QueryCursorResult$1 {
3797
- cursors: Cursors$1;
3798
- hasNext: () => boolean;
3799
- hasPrev: () => boolean;
3800
- length: number;
3801
- pageSize: number;
3802
- }
3803
- interface FormSpamSubmissionReportsQueryResult extends QueryCursorResult$1 {
3804
- items: FormSpamSubmissionReport[];
3805
- query: FormSpamSubmissionReportsQueryBuilder;
3806
- next: () => Promise<FormSpamSubmissionReportsQueryResult>;
3807
- prev: () => Promise<FormSpamSubmissionReportsQueryResult>;
3808
- }
3809
- interface FormSpamSubmissionReportsQueryBuilder {
3810
- /** @param propertyName - Property whose value is compared with `value`.
3811
- * @param value - Value to compare against.
3812
- * @documentationMaturity preview
3813
- */
3814
- eq: (propertyName: '_id' | 'formId' | 'namespace' | 'reportReason' | '_createdDate' | 'reportedDate', value: any) => FormSpamSubmissionReportsQueryBuilder;
3815
- /** @param propertyName - Property whose value is compared with `value`.
3816
- * @param value - Value to compare against.
3817
- * @documentationMaturity preview
3818
- */
3819
- ne: (propertyName: '_id' | 'formId' | 'reportReason' | '_createdDate' | 'reportedDate', value: any) => FormSpamSubmissionReportsQueryBuilder;
3820
- /** @param propertyName - Property whose value is compared with `value`.
3821
- * @param value - Value to compare against.
3822
- * @documentationMaturity preview
3823
- */
3824
- ge: (propertyName: '_createdDate' | 'reportedDate', value: any) => FormSpamSubmissionReportsQueryBuilder;
3825
- /** @param propertyName - Property whose value is compared with `value`.
3826
- * @param value - Value to compare against.
3827
- * @documentationMaturity preview
3828
- */
3829
- gt: (propertyName: '_createdDate' | 'reportedDate', value: any) => FormSpamSubmissionReportsQueryBuilder;
3830
- /** @param propertyName - Property whose value is compared with `value`.
3831
- * @param value - Value to compare against.
3832
- * @documentationMaturity preview
3833
- */
3834
- le: (propertyName: '_createdDate' | 'reportedDate', value: any) => FormSpamSubmissionReportsQueryBuilder;
3835
- /** @param propertyName - Property whose value is compared with `value`.
3836
- * @param value - Value to compare against.
3837
- * @documentationMaturity preview
3838
- */
3839
- lt: (propertyName: '_createdDate' | 'reportedDate', value: any) => FormSpamSubmissionReportsQueryBuilder;
3840
- /** @documentationMaturity preview */
3841
- in: (propertyName: '_id' | 'formId' | 'reportReason' | '_createdDate' | 'reportedDate', value: any) => FormSpamSubmissionReportsQueryBuilder;
3842
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
3843
- * @documentationMaturity preview
3844
- */
3845
- ascending: (...propertyNames: Array<'_id' | 'formId' | 'reportReason' | '_createdDate' | 'reportedDate'>) => FormSpamSubmissionReportsQueryBuilder;
3846
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
3847
- * @documentationMaturity preview
3848
- */
3849
- descending: (...propertyNames: Array<'_id' | 'formId' | 'reportReason' | '_createdDate' | 'reportedDate'>) => FormSpamSubmissionReportsQueryBuilder;
3850
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
3851
- * @documentationMaturity preview
3852
- */
3853
- limit: (limit: number) => FormSpamSubmissionReportsQueryBuilder;
3854
- /** @param cursor - A pointer to specific record
3855
- * @documentationMaturity preview
3856
- */
3857
- skipTo: (cursor: string) => FormSpamSubmissionReportsQueryBuilder;
3858
- /** @documentationMaturity preview */
3859
- find: () => Promise<FormSpamSubmissionReportsQueryResult>;
3860
- }
92
+ declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
3861
93
 
3862
- declare function checkForSpam$1(httpClient: HttpClient): (submission: FormSubmission$1) => Promise<CheckForSpamResponse>;
3863
- declare function createFormSpamSubmissionReport$1(httpClient: HttpClient): (formSpamSubmissionReport: FormSpamSubmissionReport) => Promise<FormSpamSubmissionReport>;
3864
- declare function getFormSpamSubmissionReport$1(httpClient: HttpClient): (formSpamSubmissionReportId: string) => Promise<FormSpamSubmissionReport>;
3865
- declare function deleteFormSpamSubmissionReport$1(httpClient: HttpClient): (formSpamSubmissionReportId: string) => Promise<void>;
3866
- declare function bulkDeleteFormSpamSubmissionReport$1(httpClient: HttpClient): (formId: string, options?: BulkDeleteFormSpamSubmissionReportOptions) => Promise<BulkDeleteFormSpamSubmissionReportResponse>;
3867
- declare function bulkDeleteFormSpamSubmissionReportByFilter$1(httpClient: HttpClient): (filter: Record<string, any> | null) => Promise<BulkDeleteFormSpamSubmissionReportByFilterResponse>;
3868
- declare function reportNotSpamSubmission$1(httpClient: HttpClient): (formSpamSubmissionReportId: string) => Promise<ReportNotSpamSubmissionResponse>;
3869
- declare function bulkReportNotSpamSubmission$1(httpClient: HttpClient): (formId: string, options?: BulkReportNotSpamSubmissionOptions) => Promise<BulkReportNotSpamSubmissionResponse>;
3870
- declare function reportSpamSubmission$1(httpClient: HttpClient): (submissionId: string, reportReason: ReportReason) => Promise<ReportSpamSubmissionResponse>;
3871
- declare function bulkReportSpamSubmission$1(httpClient: HttpClient): (formId: string, options?: BulkReportSpamSubmissionOptions) => Promise<BulkReportSpamSubmissionResponse>;
3872
- declare function queryFormSpamSubmissionReportsByNamespace$1(httpClient: HttpClient): () => FormSpamSubmissionReportsQueryBuilder;
3873
- declare function countFormSpamSubmissionReports$1(httpClient: HttpClient): (formIds: string[], namespace: string) => Promise<CountFormSpamSubmissionReportsResponse>;
3874
- declare const onFormSpamSubmissionReportCreated$1: EventDefinition<FormSpamSubmissionReportCreatedEnvelope, "wix.forms.v4.form_spam_submission_report_created">;
3875
- declare const onFormSpamSubmissionReportDeleted$1: EventDefinition<FormSpamSubmissionReportDeletedEnvelope, "wix.forms.v4.form_spam_submission_report_deleted">;
94
+ declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
3876
95
 
3877
- declare const checkForSpam: BuildRESTFunction<typeof checkForSpam$1>;
3878
- declare const createFormSpamSubmissionReport: BuildRESTFunction<typeof createFormSpamSubmissionReport$1>;
3879
- declare const getFormSpamSubmissionReport: BuildRESTFunction<typeof getFormSpamSubmissionReport$1>;
3880
- declare const deleteFormSpamSubmissionReport: BuildRESTFunction<typeof deleteFormSpamSubmissionReport$1>;
3881
- declare const bulkDeleteFormSpamSubmissionReport: BuildRESTFunction<typeof bulkDeleteFormSpamSubmissionReport$1>;
3882
- declare const bulkDeleteFormSpamSubmissionReportByFilter: BuildRESTFunction<typeof bulkDeleteFormSpamSubmissionReportByFilter$1>;
3883
- declare const reportNotSpamSubmission: BuildRESTFunction<typeof reportNotSpamSubmission$1>;
3884
- declare const bulkReportNotSpamSubmission: BuildRESTFunction<typeof bulkReportNotSpamSubmission$1>;
3885
- declare const reportSpamSubmission: BuildRESTFunction<typeof reportSpamSubmission$1>;
3886
- declare const bulkReportSpamSubmission: BuildRESTFunction<typeof bulkReportSpamSubmission$1>;
3887
- declare const queryFormSpamSubmissionReportsByNamespace: BuildRESTFunction<typeof queryFormSpamSubmissionReportsByNamespace$1>;
3888
- declare const countFormSpamSubmissionReports: BuildRESTFunction<typeof countFormSpamSubmissionReports$1>;
3889
- declare const onFormSpamSubmissionReportCreated: BuildEventDefinition<typeof onFormSpamSubmissionReportCreated$1>;
3890
- declare const onFormSpamSubmissionReportDeleted: BuildEventDefinition<typeof onFormSpamSubmissionReportDeleted$1>;
96
+ declare const checkForSpam: ReturnType<typeof createRESTModule$1<typeof publicCheckForSpam>>;
97
+ declare const createFormSpamSubmissionReport: ReturnType<typeof createRESTModule$1<typeof publicCreateFormSpamSubmissionReport>>;
98
+ declare const getFormSpamSubmissionReport: ReturnType<typeof createRESTModule$1<typeof publicGetFormSpamSubmissionReport>>;
99
+ declare const deleteFormSpamSubmissionReport: ReturnType<typeof createRESTModule$1<typeof publicDeleteFormSpamSubmissionReport>>;
100
+ declare const bulkDeleteFormSpamSubmissionReport: ReturnType<typeof createRESTModule$1<typeof publicBulkDeleteFormSpamSubmissionReport>>;
101
+ declare const bulkDeleteFormSpamSubmissionReportByFilter: ReturnType<typeof createRESTModule$1<typeof publicBulkDeleteFormSpamSubmissionReportByFilter>>;
102
+ declare const reportNotSpamSubmission: ReturnType<typeof createRESTModule$1<typeof publicReportNotSpamSubmission>>;
103
+ declare const bulkReportNotSpamSubmission: ReturnType<typeof createRESTModule$1<typeof publicBulkReportNotSpamSubmission>>;
104
+ declare const reportSpamSubmission: ReturnType<typeof createRESTModule$1<typeof publicReportSpamSubmission>>;
105
+ declare const bulkReportSpamSubmission: ReturnType<typeof createRESTModule$1<typeof publicBulkReportSpamSubmission>>;
106
+ declare const queryFormSpamSubmissionReportsByNamespace: ReturnType<typeof createRESTModule$1<typeof publicQueryFormSpamSubmissionReportsByNamespace>>;
107
+ declare const countFormSpamSubmissionReports: ReturnType<typeof createRESTModule$1<typeof publicCountFormSpamSubmissionReports>>;
108
+ declare const onFormSpamSubmissionReportCreated: ReturnType<typeof createEventModule$1<typeof publicOnFormSpamSubmissionReportCreated>>;
109
+ declare const onFormSpamSubmissionReportDeleted: ReturnType<typeof createEventModule$1<typeof publicOnFormSpamSubmissionReportDeleted>>;
3891
110
 
3892
111
  declare const context$1_bulkDeleteFormSpamSubmissionReport: typeof bulkDeleteFormSpamSubmissionReport;
3893
112
  declare const context$1_bulkDeleteFormSpamSubmissionReportByFilter: typeof bulkDeleteFormSpamSubmissionReportByFilter;
@@ -3907,797 +126,38 @@ declare namespace context$1 {
3907
126
  export { context$1_bulkDeleteFormSpamSubmissionReport as bulkDeleteFormSpamSubmissionReport, context$1_bulkDeleteFormSpamSubmissionReportByFilter as bulkDeleteFormSpamSubmissionReportByFilter, context$1_bulkReportNotSpamSubmission as bulkReportNotSpamSubmission, context$1_bulkReportSpamSubmission as bulkReportSpamSubmission, context$1_checkForSpam as checkForSpam, context$1_countFormSpamSubmissionReports as countFormSpamSubmissionReports, context$1_createFormSpamSubmissionReport as createFormSpamSubmissionReport, context$1_deleteFormSpamSubmissionReport as deleteFormSpamSubmissionReport, context$1_getFormSpamSubmissionReport as getFormSpamSubmissionReport, context$1_onFormSpamSubmissionReportCreated as onFormSpamSubmissionReportCreated, context$1_onFormSpamSubmissionReportDeleted as onFormSpamSubmissionReportDeleted, context$1_queryFormSpamSubmissionReportsByNamespace as queryFormSpamSubmissionReportsByNamespace, context$1_reportNotSpamSubmission as reportNotSpamSubmission, context$1_reportSpamSubmission as reportSpamSubmission };
3908
127
  }
3909
128
 
3910
- /** Form submission that was created or retrieved. */
3911
- interface FormSubmission {
3912
- /**
3913
- * Submission ID.
3914
- * @readonly
3915
- */
3916
- _id?: string | null;
3917
- /** ID of the form which the submission belongs to. */
3918
- formId?: string;
3919
- /**
3920
- * The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace.
3921
- * @readonly
3922
- */
3923
- namespace?: string;
3924
- /**
3925
- * Status of the submission.
3926
- * - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
3927
- * - `PAYMENT_WAITING`: A form submission requiring payment is created.
3928
- * - `PAYMENT_CANCELED`: An order of a form submission is canceled.
3929
- * - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
3930
- */
3931
- status?: SubmissionStatus;
3932
- /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
3933
- submissions?: Record<string, any>;
3934
- /**
3935
- * Date and time the form submission was created.
3936
- * @readonly
3937
- */
3938
- _createdDate?: Date;
3939
- /**
3940
- * Date and time the form submission was updated.
3941
- * @readonly
3942
- */
3943
- _updatedDate?: Date;
3944
- /**
3945
- * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
3946
- * @readonly
3947
- */
3948
- revision?: string | null;
3949
- /**
3950
- * ID of the visitor that submitted the form.
3951
- * @readonly
3952
- */
3953
- submitter?: Submitter;
3954
- /** Whether a site owner marked a submission as "seen". */
3955
- seen?: boolean;
3956
- /** Data extension object that holds users' and apps' fields. */
3957
- extendedFields?: ExtendedFields;
3958
- /**
3959
- * Order details. <br>
3960
- * <b>Note</b>: This object is only applicable when submittng a form in the Wix Payments app.
3961
- */
3962
- orderDetails?: OrderDetails;
3963
- /**
3964
- * Contact ID. Member who created the submission, or a mapped contact.
3965
- * @readonly
3966
- */
3967
- contactId?: string | null;
3968
- }
3969
- declare enum SubmissionStatus {
3970
- UNDEFINED = "UNDEFINED",
3971
- PENDING = "PENDING",
3972
- CONFIRMED = "CONFIRMED",
3973
- PAYMENT_WAITING = "PAYMENT_WAITING",
3974
- PAYMENT_CANCELED = "PAYMENT_CANCELED"
3975
- }
3976
- interface Submitter extends SubmitterSubmitterOneOf {
3977
- /** Member ID. */
3978
- memberId?: string | null;
3979
- /** Visitor ID. */
3980
- visitorId?: string | null;
3981
- /** Application ID. */
3982
- applicationId?: string | null;
3983
- /** User ID. */
3984
- userId?: string | null;
3985
- }
3986
- /** @oneof */
3987
- interface SubmitterSubmitterOneOf {
3988
- /** Member ID. */
3989
- memberId?: string | null;
3990
- /** Visitor ID. */
3991
- visitorId?: string | null;
3992
- /** Application ID. */
3993
- applicationId?: string | null;
3994
- /** User ID. */
3995
- userId?: string | null;
3996
- }
3997
- interface ExtendedFields {
3998
- /**
3999
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
4000
- * The value of each key is structured according to the schema defined when the extended fields were configured.
4001
- *
4002
- * You can only access fields for which you have the appropriate permissions.
4003
- *
4004
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
4005
- */
4006
- namespaces?: Record<string, Record<string, any>>;
4007
- }
4008
- interface OrderDetails {
4009
- /**
4010
- * ID of the order related to submission (only applicable if a form has payments).
4011
- * @readonly
4012
- */
4013
- orderId?: string | null;
4014
- /**
4015
- * Order number.
4016
- * @readonly
4017
- */
4018
- number?: string | null;
4019
- /**
4020
- * Currency.
4021
- * @readonly
4022
- */
4023
- currency?: string | null;
4024
- /**
4025
- * Item subtotal.
4026
- * @readonly
4027
- */
4028
- itemSubtotal?: string;
4029
- /**
4030
- * ID of the checkout related to submission (only applicable if a form has payments).
4031
- * @readonly
4032
- */
4033
- checkoutId?: string;
4034
- }
4035
- interface CreateSubmissionResponse {
4036
- /** The created submission. */
4037
- submission?: FormSubmission;
4038
- }
4039
- interface BulkCreateSubmissionBySubmitterData {
4040
- /** Submissions to create. */
4041
- submission?: FormSubmission;
4042
- /** A flag indicating whether this operation is a repeated creation, such as restoring a previously manually reported as spam entity. */
4043
- repeatedCreation?: boolean;
4044
- }
4045
- interface BulkCreateSubmissionBySubmitterResponse {
4046
- /** Created submissions with metadata */
4047
- results?: BulkSubmissionResult[];
4048
- /** Metadata of request */
4049
- bulkActionMetadata?: BulkActionMetadata;
4050
- }
4051
- interface BulkSubmissionResult {
4052
- /** Created submission metadata */
4053
- itemMetadata?: ItemMetadata;
4054
- /** The created submission. */
4055
- item?: FormSubmission;
4056
- }
4057
- interface ItemMetadata {
4058
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
4059
- _id?: string | null;
4060
- /** Index of the item within the request array. Allows for correlation between request and response items. */
4061
- originalIndex?: number;
4062
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
4063
- success?: boolean;
4064
- /** Details about the error in case of failure. */
4065
- error?: ApplicationError;
4066
- }
4067
- interface ApplicationError {
4068
- /** Error code. */
4069
- code?: string;
4070
- /** Description of the error. */
4071
- description?: string;
4072
- /** Data related to the error. */
4073
- data?: Record<string, any> | null;
4074
- }
4075
- interface BulkActionMetadata {
4076
- /** Number of items that were successfully processed. */
4077
- totalSuccesses?: number;
4078
- /** Number of items that couldn't be processed. */
4079
- totalFailures?: number;
4080
- /** Number of failures without details because detailed failure threshold was exceeded. */
4081
- undetailedFailures?: number;
4082
- }
4083
- interface GetSubmissionResponse {
4084
- /** The retrieved submission. */
4085
- submission?: FormSubmission;
4086
- }
4087
- interface ConfirmSubmissionResponse {
4088
- /** The confirmed submission. */
4089
- submission?: FormSubmission;
4090
- }
4091
- interface FormSubmissionStatusUpdatedEvent {
4092
- /** Updated submission. */
4093
- submission?: FormSubmission;
4094
- /** Previous status of the submission. */
4095
- previousStatus?: SubmissionStatus;
4096
- }
4097
- interface BulkDeleteSubmissionResponse {
4098
- /** Results of bulk submission delete */
4099
- results?: BulkDeleteSubmissionResult[];
4100
- /** Metadata of request */
4101
- bulkActionMetadata?: BulkActionMetadata;
4102
- }
4103
- interface BulkDeleteSubmissionResult {
4104
- /** Deleted item metadata */
4105
- itemMetadata?: ItemMetadata;
4106
- }
4107
- interface RestoreSubmissionFromTrashBinResponse {
4108
- /** The restored submission. */
4109
- submission?: FormSubmission;
4110
- }
4111
- interface RemovedSubmissionFromTrash {
4112
- /** Removed submission. */
4113
- submission?: FormSubmission;
4114
- }
4115
- interface BulkRemoveSubmissionFromTrashBinResponse {
4116
- /** Results of bulk submission removal from trash */
4117
- results?: BulkRemoveSubmissionFromTrashBinResult[];
4118
- /** Metadata of request */
4119
- bulkActionMetadata?: BulkActionMetadata;
4120
- }
4121
- interface BulkRemoveSubmissionFromTrashBinResult {
4122
- /** Deleted item metadata */
4123
- itemMetadata?: ItemMetadata;
4124
- }
4125
- interface CursorPaging {
4126
- /** Number of items to load. */
4127
- limit?: number | null;
4128
- /**
4129
- * Pointer to the next or previous page in the list of results.
4130
- *
4131
- * You can get the relevant cursor token
4132
- * from the `pagingMetadata` object in the previous call's response.
4133
- * Not relevant for the first request.
4134
- */
4135
- cursor?: string | null;
4136
- }
4137
- interface ListDeletedSubmissionsResponse {
4138
- /** The retrieved Submissions. */
4139
- submissions?: FormSubmission[];
4140
- /** Paging metadata. */
4141
- pagingMetadata?: CursorPagingMetadata;
4142
- }
4143
- interface CursorPagingMetadata {
4144
- /** Number of items returned in the response. */
4145
- count?: number | null;
4146
- /** Offset that was requested. */
4147
- cursors?: Cursors;
4148
- /**
4149
- * Indicates if there are more results after the current page.
4150
- * If `true`, another page of results can be retrieved.
4151
- * If `false`, this is the last page.
4152
- */
4153
- hasNext?: boolean | null;
4154
- }
4155
- interface Cursors {
4156
- /** Cursor pointing to next page in the list of results. */
4157
- next?: string | null;
4158
- /** Cursor pointing to previous page in the list of results. */
4159
- prev?: string | null;
4160
- }
4161
- interface GetDeletedSubmissionResponse {
4162
- /** The retrieved Submission. */
4163
- submission?: FormSubmission;
4164
- }
4165
- interface CursorQuery extends CursorQueryPagingMethodOneOf {
4166
- /** 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`. */
4167
- cursorPaging?: CursorPaging;
4168
- /**
4169
- * Filter object in the following format:
4170
- * `"filter" : {
4171
- * "fieldName1": "value1",
4172
- * "fieldName2":{"$operator":"value2"}
4173
- * }`
4174
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
4175
- */
4176
- filter?: Record<string, any> | null;
4177
- /**
4178
- * Sort object in the following format:
4179
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
4180
- */
4181
- sort?: Sorting[];
4182
- }
4183
- /** @oneof */
4184
- interface CursorQueryPagingMethodOneOf {
4185
- /** 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`. */
4186
- cursorPaging?: CursorPaging;
4187
- }
4188
- interface Sorting {
4189
- /** Name of the field to sort by. */
4190
- fieldName?: string;
4191
- /** Sort order. */
4192
- order?: SortOrder;
4193
- }
4194
- declare enum SortOrder {
4195
- ASC = "ASC",
4196
- DESC = "DESC"
4197
- }
4198
- interface QuerySubmissionResponse {
4199
- /** The retrieved submissions. */
4200
- submissions?: FormSubmission[];
4201
- /** Paging metadata. */
4202
- metadata?: CursorPagingMetadata;
4203
- }
4204
- interface CursorSearch extends CursorSearchPagingMethodOneOf {
4205
- /**
4206
- * Cursor pointing to page of results.
4207
- * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
4208
- */
4209
- cursorPaging?: CursorPaging;
4210
- /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */
4211
- filter?: Record<string, any> | null;
4212
- /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
4213
- sort?: Sorting[];
4214
- /** Free text to match in searchable fields */
4215
- search?: SearchDetails;
4216
- }
4217
- /** @oneof */
4218
- interface CursorSearchPagingMethodOneOf {
4219
- /**
4220
- * Cursor pointing to page of results.
4221
- * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
4222
- */
4223
- cursorPaging?: CursorPaging;
4224
- }
4225
- interface SearchDetails {
4226
- /** Defines how separate search terms in `expression` are combined */
4227
- mode?: Mode;
4228
- /** Search term or expression */
4229
- expression?: string | null;
4230
- /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
4231
- fuzzy?: boolean;
4232
- }
4233
- declare enum Mode {
4234
- /** Any of the search terms must be present */
4235
- OR = "OR",
4236
- /** All search terms must be present */
4237
- AND = "AND"
4238
- }
4239
- interface SearchSubmissionsByNamespaceResponse {
4240
- /** The retrieved Submissions. */
4241
- submissions?: FormSubmission[];
4242
- /** Paging metadata. */
4243
- metadata?: CursorPagingMetadata;
4244
- }
4245
- interface CountSubmissionsByFilterResponse {
4246
- /** Forms submission count. */
4247
- formsSubmissionsCount?: FormSubmissionsCount[];
4248
- }
4249
- interface FormSubmissionsCount {
4250
- /** Form ID. */
4251
- formId?: string;
4252
- /** Total number of submissions. */
4253
- totalCount?: number;
4254
- /** Number of submissions that the site owner hasn't seen yet. */
4255
- unseenCount?: number;
4256
- }
4257
- interface CountSubmissionsResponse {
4258
- /** Forms submission count. */
4259
- formsSubmissionsCount?: FormSubmissionsCount[];
4260
- }
4261
- interface CountDeletedSubmissionsResponse {
4262
- /** Forms submission count. */
4263
- formsDeletedSubmissionsCount?: FormDeletedSubmissionsCount[];
4264
- }
4265
- interface FormDeletedSubmissionsCount {
4266
- /** Form ID. */
4267
- formId?: string;
4268
- /** Total number of submissions. */
4269
- totalCount?: number;
4270
- }
4271
- interface GetMediaUploadURLResponse {
4272
- /** Url to upload file. */
4273
- uploadUrl?: string;
4274
- }
4275
- interface IdentificationData extends IdentificationDataIdOneOf {
4276
- /** ID of a site visitor that has not logged in to the site. */
4277
- anonymousVisitorId?: string;
4278
- /** ID of a site visitor that has logged in to the site. */
4279
- memberId?: string;
4280
- /** ID of a Wix user (site owner, contributor, etc.). */
4281
- wixUserId?: string;
4282
- /** ID of an app. */
4283
- appId?: string;
4284
- /** @readonly */
4285
- identityType?: WebhookIdentityType;
4286
- }
4287
- /** @oneof */
4288
- interface IdentificationDataIdOneOf {
4289
- /** ID of a site visitor that has not logged in to the site. */
4290
- anonymousVisitorId?: string;
4291
- /** ID of a site visitor that has logged in to the site. */
4292
- memberId?: string;
4293
- /** ID of a Wix user (site owner, contributor, etc.). */
4294
- wixUserId?: string;
4295
- /** ID of an app. */
4296
- appId?: string;
4297
- }
4298
- declare enum WebhookIdentityType {
4299
- UNKNOWN = "UNKNOWN",
4300
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
4301
- MEMBER = "MEMBER",
4302
- WIX_USER = "WIX_USER",
4303
- APP = "APP"
4304
- }
4305
- interface UpsertContactFromSubmissionResponse {
4306
- /** Submit contact response. */
4307
- submitContactResponse?: SubmitContactResponse;
4308
- }
4309
- interface SubmitContactResponse {
4310
- /** ID of the contact that was found or created. */
4311
- contactId?: string;
4312
- /**
4313
- * Identity type of the returned contact.
4314
- *
4315
- * - `CONTACT`: The returned contact ID belongs to a new or existing contact.
4316
- * - `MEMBER`: The returned contact ID belongs to the currently logged-in site member.
4317
- * - `NOT_AUTHENTICATED_MEMBER`: The returned contact ID belongs to a site member who is not currently logged in.
4318
- */
4319
- identityType?: IdentityType;
4320
- /**
4321
- * Indicates whether the contact was just created or already existed.
4322
- *
4323
- * If the contact was just created, returns `true`.
4324
- * If it already existed, returns `false`.
4325
- */
4326
- newContact?: boolean;
4327
- }
4328
- declare enum IdentityType {
4329
- UNKNOWN = "UNKNOWN",
4330
- /** Existing or new contact */
4331
- CONTACT = "CONTACT",
4332
- /** Member is logged in, matching logic skipped */
4333
- MEMBER = "MEMBER",
4334
- /** Matching contact is a member, Merge logic won't be applied */
4335
- NOT_AUTHENTICATED_MEMBER = "NOT_AUTHENTICATED_MEMBER"
4336
- }
4337
- interface SubmissionContactMapped {
4338
- /**
4339
- * Mapped upserted contact ID.
4340
- * @readonly
4341
- */
4342
- contactId?: string;
4343
- /** Identifies the namespace that the submission's form belongs to. */
4344
- namespace?: string;
4345
- /** Marketing subscription details */
4346
- marketingSubscriptionDetails?: MarketingSubscriptionDetails;
4347
- }
4348
- interface MarketingSubscriptionDetails {
4349
- /** Form id which was submitted */
4350
- formId?: string;
4351
- /** Mapped contact emails. */
4352
- emails?: string[];
4353
- /**
4354
- * Date and time the form submission was created.
4355
- * @readonly
4356
- */
4357
- submittedDate?: Date;
4358
- /**
4359
- * Subscription consent opt in level, either single or double confirmation.
4360
- * Default: SINGLE_CONFIRMATION
4361
- */
4362
- optInLevel?: OptInLevel;
4363
- }
4364
- declare enum OptInLevel {
4365
- SINGLE_CONFIRMATION = "SINGLE_CONFIRMATION",
4366
- DOUBLE_CONFIRMATION = "DOUBLE_CONFIRMATION"
4367
- }
4368
- interface SubmissionContactMappingSkipped {
4369
- /** Form Id. */
4370
- formId?: string;
4371
- /** Identifies the namespace that the submission's form belongs to. */
4372
- namespace?: string;
4373
- }
4374
- interface BaseEventMetadata {
4375
- /** App instance ID. */
4376
- instanceId?: string | null;
4377
- /** Event type. */
4378
- eventType?: string;
4379
- /** The identification type and identity data. */
4380
- identity?: IdentificationData;
4381
- }
4382
- interface EventMetadata extends BaseEventMetadata {
4383
- /**
4384
- * Unique event ID.
4385
- * Allows clients to ignore duplicate webhooks.
4386
- */
4387
- _id?: string;
4388
- /**
4389
- * Assumes actions are also always typed to an entity_type
4390
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
4391
- */
4392
- entityFqdn?: string;
4393
- /**
4394
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
4395
- * This is although the created/updated/deleted notion is duplication of the oneof types
4396
- * Example: created/updated/deleted/started/completed/email_opened
4397
- */
4398
- slug?: string;
4399
- /** ID of the entity associated with the event. */
4400
- entityId?: string;
4401
- /** Event timestamp. */
4402
- eventTime?: Date;
4403
- /**
4404
- * Whether the event was triggered as a result of a privacy regulation application
4405
- * (for example, GDPR).
4406
- */
4407
- triggeredByAnonymizeRequest?: boolean | null;
4408
- /** If present, indicates the action that triggered the event. */
4409
- originatedFrom?: string | null;
4410
- /**
4411
- * A sequence number defining the order of updates to the underlying entity.
4412
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
4413
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
4414
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
4415
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
4416
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
4417
- */
4418
- entityEventSequence?: string | null;
4419
- }
4420
- interface SubmissionCreatedEnvelope {
4421
- entity: FormSubmission;
4422
- metadata: EventMetadata;
4423
- }
4424
- interface SubmissionUpdatedEnvelope {
4425
- entity: FormSubmission;
4426
- metadata: EventMetadata;
4427
- }
4428
- interface SubmissionStatusUpdatedEnvelope {
4429
- data: FormSubmissionStatusUpdatedEvent;
4430
- metadata: EventMetadata;
4431
- }
4432
- interface SubmissionDeletedEnvelope {
4433
- metadata: EventMetadata;
4434
- }
4435
- interface SubmissionRemovedSubmissionFromTrashEnvelope {
4436
- data: RemovedSubmissionFromTrash;
4437
- metadata: EventMetadata;
4438
- }
4439
- interface SubmissionContactMappedEnvelope {
4440
- data: SubmissionContactMapped;
4441
- metadata: EventMetadata;
4442
- }
4443
- interface SubmissionContactMappingSkippedEnvelope {
4444
- data: SubmissionContactMappingSkipped;
4445
- metadata: EventMetadata;
4446
- }
4447
- interface CreateSubmissionOptions {
4448
- /** Captcha token. */
4449
- captchaToken?: string | null;
4450
- }
4451
- interface BulkCreateSubmissionBySubmitterOptions {
4452
- /**
4453
- * Submissions to create.
4454
- * Deprecated
4455
- */
4456
- submissions?: FormSubmission[];
4457
- /** When set, items will be returned on successful create. */
4458
- returnEntity?: boolean;
4459
- /** Submissions data to create. */
4460
- submissionsV2?: BulkCreateSubmissionBySubmitterData[];
4461
- /** Validation will be mode is more forgiving, for example "required" won't be validated. */
4462
- lenientValidation?: boolean;
4463
- }
4464
- interface UpdateSubmission {
4465
- /**
4466
- * Submission ID.
4467
- * @readonly
4468
- */
4469
- _id?: string | null;
4470
- /** ID of the form which the submission belongs to. */
4471
- formId?: string;
4472
- /**
4473
- * The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace.
4474
- * @readonly
4475
- */
4476
- namespace?: string;
4477
- /**
4478
- * Status of the submission.
4479
- * - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
4480
- * - `PAYMENT_WAITING`: A form submission requiring payment is created.
4481
- * - `PAYMENT_CANCELED`: An order of a form submission is canceled.
4482
- * - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
4483
- */
4484
- status?: SubmissionStatus;
4485
- /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
4486
- submissions?: Record<string, any>;
4487
- /**
4488
- * Date and time the form submission was created.
4489
- * @readonly
4490
- */
4491
- _createdDate?: Date;
4492
- /**
4493
- * Date and time the form submission was updated.
4494
- * @readonly
4495
- */
4496
- _updatedDate?: Date;
4497
- /**
4498
- * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
4499
- * @readonly
4500
- */
4501
- revision?: string | null;
4502
- /**
4503
- * ID of the visitor that submitted the form.
4504
- * @readonly
4505
- */
4506
- submitter?: Submitter;
4507
- /** Whether a site owner marked a submission as "seen". */
4508
- seen?: boolean;
4509
- /** Data extension object that holds users' and apps' fields. */
4510
- extendedFields?: ExtendedFields;
4511
- /**
4512
- * Order details. <br>
4513
- * <b>Note</b>: This object is only applicable when submittng a form in the Wix Payments app.
4514
- */
4515
- orderDetails?: OrderDetails;
4516
- /**
4517
- * Contact ID. Member who created the submission, or a mapped contact.
4518
- * @readonly
4519
- */
4520
- contactId?: string | null;
4521
- }
4522
- interface DeleteSubmissionOptions {
4523
- /**
4524
- * Delete the submission, bypassing the trash bin. This means that the submission is permanently delete and cannot be restored.
4525
- *
4526
- *
4527
- * Default: `false`
4528
- */
4529
- permanent?: boolean;
4530
- /** Whether to preserve files, associated with the submission. If the value is `false`, then the files are deleted after 210 days. */
4531
- preserveFiles?: boolean;
4532
- }
4533
- interface BulkDeleteSubmissionOptions {
4534
- /** Submission ids. */
4535
- submissionIds?: string[];
4536
- /**
4537
- * Delete submission bypassing trash-bin
4538
- * Default: false
4539
- */
4540
- permanent?: boolean;
4541
- /** Preserve files. */
4542
- preserveFiles?: boolean;
4543
- }
4544
- interface BulkRemoveSubmissionFromTrashBinOptions {
4545
- /** Submission ids. */
4546
- submissionIds?: string[];
4547
- }
4548
- interface ListDeletedSubmissionsOptions {
4549
- /** Submission ids. */
4550
- submissionIds?: string[];
4551
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not filter or `order`. */
4552
- paging?: CursorPaging;
4553
- /**
4554
- * List of statuses of submissions which should be returned
4555
- * Default: CONFIRMED
4556
- */
4557
- statuses?: SubmissionStatus[];
4558
- }
4559
- interface QuerySubmissionOptions {
4560
- /** Whether to return only your own submissions. If `false`, returns all submissions based on query filters. */
4561
- onlyYourOwn?: boolean;
4562
- }
4563
- interface QuerySubmissionsByNamespaceOptions {
4564
- /** Whether to return only your own submissions. If `false`, returns all submissions based on query filters. */
4565
- onlyYourOwn?: boolean | undefined;
4566
- }
4567
- interface QueryCursorResult {
4568
- cursors: Cursors;
4569
- hasNext: () => boolean;
4570
- hasPrev: () => boolean;
4571
- length: number;
4572
- pageSize: number;
4573
- }
4574
- interface SubmissionsQueryResult extends QueryCursorResult {
4575
- items: FormSubmission[];
4576
- query: SubmissionsQueryBuilder;
4577
- next: () => Promise<SubmissionsQueryResult>;
4578
- prev: () => Promise<SubmissionsQueryResult>;
4579
- }
4580
- interface SubmissionsQueryBuilder {
4581
- /** @param propertyName - Property whose value is compared with `value`.
4582
- * @param value - Value to compare against.
4583
- */
4584
- eq: (propertyName: '_id' | 'formId' | 'namespace' | 'status' | '_createdDate' | '_updatedDate' | 'seen', value: any) => SubmissionsQueryBuilder;
4585
- /** @param propertyName - Property whose value is compared with `value`.
4586
- * @param value - Value to compare against.
4587
- */
4588
- ne: (propertyName: '_id' | 'formId' | 'status' | '_createdDate' | '_updatedDate' | 'seen', value: any) => SubmissionsQueryBuilder;
4589
- /** @param propertyName - Property whose value is compared with `value`.
4590
- * @param value - Value to compare against.
4591
- */
4592
- ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
4593
- /** @param propertyName - Property whose value is compared with `value`.
4594
- * @param value - Value to compare against.
4595
- */
4596
- gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
4597
- /** @param propertyName - Property whose value is compared with `value`.
4598
- * @param value - Value to compare against.
4599
- */
4600
- le: (propertyName: '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
4601
- /** @param propertyName - Property whose value is compared with `value`.
4602
- * @param value - Value to compare against.
4603
- */
4604
- lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
4605
- in: (propertyName: '_id' | 'formId' | 'status' | '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
4606
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
4607
- ascending: (...propertyNames: Array<'_id' | 'formId' | 'status' | '_createdDate' | '_updatedDate' | 'seen'>) => SubmissionsQueryBuilder;
4608
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
4609
- descending: (...propertyNames: Array<'_id' | 'formId' | 'status' | '_createdDate' | '_updatedDate' | 'seen'>) => SubmissionsQueryBuilder;
4610
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
4611
- limit: (limit: number) => SubmissionsQueryBuilder;
4612
- /** @param cursor - A pointer to specific record */
4613
- skipTo: (cursor: string) => SubmissionsQueryBuilder;
4614
- find: () => Promise<SubmissionsQueryResult>;
4615
- }
4616
- interface CountSubmissionsByFilterOptions {
4617
- /** Free text to match in searchable fields. */
4618
- search?: SearchDetails;
4619
- }
4620
- interface CountSubmissionsOptions {
4621
- /**
4622
- * Status of the submission.
4623
- * - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
4624
- * - `PAYMENT_WAITING`: A form submission requiring payment is created.
4625
- * - `PAYMENT_CANCELED`: An order of a form submission is canceled.
4626
- * - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
4627
- */
4628
- statuses?: SubmissionStatus[];
4629
- }
4630
- interface CountDeletedSubmissionsOptions {
4631
- /**
4632
- * List of statuses of submissions which should be taken into count
4633
- * Default: CONFIRMED, PAYMENT_WAITING, PAYMENT_CANCELED
4634
- */
4635
- statuses?: SubmissionStatus[];
4636
- }
4637
- interface UpsertContactFromSubmissionOptions {
4638
- /** Optional contact id to which submission should be mapped. */
4639
- contactId?: string | null;
4640
- /** Indicates contact has verified primary email. */
4641
- emailVerified?: boolean;
4642
- }
129
+ declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
4643
130
 
4644
- declare function createSubmission$1(httpClient: HttpClient): (submission: FormSubmission, options?: CreateSubmissionOptions) => Promise<CreateSubmissionResponse>;
4645
- declare function bulkCreateSubmissionBySubmitter$1(httpClient: HttpClient): (formId: string, options?: BulkCreateSubmissionBySubmitterOptions) => Promise<BulkCreateSubmissionBySubmitterResponse>;
4646
- declare function getSubmission$1(httpClient: HttpClient): (submissionId: string) => Promise<GetSubmissionResponse>;
4647
- declare function updateSubmission$1(httpClient: HttpClient): (_id: string | null, submission: UpdateSubmission) => Promise<FormSubmission>;
4648
- declare function confirmSubmission$1(httpClient: HttpClient): (submissionId: string) => Promise<ConfirmSubmissionResponse>;
4649
- declare function deleteSubmission$1(httpClient: HttpClient): (submissionId: string, options?: DeleteSubmissionOptions) => Promise<void>;
4650
- declare function bulkDeleteSubmission$1(httpClient: HttpClient): (formId: string, options?: BulkDeleteSubmissionOptions) => Promise<BulkDeleteSubmissionResponse>;
4651
- declare function restoreSubmissionFromTrashBin$1(httpClient: HttpClient): (submissionId: string) => Promise<RestoreSubmissionFromTrashBinResponse>;
4652
- declare function removeSubmissionFromTrashBin$1(httpClient: HttpClient): (submissionId: string) => Promise<void>;
4653
- declare function bulkRemoveSubmissionFromTrashBin$1(httpClient: HttpClient): (formId: string, options?: BulkRemoveSubmissionFromTrashBinOptions) => Promise<BulkRemoveSubmissionFromTrashBinResponse>;
4654
- declare function listDeletedSubmissions$1(httpClient: HttpClient): (formId: string, options?: ListDeletedSubmissionsOptions) => Promise<ListDeletedSubmissionsResponse>;
4655
- declare function getDeletedSubmission$1(httpClient: HttpClient): (submissionId: string) => Promise<GetDeletedSubmissionResponse>;
4656
- declare function querySubmission$1(httpClient: HttpClient): (query: CursorQuery, options?: QuerySubmissionOptions) => Promise<QuerySubmissionResponse>;
4657
- declare function searchSubmissionsByNamespace$1(httpClient: HttpClient): (search: CursorSearch) => Promise<SearchSubmissionsByNamespaceResponse>;
4658
- declare function querySubmissionsByNamespace$1(httpClient: HttpClient): (options?: QuerySubmissionsByNamespaceOptions) => SubmissionsQueryBuilder;
4659
- declare function countSubmissionsByFilter$1(httpClient: HttpClient): (filter: Record<string, any> | null, options?: CountSubmissionsByFilterOptions) => Promise<CountSubmissionsByFilterResponse>;
4660
- declare function countSubmissions$1(httpClient: HttpClient): (formIds: string[], namespace: string, options?: CountSubmissionsOptions) => Promise<CountSubmissionsResponse>;
4661
- declare function countDeletedSubmissions$1(httpClient: HttpClient): (formIds: string[], namespace: string, options?: CountDeletedSubmissionsOptions) => Promise<CountDeletedSubmissionsResponse>;
4662
- declare function getMediaUploadUrl$1(httpClient: HttpClient): (formId: string, filename: string, mimeType: string) => Promise<GetMediaUploadURLResponse>;
4663
- declare function bulkMarkSubmissionsAsSeen$1(httpClient: HttpClient): (ids: string[], formId: string) => Promise<void>;
4664
- declare function upsertContactFromSubmission$1(httpClient: HttpClient): (submissionId: string, options?: UpsertContactFromSubmissionOptions) => Promise<UpsertContactFromSubmissionResponse>;
4665
- declare const onSubmissionCreated$1: EventDefinition<SubmissionCreatedEnvelope, "wix.forms.v4.submission_created">;
4666
- declare const onSubmissionUpdated$1: EventDefinition<SubmissionUpdatedEnvelope, "wix.forms.v4.submission_updated">;
4667
- declare const onSubmissionStatusUpdated$1: EventDefinition<SubmissionStatusUpdatedEnvelope, "wix.forms.v4.submission_status_updated">;
4668
- declare const onSubmissionDeleted$1: EventDefinition<SubmissionDeletedEnvelope, "wix.forms.v4.submission_deleted">;
4669
- declare const onSubmissionRemovedSubmissionFromTrash$1: EventDefinition<SubmissionRemovedSubmissionFromTrashEnvelope, "wix.forms.v4.submission_removed_submission_from_trash">;
4670
- declare const onSubmissionContactMapped$1: EventDefinition<SubmissionContactMappedEnvelope, "wix.forms.v4.submission_submission_contact_mapped">;
4671
- declare const onSubmissionContactMappingSkipped$1: EventDefinition<SubmissionContactMappingSkippedEnvelope, "wix.forms.v4.submission_submission_contact_mapping_skipped">;
131
+ declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
4672
132
 
4673
- declare const createSubmission: BuildRESTFunction<typeof createSubmission$1>;
4674
- declare const bulkCreateSubmissionBySubmitter: BuildRESTFunction<typeof bulkCreateSubmissionBySubmitter$1>;
4675
- declare const getSubmission: BuildRESTFunction<typeof getSubmission$1>;
4676
- declare const updateSubmission: BuildRESTFunction<typeof updateSubmission$1>;
4677
- declare const confirmSubmission: BuildRESTFunction<typeof confirmSubmission$1>;
4678
- declare const deleteSubmission: BuildRESTFunction<typeof deleteSubmission$1>;
4679
- declare const bulkDeleteSubmission: BuildRESTFunction<typeof bulkDeleteSubmission$1>;
4680
- declare const restoreSubmissionFromTrashBin: BuildRESTFunction<typeof restoreSubmissionFromTrashBin$1>;
4681
- declare const removeSubmissionFromTrashBin: BuildRESTFunction<typeof removeSubmissionFromTrashBin$1>;
4682
- declare const bulkRemoveSubmissionFromTrashBin: BuildRESTFunction<typeof bulkRemoveSubmissionFromTrashBin$1>;
4683
- declare const listDeletedSubmissions: BuildRESTFunction<typeof listDeletedSubmissions$1>;
4684
- declare const getDeletedSubmission: BuildRESTFunction<typeof getDeletedSubmission$1>;
4685
- declare const querySubmission: BuildRESTFunction<typeof querySubmission$1>;
4686
- declare const searchSubmissionsByNamespace: BuildRESTFunction<typeof searchSubmissionsByNamespace$1>;
4687
- declare const querySubmissionsByNamespace: BuildRESTFunction<typeof querySubmissionsByNamespace$1>;
4688
- declare const countSubmissionsByFilter: BuildRESTFunction<typeof countSubmissionsByFilter$1>;
4689
- declare const countSubmissions: BuildRESTFunction<typeof countSubmissions$1>;
4690
- declare const countDeletedSubmissions: BuildRESTFunction<typeof countDeletedSubmissions$1>;
4691
- declare const getMediaUploadUrl: BuildRESTFunction<typeof getMediaUploadUrl$1>;
4692
- declare const bulkMarkSubmissionsAsSeen: BuildRESTFunction<typeof bulkMarkSubmissionsAsSeen$1>;
4693
- declare const upsertContactFromSubmission: BuildRESTFunction<typeof upsertContactFromSubmission$1>;
4694
- declare const onSubmissionCreated: BuildEventDefinition<typeof onSubmissionCreated$1>;
4695
- declare const onSubmissionUpdated: BuildEventDefinition<typeof onSubmissionUpdated$1>;
4696
- declare const onSubmissionStatusUpdated: BuildEventDefinition<typeof onSubmissionStatusUpdated$1>;
4697
- declare const onSubmissionDeleted: BuildEventDefinition<typeof onSubmissionDeleted$1>;
4698
- declare const onSubmissionRemovedSubmissionFromTrash: BuildEventDefinition<typeof onSubmissionRemovedSubmissionFromTrash$1>;
4699
- declare const onSubmissionContactMapped: BuildEventDefinition<typeof onSubmissionContactMapped$1>;
4700
- declare const onSubmissionContactMappingSkipped: BuildEventDefinition<typeof onSubmissionContactMappingSkipped$1>;
133
+ declare const createSubmission: ReturnType<typeof createRESTModule<typeof publicCreateSubmission>>;
134
+ declare const bulkCreateSubmissionBySubmitter: ReturnType<typeof createRESTModule<typeof publicBulkCreateSubmissionBySubmitter>>;
135
+ declare const getSubmission: ReturnType<typeof createRESTModule<typeof publicGetSubmission>>;
136
+ declare const updateSubmission: ReturnType<typeof createRESTModule<typeof publicUpdateSubmission>>;
137
+ declare const confirmSubmission: ReturnType<typeof createRESTModule<typeof publicConfirmSubmission>>;
138
+ declare const deleteSubmission: ReturnType<typeof createRESTModule<typeof publicDeleteSubmission>>;
139
+ declare const bulkDeleteSubmission: ReturnType<typeof createRESTModule<typeof publicBulkDeleteSubmission>>;
140
+ declare const restoreSubmissionFromTrashBin: ReturnType<typeof createRESTModule<typeof publicRestoreSubmissionFromTrashBin>>;
141
+ declare const removeSubmissionFromTrashBin: ReturnType<typeof createRESTModule<typeof publicRemoveSubmissionFromTrashBin>>;
142
+ declare const bulkRemoveSubmissionFromTrashBin: ReturnType<typeof createRESTModule<typeof publicBulkRemoveSubmissionFromTrashBin>>;
143
+ declare const listDeletedSubmissions: ReturnType<typeof createRESTModule<typeof publicListDeletedSubmissions>>;
144
+ declare const getDeletedSubmission: ReturnType<typeof createRESTModule<typeof publicGetDeletedSubmission>>;
145
+ declare const querySubmission: ReturnType<typeof createRESTModule<typeof publicQuerySubmission>>;
146
+ declare const searchSubmissionsByNamespace: ReturnType<typeof createRESTModule<typeof publicSearchSubmissionsByNamespace>>;
147
+ declare const querySubmissionsByNamespace: ReturnType<typeof createRESTModule<typeof publicQuerySubmissionsByNamespace>>;
148
+ declare const countSubmissionsByFilter: ReturnType<typeof createRESTModule<typeof publicCountSubmissionsByFilter>>;
149
+ declare const countSubmissions: ReturnType<typeof createRESTModule<typeof publicCountSubmissions>>;
150
+ declare const countDeletedSubmissions: ReturnType<typeof createRESTModule<typeof publicCountDeletedSubmissions>>;
151
+ declare const getMediaUploadUrl: ReturnType<typeof createRESTModule<typeof publicGetMediaUploadUrl>>;
152
+ declare const bulkMarkSubmissionsAsSeen: ReturnType<typeof createRESTModule<typeof publicBulkMarkSubmissionsAsSeen>>;
153
+ declare const upsertContactFromSubmission: ReturnType<typeof createRESTModule<typeof publicUpsertContactFromSubmission>>;
154
+ declare const onSubmissionCreated: ReturnType<typeof createEventModule<typeof publicOnSubmissionCreated>>;
155
+ declare const onSubmissionUpdated: ReturnType<typeof createEventModule<typeof publicOnSubmissionUpdated>>;
156
+ declare const onSubmissionStatusUpdated: ReturnType<typeof createEventModule<typeof publicOnSubmissionStatusUpdated>>;
157
+ declare const onSubmissionDeleted: ReturnType<typeof createEventModule<typeof publicOnSubmissionDeleted>>;
158
+ declare const onSubmissionRemovedSubmissionFromTrash: ReturnType<typeof createEventModule<typeof publicOnSubmissionRemovedSubmissionFromTrash>>;
159
+ declare const onSubmissionContactMapped: ReturnType<typeof createEventModule<typeof publicOnSubmissionContactMapped>>;
160
+ declare const onSubmissionContactMappingSkipped: ReturnType<typeof createEventModule<typeof publicOnSubmissionContactMappingSkipped>>;
4701
161
 
4702
162
  declare const context_bulkCreateSubmissionBySubmitter: typeof bulkCreateSubmissionBySubmitter;
4703
163
  declare const context_bulkDeleteSubmission: typeof bulkDeleteSubmission;