@wix/auto_sdk_data_collections 1.0.111 → 1.0.113

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.
@@ -97,6 +97,11 @@ interface DataCollection {
97
97
  * @readonly
98
98
  */
99
99
  updatedDate?: Date | null;
100
+ /**
101
+ * Actual data operations permitted for the caller. Included only if requested by `includeAllowedDataPermissions`
102
+ * @readonly
103
+ */
104
+ allowedDataPermissions?: AllowedDataPermissions;
100
105
  /**
101
106
  * Deprecation metadata for this collection. App collections set this metadata to direct users to a replacement collection.
102
107
  * @readonly
@@ -378,6 +383,11 @@ declare enum Type {
378
383
  * @documentationMaturity preview
379
384
  */
380
385
  EMAIL = "EMAIL",
386
+ /**
387
+ * Secured media object with digital file metadata.
388
+ * @documentationMaturity preview
389
+ */
390
+ SECURED_MEDIA = "SECURED_MEDIA",
381
391
  /**
382
392
  * Media image object.
383
393
  * @documentationMaturity preview
@@ -390,7 +400,7 @@ declare enum Type {
390
400
  MEDIA_VECTOR_ART = "MEDIA_VECTOR_ART"
391
401
  }
392
402
  /** @enumType */
393
- type TypeWithLiterals = Type | 'TEXT' | 'NUMBER' | 'DATE' | 'DATETIME' | 'IMAGE' | 'BOOLEAN' | 'DOCUMENT' | 'URL' | 'RICH_TEXT' | 'VIDEO' | 'ANY' | 'ARRAY_STRING' | 'ARRAY_DOCUMENT' | 'AUDIO' | 'TIME' | 'LANGUAGE' | 'RICH_CONTENT' | 'MEDIA_GALLERY' | 'ADDRESS' | 'PAGE_LINK' | 'REFERENCE' | 'MULTI_REFERENCE' | 'OBJECT' | 'ARRAY' | 'LEGACY_TIME' | 'LEGACY_BOOK' | 'LEGACY_EXTERNAL_URL' | 'LEGACY_BROKEN_REFERENCE' | 'LEGACY_IMAGE' | 'LEGACY_COLOR' | 'LEGACY_EXTERNAL_VIDEO' | 'SLUG' | 'EMAIL' | 'MEDIA_IMAGE' | 'MEDIA_VECTOR_ART';
403
+ type TypeWithLiterals = Type | 'TEXT' | 'NUMBER' | 'DATE' | 'DATETIME' | 'IMAGE' | 'BOOLEAN' | 'DOCUMENT' | 'URL' | 'RICH_TEXT' | 'VIDEO' | 'ANY' | 'ARRAY_STRING' | 'ARRAY_DOCUMENT' | 'AUDIO' | 'TIME' | 'LANGUAGE' | 'RICH_CONTENT' | 'MEDIA_GALLERY' | 'ADDRESS' | 'PAGE_LINK' | 'REFERENCE' | 'MULTI_REFERENCE' | 'OBJECT' | 'ARRAY' | 'LEGACY_TIME' | 'LEGACY_BOOK' | 'LEGACY_EXTERNAL_URL' | 'LEGACY_BROKEN_REFERENCE' | 'LEGACY_IMAGE' | 'LEGACY_COLOR' | 'LEGACY_EXTERNAL_VIDEO' | 'SLUG' | 'EMAIL' | 'SECURED_MEDIA' | 'MEDIA_IMAGE' | 'MEDIA_VECTOR_ART';
394
404
  interface TypeMetadata extends TypeMetadataMetadataOneOf {
395
405
  /** Metadata for a reference field. */
396
406
  reference?: Reference;
@@ -402,6 +412,48 @@ interface TypeMetadata extends TypeMetadataMetadataOneOf {
402
412
  array?: _Array;
403
413
  /** Metadata for a page link field. */
404
414
  pageLink?: PageLink;
415
+ /** Metadata for a slug field. */
416
+ slug?: Slug;
417
+ /** Metadata for TEXT. */
418
+ text?: Text;
419
+ /** Metadata for NUMBER. */
420
+ number?: _Number;
421
+ /** Metadata for DATE. */
422
+ date?: _Date;
423
+ /** Metadata for DATETIME. */
424
+ datetime?: Datetime;
425
+ /** Metadata for IMAGE. */
426
+ image?: Image;
427
+ /** Metadata for BOOLEAN. */
428
+ boolean?: _Boolean;
429
+ /** Metadata for DOCUMENT. */
430
+ document?: Document;
431
+ /** Metadata for URL. */
432
+ url?: Url;
433
+ /** Metadata for RICH_TEXT. */
434
+ richText?: RichText;
435
+ /** Metadata for VIDEO. */
436
+ video?: Video;
437
+ /** Metadata for ARRAY_STRING. */
438
+ arrayString?: ArrayString;
439
+ /** Metadata for ARRAY_DOCUMENT. */
440
+ arrayDocument?: ArrayDocument;
441
+ /** Metadata for AUDIO. */
442
+ audio?: Audio;
443
+ /** Metadata for TIME. */
444
+ time?: Time;
445
+ /** Metadata for RICH_CONTENT. */
446
+ richContent?: RichContent;
447
+ /** Metadata for MEDIA_GALLERY. */
448
+ mediaGallery?: MediaGallery;
449
+ /** Metadata for ADDRESS. */
450
+ address?: Address;
451
+ /** Metadata for EMAIL. */
452
+ email?: Email;
453
+ /** Metadata for LEGACY_COLOR. */
454
+ legacyColor?: LegacyColor;
455
+ /** Metadata for MEDIA_IMAGE. */
456
+ mediaImage?: MediaImage;
405
457
  }
406
458
  /** @oneof */
407
459
  interface TypeMetadataMetadataOneOf {
@@ -415,6 +467,48 @@ interface TypeMetadataMetadataOneOf {
415
467
  array?: _Array;
416
468
  /** Metadata for a page link field. */
417
469
  pageLink?: PageLink;
470
+ /** Metadata for a slug field. */
471
+ slug?: Slug;
472
+ /** Metadata for TEXT. */
473
+ text?: Text;
474
+ /** Metadata for NUMBER. */
475
+ number?: _Number;
476
+ /** Metadata for DATE. */
477
+ date?: _Date;
478
+ /** Metadata for DATETIME. */
479
+ datetime?: Datetime;
480
+ /** Metadata for IMAGE. */
481
+ image?: Image;
482
+ /** Metadata for BOOLEAN. */
483
+ boolean?: _Boolean;
484
+ /** Metadata for DOCUMENT. */
485
+ document?: Document;
486
+ /** Metadata for URL. */
487
+ url?: Url;
488
+ /** Metadata for RICH_TEXT. */
489
+ richText?: RichText;
490
+ /** Metadata for VIDEO. */
491
+ video?: Video;
492
+ /** Metadata for ARRAY_STRING. */
493
+ arrayString?: ArrayString;
494
+ /** Metadata for ARRAY_DOCUMENT. */
495
+ arrayDocument?: ArrayDocument;
496
+ /** Metadata for AUDIO. */
497
+ audio?: Audio;
498
+ /** Metadata for TIME. */
499
+ time?: Time;
500
+ /** Metadata for RICH_CONTENT. */
501
+ richContent?: RichContent;
502
+ /** Metadata for MEDIA_GALLERY. */
503
+ mediaGallery?: MediaGallery;
504
+ /** Metadata for ADDRESS. */
505
+ address?: Address;
506
+ /** Metadata for EMAIL. */
507
+ email?: Email;
508
+ /** Metadata for LEGACY_COLOR. */
509
+ legacyColor?: LegacyColor;
510
+ /** Metadata for MEDIA_IMAGE. */
511
+ mediaImage?: MediaImage;
418
512
  }
419
513
  interface FieldCapabilities {
420
514
  /**
@@ -549,12 +643,19 @@ interface _Object {
549
643
  * @maxSize 1000
550
644
  */
551
645
  fields?: ObjectField[];
646
+ /** Value assigned when a data item omits this field. */
647
+ defaultValue?: Record<string, any> | null;
552
648
  }
553
649
  interface _Array {
554
650
  /** Element's data type. */
555
651
  elementType?: TypeWithLiterals;
556
652
  /** Type-specific configuration, such as the referenced collection for a reference field or the calculation pattern for a page link. */
557
653
  typeMetadata?: TypeMetadata;
654
+ /** Minimum permitted number of items in an array field. */
655
+ minSize?: number | null;
656
+ /** Maximum permitted number of items in an array field. */
657
+ maxSize?: number | null;
658
+ defaultValue?: any[];
558
659
  }
559
660
  interface PageLink {
560
661
  /** Calculation pattern used to generate the page link. Required for page link fields. */
@@ -564,6 +665,8 @@ interface PageLink {
564
665
  * @maxLength 1000
565
666
  */
566
667
  linkedRouterPage?: string | null;
668
+ /** Defines the type of the page link. */
669
+ pageLinkType?: PageLinkTypeWithLiterals;
567
670
  }
568
671
  interface Slug {
569
672
  /**
@@ -572,6 +675,11 @@ interface Slug {
572
675
  * @maxLength 1000
573
676
  */
574
677
  pattern?: string;
678
+ /** Minimum permitted length for a string field. */
679
+ minLength?: number | null;
680
+ /** Maximum permitted length for a string field. */
681
+ maxLength?: number | null;
682
+ defaultValue?: string | null;
575
683
  }
576
684
  interface Text extends TextValidationOneOf {
577
685
  /** Length and pattern constraints for the text value. */
@@ -821,10 +929,16 @@ declare enum FieldPluginType {
821
929
  /** Unknown plugin type. */
822
930
  UNKNOWN = "UNKNOWN",
823
931
  /** CMS-related field attributes. */
824
- CMS = "CMS"
932
+ CMS = "CMS",
933
+ /** Marks a multi-reference field as a category field linking to a Category Group. */
934
+ CATEGORY_FIELD = "CATEGORY_FIELD",
935
+ /** Marks a back-reference field on Category Groups indicating a consumer relationship. */
936
+ CATEGORY_CONSUMER = "CATEGORY_CONSUMER",
937
+ /** Marks the auto-managed primary category single-reference field on a consumer collection. */
938
+ PRIMARY_CATEGORY_FIELD = "PRIMARY_CATEGORY_FIELD"
825
939
  }
826
940
  /** @enumType */
827
- type FieldPluginTypeWithLiterals = FieldPluginType | 'UNKNOWN' | 'CMS';
941
+ type FieldPluginTypeWithLiterals = FieldPluginType | 'UNKNOWN' | 'CMS' | 'CATEGORY_FIELD' | 'CATEGORY_CONSUMER' | 'PRIMARY_CATEGORY_FIELD';
828
942
  /** Options for the CMS plugin. */
829
943
  interface CmsOptions {
830
944
  /**
@@ -918,6 +1032,10 @@ interface Plugin extends PluginOptionsOneOf {
918
1032
  editablePageLinkOptions?: PageLinkPluginOptions;
919
1033
  /** Options for the CMS plugin. */
920
1034
  cmsOptions?: PluginCmsOptions;
1035
+ /** Options for the Catalog plugin. */
1036
+ catalogOptions?: CatalogOptions;
1037
+ /** Options for the Draft Items plugin. */
1038
+ draftItemsOptions?: DraftItemsPluginOptions;
921
1039
  /** Plugin type. */
922
1040
  type?: PluginTypeWithLiterals;
923
1041
  }
@@ -938,6 +1056,10 @@ interface PluginOptionsOneOf {
938
1056
  editablePageLinkOptions?: PageLinkPluginOptions;
939
1057
  /** Options for the CMS plugin. */
940
1058
  cmsOptions?: PluginCmsOptions;
1059
+ /** Options for the Catalog plugin. */
1060
+ catalogOptions?: CatalogOptions;
1061
+ /** Options for the Draft Items plugin. */
1062
+ draftItemsOptions?: DraftItemsPluginOptions;
941
1063
  }
942
1064
  declare enum Status {
943
1065
  /** Items are published by default. */
@@ -988,6 +1110,23 @@ declare enum AccessLevel {
988
1110
  /** @enumType */
989
1111
  type AccessLevelWithLiterals = AccessLevel | 'ANYONE' | 'SITE_MEMBER' | 'SITE_MEMBER_AUTHOR' | 'CMS_EDITOR' | 'PRIVILEGED';
990
1112
  interface DraftPermissions {
1113
+ /**
1114
+ * Access level required to view/edit/remove items from the drafts collection.
1115
+ * Can be set to one of CMS_EDITOR, PRIVILEGED
1116
+ * Default: `CMS_EDITOR`
1117
+ */
1118
+ manageDrafts?: AccessLevelWithLiterals;
1119
+ /**
1120
+ * Access level required to publish draft items and unpublish published items.
1121
+ * Can be set to one of CMS_EDITOR, PRIVILEGED
1122
+ * Default: `CMS_EDITOR`
1123
+ */
1124
+ managePublishStatus?: AccessLevelWithLiterals;
1125
+ /**
1126
+ * Access level required to view draft items. Managing drafts also grants viewing.
1127
+ * If omitted, inherits manage_drafts for compatibility.
1128
+ */
1129
+ viewDrafts?: AccessLevelWithLiterals;
991
1130
  }
992
1131
  interface AllowedDraftPermissions {
993
1132
  /** If manage_drafts is permitted for the caller. */
@@ -1013,10 +1152,16 @@ declare enum PluginType {
1013
1152
  /** Indicates that page link fields are persisted and can be updated. */
1014
1153
  EDITABLE_PAGE_LINK = "EDITABLE_PAGE_LINK",
1015
1154
  /** CMS-specific collection properties. */
1016
- CMS = "CMS"
1155
+ CMS = "CMS",
1156
+ /** Indicates that the collection is used as a [Wix Catalog](https://dev.wix.com/docs/rest/business-solutions/e-commerce/catalogs/catalog-service-plugin/introduction) app. This plugin is used to manage product data and is required for collections that are part of a catalog. */
1157
+ CATALOG = "CATALOG",
1158
+ /** Marks the collection as a Category Group for categorization features. */
1159
+ CATEGORIES = "CATEGORIES",
1160
+ /** Enables the draft items collection: safe draft editing with explicit publish step. */
1161
+ DRAFT_ITEMS = "DRAFT_ITEMS"
1017
1162
  }
1018
1163
  /** @enumType */
1019
- type PluginTypeWithLiterals = PluginType | 'PUBLISH' | 'SINGLE_ITEM' | 'URLIZED' | 'GRIDAPPLESS' | 'MULTILINGUAL' | 'SHARED' | 'EDITABLE_PAGE_LINK' | 'CMS';
1164
+ type PluginTypeWithLiterals = PluginType | 'PUBLISH' | 'SINGLE_ITEM' | 'URLIZED' | 'GRIDAPPLESS' | 'MULTILINGUAL' | 'SHARED' | 'EDITABLE_PAGE_LINK' | 'CMS' | 'CATALOG' | 'CATEGORIES' | 'DRAFT_ITEMS';
1020
1165
  interface PublishPluginOptions {
1021
1166
  /**
1022
1167
  * Publication status assigned to items that don't specify one.
@@ -1235,6 +1380,19 @@ interface DraftItemsPluginOptions extends DraftItemsPluginOptionsPairedCollectio
1235
1380
  * @readonly
1236
1381
  */
1237
1382
  publishedCollectionId?: string;
1383
+ /** Access levels required to view and manage drafts and change publication status. */
1384
+ draftPermissions?: DraftPermissions;
1385
+ /**
1386
+ * Actual draft management operations permitted for the caller. Included only if requested by `includeAllowedDataPermissions`.
1387
+ * @readonly
1388
+ */
1389
+ allowedPermissions?: AllowedDraftPermissions;
1390
+ /**
1391
+ * Whether writes to the published collection are allowed while the Draft Items plugin is enabled.
1392
+ * Defaults to `false` for newly created collections and newly added plugins.
1393
+ * Existing schemas that predate this field return `true` for backwards compatibility.
1394
+ */
1395
+ allowWritesToPublishedCollection?: boolean;
1238
1396
  }
1239
1397
  /** @oneof */
1240
1398
  interface DraftItemsPluginOptionsPairedCollectionOneOf {
@@ -1407,6 +1565,8 @@ interface GetDataCollectionRequest {
1407
1565
  * Default: `false`
1408
1566
  */
1409
1567
  consistentRead?: boolean;
1568
+ /** If set allowed for caller data permissions would be included in the response */
1569
+ includeAllowedDataPermissions?: boolean;
1410
1570
  /**
1411
1571
  * Top-level collection properties to return, using camelCase names, such as `displayName`.
1412
1572
  * Applies to every returned collection. `id`, `revision`, and `collectionType` are always retained.
@@ -1450,6 +1610,8 @@ interface ListDataCollectionsRequest {
1450
1610
  * Default: `false`
1451
1611
  */
1452
1612
  consistentRead?: boolean;
1613
+ /** If set allowed for caller data permissions would be included in the response */
1614
+ includeAllowedDataPermissions?: boolean;
1453
1615
  /**
1454
1616
  * Top-level collection properties to return, using camelCase names, such as `displayName`.
1455
1617
  * Applies to every returned collection. `id`, `revision`, and `collectionType` are always retained.
@@ -1532,6 +1694,8 @@ interface BulkGetDataCollectionsRequest {
1532
1694
  * Default: `false`
1533
1695
  */
1534
1696
  consistentRead?: boolean;
1697
+ /** If set allowed for caller data permissions would be included in the response */
1698
+ includeAllowedDataPermissions?: boolean;
1535
1699
  /**
1536
1700
  * Top-level collection properties to return, using camelCase names, such as `displayName`.
1537
1701
  * Applies to every returned collection. `id`, `revision`, and `collectionType` are always retained.
package/build/es/meta.mjs CHANGED
@@ -203,13 +203,13 @@ function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl
203
203
  srcPath: "/_api/cloud-data/v1/schemas",
204
204
  destPath: "/v1/schemas"
205
205
  },
206
- {
207
- srcPath: "/_api/cloud-data/v2/collections",
208
- destPath: "/v2/collections"
209
- },
210
206
  {
211
207
  srcPath: "/_api/cloud-data/v2/bulk/collections",
212
208
  destPath: "/v2/bulk/collections"
209
+ },
210
+ {
211
+ srcPath: "/_api/cloud-data/v2/collections",
212
+ destPath: "/v2/collections"
213
213
  }
214
214
  ],
215
215
  "wixbo.ai": [
@@ -217,13 +217,13 @@ function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl
217
217
  srcPath: "/_api/cloud-data/v1/schemas",
218
218
  destPath: "/v1/schemas"
219
219
  },
220
- {
221
- srcPath: "/_api/cloud-data/v2/collections",
222
- destPath: "/v2/collections"
223
- },
224
220
  {
225
221
  srcPath: "/_api/cloud-data/v2/bulk/collections",
226
222
  destPath: "/v2/bulk/collections"
223
+ },
224
+ {
225
+ srcPath: "/_api/cloud-data/v2/collections",
226
+ destPath: "/v2/collections"
227
227
  }
228
228
  ],
229
229
  "wix-bo.com": [
@@ -231,13 +231,13 @@ function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl
231
231
  srcPath: "/_api/cloud-data/v1/schemas",
232
232
  destPath: "/v1/schemas"
233
233
  },
234
- {
235
- srcPath: "/_api/cloud-data/v2/collections",
236
- destPath: "/v2/collections"
237
- },
238
234
  {
239
235
  srcPath: "/_api/cloud-data/v2/bulk/collections",
240
236
  destPath: "/v2/bulk/collections"
237
+ },
238
+ {
239
+ srcPath: "/_api/cloud-data/v2/collections",
240
+ destPath: "/v2/collections"
241
241
  }
242
242
  ],
243
243
  "cloud-data.wix-code.com": [
@@ -287,13 +287,13 @@ function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl
287
287
  srcPath: "/_api/cloud-data/v1/schemas",
288
288
  destPath: "/v1/schemas"
289
289
  },
290
- {
291
- srcPath: "/_api/cloud-data/v2/collections",
292
- destPath: "/v2/collections"
293
- },
294
290
  {
295
291
  srcPath: "/_api/cloud-data/v2/bulk/collections",
296
292
  destPath: "/v2/bulk/collections"
293
+ },
294
+ {
295
+ srcPath: "/_api/cloud-data/v2/collections",
296
+ destPath: "/v2/collections"
297
297
  }
298
298
  ],
299
299
  "*.dev.wix-code.com": [