@wix/auto_sdk_stores_catalog-imports-v-3 1.0.2 → 1.0.4

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,3209 +1,49 @@
1
- /** Catalog Import represents an import session for product upsert operations. */
2
- interface CatalogImport {
3
- /**
4
- * CatalogImport ID.
5
- * @format GUID
6
- * @readonly
7
- */
8
- _id?: string | null;
9
- /**
10
- * Date and time the CatalogImport was created.
11
- * @readonly
12
- */
13
- _createdDate?: Date | null;
14
- }
15
- interface CreateCatalogImportRequest {
16
- /** CatalogImport to be created. */
17
- catalogImport: CatalogImport;
18
- }
19
- interface CreateCatalogImportResponse {
20
- /** Created CatalogImport. */
21
- catalogImport?: CatalogImport;
22
- }
23
- interface AddProductsToImportRequest {
24
- /**
25
- * Catalog Import ID.
26
- * @format GUID
27
- */
28
- catalogImportId: string;
29
- /**
30
- * List of product items to add to the import session.
31
- * @minSize 1
32
- * @maxSize 100
33
- */
34
- products: ProductItem[];
35
- }
36
- interface ProductItem {
37
- /** Product to upsert - handle field is required for identification */
38
- product?: ProductWithInventory;
39
- /**
40
- * Categories to set for the product.
41
- * Overrides any existing category assignments.
42
- */
43
- categoryIdsInfo?: ProductCategoryIdsInfo;
44
- }
45
- interface ProductWithInventory extends ProductWithInventoryTypedPropertiesOneOf {
46
- /**
47
- * Physical properties.
48
- *
49
- * Required when `productType: PHYSICAL`.
50
- */
51
- physicalProperties?: PhysicalProperties;
52
- /**
53
- * Product ID.
54
- * @minLength 1
55
- * @maxLength 36
56
- * @immutable
57
- * @readonly
58
- */
59
- _id?: string | null;
60
- /**
61
- * Revision number, which increments by 1 each time the product is updated.
62
- * To prevent conflicting changes,
63
- * the current revision must be passed when updating the product.
64
- *
65
- * Ignored when creating a product with inventory.
66
- * @readonly
67
- */
68
- revision?: string | null;
69
- /**
70
- * Product name.
71
- * @minLength 1
72
- * @maxLength 80
73
- */
74
- name?: string | null;
75
- /**
76
- * Product slug.
77
- *
78
- * If not provided, the slug is autogenerated based on the product name.
79
- * @format URL_SLUG
80
- */
81
- slug?: string | null;
82
- /**
83
- * Product description in HTML.
84
- *
85
- * + When provided on create/update, this string must be a valid HTML. It will then be converted to rich content.
86
- * + `plainDescription` is ignored when value is also passed to the `description` field.
87
- * > **Note:** Returned only when you pass `"PLAIN_DESCRIPTION"` to the `fields` array in Products API requests.
88
- * @maxLength 16000
89
- */
90
- plainDescription?: string | null;
91
- /**
92
- * Whether the product is visible to site visitors on the site.
93
- *
94
- * Default: `true`
95
- */
96
- visible?: boolean | null;
97
- /**
98
- * Whether the product is visible in POS (point of sale).
99
- *
100
- * Default: `true`
101
- * > **Note:** Always `false` for `productType: DIGITAL`.
102
- */
103
- visibleInPos?: boolean | null;
104
- /** Product media items. */
105
- media?: Media;
106
- /** Product SEO data. */
107
- seoData?: SeoSchema;
108
- /**
109
- * Tax group ID.
110
- * @format GUID
111
- */
112
- taxGroupId?: string | null;
113
- /**
114
- * Product options. Allows buyer to customize product, e.g. select Color, Size and so on.
115
- * Always generates variants: every variant must have exactly one choice related to each option.
116
- * Since options and variants tightly coupled and rely on each other they usually should be provided together in all operations.
117
- * For existing options and choices provide ids only, all other data (e.g. names, title, types and so on) will be resolved for you by ids.
118
- * If you don't have ids it's ok to omit them but provide all other data instead. For existing options ids will be resolved, not existing options will be created.
119
- * *None*: you cannot change name of existing option via this endpoint but you can do it by calling CustomizationService
120
- * @maxSize 6
121
- */
122
- options?: ConnectedOption[];
123
- /**
124
- * Product Modifiers. Allows buyer to customize product, e.g. select Color, Size and so on similarly to `options` but with one main difference - `modifiers` never generate any variants.
125
- * For existing modifiers and choices provide ids only, all other data (e.g. names, title, types and so on) will be resolved for you by ids.
126
- * If you don't have ids it's ok to omit them but provide all other data instead. For existing modifiers ids will be resolved, not existing modifiers will be created.
127
- * *None*: you cannot change name of existing modifier via this endpoint by passing id and changed name, if you pass id name will be ignored. If you want to update existing modifier name do it by calling CustomizationService
128
- * @maxSize 10
129
- */
130
- modifiers?: ConnectedModifier[];
131
- /**
132
- * Product brand.
133
- *
134
- * + Pass `brand.name` to add a new brand while creating a product.
135
- * + Pass an existing brand's `id` to assign that brand to the product.
136
- */
137
- brand?: Brand;
138
- /**
139
- * Product info section.
140
- *
141
- * + Pass `infoSection.uniqueName`, `infoSection.title`, and `infoSection.description` to add a new info section while creating a product.
142
- * + Pass an existing info section's `id` or `uniqueName` to assign that info section to the product.
143
- * @maxSize 10
144
- */
145
- infoSections?: InfoSection[];
146
- /**
147
- * Product ribbon.
148
- *
149
- * + Pass `ribbon.name` to add a new ribbon while creating a product.
150
- * + Pass an existing ribbon's `id` or `name` to assign that ribbon to the product.
151
- */
152
- ribbon?: Ribbon;
153
- /**
154
- * Main category ID.
155
- * @format GUID
156
- */
157
- mainCategoryId?: string | null;
158
- /**
159
- * Product type.
160
- *
161
- * When passing `productType: PHYSICAL`, you must also pass `physicalProperties`.
162
- * @immutable
163
- */
164
- productType?: ProductTypeWithLiterals;
165
- /**
166
- * A unique human-friendly identifier for the product.
167
- * Unlike the product ID, the handle can be set by the user to ensure consistency across multiple platforms.
168
- * In case handle wasn't given, the handle will be automatically generated.
169
- * @minLength 1
170
- * @maxLength 100
171
- * @readonly
172
- */
173
- handle?: string | null;
174
- /** Product variants. */
175
- variantsInfo?: VariantsInfo;
176
- /** Subscription details. */
177
- subscriptionDetails?: SubscriptionDetails;
178
- /**
179
- * Custom extended fields for the product object.
180
- *
181
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls.
182
- */
183
- extendedFields?: ExtendedFields;
184
- }
185
- /** @oneof */
186
- interface ProductWithInventoryTypedPropertiesOneOf {
187
- /**
188
- * Physical properties.
189
- *
190
- * Required when `productType: PHYSICAL`.
191
- */
192
- physicalProperties?: PhysicalProperties;
193
- }
194
- interface RichContent {
195
- /** Node objects representing a rich content document. */
196
- nodes?: Node[];
197
- /** Object metadata. */
198
- metadata?: Metadata;
199
- /** Global styling for header, paragraph, block quote, and code block nodes in the object. */
200
- documentStyle?: DocumentStyle;
201
- }
202
- interface Node extends NodeDataOneOf {
203
- /** Data for a button node. */
204
- buttonData?: ButtonData;
205
- /** Data for a code block node. */
206
- codeBlockData?: CodeBlockData;
207
- /** Data for a divider node. */
208
- dividerData?: DividerData;
209
- /** Data for a file node. */
210
- fileData?: FileData;
211
- /** Data for a gallery node. */
212
- galleryData?: GalleryData;
213
- /** Data for a GIF node. */
214
- gifData?: GIFData;
215
- /** Data for a heading node. */
216
- headingData?: HeadingData;
217
- /** Data for an embedded HTML node. */
218
- htmlData?: HTMLData;
219
- /** Data for an image node. */
220
- imageData?: ImageData;
221
- /** Data for a link preview node. */
222
- linkPreviewData?: LinkPreviewData;
223
- /** @deprecated */
224
- mapData?: MapData;
225
- /** Data for a paragraph node. */
226
- paragraphData?: ParagraphData;
227
- /** Data for a poll node. */
228
- pollData?: PollData;
229
- /** Data for a text node. Used to apply decorations to text. */
230
- textData?: TextData;
231
- /** Data for an app embed node. */
232
- appEmbedData?: AppEmbedData;
233
- /** Data for a video node. */
234
- videoData?: VideoData;
235
- /** Data for an oEmbed node. */
236
- embedData?: EmbedData;
237
- /** Data for a collapsible list node. */
238
- collapsibleListData?: CollapsibleListData;
239
- /** Data for a table node. */
240
- tableData?: TableData;
241
- /** Data for a table cell node. */
242
- tableCellData?: TableCellData;
243
- /** Data for a custom external node. */
244
- externalData?: Record<string, any> | null;
245
- /** Data for an audio node. */
246
- audioData?: AudioData;
247
- /** Data for an ordered list node. */
248
- orderedListData?: OrderedListData;
249
- /** Data for a bulleted list node. */
250
- bulletedListData?: BulletedListData;
251
- /** Data for a block quote node. */
252
- blockquoteData?: BlockquoteData;
253
- /** Data for a caption node. */
254
- captionData?: CaptionData;
255
- /** LayoutData layout_data = 31; // Data for a layout node. Reserved for future use. */
256
- layoutCellData?: LayoutCellData;
257
- /** 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. */
258
- type?: NodeTypeWithLiterals;
259
- /** Node ID. */
260
- id?: string;
261
- /** A list of child nodes. */
262
- nodes?: Node[];
263
- /** Padding and background color styling for the node. */
264
- style?: NodeStyle;
265
- }
266
- /** @oneof */
267
- interface NodeDataOneOf {
268
- /** Data for a button node. */
269
- buttonData?: ButtonData;
270
- /** Data for a code block node. */
271
- codeBlockData?: CodeBlockData;
272
- /** Data for a divider node. */
273
- dividerData?: DividerData;
274
- /** Data for a file node. */
275
- fileData?: FileData;
276
- /** Data for a gallery node. */
277
- galleryData?: GalleryData;
278
- /** Data for a GIF node. */
279
- gifData?: GIFData;
280
- /** Data for a heading node. */
281
- headingData?: HeadingData;
282
- /** Data for an embedded HTML node. */
283
- htmlData?: HTMLData;
284
- /** Data for an image node. */
285
- imageData?: ImageData;
286
- /** Data for a link preview node. */
287
- linkPreviewData?: LinkPreviewData;
288
- /** @deprecated */
289
- mapData?: MapData;
290
- /** Data for a paragraph node. */
291
- paragraphData?: ParagraphData;
292
- /** Data for a poll node. */
293
- pollData?: PollData;
294
- /** Data for a text node. Used to apply decorations to text. */
295
- textData?: TextData;
296
- /** Data for an app embed node. */
297
- appEmbedData?: AppEmbedData;
298
- /** Data for a video node. */
299
- videoData?: VideoData;
300
- /** Data for an oEmbed node. */
301
- embedData?: EmbedData;
302
- /** Data for a collapsible list node. */
303
- collapsibleListData?: CollapsibleListData;
304
- /** Data for a table node. */
305
- tableData?: TableData;
306
- /** Data for a table cell node. */
307
- tableCellData?: TableCellData;
308
- /** Data for a custom external node. */
309
- externalData?: Record<string, any> | null;
310
- /** Data for an audio node. */
311
- audioData?: AudioData;
312
- /** Data for an ordered list node. */
313
- orderedListData?: OrderedListData;
314
- /** Data for a bulleted list node. */
315
- bulletedListData?: BulletedListData;
316
- /** Data for a block quote node. */
317
- blockquoteData?: BlockquoteData;
318
- /** Data for a caption node. */
319
- captionData?: CaptionData;
320
- /** LayoutData layout_data = 31; // Data for a layout node. Reserved for future use. */
321
- layoutCellData?: LayoutCellData;
322
- }
323
- declare enum NodeType {
324
- PARAGRAPH = "PARAGRAPH",
325
- TEXT = "TEXT",
326
- HEADING = "HEADING",
327
- BULLETED_LIST = "BULLETED_LIST",
328
- ORDERED_LIST = "ORDERED_LIST",
329
- LIST_ITEM = "LIST_ITEM",
330
- BLOCKQUOTE = "BLOCKQUOTE",
331
- CODE_BLOCK = "CODE_BLOCK",
332
- VIDEO = "VIDEO",
333
- DIVIDER = "DIVIDER",
334
- FILE = "FILE",
335
- GALLERY = "GALLERY",
336
- GIF = "GIF",
337
- HTML = "HTML",
338
- IMAGE = "IMAGE",
339
- LINK_PREVIEW = "LINK_PREVIEW",
340
- /** @deprecated */
341
- MAP = "MAP",
342
- POLL = "POLL",
343
- APP_EMBED = "APP_EMBED",
344
- BUTTON = "BUTTON",
345
- COLLAPSIBLE_LIST = "COLLAPSIBLE_LIST",
346
- TABLE = "TABLE",
347
- EMBED = "EMBED",
348
- COLLAPSIBLE_ITEM = "COLLAPSIBLE_ITEM",
349
- COLLAPSIBLE_ITEM_TITLE = "COLLAPSIBLE_ITEM_TITLE",
350
- COLLAPSIBLE_ITEM_BODY = "COLLAPSIBLE_ITEM_BODY",
351
- TABLE_CELL = "TABLE_CELL",
352
- TABLE_ROW = "TABLE_ROW",
353
- EXTERNAL = "EXTERNAL",
354
- AUDIO = "AUDIO",
355
- CAPTION = "CAPTION",
356
- LAYOUT = "LAYOUT",
357
- LAYOUT_CELL = "LAYOUT_CELL"
358
- }
359
- /** @enumType */
360
- type NodeTypeWithLiterals = NodeType | 'PARAGRAPH' | 'TEXT' | 'HEADING' | 'BULLETED_LIST' | 'ORDERED_LIST' | 'LIST_ITEM' | 'BLOCKQUOTE' | 'CODE_BLOCK' | 'VIDEO' | 'DIVIDER' | 'FILE' | 'GALLERY' | 'GIF' | 'HTML' | 'IMAGE' | 'LINK_PREVIEW' | 'MAP' | 'POLL' | 'APP_EMBED' | 'BUTTON' | 'COLLAPSIBLE_LIST' | 'TABLE' | 'EMBED' | 'COLLAPSIBLE_ITEM' | 'COLLAPSIBLE_ITEM_TITLE' | 'COLLAPSIBLE_ITEM_BODY' | 'TABLE_CELL' | 'TABLE_ROW' | 'EXTERNAL' | 'AUDIO' | 'CAPTION' | 'LAYOUT' | 'LAYOUT_CELL';
361
- interface NodeStyle {
362
- /** The top padding value in pixels. */
363
- paddingTop?: string | null;
364
- /** The bottom padding value in pixels. */
365
- paddingBottom?: string | null;
366
- /** The background color as a hexadecimal value. */
367
- backgroundColor?: string | null;
368
- }
369
- interface ButtonData {
370
- /** Styling for the button's container. */
371
- containerData?: PluginContainerData;
372
- /** The button type. */
373
- type?: ButtonDataTypeWithLiterals;
374
- /** Styling for the button. */
375
- styles?: Styles;
376
- /** The text to display on the button. */
377
- text?: string | null;
378
- /** Button link details. */
379
- link?: Link;
380
- }
381
- interface Border {
382
- /**
383
- * Deprecated: Use `borderWidth` in `styles` instead.
384
- * @deprecated
385
- */
386
- width?: number | null;
387
- /**
388
- * Deprecated: Use `borderRadius` in `styles` instead.
389
- * @deprecated
390
- */
391
- radius?: number | null;
392
- }
393
- interface Colors {
394
- /**
395
- * Deprecated: Use `textColor` in `styles` instead.
396
- * @deprecated
397
- */
398
- text?: string | null;
399
- /**
400
- * Deprecated: Use `borderColor` in `styles` instead.
401
- * @deprecated
402
- */
403
- border?: string | null;
404
- /**
405
- * Deprecated: Use `backgroundColor` in `styles` instead.
406
- * @deprecated
407
- */
408
- background?: string | null;
409
- }
410
- interface PluginContainerData {
411
- /** The width of the node when it's displayed. */
412
- width?: PluginContainerDataWidth;
413
- /** The node's alignment within its container. */
414
- alignment?: PluginContainerDataAlignmentWithLiterals;
415
- /** Spoiler cover settings for the node. */
416
- spoiler?: Spoiler;
417
- /** The height of the node when it's displayed. */
418
- height?: Height;
419
- /** 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`. */
420
- textWrap?: boolean | null;
421
- }
422
- declare enum WidthType {
423
- /** Width matches the content width */
424
- CONTENT = "CONTENT",
425
- /** Small Width */
426
- SMALL = "SMALL",
427
- /** Width will match the original asset width */
428
- ORIGINAL = "ORIGINAL",
429
- /** coast-to-coast display */
430
- FULL_WIDTH = "FULL_WIDTH"
431
- }
432
- /** @enumType */
433
- type WidthTypeWithLiterals = WidthType | 'CONTENT' | 'SMALL' | 'ORIGINAL' | 'FULL_WIDTH';
434
- interface PluginContainerDataWidth extends PluginContainerDataWidthDataOneOf {
435
- /**
436
- * One of the following predefined width options:
437
- * `CONTENT`: The width of the container matches the content width.
438
- * `SMALL`: A small width.
439
- * `ORIGINAL`: For `imageData` containers only. The width of the container matches the original image width.
440
- * `FULL_WIDTH`: For `imageData` containers only. The image container takes up the full width of the screen.
441
- */
442
- size?: WidthTypeWithLiterals;
443
- /** A custom width value in pixels. */
444
- custom?: string | null;
445
- }
446
- /** @oneof */
447
- interface PluginContainerDataWidthDataOneOf {
448
- /**
449
- * One of the following predefined width options:
450
- * `CONTENT`: The width of the container matches the content width.
451
- * `SMALL`: A small width.
452
- * `ORIGINAL`: For `imageData` containers only. The width of the container matches the original image width.
453
- * `FULL_WIDTH`: For `imageData` containers only. The image container takes up the full width of the screen.
454
- */
455
- size?: WidthTypeWithLiterals;
456
- /** A custom width value in pixels. */
457
- custom?: string | null;
458
- }
459
- declare enum PluginContainerDataAlignment {
460
- /** Center Alignment */
461
- CENTER = "CENTER",
462
- /** Left Alignment */
463
- LEFT = "LEFT",
464
- /** Right Alignment */
465
- RIGHT = "RIGHT"
466
- }
467
- /** @enumType */
468
- type PluginContainerDataAlignmentWithLiterals = PluginContainerDataAlignment | 'CENTER' | 'LEFT' | 'RIGHT';
469
- interface Spoiler {
470
- /** Sets whether the spoiler cover is enabled for this node. Defaults to `false`. */
471
- enabled?: boolean | null;
472
- /** The description displayed on top of the spoiler cover. */
473
- description?: string | null;
474
- /** The text for the button used to remove the spoiler cover. */
475
- buttonText?: string | null;
476
- }
477
- interface Height {
478
- /** A custom height value in pixels. */
479
- custom?: string | null;
480
- }
481
- declare enum ButtonDataType {
482
- /** Regular link button */
483
- LINK = "LINK",
484
- /** Triggers custom action that is defined in plugin configuration by the consumer */
485
- ACTION = "ACTION"
486
- }
487
- /** @enumType */
488
- type ButtonDataTypeWithLiterals = ButtonDataType | 'LINK' | 'ACTION';
489
- interface Styles {
490
- /**
491
- * Deprecated: Use `borderWidth` and `borderRadius` instead.
492
- * @deprecated
493
- */
494
- border?: Border;
495
- /**
496
- * Deprecated: Use `textColor`, `borderColor` and `backgroundColor` instead.
497
- * @deprecated
498
- */
499
- colors?: Colors;
500
- /** Border width in pixels. */
501
- borderWidth?: number | null;
502
- /**
503
- * Deprecated: Use `borderWidth` for normal/hover states instead.
504
- * @deprecated
505
- */
506
- borderWidthHover?: number | null;
507
- /** Border radius in pixels. */
508
- borderRadius?: number | null;
509
- /**
510
- * Border color as a hexadecimal value.
511
- * @format COLOR_HEX
512
- */
513
- borderColor?: string | null;
514
- /**
515
- * Border color as a hexadecimal value (hover state).
516
- * @format COLOR_HEX
517
- */
518
- borderColorHover?: string | null;
519
- /**
520
- * Text color as a hexadecimal value.
521
- * @format COLOR_HEX
522
- */
523
- textColor?: string | null;
524
- /**
525
- * Text color as a hexadecimal value (hover state).
526
- * @format COLOR_HEX
527
- */
528
- textColorHover?: string | null;
529
- /**
530
- * Background color as a hexadecimal value.
531
- * @format COLOR_HEX
532
- */
533
- backgroundColor?: string | null;
534
- /**
535
- * Background color as a hexadecimal value (hover state).
536
- * @format COLOR_HEX
537
- */
538
- backgroundColorHover?: string | null;
539
- /** Button size option, one of `SMALL`, `MEDIUM` or `LARGE`. Defaults to `MEDIUM`. */
540
- buttonSize?: string | null;
541
- }
542
- interface Link extends LinkDataOneOf {
543
- /** The absolute URL for the linked document. */
544
- url?: string;
545
- /** The target node's ID. Used for linking to another node in this object. */
546
- anchor?: string;
547
- /**
548
- * he HTML `target` attribute value for the link. This property defines where the linked document opens as follows:
549
- * `SELF` - Default. Opens the linked document in the same frame as the link.
550
- * `BLANK` - Opens the linked document in a new browser tab or window.
551
- * `PARENT` - Opens the linked document in the link's parent frame.
552
- * `TOP` - Opens the linked document in the full body of the link's browser tab or window.
553
- */
554
- target?: TargetWithLiterals;
555
- /** The HTML `rel` attribute value for the link. This object specifies the relationship between the current document and the linked document. */
556
- rel?: Rel;
557
- /** A serialized object used for a custom or external link panel. */
558
- customData?: string | null;
559
- }
560
- /** @oneof */
561
- interface LinkDataOneOf {
562
- /** The absolute URL for the linked document. */
563
- url?: string;
564
- /** The target node's ID. Used for linking to another node in this object. */
565
- anchor?: string;
566
- }
567
- declare enum Target {
568
- /** Opens the linked document in the same frame as it was clicked (this is default) */
569
- SELF = "SELF",
570
- /** Opens the linked document in a new window or tab */
571
- BLANK = "BLANK",
572
- /** Opens the linked document in the parent frame */
573
- PARENT = "PARENT",
574
- /** Opens the linked document in the full body of the window */
575
- TOP = "TOP"
576
- }
577
- /** @enumType */
578
- type TargetWithLiterals = Target | 'SELF' | 'BLANK' | 'PARENT' | 'TOP';
579
- interface Rel {
580
- /** Indicates to search engine crawlers not to follow the link. Defaults to `false`. */
581
- nofollow?: boolean | null;
582
- /** Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement. Defaults to `false`. */
583
- sponsored?: boolean | null;
584
- /** 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`. */
585
- ugc?: boolean | null;
586
- /** Indicates that this link protect referral information from being passed to the target website. */
587
- noreferrer?: boolean | null;
588
- }
589
- interface CodeBlockData {
590
- /** Styling for the code block's text. */
591
- textStyle?: TextStyle;
592
- }
593
- interface TextStyle {
594
- /** Text alignment. Defaults to `AUTO`. */
595
- textAlignment?: TextAlignmentWithLiterals;
596
- /** 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. */
597
- lineHeight?: string | null;
598
- }
599
- declare enum TextAlignment {
600
- /** browser default, eqivalent to `initial` */
601
- AUTO = "AUTO",
602
- /** Left align */
603
- LEFT = "LEFT",
604
- /** Right align */
605
- RIGHT = "RIGHT",
606
- /** Center align */
607
- CENTER = "CENTER",
608
- /** 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 */
609
- JUSTIFY = "JUSTIFY"
610
- }
611
- /** @enumType */
612
- type TextAlignmentWithLiterals = TextAlignment | 'AUTO' | 'LEFT' | 'RIGHT' | 'CENTER' | 'JUSTIFY';
613
- interface DividerData {
614
- /** Styling for the divider's container. */
615
- containerData?: PluginContainerData;
616
- /** Divider line style. */
617
- lineStyle?: LineStyleWithLiterals;
618
- /** Divider width. */
619
- width?: WidthWithLiterals;
620
- /** Divider alignment. */
621
- alignment?: DividerDataAlignmentWithLiterals;
622
- }
623
- declare enum LineStyle {
624
- /** Single Line */
625
- SINGLE = "SINGLE",
626
- /** Double Line */
627
- DOUBLE = "DOUBLE",
628
- /** Dashed Line */
629
- DASHED = "DASHED",
630
- /** Dotted Line */
631
- DOTTED = "DOTTED"
632
- }
633
- /** @enumType */
634
- type LineStyleWithLiterals = LineStyle | 'SINGLE' | 'DOUBLE' | 'DASHED' | 'DOTTED';
635
- declare enum Width {
636
- /** Large line */
637
- LARGE = "LARGE",
638
- /** Medium line */
639
- MEDIUM = "MEDIUM",
640
- /** Small line */
641
- SMALL = "SMALL"
642
- }
643
- /** @enumType */
644
- type WidthWithLiterals = Width | 'LARGE' | 'MEDIUM' | 'SMALL';
645
- declare enum DividerDataAlignment {
646
- /** Center alignment */
647
- CENTER = "CENTER",
648
- /** Left alignment */
649
- LEFT = "LEFT",
650
- /** Right alignment */
651
- RIGHT = "RIGHT"
652
- }
653
- /** @enumType */
654
- type DividerDataAlignmentWithLiterals = DividerDataAlignment | 'CENTER' | 'LEFT' | 'RIGHT';
655
- interface FileData {
656
- /** Styling for the file's container. */
657
- containerData?: PluginContainerData;
658
- /** The source for the file's data. */
659
- src?: FileSource;
660
- /** File name. */
661
- name?: string | null;
662
- /** File type. */
663
- type?: string | null;
664
- /**
665
- * Use `sizeInKb` instead.
666
- * @deprecated
667
- */
668
- size?: number | null;
669
- /** Settings for PDF files. */
670
- pdfSettings?: PDFSettings;
671
- /** File MIME type. */
672
- mimeType?: string | null;
673
- /** File path. */
674
- path?: string | null;
675
- /** File size in KB. */
676
- sizeInKb?: string | null;
677
- }
678
- declare enum ViewMode {
679
- /** No PDF view */
680
- NONE = "NONE",
681
- /** Full PDF view */
682
- FULL = "FULL",
683
- /** Mini PDF view */
684
- MINI = "MINI"
685
- }
686
- /** @enumType */
687
- type ViewModeWithLiterals = ViewMode | 'NONE' | 'FULL' | 'MINI';
688
- interface FileSource extends FileSourceDataOneOf {
689
- /** The absolute URL for the file's source. */
690
- url?: string | null;
691
- /**
692
- * Custom ID. Use `id` instead.
693
- * @deprecated
694
- */
695
- custom?: string | null;
696
- /** An ID that's resolved to a URL by a resolver function. */
697
- id?: string | null;
698
- /** Indicates whether the file's source is private. Defaults to `false`. */
699
- private?: boolean | null;
700
- }
701
- /** @oneof */
702
- interface FileSourceDataOneOf {
703
- /** The absolute URL for the file's source. */
704
- url?: string | null;
705
- /**
706
- * Custom ID. Use `id` instead.
707
- * @deprecated
708
- */
709
- custom?: string | null;
710
- /** An ID that's resolved to a URL by a resolver function. */
711
- id?: string | null;
712
- }
713
- interface PDFSettings {
714
- /**
715
- * PDF view mode. One of the following:
716
- * `NONE` : The PDF isn't displayed.
717
- * `FULL` : A full page view of the PDF is displayed.
718
- * `MINI` : A mini view of the PDF is displayed.
719
- */
720
- viewMode?: ViewModeWithLiterals;
721
- /** Sets whether the PDF download button is disabled. Defaults to `false`. */
722
- disableDownload?: boolean | null;
723
- /** Sets whether the PDF print button is disabled. Defaults to `false`. */
724
- disablePrint?: boolean | null;
725
- }
726
- interface GalleryData {
727
- /** Styling for the gallery's container. */
728
- containerData?: PluginContainerData;
729
- /** The items in the gallery. */
730
- items?: Item[];
731
- /** Options for defining the gallery's appearance. */
732
- options?: GalleryOptions;
733
- /** Sets whether the gallery's expand button is disabled. Defaults to `false`. */
734
- disableExpand?: boolean | null;
735
- /** Sets whether the gallery's download button is disabled. Defaults to `false`. */
736
- disableDownload?: boolean | null;
737
- }
738
- interface V1Media {
739
- /** The source for the media's data. */
740
- src?: FileSource;
741
- /** Media width in pixels. */
742
- width?: number | null;
743
- /** Media height in pixels. */
744
- height?: number | null;
745
- /** Media duration in seconds. Only relevant for audio and video files. */
746
- duration?: number | null;
747
- }
748
- interface Image {
749
- /** Image file details. */
750
- media?: V1Media;
751
- /** Link details for images that are links. */
752
- link?: Link;
753
- }
754
- interface Video {
755
- /** Video file details. */
756
- media?: V1Media;
757
- /** Video thumbnail file details. */
758
- thumbnail?: V1Media;
759
- }
760
- interface Item extends ItemDataOneOf {
761
- /** An image item. */
762
- image?: Image;
763
- /** A video item. */
764
- video?: Video;
765
- /** Item title. */
766
- title?: string | null;
767
- /** Item's alternative text. */
768
- altText?: string | null;
769
- }
770
- /** @oneof */
771
- interface ItemDataOneOf {
772
- /** An image item. */
773
- image?: Image;
774
- /** A video item. */
775
- video?: Video;
776
- }
777
- interface GalleryOptions {
778
- /** Gallery layout. */
779
- layout?: GalleryOptionsLayout;
780
- /** Styling for gallery items. */
781
- item?: ItemStyle;
782
- /** Styling for gallery thumbnail images. */
783
- thumbnails?: Thumbnails;
784
- }
785
- declare enum LayoutType {
786
- /** Collage type */
787
- COLLAGE = "COLLAGE",
788
- /** Masonry type */
789
- MASONRY = "MASONRY",
790
- /** Grid type */
791
- GRID = "GRID",
792
- /** Thumbnail type */
793
- THUMBNAIL = "THUMBNAIL",
794
- /** Slider type */
795
- SLIDER = "SLIDER",
796
- /** Slideshow type */
797
- SLIDESHOW = "SLIDESHOW",
798
- /** Panorama type */
799
- PANORAMA = "PANORAMA",
800
- /** Column type */
801
- COLUMN = "COLUMN",
802
- /** Magic type */
803
- MAGIC = "MAGIC",
804
- /** Fullsize images type */
805
- FULLSIZE = "FULLSIZE"
806
- }
807
- /** @enumType */
808
- type LayoutTypeWithLiterals = LayoutType | 'COLLAGE' | 'MASONRY' | 'GRID' | 'THUMBNAIL' | 'SLIDER' | 'SLIDESHOW' | 'PANORAMA' | 'COLUMN' | 'MAGIC' | 'FULLSIZE';
809
- declare enum Orientation {
810
- /** Rows Orientation */
811
- ROWS = "ROWS",
812
- /** Columns Orientation */
813
- COLUMNS = "COLUMNS"
814
- }
815
- /** @enumType */
816
- type OrientationWithLiterals = Orientation | 'ROWS' | 'COLUMNS';
817
- declare enum Crop {
818
- /** Crop to fill */
819
- FILL = "FILL",
820
- /** Crop to fit */
821
- FIT = "FIT"
822
- }
823
- /** @enumType */
824
- type CropWithLiterals = Crop | 'FILL' | 'FIT';
825
- declare enum ThumbnailsAlignment {
826
- /** Top alignment */
827
- TOP = "TOP",
828
- /** Right alignment */
829
- RIGHT = "RIGHT",
830
- /** Bottom alignment */
831
- BOTTOM = "BOTTOM",
832
- /** Left alignment */
833
- LEFT = "LEFT",
834
- /** No thumbnail */
835
- NONE = "NONE"
836
- }
837
- /** @enumType */
838
- type ThumbnailsAlignmentWithLiterals = ThumbnailsAlignment | 'TOP' | 'RIGHT' | 'BOTTOM' | 'LEFT' | 'NONE';
839
- interface GalleryOptionsLayout {
840
- /** Gallery layout type. */
841
- type?: LayoutTypeWithLiterals;
842
- /** Sets whether horizontal scroll is enabled. Defaults to `true` unless the layout `type` is set to `GRID` or `COLLAGE`. */
843
- horizontalScroll?: boolean | null;
844
- /** Gallery orientation. */
845
- orientation?: OrientationWithLiterals;
846
- /** The number of columns to display on full size screens. */
847
- numberOfColumns?: number | null;
848
- /** The number of columns to display on mobile screens. */
849
- mobileNumberOfColumns?: number | null;
850
- }
851
- interface ItemStyle {
852
- /** Desirable dimension for each item in pixels (behvaior changes according to gallery type) */
853
- targetSize?: number | null;
854
- /** Item ratio */
855
- ratio?: number | null;
856
- /** Sets how item images are cropped. */
857
- crop?: CropWithLiterals;
858
- /** The spacing between items in pixels. */
859
- spacing?: number | null;
860
- }
861
- interface Thumbnails {
862
- /** Thumbnail alignment. */
863
- placement?: ThumbnailsAlignmentWithLiterals;
864
- /** Spacing between thumbnails in pixels. */
865
- spacing?: number | null;
866
- }
867
- interface GIFData {
868
- /** Styling for the GIF's container. */
869
- containerData?: PluginContainerData;
870
- /** The source of the full size GIF. */
871
- original?: GIF;
872
- /** The source of the downsized GIF. */
873
- downsized?: GIF;
874
- /** Height in pixels. */
875
- height?: number;
876
- /** Width in pixels. */
877
- width?: number;
878
- /** Type of GIF (Sticker or NORMAL). Defaults to `NORMAL`. */
879
- gifType?: GIFTypeWithLiterals;
880
- }
881
- interface GIF {
882
- /**
883
- * GIF format URL.
884
- * @format WEB_URL
885
- */
886
- gif?: string | null;
887
- /**
888
- * MP4 format URL.
889
- * @format WEB_URL
890
- */
891
- mp4?: string | null;
892
- /**
893
- * Thumbnail URL.
894
- * @format WEB_URL
895
- */
896
- still?: string | null;
897
- }
898
- declare enum GIFType {
899
- NORMAL = "NORMAL",
900
- STICKER = "STICKER"
901
- }
902
- /** @enumType */
903
- type GIFTypeWithLiterals = GIFType | 'NORMAL' | 'STICKER';
904
- interface HeadingData {
905
- /** Heading level from 1-6. */
906
- level?: number;
907
- /** Styling for the heading text. */
908
- textStyle?: TextStyle;
909
- /** Indentation level from 1-4. */
910
- indentation?: number | null;
911
- }
912
- interface HTMLData extends HTMLDataDataOneOf {
913
- /** The URL for the HTML code for the node. */
914
- url?: string;
915
- /** The HTML code for the node. */
916
- html?: string;
917
- /**
918
- * Whether this is an AdSense element. Use `source` instead.
919
- * @deprecated
920
- */
921
- isAdsense?: boolean | null;
922
- /** Styling for the HTML node's container. Height property is irrelevant for HTML embeds when autoHeight is set to `true`. */
923
- containerData?: PluginContainerData;
924
- /** The type of HTML code. */
925
- source?: SourceWithLiterals;
926
- /** If container height is aligned with its content height. Defaults to `true`. */
927
- autoHeight?: boolean | null;
928
- }
929
- /** @oneof */
930
- interface HTMLDataDataOneOf {
931
- /** The URL for the HTML code for the node. */
932
- url?: string;
933
- /** The HTML code for the node. */
934
- html?: string;
935
- /**
936
- * Whether this is an AdSense element. Use `source` instead.
937
- * @deprecated
938
- */
939
- isAdsense?: boolean | null;
940
- }
941
- declare enum Source {
942
- HTML = "HTML",
943
- ADSENSE = "ADSENSE"
944
- }
945
- /** @enumType */
946
- type SourceWithLiterals = Source | 'HTML' | 'ADSENSE';
947
- interface ImageData {
948
- /** Styling for the image's container. */
949
- containerData?: PluginContainerData;
950
- /** Image file details. */
951
- image?: V1Media;
952
- /** Link details for images that are links. */
953
- link?: Link;
954
- /** Sets whether the image expands to full screen when clicked. Defaults to `false`. */
955
- disableExpand?: boolean | null;
956
- /** Image's alternative text. */
957
- altText?: string | null;
958
- /**
959
- * Deprecated: use Caption node instead.
960
- * @deprecated
961
- */
962
- caption?: string | null;
963
- /** Sets whether the image's download button is disabled. Defaults to `false`. */
964
- disableDownload?: boolean | null;
965
- /** Sets whether the image is decorative and does not need an explanation. Defaults to `false`. */
966
- decorative?: boolean | null;
967
- /** Styling for the image. */
968
- styles?: ImageDataStyles;
969
- }
970
- interface StylesBorder {
971
- /** Border width in pixels. */
972
- width?: number | null;
973
- /**
974
- * Border color as a hexadecimal value.
975
- * @format COLOR_HEX
976
- */
977
- color?: string | null;
978
- /** Border radius in pixels. */
979
- radius?: number | null;
980
- }
981
- interface ImageDataStyles {
982
- /** Border attributes. */
983
- border?: StylesBorder;
984
- }
985
- interface LinkPreviewData {
986
- /** Styling for the link preview's container. */
987
- containerData?: PluginContainerData;
988
- /** Link details. */
989
- link?: Link;
990
- /** Preview title. */
991
- title?: string | null;
992
- /** Preview thumbnail URL. */
993
- thumbnailUrl?: string | null;
994
- /** Preview description. */
995
- description?: string | null;
996
- /** The preview content as HTML. */
997
- html?: string | null;
998
- /** Styling for the link preview. */
999
- styles?: LinkPreviewDataStyles;
1000
- }
1001
- declare enum StylesPosition {
1002
- /** Thumbnail positioned at the start (left in LTR layouts, right in RTL layouts) */
1003
- START = "START",
1004
- /** Thumbnail positioned at the end (right in LTR layouts, left in RTL layouts) */
1005
- END = "END",
1006
- /** Thumbnail positioned at the top */
1007
- TOP = "TOP",
1008
- /** Thumbnail hidden and not displayed */
1009
- HIDDEN = "HIDDEN"
1010
- }
1011
- /** @enumType */
1012
- type StylesPositionWithLiterals = StylesPosition | 'START' | 'END' | 'TOP' | 'HIDDEN';
1013
- interface LinkPreviewDataStyles {
1014
- /**
1015
- * Background color as a hexadecimal value.
1016
- * @format COLOR_HEX
1017
- */
1018
- backgroundColor?: string | null;
1019
- /**
1020
- * Title color as a hexadecimal value.
1021
- * @format COLOR_HEX
1022
- */
1023
- titleColor?: string | null;
1024
- /**
1025
- * Subtitle color as a hexadecimal value.
1026
- * @format COLOR_HEX
1027
- */
1028
- subtitleColor?: string | null;
1029
- /**
1030
- * Link color as a hexadecimal value.
1031
- * @format COLOR_HEX
1032
- */
1033
- linkColor?: string | null;
1034
- /** Border width in pixels. */
1035
- borderWidth?: number | null;
1036
- /** Border radius in pixels. */
1037
- borderRadius?: number | null;
1038
- /**
1039
- * Border color as a hexadecimal value.
1040
- * @format COLOR_HEX
1041
- */
1042
- borderColor?: string | null;
1043
- /** Position of thumbnail. Defaults to `START`. */
1044
- thumbnailPosition?: StylesPositionWithLiterals;
1045
- }
1046
- interface MapData {
1047
- /** Styling for the map's container. */
1048
- containerData?: PluginContainerData;
1049
- /** Map settings. */
1050
- mapSettings?: MapSettings;
1051
- }
1052
- interface MapSettings {
1053
- /** The address to display on the map. */
1054
- address?: string | null;
1055
- /** Sets whether the map is draggable. */
1056
- draggable?: boolean | null;
1057
- /** Sets whether the location marker is visible. */
1058
- marker?: boolean | null;
1059
- /** Sets whether street view control is enabled. */
1060
- streetViewControl?: boolean | null;
1061
- /** Sets whether zoom control is enabled. */
1062
- zoomControl?: boolean | null;
1063
- /** Location latitude. */
1064
- lat?: number | null;
1065
- /** Location longitude. */
1066
- lng?: number | null;
1067
- /** Location name. */
1068
- locationName?: string | null;
1069
- /** Sets whether view mode control is enabled. */
1070
- viewModeControl?: boolean | null;
1071
- /** Initial zoom value. */
1072
- initialZoom?: number | null;
1073
- /** Map type. `HYBRID` is a combination of the `ROADMAP` and `SATELLITE` map types. */
1074
- mapType?: MapTypeWithLiterals;
1075
- }
1076
- declare enum MapType {
1077
- /** Roadmap map type */
1078
- ROADMAP = "ROADMAP",
1079
- /** Satellite map type */
1080
- SATELITE = "SATELITE",
1081
- /** Hybrid map type */
1082
- HYBRID = "HYBRID",
1083
- /** Terrain map type */
1084
- TERRAIN = "TERRAIN"
1085
- }
1086
- /** @enumType */
1087
- type MapTypeWithLiterals = MapType | 'ROADMAP' | 'SATELITE' | 'HYBRID' | 'TERRAIN';
1088
- interface ParagraphData {
1089
- /** Styling for the paragraph text. */
1090
- textStyle?: TextStyle;
1091
- /** Indentation level from 1-4. */
1092
- indentation?: number | null;
1093
- /** Paragraph level */
1094
- level?: number | null;
1095
- }
1096
- interface PollData {
1097
- /** Styling for the poll's container. */
1098
- containerData?: PluginContainerData;
1099
- /** Poll data. */
1100
- poll?: Poll;
1101
- /** Layout settings for the poll and voting options. */
1102
- layout?: PollDataLayout;
1103
- /** Styling for the poll and voting options. */
1104
- design?: Design;
1105
- }
1106
- declare enum ViewRole {
1107
- /** Only Poll creator can view the results */
1108
- CREATOR = "CREATOR",
1109
- /** Anyone who voted can see the results */
1110
- VOTERS = "VOTERS",
1111
- /** Anyone can see the results, even if one didn't vote */
1112
- EVERYONE = "EVERYONE"
1113
- }
1114
- /** @enumType */
1115
- type ViewRoleWithLiterals = ViewRole | 'CREATOR' | 'VOTERS' | 'EVERYONE';
1116
- declare enum VoteRole {
1117
- /** Logged in member */
1118
- SITE_MEMBERS = "SITE_MEMBERS",
1119
- /** Anyone */
1120
- ALL = "ALL"
1121
- }
1122
- /** @enumType */
1123
- type VoteRoleWithLiterals = VoteRole | 'SITE_MEMBERS' | 'ALL';
1124
- interface Permissions {
1125
- /** Sets who can view the poll results. */
1126
- view?: ViewRoleWithLiterals;
1127
- /** Sets who can vote. */
1128
- vote?: VoteRoleWithLiterals;
1129
- /** Sets whether one voter can vote multiple times. Defaults to `false`. */
1130
- allowMultipleVotes?: boolean | null;
1131
- }
1132
- interface Option {
1133
- /** Option ID. */
1134
- id?: string | null;
1135
- /** Option title. */
1136
- title?: string | null;
1137
- /** The image displayed with the option. */
1138
- image?: V1Media;
1139
- }
1140
- interface PollSettings {
1141
- /** Permissions settings for voting. */
1142
- permissions?: Permissions;
1143
- /** Sets whether voters are displayed in the vote results. Defaults to `true`. */
1144
- showVoters?: boolean | null;
1145
- /** Sets whether the vote count is displayed. Defaults to `true`. */
1146
- showVotesCount?: boolean | null;
1147
- }
1148
- declare enum PollLayoutType {
1149
- /** List */
1150
- LIST = "LIST",
1151
- /** Grid */
1152
- GRID = "GRID"
1153
- }
1154
- /** @enumType */
1155
- type PollLayoutTypeWithLiterals = PollLayoutType | 'LIST' | 'GRID';
1156
- declare enum PollLayoutDirection {
1157
- /** Left-to-right */
1158
- LTR = "LTR",
1159
- /** Right-to-left */
1160
- RTL = "RTL"
1161
- }
1162
- /** @enumType */
1163
- type PollLayoutDirectionWithLiterals = PollLayoutDirection | 'LTR' | 'RTL';
1164
- interface PollLayout {
1165
- /** The layout for displaying the voting options. */
1166
- type?: PollLayoutTypeWithLiterals;
1167
- /** The direction of the text displayed in the voting options. Text can be displayed either right-to-left or left-to-right. */
1168
- direction?: PollLayoutDirectionWithLiterals;
1169
- /** Sets whether to display the main poll image. Defaults to `false`. */
1170
- enableImage?: boolean | null;
1171
- }
1172
- interface OptionLayout {
1173
- /** Sets whether to display option images. Defaults to `false`. */
1174
- enableImage?: boolean | null;
1175
- }
1176
- declare enum BackgroundType {
1177
- /** Color background type */
1178
- COLOR = "COLOR",
1179
- /** Image background type */
1180
- IMAGE = "IMAGE",
1181
- /** Gradiant background type */
1182
- GRADIENT = "GRADIENT"
1183
- }
1184
- /** @enumType */
1185
- type BackgroundTypeWithLiterals = BackgroundType | 'COLOR' | 'IMAGE' | 'GRADIENT';
1186
- interface Gradient {
1187
- /** The gradient angle in degrees. */
1188
- angle?: number | null;
1189
- /**
1190
- * The start color as a hexademical value.
1191
- * @format COLOR_HEX
1192
- */
1193
- startColor?: string | null;
1194
- /**
1195
- * The end color as a hexademical value.
1196
- * @format COLOR_HEX
1197
- */
1198
- lastColor?: string | null;
1199
- }
1200
- interface Background extends BackgroundBackgroundOneOf {
1201
- /**
1202
- * The background color as a hexademical value.
1203
- * @format COLOR_HEX
1204
- */
1205
- color?: string | null;
1206
- /** An image to use for the background. */
1207
- image?: V1Media;
1208
- /** Details for a gradient background. */
1209
- gradient?: Gradient;
1210
- /** Background type. For each option, include the relevant details. */
1211
- type?: BackgroundTypeWithLiterals;
1212
- }
1213
- /** @oneof */
1214
- interface BackgroundBackgroundOneOf {
1215
- /**
1216
- * The background color as a hexademical value.
1217
- * @format COLOR_HEX
1218
- */
1219
- color?: string | null;
1220
- /** An image to use for the background. */
1221
- image?: V1Media;
1222
- /** Details for a gradient background. */
1223
- gradient?: Gradient;
1224
- }
1225
- interface PollDesign {
1226
- /** Background styling. */
1227
- background?: Background;
1228
- /** Border radius in pixels. */
1229
- borderRadius?: number | null;
1230
- }
1231
- interface OptionDesign {
1232
- /** Border radius in pixels. */
1233
- borderRadius?: number | null;
1234
- }
1235
- interface Poll {
1236
- /** Poll ID. */
1237
- id?: string | null;
1238
- /** Poll title. */
1239
- title?: string | null;
1240
- /** Poll creator ID. */
1241
- creatorId?: string | null;
1242
- /** Main poll image. */
1243
- image?: V1Media;
1244
- /** Voting options. */
1245
- options?: Option[];
1246
- /** The poll's permissions and display settings. */
1247
- settings?: PollSettings;
1248
- }
1249
- interface PollDataLayout {
1250
- /** Poll layout settings. */
1251
- poll?: PollLayout;
1252
- /** Voting otpions layout settings. */
1253
- options?: OptionLayout;
1254
- }
1255
- interface Design {
1256
- /** Styling for the poll. */
1257
- poll?: PollDesign;
1258
- /** Styling for voting options. */
1259
- options?: OptionDesign;
1260
- }
1261
- interface TextData {
1262
- /** The text to apply decorations to. */
1263
- text?: string;
1264
- /** The decorations to apply. */
1265
- decorations?: Decoration[];
1266
- }
1267
- /** Adds appearence changes to text */
1268
- interface Decoration extends DecorationDataOneOf {
1269
- /** Data for an anchor link decoration. */
1270
- anchorData?: AnchorData;
1271
- /** Data for a color decoration. */
1272
- colorData?: ColorData;
1273
- /** Data for an external link decoration. */
1274
- linkData?: LinkData;
1275
- /** Data for a mention decoration. */
1276
- mentionData?: MentionData;
1277
- /** Data for a font size decoration. */
1278
- fontSizeData?: FontSizeData;
1279
- /** Font weight for a bold decoration. */
1280
- fontWeightValue?: number | null;
1281
- /** Data for an italic decoration. Defaults to `true`. */
1282
- italicData?: boolean | null;
1283
- /** Data for an underline decoration. Defaults to `true`. */
1284
- underlineData?: boolean | null;
1285
- /** Data for a spoiler decoration. */
1286
- spoilerData?: SpoilerData;
1287
- /** Data for a strikethrough decoration. Defaults to `true`. */
1288
- strikethroughData?: boolean | null;
1289
- /** Data for a superscript decoration. Defaults to `true`. */
1290
- superscriptData?: boolean | null;
1291
- /** Data for a subscript decoration. Defaults to `true`. */
1292
- subscriptData?: boolean | null;
1293
- /** The type of decoration to apply. */
1294
- type?: DecorationTypeWithLiterals;
1295
- }
1296
- /** @oneof */
1297
- interface DecorationDataOneOf {
1298
- /** Data for an anchor link decoration. */
1299
- anchorData?: AnchorData;
1300
- /** Data for a color decoration. */
1301
- colorData?: ColorData;
1302
- /** Data for an external link decoration. */
1303
- linkData?: LinkData;
1304
- /** Data for a mention decoration. */
1305
- mentionData?: MentionData;
1306
- /** Data for a font size decoration. */
1307
- fontSizeData?: FontSizeData;
1308
- /** Font weight for a bold decoration. */
1309
- fontWeightValue?: number | null;
1310
- /** Data for an italic decoration. Defaults to `true`. */
1311
- italicData?: boolean | null;
1312
- /** Data for an underline decoration. Defaults to `true`. */
1313
- underlineData?: boolean | null;
1314
- /** Data for a spoiler decoration. */
1315
- spoilerData?: SpoilerData;
1316
- /** Data for a strikethrough decoration. Defaults to `true`. */
1317
- strikethroughData?: boolean | null;
1318
- /** Data for a superscript decoration. Defaults to `true`. */
1319
- superscriptData?: boolean | null;
1320
- /** Data for a subscript decoration. Defaults to `true`. */
1321
- subscriptData?: boolean | null;
1322
- }
1323
- declare enum DecorationType {
1324
- BOLD = "BOLD",
1325
- ITALIC = "ITALIC",
1326
- UNDERLINE = "UNDERLINE",
1327
- SPOILER = "SPOILER",
1328
- ANCHOR = "ANCHOR",
1329
- MENTION = "MENTION",
1330
- LINK = "LINK",
1331
- COLOR = "COLOR",
1332
- FONT_SIZE = "FONT_SIZE",
1333
- EXTERNAL = "EXTERNAL",
1334
- STRIKETHROUGH = "STRIKETHROUGH",
1335
- SUPERSCRIPT = "SUPERSCRIPT",
1336
- SUBSCRIPT = "SUBSCRIPT"
1337
- }
1338
- /** @enumType */
1339
- type DecorationTypeWithLiterals = DecorationType | 'BOLD' | 'ITALIC' | 'UNDERLINE' | 'SPOILER' | 'ANCHOR' | 'MENTION' | 'LINK' | 'COLOR' | 'FONT_SIZE' | 'EXTERNAL' | 'STRIKETHROUGH' | 'SUPERSCRIPT' | 'SUBSCRIPT';
1340
- interface AnchorData {
1341
- /** The target node's ID. */
1342
- anchor?: string;
1343
- }
1344
- interface ColorData {
1345
- /** The text's background color as a hexadecimal value. */
1346
- background?: string | null;
1347
- /** The text's foreground color as a hexadecimal value. */
1348
- foreground?: string | null;
1349
- }
1350
- interface LinkData {
1351
- /** Link details. */
1352
- link?: Link;
1353
- }
1354
- interface MentionData {
1355
- /** The mentioned user's name. */
1356
- name?: string;
1357
- /** The version of the user's name that appears after the `@` character in the mention. */
1358
- slug?: string;
1359
- /** Mentioned user's ID. */
1360
- id?: string | null;
1361
- }
1362
- interface FontSizeData {
1363
- /** The units used for the font size. */
1364
- unit?: FontTypeWithLiterals;
1365
- /** Font size value. */
1366
- value?: number | null;
1367
- }
1368
- declare enum FontType {
1369
- PX = "PX",
1370
- EM = "EM"
1371
- }
1372
- /** @enumType */
1373
- type FontTypeWithLiterals = FontType | 'PX' | 'EM';
1374
- interface SpoilerData {
1375
- /** Spoiler ID. */
1376
- id?: string | null;
1377
- }
1378
- interface AppEmbedData extends AppEmbedDataAppDataOneOf {
1379
- /** Data for embedded Wix Bookings content. */
1380
- bookingData?: BookingData;
1381
- /** Data for embedded Wix Events content. */
1382
- eventData?: EventData;
1383
- /** The type of Wix App content being embedded. */
1384
- type?: AppTypeWithLiterals;
1385
- /** The ID of the embedded content. */
1386
- itemId?: string | null;
1387
- /** The name of the embedded content. */
1388
- name?: string | null;
1389
- /**
1390
- * Deprecated: Use `image` instead.
1391
- * @deprecated
1392
- */
1393
- imageSrc?: string | null;
1394
- /** The URL for the embedded content. */
1395
- url?: string | null;
1396
- /** An image for the embedded content. */
1397
- image?: V1Media;
1398
- /** Whether to hide the image. */
1399
- hideImage?: boolean | null;
1400
- /** Whether to hide the title. */
1401
- hideTitle?: boolean | null;
1402
- /** Whether to hide the price. */
1403
- hidePrice?: boolean | null;
1404
- /** Whether to hide the description (Event and Booking). */
1405
- hideDescription?: boolean | null;
1406
- /** Whether to hide the date and time (Event). */
1407
- hideDateTime?: boolean | null;
1408
- /** Whether to hide the location (Event). */
1409
- hideLocation?: boolean | null;
1410
- /** Whether to hide the duration (Booking). */
1411
- hideDuration?: boolean | null;
1412
- /** Whether to hide the button. */
1413
- hideButton?: boolean | null;
1414
- /** Whether to hide the ribbon. */
1415
- hideRibbon?: boolean | null;
1416
- /** Button styling options. */
1417
- buttonStyles?: ButtonStyles;
1418
- /** Image styling options. */
1419
- imageStyles?: ImageStyles;
1420
- /** Ribbon styling options. */
1421
- ribbonStyles?: RibbonStyles;
1422
- /** Card styling options. */
1423
- cardStyles?: CardStyles;
1424
- /** Styling for the app embed's container. */
1425
- containerData?: PluginContainerData;
1426
- /** Pricing data for embedded Wix App content. */
1427
- pricingData?: PricingData;
1428
- }
1429
- /** @oneof */
1430
- interface AppEmbedDataAppDataOneOf {
1431
- /** Data for embedded Wix Bookings content. */
1432
- bookingData?: BookingData;
1433
- /** Data for embedded Wix Events content. */
1434
- eventData?: EventData;
1435
- }
1436
- declare enum Position {
1437
- /** Image positioned at the start (left in LTR layouts, right in RTL layouts) */
1438
- START = "START",
1439
- /** Image positioned at the end (right in LTR layouts, left in RTL layouts) */
1440
- END = "END",
1441
- /** Image positioned at the top */
1442
- TOP = "TOP"
1443
- }
1444
- /** @enumType */
1445
- type PositionWithLiterals = Position | 'START' | 'END' | 'TOP';
1446
- declare enum AspectRatio {
1447
- /** 1:1 aspect ratio */
1448
- SQUARE = "SQUARE",
1449
- /** 16:9 aspect ratio */
1450
- RECTANGLE = "RECTANGLE"
1451
- }
1452
- /** @enumType */
1453
- type AspectRatioWithLiterals = AspectRatio | 'SQUARE' | 'RECTANGLE';
1454
- declare enum Resizing {
1455
- /** Fill the container, may crop the image */
1456
- FILL = "FILL",
1457
- /** Fit the image within the container */
1458
- FIT = "FIT"
1459
- }
1460
- /** @enumType */
1461
- type ResizingWithLiterals = Resizing | 'FILL' | 'FIT';
1462
- declare enum Placement {
1463
- /** Ribbon placed on the image */
1464
- IMAGE = "IMAGE",
1465
- /** Ribbon placed on the product information */
1466
- PRODUCT_INFO = "PRODUCT_INFO"
1467
- }
1468
- /** @enumType */
1469
- type PlacementWithLiterals = Placement | 'IMAGE' | 'PRODUCT_INFO';
1470
- declare enum Type {
1471
- /** Card with visible border and background */
1472
- CONTAINED = "CONTAINED",
1473
- /** Card without visible border */
1474
- FRAMELESS = "FRAMELESS"
1475
- }
1476
- /** @enumType */
1477
- type TypeWithLiterals = Type | 'CONTAINED' | 'FRAMELESS';
1478
- declare enum Alignment {
1479
- /** Content aligned to start (left in LTR layouts, right in RTL layouts) */
1480
- START = "START",
1481
- /** Content centered */
1482
- CENTER = "CENTER",
1483
- /** Content aligned to end (right in LTR layouts, left in RTL layouts) */
1484
- END = "END"
1485
- }
1486
- /** @enumType */
1487
- type AlignmentWithLiterals = Alignment | 'START' | 'CENTER' | 'END';
1488
- declare enum Layout {
1489
- /** Elements stacked vertically */
1490
- STACKED = "STACKED",
1491
- /** Elements arranged horizontally */
1492
- SIDE_BY_SIDE = "SIDE_BY_SIDE"
1493
- }
1494
- /** @enumType */
1495
- type LayoutWithLiterals = Layout | 'STACKED' | 'SIDE_BY_SIDE';
1496
- declare enum AppType {
1497
- PRODUCT = "PRODUCT",
1498
- EVENT = "EVENT",
1499
- BOOKING = "BOOKING"
1500
- }
1501
- /** @enumType */
1502
- type AppTypeWithLiterals = AppType | 'PRODUCT' | 'EVENT' | 'BOOKING';
1503
- interface BookingData {
1504
- /** Booking duration in minutes. */
1505
- durations?: string | null;
1506
- }
1507
- interface EventData {
1508
- /** Event schedule. */
1509
- scheduling?: string | null;
1510
- /** Event location. */
1511
- location?: string | null;
1512
- }
1513
- interface ButtonStyles {
1514
- /** Text to display on the button. */
1515
- buttonText?: string | null;
1516
- /** Border width in pixels. */
1517
- borderWidth?: number | null;
1518
- /** Border radius in pixels. */
1519
- borderRadius?: number | null;
1520
- /**
1521
- * Border color as a hexadecimal value.
1522
- * @format COLOR_HEX
1523
- */
1524
- borderColor?: string | null;
1525
- /**
1526
- * Text color as a hexadecimal value.
1527
- * @format COLOR_HEX
1528
- */
1529
- textColor?: string | null;
1530
- /**
1531
- * Background color as a hexadecimal value.
1532
- * @format COLOR_HEX
1533
- */
1534
- backgroundColor?: string | null;
1535
- /**
1536
- * Border color as a hexadecimal value (hover state).
1537
- * @format COLOR_HEX
1538
- */
1539
- borderColorHover?: string | null;
1540
- /**
1541
- * Text color as a hexadecimal value (hover state).
1542
- * @format COLOR_HEX
1543
- */
1544
- textColorHover?: string | null;
1545
- /**
1546
- * Background color as a hexadecimal value (hover state).
1547
- * @format COLOR_HEX
1548
- */
1549
- backgroundColorHover?: string | null;
1550
- /** Button size option, one of `SMALL`, `MEDIUM` or `LARGE`. Defaults to `MEDIUM`. */
1551
- buttonSize?: string | null;
1552
- }
1553
- interface ImageStyles {
1554
- /** Whether to hide the image. */
1555
- hideImage?: boolean | null;
1556
- /** Position of image. Defaults to `START`. */
1557
- imagePosition?: PositionWithLiterals;
1558
- /** Aspect ratio for the image. Defaults to `SQUARE`. */
1559
- aspectRatio?: AspectRatioWithLiterals;
1560
- /** How the image should be resized. Defaults to `FILL`. */
1561
- resizing?: ResizingWithLiterals;
1562
- /**
1563
- * Image border color as a hexadecimal value.
1564
- * @format COLOR_HEX
1565
- */
1566
- borderColor?: string | null;
1567
- /** Image border width in pixels. */
1568
- borderWidth?: number | null;
1569
- /** Image border radius in pixels. */
1570
- borderRadius?: number | null;
1571
- }
1572
- interface RibbonStyles {
1573
- /** Text to display on the ribbon. */
1574
- ribbonText?: string | null;
1575
- /**
1576
- * Ribbon background color as a hexadecimal value.
1577
- * @format COLOR_HEX
1578
- */
1579
- backgroundColor?: string | null;
1580
- /**
1581
- * Ribbon text color as a hexadecimal value.
1582
- * @format COLOR_HEX
1583
- */
1584
- textColor?: string | null;
1585
- /**
1586
- * Ribbon border color as a hexadecimal value.
1587
- * @format COLOR_HEX
1588
- */
1589
- borderColor?: string | null;
1590
- /** Ribbon border width in pixels. */
1591
- borderWidth?: number | null;
1592
- /** Ribbon border radius in pixels. */
1593
- borderRadius?: number | null;
1594
- /** Placement of the ribbon. Defaults to `IMAGE`. */
1595
- ribbonPlacement?: PlacementWithLiterals;
1596
- }
1597
- interface CardStyles {
1598
- /**
1599
- * Card background color as a hexadecimal value.
1600
- * @format COLOR_HEX
1601
- */
1602
- backgroundColor?: string | null;
1603
- /**
1604
- * Card border color as a hexadecimal value.
1605
- * @format COLOR_HEX
1606
- */
1607
- borderColor?: string | null;
1608
- /** Card border width in pixels. */
1609
- borderWidth?: number | null;
1610
- /** Card border radius in pixels. */
1611
- borderRadius?: number | null;
1612
- /** Card type. Defaults to `CONTAINED`. */
1613
- type?: TypeWithLiterals;
1614
- /** Content alignment. Defaults to `START`. */
1615
- alignment?: AlignmentWithLiterals;
1616
- /** Layout for title and price. Defaults to `STACKED`. */
1617
- titlePriceLayout?: LayoutWithLiterals;
1618
- /**
1619
- * Title text color as a hexadecimal value.
1620
- * @format COLOR_HEX
1621
- */
1622
- titleColor?: string | null;
1623
- /**
1624
- * Text color as a hexadecimal value.
1625
- * @format COLOR_HEX
1626
- */
1627
- textColor?: string | null;
1628
- }
1629
- interface PricingData {
1630
- /**
1631
- * Minimum numeric price value as string (e.g., "10.99").
1632
- * @decimalValue options { maxScale:2 }
1633
- */
1634
- valueFrom?: string | null;
1635
- /**
1636
- * Maximum numeric price value as string (e.g., "19.99").
1637
- * @decimalValue options { maxScale:2 }
1638
- */
1639
- valueTo?: string | null;
1640
- /**
1641
- * Numeric price value as string after discount application (e.g., "15.99").
1642
- * @decimalValue options { maxScale:2 }
1643
- */
1644
- discountedValue?: string | null;
1645
- /**
1646
- * Currency of the value in ISO 4217 format (e.g., "USD", "EUR").
1647
- * @format CURRENCY
1648
- */
1649
- currency?: string | null;
1650
- /**
1651
- * Pricing plan ID.
1652
- * @format GUID
1653
- */
1654
- pricingPlanId?: string | null;
1655
- }
1656
- interface VideoData {
1657
- /** Styling for the video's container. */
1658
- containerData?: PluginContainerData;
1659
- /** Video details. */
1660
- video?: V1Media;
1661
- /** Video thumbnail details. */
1662
- thumbnail?: V1Media;
1663
- /** Sets whether the video's download button is disabled. Defaults to `false`. */
1664
- disableDownload?: boolean | null;
1665
- /** Video title. */
1666
- title?: string | null;
1667
- /** Video options. */
1668
- options?: PlaybackOptions;
1669
- }
1670
- interface PlaybackOptions {
1671
- /** Sets whether the media will automatically start playing. */
1672
- autoPlay?: boolean | null;
1673
- /** Sets whether media's will be looped. */
1674
- playInLoop?: boolean | null;
1675
- /** Sets whether media's controls will be shown. */
1676
- showControls?: boolean | null;
1677
- }
1678
- interface EmbedData {
1679
- /** Styling for the oEmbed node's container. */
1680
- containerData?: PluginContainerData;
1681
- /** An [oEmbed](https://www.oembed.com) object. */
1682
- oembed?: Oembed;
1683
- /** Origin asset source. */
1684
- src?: string | null;
1685
- }
1686
- interface Oembed {
1687
- /** The resource type. */
1688
- type?: string | null;
1689
- /** The width of the resource specified in the `url` property in pixels. */
1690
- width?: number | null;
1691
- /** The height of the resource specified in the `url` property in pixels. */
1692
- height?: number | null;
1693
- /** Resource title. */
1694
- title?: string | null;
1695
- /** The source URL for the resource. */
1696
- url?: string | null;
1697
- /** HTML for embedding a video player. The HTML should have no padding or margins. */
1698
- html?: string | null;
1699
- /** The name of the author or owner of the resource. */
1700
- authorName?: string | null;
1701
- /** The URL for the author or owner of the resource. */
1702
- authorUrl?: string | null;
1703
- /** The name of the resource provider. */
1704
- providerName?: string | null;
1705
- /** The URL for the resource provider. */
1706
- providerUrl?: string | null;
1707
- /** The URL for a thumbnail image for the resource. If this property is defined, `thumbnailWidth` and `thumbnailHeight` must also be defined. */
1708
- thumbnailUrl?: string | null;
1709
- /** The width of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailHeight` must also be defined. */
1710
- thumbnailWidth?: string | null;
1711
- /** The height of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailWidth`must also be defined. */
1712
- thumbnailHeight?: string | null;
1713
- /** The URL for an embedded viedo. */
1714
- videoUrl?: string | null;
1715
- /** The oEmbed version number. This value must be `1.0`. */
1716
- version?: string | null;
1717
- }
1718
- interface CollapsibleListData {
1719
- /** Styling for the collapsible list's container. */
1720
- containerData?: PluginContainerData;
1721
- /** If `true`, only one item can be expanded at a time. Defaults to `false`. */
1722
- expandOnlyOne?: boolean | null;
1723
- /** Sets which items are expanded when the page loads. */
1724
- initialExpandedItems?: InitialExpandedItemsWithLiterals;
1725
- /** The direction of the text in the list. Either left-to-right or right-to-left. */
1726
- direction?: DirectionWithLiterals;
1727
- /** If `true`, The collapsible item will appear in search results as an FAQ. */
1728
- isQapageData?: boolean | null;
1729
- }
1730
- declare enum InitialExpandedItems {
1731
- /** First item will be expended initally */
1732
- FIRST = "FIRST",
1733
- /** All items will expended initally */
1734
- ALL = "ALL",
1735
- /** All items collapsed initally */
1736
- NONE = "NONE"
1737
- }
1738
- /** @enumType */
1739
- type InitialExpandedItemsWithLiterals = InitialExpandedItems | 'FIRST' | 'ALL' | 'NONE';
1740
- declare enum Direction {
1741
- /** Left-to-right */
1742
- LTR = "LTR",
1743
- /** Right-to-left */
1744
- RTL = "RTL"
1745
- }
1746
- /** @enumType */
1747
- type DirectionWithLiterals = Direction | 'LTR' | 'RTL';
1748
- interface TableData {
1749
- /** Styling for the table's container. */
1750
- containerData?: PluginContainerData;
1751
- /** The table's dimensions. */
1752
- dimensions?: Dimensions;
1753
- /**
1754
- * Deprecated: Use `rowHeader` and `columnHeader` instead.
1755
- * @deprecated
1756
- */
1757
- header?: boolean | null;
1758
- /** Sets whether the table's first row is a header. Defaults to `false`. */
1759
- rowHeader?: boolean | null;
1760
- /** Sets whether the table's first column is a header. Defaults to `false`. */
1761
- columnHeader?: boolean | null;
1762
- }
1763
- interface Dimensions {
1764
- /** An array representing relative width of each column in relation to the other columns. */
1765
- colsWidthRatio?: number[];
1766
- /** An array representing the height of each row in pixels. */
1767
- rowsHeight?: number[];
1768
- /** An array representing the minimum width of each column in pixels. */
1769
- colsMinWidth?: number[];
1770
- }
1771
- interface TableCellData {
1772
- /** Styling for the cell's background color and text alignment. */
1773
- cellStyle?: CellStyle;
1774
- /** The cell's border colors. */
1775
- borderColors?: BorderColors;
1776
- }
1777
- declare enum VerticalAlignment {
1778
- /** Top alignment */
1779
- TOP = "TOP",
1780
- /** Middle alignment */
1781
- MIDDLE = "MIDDLE",
1782
- /** Bottom alignment */
1783
- BOTTOM = "BOTTOM"
1784
- }
1785
- /** @enumType */
1786
- type VerticalAlignmentWithLiterals = VerticalAlignment | 'TOP' | 'MIDDLE' | 'BOTTOM';
1787
- interface CellStyle {
1788
- /** Vertical alignment for the cell's text. */
1789
- verticalAlignment?: VerticalAlignmentWithLiterals;
1790
- /**
1791
- * Cell background color as a hexadecimal value.
1792
- * @format COLOR_HEX
1793
- */
1794
- backgroundColor?: string | null;
1795
- }
1796
- interface BorderColors {
1797
- /**
1798
- * Left border color as a hexadecimal value.
1799
- * @format COLOR_HEX
1800
- */
1801
- left?: string | null;
1802
- /**
1803
- * Right border color as a hexadecimal value.
1804
- * @format COLOR_HEX
1805
- */
1806
- right?: string | null;
1807
- /**
1808
- * Top border color as a hexadecimal value.
1809
- * @format COLOR_HEX
1810
- */
1811
- top?: string | null;
1812
- /**
1813
- * Bottom border color as a hexadecimal value.
1814
- * @format COLOR_HEX
1815
- */
1816
- bottom?: string | null;
1817
- }
1818
- /**
1819
- * `NullValue` is a singleton enumeration to represent the null value for the
1820
- * `Value` type union.
1821
- *
1822
- * The JSON representation for `NullValue` is JSON `null`.
1823
- */
1824
- declare enum NullValue {
1825
- /** Null value. */
1826
- NULL_VALUE = "NULL_VALUE"
1827
- }
1828
- /** @enumType */
1829
- type NullValueWithLiterals = NullValue | 'NULL_VALUE';
1830
- /**
1831
- * `ListValue` is a wrapper around a repeated field of values.
1832
- *
1833
- * The JSON representation for `ListValue` is JSON array.
1834
- */
1835
- interface ListValue {
1836
- /** Repeated field of dynamically typed values. */
1837
- values?: any[];
1838
- }
1839
- interface AudioData {
1840
- /** Styling for the audio node's container. */
1841
- containerData?: PluginContainerData;
1842
- /** Audio file details. */
1843
- audio?: V1Media;
1844
- /** Sets whether the audio node's download button is disabled. Defaults to `false`. */
1845
- disableDownload?: boolean | null;
1846
- /** Cover image. */
1847
- coverImage?: V1Media;
1848
- /** Track name. */
1849
- name?: string | null;
1850
- /** Author name. */
1851
- authorName?: string | null;
1852
- /** An HTML version of the audio node. */
1853
- html?: string | null;
1854
- }
1855
- interface OrderedListData {
1856
- /** Indentation level from 0-4. */
1857
- indentation?: number;
1858
- /** Offset level from 0-4. */
1859
- offset?: number | null;
1860
- /** List start number. */
1861
- start?: number | null;
1862
- }
1863
- interface BulletedListData {
1864
- /** Indentation level from 0-4. */
1865
- indentation?: number;
1866
- /** Offset level from 0-4. */
1867
- offset?: number | null;
1868
- }
1869
- interface BlockquoteData {
1870
- /** Indentation level from 1-4. */
1871
- indentation?: number;
1872
- }
1873
- interface CaptionData {
1874
- textStyle?: TextStyle;
1875
- }
1876
- interface LayoutCellData {
1877
- /** Size of the cell in 12 columns grid. */
1878
- colSpan?: number | null;
1879
- }
1880
- interface Metadata {
1881
- /** Schema version. */
1882
- version?: number;
1883
- /**
1884
- * When the object was created.
1885
- * @readonly
1886
- * @deprecated
1887
- */
1888
- createdTimestamp?: Date | null;
1889
- /**
1890
- * When the object was most recently updated.
1891
- * @deprecated
1892
- */
1893
- updatedTimestamp?: Date | null;
1894
- /** Object ID. */
1895
- _id?: string | null;
1896
- }
1897
- interface DocumentStyle {
1898
- /** Styling for H1 nodes. */
1899
- headerOne?: TextNodeStyle;
1900
- /** Styling for H2 nodes. */
1901
- headerTwo?: TextNodeStyle;
1902
- /** Styling for H3 nodes. */
1903
- headerThree?: TextNodeStyle;
1904
- /** Styling for H4 nodes. */
1905
- headerFour?: TextNodeStyle;
1906
- /** Styling for H5 nodes. */
1907
- headerFive?: TextNodeStyle;
1908
- /** Styling for H6 nodes. */
1909
- headerSix?: TextNodeStyle;
1910
- /** Styling for paragraph nodes. */
1911
- paragraph?: TextNodeStyle;
1912
- /** Styling for block quote nodes. */
1913
- blockquote?: TextNodeStyle;
1914
- /** Styling for code block nodes. */
1915
- codeBlock?: TextNodeStyle;
1916
- }
1917
- interface TextNodeStyle {
1918
- /** The decorations to apply to the node. */
1919
- decorations?: Decoration[];
1920
- /** Padding and background color for the node. */
1921
- nodeStyle?: NodeStyle;
1922
- /** Line height for text in the node. */
1923
- lineHeight?: string | null;
1924
- }
1925
- interface Media {
1926
- /**
1927
- * Main media (image, video, etc.) associated with this product.
1928
- * @readonly
1929
- */
1930
- main?: ProductMedia;
1931
- /**
1932
- * All media items.
1933
- * > **Note:** Returned only when you pass `"MEDIA_ITEMS_INFO"` to the `fields` array in Products API requests.
1934
- */
1935
- itemsInfo?: MediaItemsInfo;
1936
- }
1937
- interface ProductMedia extends ProductMediaSetByOneOf, ProductMediaMediaOneOf {
1938
- /**
1939
- * Set media by ID of an existing file in Wix Media Manager.
1940
- * @minLength 1
1941
- * @maxLength 200
1942
- */
1943
- _id?: string;
1944
- /**
1945
- * Set media using an external media URL.
1946
- * @format WEB_URL
1947
- */
1948
- url?: string;
1949
- /**
1950
- * Product image.
1951
- * @readonly
1952
- */
1953
- image?: string;
1954
- /**
1955
- * Product video.
1956
- * @readonly
1957
- */
1958
- video?: string;
1959
- /**
1960
- * Image alt text.
1961
- * @minLength 1
1962
- * @maxLength 1000
1963
- */
1964
- altText?: string | null;
1965
- /**
1966
- * Media display name.
1967
- * Allows to override the default media name. Can be passed only when `setBy: url`.
1968
- * @maxLength 80
1969
- */
1970
- displayName?: string | null;
1971
- /**
1972
- * Media type.
1973
- * @readonly
1974
- */
1975
- mediaType?: MediaTypeWithLiterals;
1976
- /**
1977
- * Media thumbnail.
1978
- * > **Note:** Returned only when you pass `"THUMBNAIL"` to the `fields` array in Products API requests.
1979
- */
1980
- thumbnail?: Thumbnail;
1981
- /**
1982
- * ID used to upload media to Wix Media Manager.
1983
- * @readonly
1984
- * @format GUID
1985
- */
1986
- uploadId?: string;
1987
- }
1988
- /** @oneof */
1989
- interface ProductMediaSetByOneOf {
1990
- /**
1991
- * Set media by ID of an existing file in Wix Media Manager.
1992
- * @minLength 1
1993
- * @maxLength 200
1994
- */
1995
- _id?: string;
1996
- /**
1997
- * Set media using an external media URL.
1998
- * @format WEB_URL
1999
- */
2000
- url?: string;
2001
- }
2002
- /** @oneof */
2003
- interface ProductMediaMediaOneOf {
2004
- /**
2005
- * Product image.
2006
- * @readonly
2007
- */
2008
- image?: string;
2009
- /**
2010
- * Product video.
2011
- * @readonly
2012
- */
2013
- video?: string;
2014
- }
2015
- interface VideoResolution {
2016
- /**
2017
- * Video URL.
2018
- * @format WEB_URL
2019
- */
2020
- url?: string;
2021
- /** Video height. */
2022
- height?: number;
2023
- /** Video width. */
2024
- width?: number;
2025
- /**
2026
- * Video format for example, mp4, hls.
2027
- * @maxLength 200
2028
- */
2029
- format?: string;
2030
- }
2031
- declare enum MediaType {
2032
- UNKNOWN_MEDIA_TYPE = "UNKNOWN_MEDIA_TYPE",
2033
- /** Image media type. */
2034
- IMAGE = "IMAGE",
2035
- /** Video media type. */
2036
- VIDEO = "VIDEO"
2037
- }
2038
- /** @enumType */
2039
- type MediaTypeWithLiterals = MediaType | 'UNKNOWN_MEDIA_TYPE' | 'IMAGE' | 'VIDEO';
2040
- interface Thumbnail {
2041
- /**
2042
- * Thumbnail url.
2043
- * @format WEB_URL
2044
- */
2045
- url?: string;
2046
- /** Thumbnail height. */
2047
- height?: number;
2048
- /** Thumbnail width. */
2049
- width?: number;
2050
- /**
2051
- * Thumbnail alt text.
2052
- * @minLength 1
2053
- * @maxLength 1000
2054
- */
2055
- altText?: string | null;
2056
- }
2057
- interface MediaItemsInfo {
2058
- /**
2059
- * All media items (images, videos etc) associated with this product.
2060
- * @maxSize 15
2061
- */
2062
- items?: ProductMedia[];
2063
- }
2064
- /**
2065
- * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
2066
- * The search engines use this information for ranking purposes, or to display snippets in the search results.
2067
- * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
2068
- */
2069
- interface SeoSchema {
2070
- /** SEO tag information. */
2071
- tags?: Tag[];
2072
- /** SEO general settings. */
2073
- settings?: Settings;
2074
- }
2075
- interface Keyword {
2076
- /** Keyword value. */
2077
- term?: string;
2078
- /** Whether the keyword is the main focus keyword. */
2079
- isMain?: boolean;
2080
- /**
2081
- * The source that added the keyword terms to the SEO settings.
2082
- * @maxLength 1000
2083
- */
2084
- origin?: string | null;
2085
- }
2086
- interface Tag {
2087
- /**
2088
- * SEO tag type.
2089
- *
2090
- *
2091
- * Supported values: `title`, `meta`, `script`, `link`.
2092
- */
2093
- type?: string;
2094
- /**
2095
- * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
2096
- * For example: `{"name": "description", "content": "the description itself"}`.
2097
- */
2098
- props?: Record<string, any> | null;
2099
- /** SEO tag metadata. For example, `{"height": 300, "width": 240}`. */
2100
- meta?: Record<string, any> | null;
2101
- /** SEO tag inner content. For example, `<title> inner content </title>`. */
2102
- children?: string;
2103
- /** Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). */
2104
- custom?: boolean;
2105
- /** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */
2106
- disabled?: boolean;
2107
- }
2108
- interface Settings {
2109
- /**
2110
- * Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.
2111
- *
2112
- *
2113
- * Default: `false` (automatical redirect is enabled).
2114
- */
2115
- preventAutoRedirect?: boolean;
2116
- /**
2117
- * User-selected keyword terms for a specific page.
2118
- * @maxSize 5
2119
- */
2120
- keywords?: Keyword[];
2121
- }
2122
- interface ConnectedOption extends ConnectedOptionOptionSettingsOneOf {
2123
- /** Choices settings. */
2124
- choicesSettings?: ChoicesSettings;
2125
- /**
2126
- * ID of a customization with `customizationType: PRODUCT_OPTION`.
2127
- * @minLength 1
2128
- * @maxLength 36
2129
- */
2130
- _id?: string | null;
2131
- /**
2132
- * Option name.
2133
- * @minLength 1
2134
- * @maxLength 50
2135
- */
2136
- name?: string | null;
2137
- /** Option render type. */
2138
- optionRenderType?: ProductOptionRenderTypeWithLiterals;
2139
- }
2140
- /** @oneof */
2141
- interface ConnectedOptionOptionSettingsOneOf {
2142
- /** Choices settings. */
2143
- choicesSettings?: ChoicesSettings;
2144
- }
2145
- declare enum ProductOptionRenderType {
2146
- /** Not implemented. */
2147
- UNKNOWN_OPTION_RENDER_TYPE = "UNKNOWN_OPTION_RENDER_TYPE",
2148
- /** Text choices. */
2149
- TEXT_CHOICES = "TEXT_CHOICES",
2150
- /** Swatch choices. */
2151
- SWATCH_CHOICES = "SWATCH_CHOICES"
2152
- }
2153
- /** @enumType */
2154
- type ProductOptionRenderTypeWithLiterals = ProductOptionRenderType | 'UNKNOWN_OPTION_RENDER_TYPE' | 'TEXT_CHOICES' | 'SWATCH_CHOICES';
2155
- interface ChoicesSettings {
2156
- /**
2157
- * List of available choices for the option.
2158
- * @minSize 1
2159
- * @maxSize 100
2160
- * @immutable
2161
- */
2162
- choices?: ConnectedOptionChoice[];
2163
- }
2164
- interface ConnectedOptionChoice extends ConnectedOptionChoiceValueOneOf {
2165
- /**
2166
- * Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color).
2167
- * @minLength 3
2168
- * @maxLength 20
2169
- */
2170
- colorCode?: string;
2171
- /**
2172
- * The id of the choice.
2173
- * @format GUID
2174
- */
2175
- choiceId?: string | null;
2176
- /**
2177
- * Product media overrides. When not empty only these images will be shown when such choices selected by customer. Otherwise all images of product.
2178
- * When several choices from different options selected only media filter present in `media_overrides` of ALL choices will be shown.
2179
- * For example if Color:red has images 1,2,3 and Material:Silk has images 2,3,5 then only images 2,3 will be shown when both of them selected.
2180
- * @maxSize 100
2181
- */
2182
- linkedMedia?: ProductMedia[];
2183
- /** The type of this choice. */
2184
- choiceType?: ChoiceTypeWithLiterals;
2185
- /**
2186
- * Choice name.
2187
- * @minLength 1
2188
- * @maxLength 50
2189
- */
2190
- name?: string | null;
2191
- /**
2192
- * A flag that indicates if at least one variant with this choice is in stock in the default store's location.
2193
- * For example, a product with 'Color' and 'Size' options with variants: [Blue, Small] which is out of stock and [Red Large] which is in stock. For choice 'Blue' ths flag will be 'false' and for 'Red' the flag will be true
2194
- * @readonly
2195
- */
2196
- inStock?: boolean;
2197
- /**
2198
- * Whether at least one variant with this choice is visible.
2199
- *
2200
- * Default: `false`
2201
- * @readonly
2202
- */
2203
- visible?: boolean;
2204
- }
2205
- /** @oneof */
2206
- interface ConnectedOptionChoiceValueOneOf {
2207
- /**
2208
- * Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color).
2209
- * @minLength 3
2210
- * @maxLength 20
2211
- */
2212
- colorCode?: string;
2213
- }
2214
- declare enum ChoiceType {
2215
- UNKNOWN_CHOICE_TYPE = "UNKNOWN_CHOICE_TYPE",
2216
- /** Text choice. */
2217
- CHOICE_TEXT = "CHOICE_TEXT",
2218
- /** Single color choice. */
2219
- ONE_COLOR = "ONE_COLOR",
2220
- /** Multiple colors choice. */
2221
- MULTIPLE_COLORS = "MULTIPLE_COLORS",
2222
- /** Image choice. */
2223
- IMAGE = "IMAGE"
2224
- }
2225
- /** @enumType */
2226
- type ChoiceTypeWithLiterals = ChoiceType | 'UNKNOWN_CHOICE_TYPE' | 'CHOICE_TEXT' | 'ONE_COLOR' | 'MULTIPLE_COLORS' | 'IMAGE';
2227
- interface MultipleColors {
2228
- /**
2229
- * List of color codes.
2230
- * @minLength 3
2231
- * @maxLength 20
2232
- * @minSize 2
2233
- * @maxSize 2
2234
- */
2235
- colorCodes?: string[];
2236
- }
2237
- interface ConnectedModifier extends ConnectedModifierModifierSettingsOneOf {
2238
- /** Free text modifier settings. */
2239
- freeTextSettings?: FreeTextSettings;
2240
- /** Choice settings. */
2241
- choicesSettings?: ModifierChoicesSettings;
2242
- /**
2243
- * ID of a customization with `customizationType: MODIFIER`.
2244
- * @minLength 1
2245
- * @maxLength 36
2246
- */
2247
- _id?: string | null;
2248
- /**
2249
- * Modifier title.
2250
- * @minLength 1
2251
- * @maxLength 50
2252
- */
2253
- name?: string | null;
2254
- /** Modifier render type. */
2255
- modifierRenderType?: ModifierRenderTypeWithLiterals;
2256
- /** Whether customer input is required for this modifier. */
2257
- mandatory?: boolean;
2258
- }
2259
- /** @oneof */
2260
- interface ConnectedModifierModifierSettingsOneOf {
2261
- /** Free text modifier settings. */
2262
- freeTextSettings?: FreeTextSettings;
2263
- /** Choice settings. */
2264
- choicesSettings?: ModifierChoicesSettings;
2265
- }
2266
- declare enum ModifierRenderType {
2267
- /** Not implemented. */
2268
- UNKNOWN_MODIFIER_RENDER_TYPE = "UNKNOWN_MODIFIER_RENDER_TYPE",
2269
- /** Free text. */
2270
- FREE_TEXT = "FREE_TEXT",
2271
- /** Text choices. */
2272
- TEXT_CHOICES = "TEXT_CHOICES",
2273
- /** Swatch choices. */
2274
- SWATCH_CHOICES = "SWATCH_CHOICES"
2275
- }
2276
- /** @enumType */
2277
- type ModifierRenderTypeWithLiterals = ModifierRenderType | 'UNKNOWN_MODIFIER_RENDER_TYPE' | 'FREE_TEXT' | 'TEXT_CHOICES' | 'SWATCH_CHOICES';
2278
- interface FreeTextSettings {
2279
- /** Minimum number of characters. */
2280
- minCharCount?: number;
2281
- /**
2282
- * Maximum number of characters.
2283
- * @max 500
2284
- */
2285
- maxCharCount?: number;
2286
- /**
2287
- * Default amount to be added to the product's price.
2288
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
2289
- */
2290
- defaultAddedPrice?: string | null;
2291
- /**
2292
- * Title of the text to be input by the customer.
2293
- * @minLength 1
2294
- * @maxLength 150
2295
- */
2296
- title?: string;
2297
- }
2298
- interface ModifierChoicesSettings {
2299
- /**
2300
- * List of modifier choices.
2301
- * @minSize 1
2302
- * @maxSize 100
2303
- * @immutable
2304
- */
2305
- choices?: ConnectedModifierChoice[];
2306
- }
2307
- interface ConnectedModifierChoice extends ConnectedModifierChoiceValueOneOf {
2308
- /**
2309
- * Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color).
2310
- * @minLength 3
2311
- * @maxLength 20
2312
- */
2313
- colorCode?: string;
2314
- /**
2315
- * Choice ID.
2316
- * @format GUID
2317
- */
2318
- choiceId?: string | null;
2319
- /**
2320
- * Product media.
2321
- * @maxSize 100
2322
- */
2323
- linkedMedia?: ProductMedia[];
2324
- /** Choice type. */
2325
- choiceType?: ChoiceTypeWithLiterals;
2326
- /**
2327
- * Modifier key. Used for eCommerce integration.
2328
- * @readonly
2329
- * @minLength 1
2330
- * @maxLength 50
2331
- */
2332
- key?: string;
2333
- /**
2334
- * Choice name.
2335
- * @minLength 1
2336
- * @maxLength 50
2337
- */
2338
- name?: string | null;
2339
- /**
2340
- * Added price.
2341
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
2342
- */
2343
- addedPrice?: string | null;
2344
- }
2345
- /** @oneof */
2346
- interface ConnectedModifierChoiceValueOneOf {
2347
- /**
2348
- * Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color).
2349
- * @minLength 3
2350
- * @maxLength 20
2351
- */
2352
- colorCode?: string;
2353
- }
2354
- interface Brand {
2355
- /**
2356
- * Brand ID.
2357
- * @format GUID
2358
- */
2359
- _id?: string | null;
2360
- /**
2361
- * Brand name.
2362
- * @maxLength 50
2363
- */
2364
- name?: string | null;
2365
- }
2366
- interface InfoSection {
2367
- /**
2368
- * Info section ID.
2369
- * @format GUID
2370
- */
2371
- _id?: string | null;
2372
- /**
2373
- * Info section unique name.
2374
- * > **Note:** Returned only when you pass `"INFO_SECTION"` to the `fields` array in Products API requests.
2375
- * @maxLength 100
2376
- */
2377
- uniqueName?: string | null;
2378
- /**
2379
- * Info section title.
2380
- * > **Note:** Returned only when you pass `"INFO_SECTION"` to the `fields` array in Products API requests.
2381
- * @minLength 1
2382
- * @maxLength 50
2383
- * @readonly
2384
- */
2385
- title?: string | null;
2386
- /**
2387
- * Info section description using rich content.
2388
- * > **Note:** Returned only when you pass `"INFO_SECTION_DESCRIPTION"` to the `fields` array in Products API requests.
2389
- *
2390
- * <widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="indent.emoji.divider.codeBlock.file.gallery.giphy.image.table.link.textHighlight.textColor" exampleid="7dc9240e-d548-417a-abcf-0291b68b4303">
2391
- * <a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>
2392
- * </widget>
2393
- * @readonly
2394
- */
2395
- description?: RichContent;
2396
- /**
2397
- * Info section description in HTML.
2398
- *
2399
- * When provided on create/update, this string must be a valid HTML. It will then be converted to rich content.
2400
- * `plainDescription` is ignored when value is also passed to the `description` field.
2401
- * > **Note:** Returned only when you pass `"INFO_SECTION_PLAIN_DESCRIPTION"` to the `fields` array in Products API requests.
2402
- * @maxLength 16000
2403
- */
2404
- plainDescription?: string | null;
2405
- }
2406
- interface Ribbon {
2407
- /**
2408
- * Ribbon ID.
2409
- * @minLength 1
2410
- * @maxLength 36
2411
- */
2412
- _id?: string | null;
2413
- /**
2414
- * Ribbon name.
2415
- * @maxLength 30
2416
- */
2417
- name?: string | null;
2418
- }
2419
- declare enum ProductType {
2420
- /** Not implemented. */
2421
- UNKNOWN_PRODUCT_TYPE = "UNKNOWN_PRODUCT_TYPE",
2422
- /** Physical product. */
2423
- PHYSICAL = "PHYSICAL",
2424
- /** Digital product. */
2425
- DIGITAL = "DIGITAL"
2426
- }
2427
- /** @enumType */
2428
- type ProductTypeWithLiterals = ProductType | 'UNKNOWN_PRODUCT_TYPE' | 'PHYSICAL' | 'DIGITAL';
2429
- interface PhysicalProperties {
2430
- /**
2431
- * Price per unit settings.
2432
- * > **Note:** Use this field only when relevant. For example, for products that are sold by weight, volume, or length.
2433
- */
2434
- pricePerUnit?: PricePerUnitSettings;
2435
- /**
2436
- * Fulfiller ID.
2437
- * @format GUID
2438
- */
2439
- fulfillerId?: string | null;
2440
- /**
2441
- * Product shipping weight range - Calculated from the lightest and heaviest variant shipping weights.
2442
- * @readonly
2443
- */
2444
- shippingWeightRange?: WeightRange;
2445
- /**
2446
- * Product price per unit range. The minimum and maximum price per unit of all the variants.
2447
- * @readonly
2448
- */
2449
- pricePerUnitRange?: PricePerUnitRange;
2450
- /**
2451
- * Weight measurement unit.
2452
- * > **Note:** Returned only when you pass `"WEIGHT_MEASUREMENT_UNIT_INFO"` to the `fields` array in Products API requests.
2453
- * @readonly
2454
- */
2455
- weightMeasurementUnitInfo?: WeightMeasurementUnitInfo;
2456
- /**
2457
- * Delivery profile ID.
2458
- * @format GUID
2459
- */
2460
- deliveryProfileId?: string | null;
2461
- }
2462
- interface PricePerUnitSettings {
2463
- /**
2464
- * Quantity.
2465
- * For example, to define price per per 100 grams, set this field to `100`.
2466
- * @min 0.01
2467
- * @max 999999999.99
2468
- */
2469
- quantity?: number;
2470
- /**
2471
- * Measurement unit.
2472
- * For example, to define price per 100 grams, set this field to "G".
2473
- */
2474
- measurementUnit?: MeasurementUnitWithLiterals;
2475
- }
2476
- declare enum MeasurementUnit {
2477
- UNSPECIFIED = "UNSPECIFIED",
2478
- ML = "ML",
2479
- CL = "CL",
2480
- L = "L",
2481
- CBM = "CBM",
2482
- MG = "MG",
2483
- G = "G",
2484
- KG = "KG",
2485
- MM = "MM",
2486
- CM = "CM",
2487
- M = "M",
2488
- SQM = "SQM",
2489
- OZ = "OZ",
2490
- LB = "LB",
2491
- FLOZ = "FLOZ",
2492
- PT = "PT",
2493
- QT = "QT",
2494
- GAL = "GAL",
2495
- IN = "IN",
2496
- FT = "FT",
2497
- YD = "YD",
2498
- SQFT = "SQFT"
2499
- }
2500
- /** @enumType */
2501
- type MeasurementUnitWithLiterals = MeasurementUnit | 'UNSPECIFIED' | 'ML' | 'CL' | 'L' | 'CBM' | 'MG' | 'G' | 'KG' | 'MM' | 'CM' | 'M' | 'SQM' | 'OZ' | 'LB' | 'FLOZ' | 'PT' | 'QT' | 'GAL' | 'IN' | 'FT' | 'YD' | 'SQFT';
2502
- interface WeightRange {
2503
- /**
2504
- * Minimum weight across all variants associated with this product.
2505
- * @max 999999999.99
2506
- */
2507
- minValue?: number;
2508
- /**
2509
- * Maximum weight across all variants associated with this product.
2510
- * @max 999999999.99
2511
- */
2512
- maxValue?: number;
2513
- }
2514
- interface PricePerUnitRange {
2515
- /** Minimum price per unit across all variants. */
2516
- minValue?: PricePerUnitRangePricePerUnit;
2517
- /** Maximum price per unit across all variants. */
2518
- maxValue?: PricePerUnitRangePricePerUnit;
2519
- }
2520
- interface PricePerUnitRangePricePerUnit {
2521
- /**
2522
- * Calculated value of price per unit. Takes into account pricePerUnit settings of product and variants and price of variants.
2523
- * For example if discounted price is 2$, product's price per unit setting is 1 Kg, variant price per unit setting is 0.5 Kg then this value is 4$ (means variant weight is 0.5 Kg and it costs 2$ but we want to show price per 1 Kg so we show 4$).
2524
- * @readonly
2525
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
2526
- */
2527
- value?: string;
2528
- /**
2529
- * Price per unit info in the format of variant specific data / product setting, for example €4.00 / 1 Kg.
2530
- * > **Note:** This field is returned by the API only when you pass `fields: "CURRENCY"` in a request.
2531
- * @readonly
2532
- * @maxLength 100
2533
- */
2534
- description?: string | null;
2535
- }
2536
- interface WeightMeasurementUnitInfo {
2537
- /**
2538
- * Weight measurement unit.
2539
- * @readonly
2540
- */
2541
- weightMeasurementUnit?: WeightUnitWithLiterals;
2542
- }
2543
- declare enum WeightUnit {
2544
- /** Weight unit can't be classified due to an error. */
2545
- UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
2546
- /** Kilograms. */
2547
- KG = "KG",
2548
- /** Pounds. */
2549
- LB = "LB"
2550
- }
2551
- /** @enumType */
2552
- type WeightUnitWithLiterals = WeightUnit | 'UNSPECIFIED_WEIGHT_UNIT' | 'KG' | 'LB';
2553
- interface VariantsInfo {
2554
- /**
2555
- * List of related variants.
2556
- * Partial update of variants is not supported so on update you must pass all data for all of them.
2557
- * If you want to update existing variant you must provide `id`, otherwise new variant with different id will be created which might break some integrations that rely on variant ids.
2558
- * @minSize 1
2559
- * @maxSize 1000
2560
- */
2561
- variants?: VariantWithInventory[];
2562
- }
2563
- interface VariantWithInventory extends VariantWithInventoryTypedPropertiesOneOf {
2564
- /** Physical properties. Must be passed when `productType: PHYSICAL` */
2565
- physicalProperties?: VariantPhysicalProperties;
2566
- /** Digital properties. Must be passed when `productType: DIGITAL` */
2567
- digitalProperties?: VariantDigitalProperties;
2568
- /**
2569
- * Variant ID.
2570
- * @format GUID
2571
- * @immutable
2572
- */
2573
- _id?: string | null;
2574
- /**
2575
- * Whether the variant is visible to site visitors.
2576
- *
2577
- * Default: `true`
2578
- */
2579
- visible?: boolean | null;
2580
- /**
2581
- * Variant SKU (stock keeping unit).
2582
- * @minLength 1
2583
- * @maxLength 40
2584
- */
2585
- sku?: string | null;
2586
- /**
2587
- * Variant barcode.
2588
- * @minLength 1
2589
- * @maxLength 40
2590
- */
2591
- barcode?: string | null;
2592
- /** Variant price. */
2593
- price?: PriceInfo;
2594
- /**
2595
- * Variant revenue details.
2596
- *
2597
- * > **Note:** Returned only when the following conditions are met:
2598
- * > + You pass `"MERCHANT_DATA"` to the `fields` array in Products API requests.
2599
- * > + Your app has the required `SCOPE.STORES.PRODUCT_READ_ADMIN` permission scope.
2600
- */
2601
- revenueDetails?: RevenueDetails;
2602
- /** Inventory item of the variant on the default location. */
2603
- inventoryItem?: InventoryItemComposite;
2604
- /**
2605
- * List of choices.
2606
- * @maxSize 6
2607
- * @immutable
2608
- */
2609
- choices?: OptionChoiceReferences[];
2610
- }
2611
- /** @oneof */
2612
- interface VariantWithInventoryTypedPropertiesOneOf {
2613
- /** Physical properties. Must be passed when `productType: PHYSICAL` */
2614
- physicalProperties?: VariantPhysicalProperties;
2615
- /** Digital properties. Must be passed when `productType: DIGITAL` */
2616
- digitalProperties?: VariantDigitalProperties;
2617
- }
2618
- interface PriceInfo {
2619
- /** Variant price. Must be greater or equal to 0. */
2620
- actualPrice?: FixedMonetaryAmount;
2621
- /** The compare-at-price represents the original price of a product before any discount. It is optional and should only be set if a discount applies. When set, it must be higher than the current price to reflect accurate savings. */
2622
- compareAtPrice?: FixedMonetaryAmount;
2623
- }
2624
- interface FixedMonetaryAmount {
2625
- /**
2626
- * Monetary amount. For example, `"3.99"`, or `"-4.99"` for a negative amount.
2627
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
2628
- */
2629
- amount?: string;
2630
- /**
2631
- * Formatted monetary amount. For example, `"$3.99"`.
2632
- * > **Note:** Returned only when you pass `"CURRENCY"` to the `fields` array in Products API requests.
2633
- * @readonly
2634
- * @maxLength 20
2635
- */
2636
- formattedAmount?: string | null;
2637
- }
2638
- interface RevenueDetails {
2639
- /** Item cost. */
2640
- cost?: FixedMonetaryAmount;
2641
- /**
2642
- * Profit. Calculated by reducing `cost` from `discountedPrice`.
2643
- * @readonly
2644
- */
2645
- profit?: FixedMonetaryAmount;
2646
- /**
2647
- * Profit Margin. Calculated by dividing `profit` by `discountedPrice`.
2648
- * The result is rounded to 4 decimal places.
2649
- * @readonly
2650
- * @max 1
2651
- */
2652
- profitMargin?: number;
2653
- }
2654
- interface VariantPhysicalProperties {
2655
- /**
2656
- * Variant shipping weight.
2657
- * product.physicalProperties.shipping_weight_range values are taken from here.
2658
- * @max 999999999.99
2659
- */
2660
- weight?: number | null;
2661
- /**
2662
- * Price per unit info, in order to show price per unit on the product page.
2663
- * For example if one sells cheese and defines 100g here then we know that buying this variant buyer receives 100g of cheese.
2664
- * But on product page price will be displayed for units defined on product level. See `pricePerUnit.value` to understand how it's calculated.
2665
- */
2666
- pricePerUnit?: PricePerUnit;
2667
- }
2668
- interface PricePerUnit {
2669
- /**
2670
- * Price per unit data for this variant.
2671
- * `measurementUnit` value must correspond to the measurement unit set on the product.
2672
- */
2673
- settings?: PricePerUnitSettings;
2674
- /**
2675
- * Calculated value of price per unit. Takes into account `pricePerUnit` settings of parent product, of this variant, and discounted price of variant.
2676
- * For example if discounted price is 2$, product's price per unit setting is 1 Kg, variant price per unit setting is 0.5 Kg then this value is 4$ (means variant weight is 0.5 Kg and it costs 2$ but we want to show price per 1 Kg so we show 4$).
2677
- * @readonly
2678
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
2679
- */
2680
- value?: string;
2681
- /**
2682
- * Price per unit description.
2683
- * > **Note:** Returned only when you pass `"CURRENCY"` to the `fields` array in Products API requests.
2684
- * @readonly
2685
- * @maxLength 100
2686
- */
2687
- description?: string | null;
2688
- }
2689
- interface VariantDigitalProperties {
2690
- /** Digital file which will be downloaded by customer after successful purchase. */
2691
- digitalFile?: SecuredMedia;
2692
- }
2693
- interface SecuredMedia {
2694
- /**
2695
- * Media ID in media manager.
2696
- * @minLength 1
2697
- * @maxLength 100
2698
- */
2699
- _id?: string;
2700
- /**
2701
- * Original file name.
2702
- * @minLength 1
2703
- * @maxLength 1000
2704
- * @readonly
2705
- */
2706
- fileName?: string;
2707
- /**
2708
- * Original file size.
2709
- * @minLength 1
2710
- * @maxLength 1000
2711
- * @readonly
2712
- * @format DECIMAL_VALUE
2713
- * @decimalValue options { maxScale:0 }
2714
- */
2715
- fileSize?: string | null;
2716
- /**
2717
- * File type.
2718
- * @readonly
2719
- */
2720
- fileType?: FileTypeWithLiterals;
2721
- }
2722
- declare enum FileType {
2723
- /** Unspecified file type. */
2724
- UNSPECIFIED = "UNSPECIFIED",
2725
- /** Secure picture file. */
2726
- SECURE_PICTURE = "SECURE_PICTURE",
2727
- /** Secure video file. */
2728
- SECURE_VIDEO = "SECURE_VIDEO",
2729
- /** Secure document file. */
2730
- SECURE_DOCUMENT = "SECURE_DOCUMENT",
2731
- /** Secure music file. */
2732
- SECURE_MUSIC = "SECURE_MUSIC",
2733
- /** Secure archive file. */
2734
- SECURE_ARCHIVE = "SECURE_ARCHIVE"
2735
- }
2736
- /** @enumType */
2737
- type FileTypeWithLiterals = FileType | 'UNSPECIFIED' | 'SECURE_PICTURE' | 'SECURE_VIDEO' | 'SECURE_DOCUMENT' | 'SECURE_MUSIC' | 'SECURE_ARCHIVE';
2738
- interface InventoryItemComposite extends InventoryItemCompositeTrackingMethodOneOf {
2739
- /**
2740
- * Tracking method - in stock.
2741
- *
2742
- * When set to `true`, the item is available for sale without a quantity limit.
2743
- */
2744
- inStock?: boolean;
2745
- /**
2746
- * Tracking method - quantity left in inventory.
2747
- *
2748
- * Quantity can be negative when decrementing inventory for an order that has already been paid.
2749
- * @min -99999
2750
- * @max 99999
2751
- */
2752
- quantity?: number;
2753
- /**
2754
- * Inventory item ID.
2755
- * If you want to update existing inventory item you must provide id,
2756
- * otherwise new inventory item with different id will be created.
2757
- * @format GUID
2758
- * @readonly
2759
- */
2760
- _id?: string | null;
2761
- /**
2762
- * Inventory item revision.
2763
- * @readonly
2764
- */
2765
- revision?: string | null;
2766
- /** Item preorder info. */
2767
- preorderInfo?: PreorderInfo;
2768
- }
2769
- /** @oneof */
2770
- interface InventoryItemCompositeTrackingMethodOneOf {
2771
- /**
2772
- * Tracking method - in stock.
2773
- *
2774
- * When set to `true`, the item is available for sale without a quantity limit.
2775
- */
2776
- inStock?: boolean;
2777
- /**
2778
- * Tracking method - quantity left in inventory.
2779
- *
2780
- * Quantity can be negative when decrementing inventory for an order that has already been paid.
2781
- * @min -99999
2782
- * @max 99999
2783
- */
2784
- quantity?: number;
2785
- }
2786
- interface PreorderInfo {
2787
- /**
2788
- * Whether preorder is enabled for the product.
2789
- *
2790
- * Default: `false`
2791
- */
2792
- enabled?: boolean | null;
2793
- /**
2794
- * A message the customer will see when the item is out of stock and preorder is enabled.
2795
- * @minLength 1
2796
- * @maxLength 250
2797
- */
2798
- message?: string | null;
2799
- /**
2800
- * Number of products that can be preordered after stock reaches zero.
2801
- * Supported only for inventory items with `trackQuantity = true`.
2802
- *
2803
- * Default: `100000`
2804
- * @max 100000
2805
- */
2806
- limit?: number | null;
2807
- /**
2808
- * Number of times the product was preordered.
2809
- *
2810
- * Supported only for inventory items with `trackQuantity = true`.
2811
- * @readonly
2812
- * @max 99999
2813
- */
2814
- counter?: number | null;
2815
- /**
2816
- * Quantity of products that can be preordered.
2817
- *
2818
- * Supported only for inventory items with `trackQuantity = true`.
2819
- * @readonly
2820
- */
2821
- quantity?: number | null;
2822
- }
2823
- interface OptionChoiceReferences {
2824
- /** Option and choice IDs. */
2825
- optionChoiceIds?: OptionChoiceIds;
2826
- /** Option and choice names. */
2827
- optionChoiceNames?: OptionChoiceNames;
2828
- }
2829
- interface OptionChoiceIds {
2830
- /**
2831
- * Option ID.
2832
- * @minLength 1
2833
- * @maxLength 36
2834
- * @immutable
2835
- */
2836
- optionId?: string;
2837
- /**
2838
- * Choice ID.
2839
- * @format GUID
2840
- * @immutable
2841
- */
2842
- choiceId?: string;
2843
- }
2844
- interface OptionChoiceNames {
2845
- /**
2846
- * Option name.
2847
- * @minLength 1
2848
- */
2849
- optionName?: string;
2850
- /**
2851
- * Choice name.
2852
- * @minLength 1
2853
- */
2854
- choiceName?: string;
2855
- /** Render type. */
2856
- renderType?: ProductOptionRenderTypeWithLiterals;
2857
- }
2858
- interface SubscriptionDetails {
2859
- /**
2860
- * Subscriptions.
2861
- * @minSize 1
2862
- * @maxSize 6
2863
- */
2864
- subscriptions?: Subscription[];
2865
- /**
2866
- * Whether to allow one-time purchases in addition to subscription-based purchases.
2867
- *
2868
- * Default: `false`
2869
- */
2870
- allowOneTimePurchases?: boolean | null;
2871
- }
2872
- interface Subscription extends SubscriptionCyclesOneOf {
2873
- /** Whether subscription is renewed automatically at the end of each period. Cannot be `false`, instead set `billingCycles`. */
2874
- autoRenewal?: boolean;
2875
- /**
2876
- * Number of billing cycles before subscription ends.
2877
- * @min 2
2878
- * @max 999
2879
- */
2880
- billingCycles?: number;
2881
- /**
2882
- * Subscription ID.
2883
- * @format GUID
2884
- * @immutable
2885
- */
2886
- _id?: string | null;
2887
- /**
2888
- * Subscription title.
2889
- * @minLength 1
2890
- * @maxLength 20
2891
- */
2892
- title?: string;
2893
- /**
2894
- * Subscription description.
2895
- * @maxLength 60
2896
- */
2897
- description?: string | null;
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { CatalogImport, ProductItem, AddProductsToImportResponse, SubmitCatalogImportResponse, SubmitCatalogImportApplicationErrors } from './index.typings.mjs';
3
+ export { ActionEvent, AddProductResult, AddProductsToImportRequest, Alignment, AlignmentWithLiterals, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, ApplicationError, AspectRatio, AspectRatioWithLiterals, AudioData, Background, BackgroundBackgroundOneOf, BackgroundType, BackgroundTypeWithLiterals, BlockquoteData, BookingData, Border, BorderColors, Brand, BulkActionMetadata, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CatalogImportAlreadySubmittedErrorData, CellStyle, ChoiceType, ChoiceTypeWithLiterals, ChoicesSettings, CodeBlockData, CollapsibleListData, ColorData, Colors, ConnectedModifier, ConnectedModifierChoice, ConnectedModifierChoiceValueOneOf, ConnectedModifierModifierSettingsOneOf, ConnectedOption, ConnectedOptionChoice, ConnectedOptionChoiceValueOneOf, ConnectedOptionOptionSettingsOneOf, CreateCatalogImportRequest, CreateCatalogImportResponse, Crop, CropWithLiterals, Decoration, DecorationDataOneOf, DecorationType, DecorationTypeWithLiterals, Design, Dimensions, Direction, DirectionWithLiterals, DiscountType, DiscountTypeWithLiterals, DividerData, DividerDataAlignment, DividerDataAlignmentWithLiterals, DocumentStyle, DomainEvent, DomainEventBodyOneOf, EmbedData, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, ExtendedFields, FileData, FileSource, FileSourceDataOneOf, FileType, FileTypeWithLiterals, FixedMonetaryAmount, FontSizeData, FontType, FontTypeWithLiterals, FreeTextSettings, GIF, GIFData, GIFType, GIFTypeWithLiterals, GalleryData, GalleryOptions, GalleryOptionsLayout, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, ImageStyles, InfoSection, InitialExpandedItems, InitialExpandedItemsWithLiterals, InventoryItemComposite, InventoryItemCompositeTrackingMethodOneOf, Item, ItemDataOneOf, ItemMetadata, ItemStyle, Keyword, Layout, LayoutCellData, LayoutType, LayoutTypeWithLiterals, LayoutWithLiterals, LineStyle, LineStyleWithLiterals, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListValue, MapData, MapSettings, MapType, MapTypeWithLiterals, MeasurementUnit, MeasurementUnitWithLiterals, Media, MediaItemsInfo, MediaType, MediaTypeWithLiterals, MentionData, MessageEnvelope, Metadata, ModifierChoicesSettings, ModifierRenderType, ModifierRenderTypeWithLiterals, MultipleColors, Node, NodeDataOneOf, NodeStyle, NodeType, NodeTypeWithLiterals, NullValue, NullValueWithLiterals, Oembed, Option, OptionChoiceIds, OptionChoiceNames, OptionChoiceReferences, OptionDesign, OptionLayout, OrderedListData, Orientation, OrientationWithLiterals, PDFSettings, ParagraphData, Permissions, PhysicalProperties, Placement, PlacementWithLiterals, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataAlignmentWithLiterals, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutDirectionWithLiterals, PollLayoutType, PollLayoutTypeWithLiterals, PollSettings, Position, PositionWithLiterals, PreorderInfo, PriceInfo, PricePerUnit, PricePerUnitRange, PricePerUnitRangePricePerUnit, PricePerUnitSettings, PricingData, ProductCategoryIdsInfo, ProductMedia, ProductMediaMediaOneOf, ProductMediaSetByOneOf, ProductOptionRenderType, ProductOptionRenderTypeWithLiterals, ProductType, ProductTypeWithLiterals, ProductWithInventory, ProductWithInventoryTypedPropertiesOneOf, Rel, Resizing, ResizingWithLiterals, RestoreInfo, RevenueDetails, Ribbon, RibbonStyles, RichContent, SecuredMedia, SeoSchema, Settings, Source, SourceWithLiterals, Spoiler, SpoilerData, Styles, StylesBorder, StylesPosition, StylesPositionWithLiterals, SubmitCatalogImportRequest, Subscription, SubscriptionCyclesOneOf, SubscriptionDetails, SubscriptionDiscount, SubscriptionDiscountDiscountOneOf, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, TableCellData, TableData, Tag, Target, TargetWithLiterals, TextAlignment, TextAlignmentWithLiterals, TextData, TextNodeStyle, TextStyle, Thumbnail, Thumbnails, ThumbnailsAlignment, ThumbnailsAlignmentWithLiterals, Type, TypeWithLiterals, V1Media, VariantDigitalProperties, VariantPhysicalProperties, VariantWithInventory, VariantWithInventoryTypedPropertiesOneOf, VariantsInfo, VerticalAlignment, VerticalAlignmentWithLiterals, Video, VideoData, VideoResolution, ViewMode, ViewModeWithLiterals, ViewRole, ViewRoleWithLiterals, VoteRole, VoteRoleWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightMeasurementUnitInfo, WeightRange, WeightUnit, WeightUnitWithLiterals, Width, WidthType, WidthTypeWithLiterals, WidthWithLiterals } from './index.typings.mjs';
4
+
5
+ declare function createCatalogImport$1(httpClient: HttpClient): CreateCatalogImportSignature;
6
+ interface CreateCatalogImportSignature {
2898
7
  /**
2899
- * Whether the subscription is visible to site visitors.
8
+ * Creates a CatalogImport for upsert product operations.
2900
9
  *
2901
- * Default: `true`
2902
- */
2903
- visible?: boolean | null;
2904
- /**
2905
- * Frequency of recurring payment.
2906
- * For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months.
2907
- */
2908
- frequency?: SubscriptionFrequencyWithLiterals;
2909
- /**
2910
- * Interval of recurring payment. Default: `1`. For example, if `frequency: MONTH`, `billingCycles: 3` and `interval: 2`; payment will be made every 2 months for a total of 6 months.
2911
- * @min 1
2912
- * @max 50
2913
- */
2914
- interval?: number | null;
2915
- /**
2916
- * Discount info (optional).
2917
- * For example, a $20 discount would be `amount: 20`, `type: AMOUNT`.
2918
- */
2919
- discount?: SubscriptionDiscount;
2920
- }
2921
- /** @oneof */
2922
- interface SubscriptionCyclesOneOf {
2923
- /** Whether subscription is renewed automatically at the end of each period. Cannot be `false`, instead set `billingCycles`. */
2924
- autoRenewal?: boolean;
2925
- /**
2926
- * Number of billing cycles before subscription ends.
2927
- * @min 2
2928
- * @max 999
2929
- */
2930
- billingCycles?: number;
2931
- }
2932
- /** Frequency unit of recurring payment */
2933
- declare enum SubscriptionFrequency {
2934
- UNDEFINED = "UNDEFINED",
2935
- DAY = "DAY",
2936
- WEEK = "WEEK",
2937
- MONTH = "MONTH",
2938
- YEAR = "YEAR"
2939
- }
2940
- /** @enumType */
2941
- type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
2942
- interface SubscriptionDiscount extends SubscriptionDiscountDiscountOneOf {
2943
- /**
2944
- * Amount to discount from the variant discounted_price.
2945
- * @decimalValue options { gt:0, lte:999999999, maxScale:3 }
2946
- */
2947
- amountOff?: string;
2948
- /**
2949
- * Percentage to discount from variant discounted_price.
2950
- * @min 0.1
2951
- * @max 99.9
2952
- */
2953
- percentOff?: number;
2954
- /** Discount type. */
2955
- type?: DiscountTypeWithLiterals;
2956
- }
2957
- /** @oneof */
2958
- interface SubscriptionDiscountDiscountOneOf {
2959
- /**
2960
- * Amount to discount from the variant discounted_price.
2961
- * @decimalValue options { gt:0, lte:999999999, maxScale:3 }
2962
- */
2963
- amountOff?: string;
2964
- /**
2965
- * Percentage to discount from variant discounted_price.
2966
- * @min 0.1
2967
- * @max 99.9
10
+ * Returns `catalogImport.id` that can be used in subsequent AddProductsToImport and SubmitCatalogImport calls.
11
+ * @param - CatalogImport to be created.
12
+ * @returns Created CatalogImport.
2968
13
  */
2969
- percentOff?: number;
2970
- }
2971
- declare enum DiscountType {
2972
- UNKNOWN_DISCOUNT = "UNKNOWN_DISCOUNT",
2973
- /** Discount by a specific amount. */
2974
- AMOUNT = "AMOUNT",
2975
- /** Discount by a percentage. */
2976
- PERCENT = "PERCENT"
14
+ (catalogImport: CatalogImport): Promise<CatalogImport>;
2977
15
  }
2978
- /** @enumType */
2979
- type DiscountTypeWithLiterals = DiscountType | 'UNKNOWN_DISCOUNT' | 'AMOUNT' | 'PERCENT';
2980
- interface ExtendedFields {
16
+ declare function addProductsToImport$1(httpClient: HttpClient): AddProductsToImportSignature;
17
+ interface AddProductsToImportSignature {
2981
18
  /**
2982
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
2983
- * The value of each key is structured according to the schema defined when the extended fields were configured.
19
+ * Add products in bulk to an existing catalog import session.
2984
20
  *
2985
- * You can only access fields for which you have the appropriate permissions.
21
+ * Products are stored in temporary storage until SubmitCatalogImport is called.
22
+ * Can be called multiple times for the same import session.
2986
23
  *
2987
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
2988
- */
2989
- namespaces?: Record<string, Record<string, any>>;
2990
- }
2991
- interface ProductCategoryIdsInfo {
2992
- /**
2993
- * List of category IDs to set for the product
2994
- * @maxSize 1000
2995
- * @format GUID
2996
- */
2997
- categoryIds?: string[];
2998
- }
2999
- interface AddProductsToImportResponse {
3000
- /**
3001
- * Action results.
3002
- * @minSize 1
3003
- * @maxSize 100
3004
- */
3005
- results?: AddProductResult[];
3006
- /** Bulk action metadata. */
3007
- bulkActionMetadata?: BulkActionMetadata;
3008
- }
3009
- interface AddProductResult {
3010
- /** Item metadata. */
3011
- itemMetadata?: ItemMetadata;
3012
- }
3013
- interface ItemMetadata {
3014
- /**
3015
- * The product `handle` as passed in the `AddProductsToImport` request.
3016
- * @format GUID
3017
- */
3018
- _id?: string | null;
3019
- /** Index of the item within the request array. Allows for correlation between request and response items. */
3020
- originalIndex?: number;
3021
- /** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */
3022
- success?: boolean;
3023
- /** Details about the error in case of failure. */
3024
- error?: ApplicationError;
3025
- }
3026
- interface ApplicationError {
3027
- /** Error code. */
3028
- code?: string;
3029
- /** Description of the error. */
3030
- description?: string;
3031
- /** Data related to the error. */
3032
- data?: Record<string, any> | null;
3033
- }
3034
- interface BulkActionMetadata {
3035
- /** Number of items that were successfully processed. */
3036
- totalSuccesses?: number;
3037
- /** Number of items that couldn't be processed. */
3038
- totalFailures?: number;
3039
- /** Number of failures without details because detailed failure threshold was exceeded. */
3040
- undetailedFailures?: number;
3041
- }
3042
- interface SubmitCatalogImportRequest {
3043
- /**
3044
- * Catalog Import ID.
3045
- * @format GUID
3046
- */
3047
- catalogImportId: string;
3048
- }
3049
- interface SubmitCatalogImportResponse {
3050
- /**
3051
- * Job ID for async operation tracking. Pass to [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/get-async-job) or [List Async Job Items](https://dev.wix.com/docs/rest/business-management/async-job/list-async-job-items) to retrieve details and metadata
3052
- * @format GUID
3053
- */
3054
- jobId?: string;
3055
- }
3056
- interface CatalogImportAlreadySubmittedErrorData {
3057
- /**
3058
- * Catalog Import ID.
3059
- * @format GUID
3060
- */
3061
- catalogImportId?: string;
3062
- /**
3063
- * Async Job ID.
3064
- * @format GUID
3065
- */
3066
- asyncJobId?: string;
3067
- }
3068
- interface DomainEvent extends DomainEventBodyOneOf {
3069
- createdEvent?: EntityCreatedEvent;
3070
- updatedEvent?: EntityUpdatedEvent;
3071
- deletedEvent?: EntityDeletedEvent;
3072
- actionEvent?: ActionEvent;
3073
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
3074
- _id?: string;
3075
- /**
3076
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
3077
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
3078
- */
3079
- entityFqdn?: string;
3080
- /**
3081
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
3082
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
3083
- */
3084
- slug?: string;
3085
- /** ID of the entity associated with the event. */
3086
- entityId?: string;
3087
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
3088
- eventTime?: Date | null;
3089
- /**
3090
- * Whether the event was triggered as a result of a privacy regulation application
3091
- * (for example, GDPR).
24
+ * > **Notes:**
25
+ * > + Products are upserted based on the `handle` field
26
+ * > + Updates don't require passing the current revision number and overwrites existing fields which are specified in `product`
27
+ * > + Pass `category_ids` to update categories assignments, overwrites existing assignments
28
+ * @param - Catalog Import ID.
29
+ * @param - List of product items to add to the import session.
3092
30
  */
3093
- triggeredByAnonymizeRequest?: boolean | null;
3094
- /** If present, indicates the action that triggered the event. */
3095
- originatedFrom?: string | null;
3096
- /**
3097
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
3098
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
3099
- */
3100
- entityEventSequence?: string | null;
3101
- }
3102
- /** @oneof */
3103
- interface DomainEventBodyOneOf {
3104
- createdEvent?: EntityCreatedEvent;
3105
- updatedEvent?: EntityUpdatedEvent;
3106
- deletedEvent?: EntityDeletedEvent;
3107
- actionEvent?: ActionEvent;
3108
- }
3109
- interface EntityCreatedEvent {
3110
- entity?: string;
3111
- }
3112
- interface RestoreInfo {
3113
- deletedDate?: Date | null;
3114
- }
3115
- interface EntityUpdatedEvent {
3116
- /**
3117
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3118
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3119
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3120
- */
3121
- currentEntity?: string;
3122
- }
3123
- interface EntityDeletedEvent {
3124
- /** Entity that was deleted. */
3125
- deletedEntity?: string | null;
3126
- }
3127
- interface ActionEvent {
3128
- body?: string;
3129
- }
3130
- interface MessageEnvelope {
3131
- /**
3132
- * App instance ID.
3133
- * @format GUID
3134
- */
3135
- instanceId?: string | null;
3136
- /**
3137
- * Event type.
3138
- * @maxLength 150
3139
- */
3140
- eventType?: string;
3141
- /** The identification type and identity data. */
3142
- identity?: IdentificationData;
3143
- /** Stringify payload. */
3144
- data?: string;
3145
- }
3146
- interface IdentificationData extends IdentificationDataIdOneOf {
3147
- /**
3148
- * ID of a site visitor that has not logged in to the site.
3149
- * @format GUID
3150
- */
3151
- anonymousVisitorId?: string;
3152
- /**
3153
- * ID of a site visitor that has logged in to the site.
3154
- * @format GUID
3155
- */
3156
- memberId?: string;
3157
- /**
3158
- * ID of a Wix user (site owner, contributor, etc.).
3159
- * @format GUID
3160
- */
3161
- wixUserId?: string;
3162
- /**
3163
- * ID of an app.
3164
- * @format GUID
3165
- */
3166
- appId?: string;
3167
- /** @readonly */
3168
- identityType?: WebhookIdentityTypeWithLiterals;
31
+ (catalogImportId: string, products: NonNullablePaths<ProductItem, `product.handle`, 3>[]): Promise<NonNullablePaths<AddProductsToImportResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
3169
32
  }
3170
- /** @oneof */
3171
- interface IdentificationDataIdOneOf {
33
+ declare function submitCatalogImport$1(httpClient: HttpClient): SubmitCatalogImportSignature;
34
+ interface SubmitCatalogImportSignature {
3172
35
  /**
3173
- * ID of a site visitor that has not logged in to the site.
3174
- * @format GUID
36
+ * Submits all products in the catalog import for processing.
37
+ * Once called, no more items can be added to this import session.
38
+ * @param - Catalog Import ID.
3175
39
  */
3176
- anonymousVisitorId?: string;
3177
- /**
3178
- * ID of a site visitor that has logged in to the site.
3179
- * @format GUID
3180
- */
3181
- memberId?: string;
3182
- /**
3183
- * ID of a Wix user (site owner, contributor, etc.).
3184
- * @format GUID
3185
- */
3186
- wixUserId?: string;
3187
- /**
3188
- * ID of an app.
3189
- * @format GUID
3190
- */
3191
- appId?: string;
40
+ (catalogImportId: string): Promise<NonNullablePaths<SubmitCatalogImportResponse, `jobId`, 2> & {
41
+ __applicationErrorsType?: SubmitCatalogImportApplicationErrors;
42
+ }>;
3192
43
  }
3193
- declare enum WebhookIdentityType {
3194
- UNKNOWN = "UNKNOWN",
3195
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3196
- MEMBER = "MEMBER",
3197
- WIX_USER = "WIX_USER",
3198
- APP = "APP"
3199
- }
3200
- /** @enumType */
3201
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
3202
- /** @docsIgnore */
3203
- type SubmitCatalogImportApplicationErrors = {
3204
- code?: 'CATALOG_IMPORT_ALREADY_SUBMITTED';
3205
- description?: string;
3206
- data?: CatalogImportAlreadySubmittedErrorData;
3207
- };
3208
44
 
3209
- export { type ActionEvent, type AddProductResult, type AddProductsToImportRequest, type AddProductsToImportResponse, Alignment, type AlignmentWithLiterals, type AnchorData, type AppEmbedData, type AppEmbedDataAppDataOneOf, AppType, type AppTypeWithLiterals, type ApplicationError, AspectRatio, type AspectRatioWithLiterals, type AudioData, type Background, type BackgroundBackgroundOneOf, BackgroundType, type BackgroundTypeWithLiterals, type BlockquoteData, type BookingData, type Border, type BorderColors, type Brand, type BulkActionMetadata, type BulletedListData, type ButtonData, ButtonDataType, type ButtonDataTypeWithLiterals, type ButtonStyles, type CaptionData, type CardStyles, type CatalogImport, type CatalogImportAlreadySubmittedErrorData, type CellStyle, ChoiceType, type ChoiceTypeWithLiterals, type ChoicesSettings, type CodeBlockData, type CollapsibleListData, type ColorData, type Colors, type ConnectedModifier, type ConnectedModifierChoice, type ConnectedModifierChoiceValueOneOf, type ConnectedModifierModifierSettingsOneOf, type ConnectedOption, type ConnectedOptionChoice, type ConnectedOptionChoiceValueOneOf, type ConnectedOptionOptionSettingsOneOf, type CreateCatalogImportRequest, type CreateCatalogImportResponse, Crop, type CropWithLiterals, type Decoration, type DecorationDataOneOf, DecorationType, type DecorationTypeWithLiterals, type Design, type Dimensions, Direction, type DirectionWithLiterals, DiscountType, type DiscountTypeWithLiterals, type DividerData, DividerDataAlignment, type DividerDataAlignmentWithLiterals, type DocumentStyle, type DomainEvent, type DomainEventBodyOneOf, type EmbedData, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventData, type ExtendedFields, type FileData, type FileSource, type FileSourceDataOneOf, FileType, type FileTypeWithLiterals, type FixedMonetaryAmount, type FontSizeData, FontType, type FontTypeWithLiterals, type FreeTextSettings, type GIF, type GIFData, GIFType, type GIFTypeWithLiterals, type GalleryData, type GalleryOptions, type GalleryOptionsLayout, type Gradient, type HTMLData, type HTMLDataDataOneOf, type HeadingData, type Height, type IdentificationData, type IdentificationDataIdOneOf, type Image, type ImageData, type ImageDataStyles, type ImageStyles, type InfoSection, InitialExpandedItems, type InitialExpandedItemsWithLiterals, type InventoryItemComposite, type InventoryItemCompositeTrackingMethodOneOf, type Item, type ItemDataOneOf, type ItemMetadata, type ItemStyle, type Keyword, Layout, type LayoutCellData, LayoutType, type LayoutTypeWithLiterals, type LayoutWithLiterals, LineStyle, type LineStyleWithLiterals, type Link, type LinkData, type LinkDataOneOf, type LinkPreviewData, type LinkPreviewDataStyles, type ListValue, type MapData, type MapSettings, MapType, type MapTypeWithLiterals, MeasurementUnit, type MeasurementUnitWithLiterals, type Media, type MediaItemsInfo, MediaType, type MediaTypeWithLiterals, type MentionData, type MessageEnvelope, type Metadata, type ModifierChoicesSettings, ModifierRenderType, type ModifierRenderTypeWithLiterals, type MultipleColors, type Node, type NodeDataOneOf, type NodeStyle, NodeType, type NodeTypeWithLiterals, NullValue, type NullValueWithLiterals, type Oembed, type Option, type OptionChoiceIds, type OptionChoiceNames, type OptionChoiceReferences, type OptionDesign, type OptionLayout, type OrderedListData, Orientation, type OrientationWithLiterals, type PDFSettings, type ParagraphData, type Permissions, type PhysicalProperties, Placement, type PlacementWithLiterals, type PlaybackOptions, type PluginContainerData, PluginContainerDataAlignment, type PluginContainerDataAlignmentWithLiterals, type PluginContainerDataWidth, type PluginContainerDataWidthDataOneOf, type Poll, type PollData, type PollDataLayout, type PollDesign, type PollLayout, PollLayoutDirection, type PollLayoutDirectionWithLiterals, PollLayoutType, type PollLayoutTypeWithLiterals, type PollSettings, Position, type PositionWithLiterals, type PreorderInfo, type PriceInfo, type PricePerUnit, type PricePerUnitRange, type PricePerUnitRangePricePerUnit, type PricePerUnitSettings, type PricingData, type ProductCategoryIdsInfo, type ProductItem, type ProductMedia, type ProductMediaMediaOneOf, type ProductMediaSetByOneOf, ProductOptionRenderType, type ProductOptionRenderTypeWithLiterals, ProductType, type ProductTypeWithLiterals, type ProductWithInventory, type ProductWithInventoryTypedPropertiesOneOf, type Rel, Resizing, type ResizingWithLiterals, type RestoreInfo, type RevenueDetails, type Ribbon, type RibbonStyles, type RichContent, type SecuredMedia, type SeoSchema, type Settings, Source, type SourceWithLiterals, type Spoiler, type SpoilerData, type Styles, type StylesBorder, StylesPosition, type StylesPositionWithLiterals, type SubmitCatalogImportApplicationErrors, type SubmitCatalogImportRequest, type SubmitCatalogImportResponse, type Subscription, type SubscriptionCyclesOneOf, type SubscriptionDetails, type SubscriptionDiscount, type SubscriptionDiscountDiscountOneOf, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type TableCellData, type TableData, type Tag, Target, type TargetWithLiterals, TextAlignment, type TextAlignmentWithLiterals, type TextData, type TextNodeStyle, type TextStyle, type Thumbnail, type Thumbnails, ThumbnailsAlignment, type ThumbnailsAlignmentWithLiterals, Type, type TypeWithLiterals, type V1Media, type VariantDigitalProperties, type VariantPhysicalProperties, type VariantWithInventory, type VariantWithInventoryTypedPropertiesOneOf, type VariantsInfo, VerticalAlignment, type VerticalAlignmentWithLiterals, type Video, type VideoData, type VideoResolution, ViewMode, type ViewModeWithLiterals, ViewRole, type ViewRoleWithLiterals, VoteRole, type VoteRoleWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WeightMeasurementUnitInfo, type WeightRange, WeightUnit, type WeightUnitWithLiterals, Width, WidthType, type WidthTypeWithLiterals, type WidthWithLiterals };
45
+ declare const createCatalogImport: MaybeContext<BuildRESTFunction<typeof createCatalogImport$1> & typeof createCatalogImport$1>;
46
+ declare const addProductsToImport: MaybeContext<BuildRESTFunction<typeof addProductsToImport$1> & typeof addProductsToImport$1>;
47
+ declare const submitCatalogImport: MaybeContext<BuildRESTFunction<typeof submitCatalogImport$1> & typeof submitCatalogImport$1>;
48
+
49
+ export { AddProductsToImportResponse, CatalogImport, ProductItem, SubmitCatalogImportApplicationErrors, SubmitCatalogImportResponse, addProductsToImport, createCatalogImport, submitCatalogImport };