@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/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": [