@wix/auto_sdk_data_collections 1.0.111 → 1.0.112

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.
@@ -821,10 +821,16 @@ declare enum FieldPluginType {
821
821
  /** Unknown plugin type. */
822
822
  UNKNOWN = "UNKNOWN",
823
823
  /** CMS-related field attributes. */
824
- CMS = "CMS"
824
+ CMS = "CMS",
825
+ /** Marks a multi-reference field as a category field linking to a Category Group. */
826
+ CATEGORY_FIELD = "CATEGORY_FIELD",
827
+ /** Marks a back-reference field on Category Groups indicating a consumer relationship. */
828
+ CATEGORY_CONSUMER = "CATEGORY_CONSUMER",
829
+ /** Marks the auto-managed primary category single-reference field on a consumer collection. */
830
+ PRIMARY_CATEGORY_FIELD = "PRIMARY_CATEGORY_FIELD"
825
831
  }
826
832
  /** @enumType */
827
- type FieldPluginTypeWithLiterals = FieldPluginType | 'UNKNOWN' | 'CMS';
833
+ type FieldPluginTypeWithLiterals = FieldPluginType | 'UNKNOWN' | 'CMS' | 'CATEGORY_FIELD' | 'CATEGORY_CONSUMER' | 'PRIMARY_CATEGORY_FIELD';
828
834
  /** Options for the CMS plugin. */
829
835
  interface CmsOptions {
830
836
  /**
@@ -918,6 +924,10 @@ interface Plugin extends PluginOptionsOneOf {
918
924
  editablePageLinkOptions?: PageLinkPluginOptions;
919
925
  /** Options for the CMS plugin. */
920
926
  cmsOptions?: PluginCmsOptions;
927
+ /** Options for the Catalog plugin. */
928
+ catalogOptions?: CatalogOptions;
929
+ /** Options for the Draft Items plugin. */
930
+ draftItemsOptions?: DraftItemsPluginOptions;
921
931
  /** Plugin type. */
922
932
  type?: PluginTypeWithLiterals;
923
933
  }
@@ -938,6 +948,10 @@ interface PluginOptionsOneOf {
938
948
  editablePageLinkOptions?: PageLinkPluginOptions;
939
949
  /** Options for the CMS plugin. */
940
950
  cmsOptions?: PluginCmsOptions;
951
+ /** Options for the Catalog plugin. */
952
+ catalogOptions?: CatalogOptions;
953
+ /** Options for the Draft Items plugin. */
954
+ draftItemsOptions?: DraftItemsPluginOptions;
941
955
  }
942
956
  declare enum Status {
943
957
  /** Items are published by default. */
@@ -988,6 +1002,23 @@ declare enum AccessLevel {
988
1002
  /** @enumType */
989
1003
  type AccessLevelWithLiterals = AccessLevel | 'ANYONE' | 'SITE_MEMBER' | 'SITE_MEMBER_AUTHOR' | 'CMS_EDITOR' | 'PRIVILEGED';
990
1004
  interface DraftPermissions {
1005
+ /**
1006
+ * Access level required to view/edit/remove items from the drafts collection.
1007
+ * Can be set to one of CMS_EDITOR, PRIVILEGED
1008
+ * Default: `CMS_EDITOR`
1009
+ */
1010
+ manageDrafts?: AccessLevelWithLiterals;
1011
+ /**
1012
+ * Access level required to publish draft items and unpublish published items.
1013
+ * Can be set to one of CMS_EDITOR, PRIVILEGED
1014
+ * Default: `CMS_EDITOR`
1015
+ */
1016
+ managePublishStatus?: AccessLevelWithLiterals;
1017
+ /**
1018
+ * Access level required to view draft items. Managing drafts also grants viewing.
1019
+ * If omitted, inherits manage_drafts for compatibility.
1020
+ */
1021
+ viewDrafts?: AccessLevelWithLiterals;
991
1022
  }
992
1023
  interface AllowedDraftPermissions {
993
1024
  /** If manage_drafts is permitted for the caller. */
@@ -1013,10 +1044,16 @@ declare enum PluginType {
1013
1044
  /** Indicates that page link fields are persisted and can be updated. */
1014
1045
  EDITABLE_PAGE_LINK = "EDITABLE_PAGE_LINK",
1015
1046
  /** CMS-specific collection properties. */
1016
- CMS = "CMS"
1047
+ CMS = "CMS",
1048
+ /** 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. */
1049
+ CATALOG = "CATALOG",
1050
+ /** Marks the collection as a Category Group for categorization features. */
1051
+ CATEGORIES = "CATEGORIES",
1052
+ /** Enables the draft items collection: safe draft editing with explicit publish step. */
1053
+ DRAFT_ITEMS = "DRAFT_ITEMS"
1017
1054
  }
1018
1055
  /** @enumType */
1019
- type PluginTypeWithLiterals = PluginType | 'PUBLISH' | 'SINGLE_ITEM' | 'URLIZED' | 'GRIDAPPLESS' | 'MULTILINGUAL' | 'SHARED' | 'EDITABLE_PAGE_LINK' | 'CMS';
1056
+ type PluginTypeWithLiterals = PluginType | 'PUBLISH' | 'SINGLE_ITEM' | 'URLIZED' | 'GRIDAPPLESS' | 'MULTILINGUAL' | 'SHARED' | 'EDITABLE_PAGE_LINK' | 'CMS' | 'CATALOG' | 'CATEGORIES' | 'DRAFT_ITEMS';
1020
1057
  interface PublishPluginOptions {
1021
1058
  /**
1022
1059
  * Publication status assigned to items that don't specify one.
@@ -1235,6 +1272,19 @@ interface DraftItemsPluginOptions extends DraftItemsPluginOptionsPairedCollectio
1235
1272
  * @readonly
1236
1273
  */
1237
1274
  publishedCollectionId?: string;
1275
+ /** Access levels required to view and manage drafts and change publication status. */
1276
+ draftPermissions?: DraftPermissions;
1277
+ /**
1278
+ * Actual draft management operations permitted for the caller. Included only if requested by `includeAllowedDataPermissions`.
1279
+ * @readonly
1280
+ */
1281
+ allowedPermissions?: AllowedDraftPermissions;
1282
+ /**
1283
+ * Whether writes to the published collection are allowed while the Draft Items plugin is enabled.
1284
+ * Defaults to `false` for newly created collections and newly added plugins.
1285
+ * Existing schemas that predate this field return `true` for backwards compatibility.
1286
+ */
1287
+ allowWritesToPublishedCollection?: boolean;
1238
1288
  }
1239
1289
  /** @oneof */
1240
1290
  interface DraftItemsPluginOptionsPairedCollectionOneOf {
package/build/cjs/meta.js CHANGED
@@ -286,13 +286,13 @@ function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl
286
286
  srcPath: "/_api/cloud-data/v1/schemas",
287
287
  destPath: "/v1/schemas"
288
288
  },
289
- {
290
- srcPath: "/_api/cloud-data/v2/collections",
291
- destPath: "/v2/collections"
292
- },
293
289
  {
294
290
  srcPath: "/_api/cloud-data/v2/bulk/collections",
295
291
  destPath: "/v2/bulk/collections"
292
+ },
293
+ {
294
+ srcPath: "/_api/cloud-data/v2/collections",
295
+ destPath: "/v2/collections"
296
296
  }
297
297
  ],
298
298
  "wixbo.ai": [
@@ -300,13 +300,13 @@ function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl
300
300
  srcPath: "/_api/cloud-data/v1/schemas",
301
301
  destPath: "/v1/schemas"
302
302
  },
303
- {
304
- srcPath: "/_api/cloud-data/v2/collections",
305
- destPath: "/v2/collections"
306
- },
307
303
  {
308
304
  srcPath: "/_api/cloud-data/v2/bulk/collections",
309
305
  destPath: "/v2/bulk/collections"
306
+ },
307
+ {
308
+ srcPath: "/_api/cloud-data/v2/collections",
309
+ destPath: "/v2/collections"
310
310
  }
311
311
  ],
312
312
  "wix-bo.com": [
@@ -314,13 +314,13 @@ function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl
314
314
  srcPath: "/_api/cloud-data/v1/schemas",
315
315
  destPath: "/v1/schemas"
316
316
  },
317
- {
318
- srcPath: "/_api/cloud-data/v2/collections",
319
- destPath: "/v2/collections"
320
- },
321
317
  {
322
318
  srcPath: "/_api/cloud-data/v2/bulk/collections",
323
319
  destPath: "/v2/bulk/collections"
320
+ },
321
+ {
322
+ srcPath: "/_api/cloud-data/v2/collections",
323
+ destPath: "/v2/collections"
324
324
  }
325
325
  ],
326
326
  "cloud-data.wix-code.com": [
@@ -370,13 +370,13 @@ function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl
370
370
  srcPath: "/_api/cloud-data/v1/schemas",
371
371
  destPath: "/v1/schemas"
372
372
  },
373
- {
374
- srcPath: "/_api/cloud-data/v2/collections",
375
- destPath: "/v2/collections"
376
- },
377
373
  {
378
374
  srcPath: "/_api/cloud-data/v2/bulk/collections",
379
375
  destPath: "/v2/bulk/collections"
376
+ },
377
+ {
378
+ srcPath: "/_api/cloud-data/v2/collections",
379
+ destPath: "/v2/collections"
380
380
  }
381
381
  ],
382
382
  "*.dev.wix-code.com": [