@wix/auto_sdk_data_collections 1.0.43 → 1.0.45

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +24 -4
  2. package/build/cjs/index.js +159 -12
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +73 -78
  5. package/build/cjs/index.typings.js +139 -10
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +35 -4
  8. package/build/cjs/meta.js +116 -9
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +24 -4
  11. package/build/es/index.mjs +157 -12
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +73 -78
  14. package/build/es/index.typings.mjs +137 -10
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +35 -4
  17. package/build/es/meta.mjs +114 -9
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +24 -4
  20. package/build/internal/cjs/index.js +159 -12
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +73 -78
  23. package/build/internal/cjs/index.typings.js +139 -10
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +35 -4
  26. package/build/internal/cjs/meta.js +116 -9
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +24 -4
  29. package/build/internal/es/index.mjs +157 -12
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +73 -78
  32. package/build/internal/es/index.typings.mjs +137 -10
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +35 -4
  35. package/build/internal/es/meta.mjs +114 -9
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { DataCollection, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, PatchDataCollectionFieldIdentifiers, PatchDataCollectionField, PatchDataCollectionFieldResponse } from './index.typings.mjs';
3
- export { AccessLevel, AccessLevelWithLiterals, ActionEvent, AllowedDataPermissions, AppOptions, ApplicationError, ArraySizeRange, BulkGetDataCollectionsPageBySnapshotsRequest, BulkGetDataCollectionsPageBySnapshotsRequestTenantModeOptionsOneOf, BulkGetDataCollectionsPageBySnapshotsResponse, BulkGetDataCollectionsRequest, BulkGetDataCollectionsResponse, Calculator, CalculatorPatternOneOf, CatalogOptions, CmsOptions, CollectionCapabilities, CollectionDefinition, CollectionOperation, CollectionOperationWithLiterals, CollectionType, CollectionTypeWithLiterals, CreateAppCollectionsSnapshotRequest, CreateAppCollectionsSnapshotResponse, CreateDataCollectionFieldRequest, CreateDataCollectionRequest, CreateDataCollectionResponse, CreateDataCollectionsSnapshotRequest, CreateDataCollectionsSnapshotResponse, CreateMigratedCollectionsSnapshotRequest, CreateMigratedCollectionsSnapshotResponse, DataCollectionChangedEvent, DataCollectionClonedEvent, DataCollectionEvictedEvent, DataOperation, DataOperationWithLiterals, DataPermissions, DeleteDataCollectionFieldRequest, DeleteDataCollectionRequest, DeleteDataCollectionResponse, DeleteDataCollectionsSnapshotRequest, DeleteDataCollectionsSnapshotResponse, Destination, Direction, DirectionWithLiterals, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FailedCollection, Failure, Field, FieldCapabilities, FieldPlugin, FieldPluginOptionsOneOf, FieldPluginType, FieldPluginTypeWithLiterals, FieldRangeValidationsOneOf, FieldUpdate, FieldsPattern, Format, FormatWithLiterals, GetDataCollectionRequest, GetDataCollectionResponse, IdentificationData, IdentificationDataIdOneOf, Index, IndexField, IndexLimits, IndexQuotaLimits, IndexSource, IndexSourceWithLiterals, IndexStatus, IndexStatusWithLiterals, ListDataCollectionsRequest, MessageEnvelope, MultiReference, MultilingualOptions, NumberRange, ObjectField, Order, OrderWithLiterals, PageLink, PageLinkPluginOptions, Paging, PagingMetadataV2, PagingMode, PagingModeWithLiterals, PatchDataCollection, PatchDataCollectionFieldRequest, PatchDataCollectionRequest, PatchDataCollectionResponse, Permissions, Plugin, PluginCmsOptions, PluginOptionsOneOf, PluginType, PluginTypeWithLiterals, PluginUpdate, PublishPluginOptions, QueryOperator, QueryOperatorWithLiterals, Reference, RestorationCollection, RestoreDataCollectionRequest, RestoreDataCollectionResponse, RestoreDataCollectionsFromSnapshotRequest, RestoreDataCollectionsFromSnapshotResponse, RestoreInfo, Role, RoleWithLiterals, Segment, SegmentWithLiterals, SingleItemPluginOptions, SiteSort, Slug, SnapshotCollection, Sort, SortOrder, SortOrderWithLiterals, Sorting, Status, StatusWithLiterals, StringLengthRange, TenantMode, TenantModeWithLiterals, Type, TypeMetadata, TypeMetadataMetadataOneOf, TypeWithLiterals, UpdateDataCollectionFieldRequest, UpdateDataCollectionRequest, UpdateDataCollectionResponse, UpdateDataPermissionsRequest, UpdateDataPermissionsResponse, UrlizedOnlyPattern, UrlizedPluginOptions, WebhookIdentityType, WebhookIdentityTypeWithLiterals, _Array, _Object } from './index.typings.mjs';
2
+ import { DataCollection, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, AddDataCollectionPluginOptions, AddDataCollectionPluginResponse, DeleteDataCollectionPluginOptions, DeleteDataCollectionPluginResponse, Field, PatchDataCollectionFieldResponse } from './index.typings.mjs';
3
+ export { AccessLevel, AccessLevelWithLiterals, ActionEvent, AddDataCollectionPluginRequest, AllowedDataPermissions, AppOptions, ApplicationError, ArraySizeRange, BulkGetDataCollectionsPageBySnapshotsRequest, BulkGetDataCollectionsPageBySnapshotsRequestTenantModeOptionsOneOf, BulkGetDataCollectionsPageBySnapshotsResponse, BulkGetDataCollectionsRequest, BulkGetDataCollectionsResponse, Calculator, CalculatorPatternOneOf, CatalogOptions, CmsOptions, CollectionCapabilities, CollectionDefinition, CollectionOperation, CollectionOperationWithLiterals, CollectionType, CollectionTypeWithLiterals, CreateAppCollectionsSnapshotRequest, CreateAppCollectionsSnapshotResponse, CreateDataCollectionFieldRequest, CreateDataCollectionRequest, CreateDataCollectionResponse, CreateDataCollectionsSnapshotRequest, CreateDataCollectionsSnapshotResponse, CreateMigratedCollectionsSnapshotRequest, CreateMigratedCollectionsSnapshotResponse, DataCollectionChangedEvent, DataCollectionClonedEvent, DataCollectionEvictedEvent, DataOperation, DataOperationWithLiterals, DataPermissions, DeleteDataCollectionFieldRequest, DeleteDataCollectionPluginRequest, DeleteDataCollectionRequest, DeleteDataCollectionResponse, DeleteDataCollectionsSnapshotRequest, DeleteDataCollectionsSnapshotResponse, Destination, Direction, DirectionWithLiterals, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FailedCollection, Failure, FieldCapabilities, FieldPlugin, FieldPluginOptionsOneOf, FieldPluginType, FieldPluginTypeWithLiterals, FieldRangeValidationsOneOf, FieldUpdate, FieldsPattern, Format, FormatWithLiterals, GetDataCollectionRequest, GetDataCollectionResponse, IdentificationData, IdentificationDataIdOneOf, Index, IndexField, IndexLimits, IndexQuotaLimits, IndexSource, IndexSourceWithLiterals, IndexStatus, IndexStatusWithLiterals, ListDataCollectionsRequest, MessageEnvelope, MultiReference, MultilingualOptions, NumberRange, ObjectField, Order, OrderWithLiterals, PageLink, PageLinkPluginOptions, Paging, PagingMetadataV2, PagingMode, PagingModeWithLiterals, PatchDataCollection, PatchDataCollectionFieldRequest, PatchDataCollectionRequest, PatchDataCollectionResponse, Permissions, Plugin, PluginCmsOptions, PluginOptionsOneOf, PluginType, PluginTypeWithLiterals, PluginUpdate, PublishPluginOptions, QueryOperator, QueryOperatorWithLiterals, Reference, RestorationCollection, RestoreDataCollectionRequest, RestoreDataCollectionResponse, RestoreDataCollectionsFromSnapshotRequest, RestoreDataCollectionsFromSnapshotResponse, RestoreInfo, Role, RoleWithLiterals, Segment, SegmentWithLiterals, SingleItemPluginOptions, SiteSort, Slug, SnapshotCollection, Sort, SortOrder, SortOrderWithLiterals, Sorting, Status, StatusWithLiterals, StringLengthRange, TenantMode, TenantModeWithLiterals, Type, TypeMetadata, TypeMetadataMetadataOneOf, TypeWithLiterals, UpdateDataCollectionFieldRequest, UpdateDataCollectionRequest, UpdateDataCollectionResponse, UpdateDataPermissionsRequest, UpdateDataPermissionsResponse, UrlizedOnlyPattern, UrlizedPluginOptions, WebhookIdentityType, WebhookIdentityTypeWithLiterals, _Array, _Object } from './index.typings.mjs';
4
4
 
5
5
  declare function createDataCollection$1(httpClient: HttpClient): CreateDataCollectionSignature;
6
6
  interface CreateDataCollectionSignature {
@@ -101,12 +101,30 @@ interface DeleteDataCollectionFieldSignature {
101
101
  */
102
102
  (dataCollectionId: string, options: NonNullablePaths<DeleteDataCollectionFieldOptions, `fieldKey`, 2>): Promise<NonNullablePaths<DeleteDataCollectionFieldResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes`, 7>>;
103
103
  }
104
+ declare function addDataCollectionPlugin$1(httpClient: HttpClient): AddDataCollectionPluginSignature;
105
+ interface AddDataCollectionPluginSignature {
106
+ /**
107
+ * Adds a plugin to a data collection.
108
+ * @param - ID of the data collection to update.
109
+ */
110
+ (dataCollectionId: string, options: NonNullablePaths<AddDataCollectionPluginOptions, `plugin` | `plugin.type`, 3>): Promise<NonNullablePaths<AddDataCollectionPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes`, 7>>;
111
+ }
112
+ declare function deleteDataCollectionPlugin$1(httpClient: HttpClient): DeleteDataCollectionPluginSignature;
113
+ interface DeleteDataCollectionPluginSignature {
114
+ /**
115
+ * Deletes a plugin from a data collection.
116
+ * @param - ID of the data collection to update.
117
+ */
118
+ (dataCollectionId: string, options: NonNullablePaths<DeleteDataCollectionPluginOptions, `pluginType`, 2>): Promise<NonNullablePaths<DeleteDataCollectionPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes`, 7>>;
119
+ }
104
120
  declare function patchDataCollectionField$1(httpClient: HttpClient): PatchDataCollectionFieldSignature;
105
121
  interface PatchDataCollectionFieldSignature {
106
122
  /**
107
123
  * Patches (partial update) a field in the structure of a data collection.
124
+ * @param - ID of the data collection to update.
125
+ * @param - Field to patch.
108
126
  */
109
- (identifiers: NonNullablePaths<PatchDataCollectionFieldIdentifiers, `dataCollectionId` | `fieldKey`, 2>, field: PatchDataCollectionField): Promise<NonNullablePaths<PatchDataCollectionFieldResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes`, 7>>;
127
+ (dataCollectionId: string, field: Field): Promise<NonNullablePaths<PatchDataCollectionFieldResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes`, 7>>;
110
128
  }
111
129
 
112
130
  declare const createDataCollection: MaybeContext<BuildRESTFunction<typeof createDataCollection$1> & typeof createDataCollection$1>;
@@ -117,6 +135,8 @@ declare const deleteDataCollection: MaybeContext<BuildRESTFunction<typeof delete
117
135
  declare const createDataCollectionField: MaybeContext<BuildRESTFunction<typeof createDataCollectionField$1> & typeof createDataCollectionField$1>;
118
136
  declare const updateDataCollectionField: MaybeContext<BuildRESTFunction<typeof updateDataCollectionField$1> & typeof updateDataCollectionField$1>;
119
137
  declare const deleteDataCollectionField: MaybeContext<BuildRESTFunction<typeof deleteDataCollectionField$1> & typeof deleteDataCollectionField$1>;
138
+ declare const addDataCollectionPlugin: MaybeContext<BuildRESTFunction<typeof addDataCollectionPlugin$1> & typeof addDataCollectionPlugin$1>;
139
+ declare const deleteDataCollectionPlugin: MaybeContext<BuildRESTFunction<typeof deleteDataCollectionPlugin$1> & typeof deleteDataCollectionPlugin$1>;
120
140
  declare const patchDataCollectionField: MaybeContext<BuildRESTFunction<typeof patchDataCollectionField$1> & typeof patchDataCollectionField$1>;
121
141
 
122
- export { CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, PatchDataCollectionField, PatchDataCollectionFieldIdentifiers, PatchDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, getDataCollection, listDataCollections, patchDataCollectionField, updateDataCollection, updateDataCollectionField };
142
+ export { AddDataCollectionPluginOptions, AddDataCollectionPluginResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, DeleteDataCollectionPluginOptions, DeleteDataCollectionPluginResponse, Field, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, PatchDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, addDataCollectionPlugin, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, deleteDataCollectionPlugin, getDataCollection, listDataCollections, patchDataCollectionField, updateDataCollection, updateDataCollectionField };
@@ -796,6 +796,76 @@ function deleteDataCollectionField(payload) {
796
796
  }
797
797
  return __deleteDataCollectionField;
798
798
  }
799
+ function addDataCollectionPlugin(payload) {
800
+ function __addDataCollectionPlugin({ host }) {
801
+ const metadata = {
802
+ entityFqdn: "wix.data.v2.data_collection",
803
+ method: "POST",
804
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.AddDataCollectionPlugin",
805
+ packageName: PACKAGE_NAME,
806
+ migrationOptions: {
807
+ optInTransformResponse: true
808
+ },
809
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
810
+ { protoPath: "/v2/collections/add-plugin", data: payload, host }
811
+ ),
812
+ data: payload,
813
+ transformResponse: (payload2) => transformPaths(payload2, [
814
+ {
815
+ transformFn: transformRESTTimestampToSDKTimestamp,
816
+ paths: [
817
+ { path: "dataCollection.createdDate" },
818
+ { path: "dataCollection.updatedDate" }
819
+ ]
820
+ },
821
+ {
822
+ transformFn: transformRESTFloatToSDKFloat,
823
+ paths: [
824
+ { path: "dataCollection.fields.numberRange.min" },
825
+ { path: "dataCollection.fields.numberRange.max" }
826
+ ]
827
+ }
828
+ ])
829
+ };
830
+ return metadata;
831
+ }
832
+ return __addDataCollectionPlugin;
833
+ }
834
+ function deleteDataCollectionPlugin(payload) {
835
+ function __deleteDataCollectionPlugin({ host }) {
836
+ const metadata = {
837
+ entityFqdn: "wix.data.v2.data_collection",
838
+ method: "POST",
839
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollectionPlugin",
840
+ packageName: PACKAGE_NAME,
841
+ migrationOptions: {
842
+ optInTransformResponse: true
843
+ },
844
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
845
+ { protoPath: "/v2/collections/delete-plugin", data: payload, host }
846
+ ),
847
+ data: payload,
848
+ transformResponse: (payload2) => transformPaths(payload2, [
849
+ {
850
+ transformFn: transformRESTTimestampToSDKTimestamp,
851
+ paths: [
852
+ { path: "dataCollection.createdDate" },
853
+ { path: "dataCollection.updatedDate" }
854
+ ]
855
+ },
856
+ {
857
+ transformFn: transformRESTFloatToSDKFloat,
858
+ paths: [
859
+ { path: "dataCollection.fields.numberRange.min" },
860
+ { path: "dataCollection.fields.numberRange.max" }
861
+ ]
862
+ }
863
+ ])
864
+ };
865
+ return metadata;
866
+ }
867
+ return __deleteDataCollectionPlugin;
868
+ }
799
869
  function patchDataCollectionField(payload) {
800
870
  function __patchDataCollectionField({ host }) {
801
871
  const serializedData = transformPaths(payload, [
@@ -813,7 +883,7 @@ function patchDataCollectionField(payload) {
813
883
  ]);
814
884
  const metadata = {
815
885
  entityFqdn: "wix.data.v2.data_collection",
816
- method: "PATCH",
886
+ method: "POST",
817
887
  methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
818
888
  packageName: PACKAGE_NAME,
819
889
  migrationOptions: {
@@ -821,7 +891,7 @@ function patchDataCollectionField(payload) {
821
891
  },
822
892
  url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
823
893
  {
824
- protoPath: "/v2/collections/{dataCollectionId}/fields/{field.key}",
894
+ protoPath: "/v2/collections/{dataCollectionId}/patch-field",
825
895
  data: serializedData,
826
896
  host
827
897
  }
@@ -1319,13 +1389,13 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
1319
1389
  throw transformedError;
1320
1390
  }
1321
1391
  }
1322
- async function patchDataCollectionField2(identifiers, field) {
1392
+ async function addDataCollectionPlugin2(dataCollectionId, options) {
1323
1393
  const { httpClient, sideEffects } = arguments[2];
1324
1394
  const payload = renameKeysFromSDKRequestToRESTRequest({
1325
- dataCollectionId: identifiers?.dataCollectionId,
1326
- field: { ...field, key: identifiers?.fieldKey }
1395
+ dataCollectionId,
1396
+ plugin: options?.plugin
1327
1397
  });
1328
- const reqOpts = patchDataCollectionField(payload);
1398
+ const reqOpts = addDataCollectionPlugin(payload);
1329
1399
  sideEffects?.onSiteCall?.();
1330
1400
  try {
1331
1401
  const result = await httpClient.request(reqOpts);
@@ -1335,14 +1405,69 @@ async function patchDataCollectionField2(identifiers, field) {
1335
1405
  const transformedError = sdkTransformError(
1336
1406
  err,
1337
1407
  {
1338
- spreadPathsToArguments: { field: "$[1]" },
1408
+ spreadPathsToArguments: {},
1409
+ explicitPathsToArguments: {
1410
+ dataCollectionId: "$[0]",
1411
+ plugin: "$[1].plugin"
1412
+ },
1413
+ singleArgumentUnchanged: false
1414
+ },
1415
+ ["dataCollectionId", "options"]
1416
+ );
1417
+ sideEffects?.onError?.(err);
1418
+ throw transformedError;
1419
+ }
1420
+ }
1421
+ async function deleteDataCollectionPlugin2(dataCollectionId, options) {
1422
+ const { httpClient, sideEffects } = arguments[2];
1423
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1424
+ dataCollectionId,
1425
+ pluginType: options?.pluginType
1426
+ });
1427
+ const reqOpts = deleteDataCollectionPlugin(payload);
1428
+ sideEffects?.onSiteCall?.();
1429
+ try {
1430
+ const result = await httpClient.request(reqOpts);
1431
+ sideEffects?.onSuccess?.(result);
1432
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1433
+ } catch (err) {
1434
+ const transformedError = sdkTransformError(
1435
+ err,
1436
+ {
1437
+ spreadPathsToArguments: {},
1339
1438
  explicitPathsToArguments: {
1340
- dataCollectionId: "$[0].dataCollectionId",
1341
- "field.key": "$[0].fieldKey"
1439
+ dataCollectionId: "$[0]",
1440
+ pluginType: "$[1].pluginType"
1342
1441
  },
1343
1442
  singleArgumentUnchanged: false
1344
1443
  },
1345
- ["identifiers", "field"]
1444
+ ["dataCollectionId", "options"]
1445
+ );
1446
+ sideEffects?.onError?.(err);
1447
+ throw transformedError;
1448
+ }
1449
+ }
1450
+ async function patchDataCollectionField2(dataCollectionId, field) {
1451
+ const { httpClient, sideEffects } = arguments[2];
1452
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1453
+ dataCollectionId,
1454
+ field
1455
+ });
1456
+ const reqOpts = patchDataCollectionField(payload);
1457
+ sideEffects?.onSiteCall?.();
1458
+ try {
1459
+ const result = await httpClient.request(reqOpts);
1460
+ sideEffects?.onSuccess?.(result);
1461
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1462
+ } catch (err) {
1463
+ const transformedError = sdkTransformError(
1464
+ err,
1465
+ {
1466
+ spreadPathsToArguments: {},
1467
+ explicitPathsToArguments: { dataCollectionId: "$[0]", field: "$[1]" },
1468
+ singleArgumentUnchanged: false
1469
+ },
1470
+ ["dataCollectionId", "field"]
1346
1471
  );
1347
1472
  sideEffects?.onError?.(err);
1348
1473
  throw transformedError;
@@ -1425,9 +1550,25 @@ function deleteDataCollectionField3(httpClient) {
1425
1550
  { httpClient }
1426
1551
  );
1427
1552
  }
1553
+ function addDataCollectionPlugin3(httpClient) {
1554
+ return (dataCollectionId, options) => addDataCollectionPlugin2(
1555
+ dataCollectionId,
1556
+ options,
1557
+ // @ts-ignore
1558
+ { httpClient }
1559
+ );
1560
+ }
1561
+ function deleteDataCollectionPlugin3(httpClient) {
1562
+ return (dataCollectionId, options) => deleteDataCollectionPlugin2(
1563
+ dataCollectionId,
1564
+ options,
1565
+ // @ts-ignore
1566
+ { httpClient }
1567
+ );
1568
+ }
1428
1569
  function patchDataCollectionField3(httpClient) {
1429
- return (identifiers, field) => patchDataCollectionField2(
1430
- identifiers,
1570
+ return (dataCollectionId, field) => patchDataCollectionField2(
1571
+ dataCollectionId,
1431
1572
  field,
1432
1573
  // @ts-ignore
1433
1574
  { httpClient }
@@ -1446,6 +1587,8 @@ var patchDataCollection4 = /* @__PURE__ */ createRESTModule(patchDataCollection3
1446
1587
  var createDataCollectionField4 = /* @__PURE__ */ createRESTModule(createDataCollectionField3);
1447
1588
  var updateDataCollectionField4 = /* @__PURE__ */ createRESTModule(updateDataCollectionField3);
1448
1589
  var deleteDataCollectionField4 = /* @__PURE__ */ createRESTModule(deleteDataCollectionField3);
1590
+ var addDataCollectionPlugin4 = /* @__PURE__ */ createRESTModule(addDataCollectionPlugin3);
1591
+ var deleteDataCollectionPlugin4 = /* @__PURE__ */ createRESTModule(deleteDataCollectionPlugin3);
1449
1592
  var patchDataCollectionField4 = /* @__PURE__ */ createRESTModule(patchDataCollectionField3);
1450
1593
  export {
1451
1594
  AccessLevel,
@@ -1468,10 +1611,12 @@ export {
1468
1611
  TenantMode,
1469
1612
  Type,
1470
1613
  WebhookIdentityType,
1614
+ addDataCollectionPlugin4 as addDataCollectionPlugin,
1471
1615
  createDataCollection4 as createDataCollection,
1472
1616
  createDataCollectionField4 as createDataCollectionField,
1473
1617
  deleteDataCollection4 as deleteDataCollection,
1474
1618
  deleteDataCollectionField4 as deleteDataCollectionField,
1619
+ deleteDataCollectionPlugin4 as deleteDataCollectionPlugin,
1475
1620
  getDataCollection4 as getDataCollection,
1476
1621
  listDataCollections4 as listDataCollections,
1477
1622
  patchDataCollection4 as patchDataCollection,