@wix/auto_sdk_data_collections 1.0.42 → 1.0.44

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 +21 -3
  2. package/build/cjs/index.js +150 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +62 -1
  5. package/build/cjs/index.typings.js +132 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +30 -2
  8. package/build/cjs/meta.js +110 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +21 -3
  11. package/build/es/index.mjs +148 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +62 -1
  14. package/build/es/index.typings.mjs +130 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +30 -2
  17. package/build/es/meta.mjs +108 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +21 -3
  20. package/build/internal/cjs/index.js +150 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +62 -1
  23. package/build/internal/cjs/index.typings.js +132 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +30 -2
  26. package/build/internal/cjs/meta.js +110 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +21 -3
  29. package/build/internal/es/index.mjs +148 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +62 -1
  32. package/build/internal/es/index.typings.mjs +130 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +30 -2
  35. package/build/internal/es/meta.mjs +108 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -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, PatchDataCollectionFieldIdentifiers, PatchDataCollectionField, 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, 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';
4
4
 
5
5
  declare function createDataCollection$1(httpClient: HttpClient): CreateDataCollectionSignature;
6
6
  interface CreateDataCollectionSignature {
@@ -101,6 +101,22 @@ 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
  /**
@@ -117,6 +133,8 @@ declare const deleteDataCollection: MaybeContext<BuildRESTFunction<typeof delete
117
133
  declare const createDataCollectionField: MaybeContext<BuildRESTFunction<typeof createDataCollectionField$1> & typeof createDataCollectionField$1>;
118
134
  declare const updateDataCollectionField: MaybeContext<BuildRESTFunction<typeof updateDataCollectionField$1> & typeof updateDataCollectionField$1>;
119
135
  declare const deleteDataCollectionField: MaybeContext<BuildRESTFunction<typeof deleteDataCollectionField$1> & typeof deleteDataCollectionField$1>;
136
+ declare const addDataCollectionPlugin: MaybeContext<BuildRESTFunction<typeof addDataCollectionPlugin$1> & typeof addDataCollectionPlugin$1>;
137
+ declare const deleteDataCollectionPlugin: MaybeContext<BuildRESTFunction<typeof deleteDataCollectionPlugin$1> & typeof deleteDataCollectionPlugin$1>;
120
138
  declare const patchDataCollectionField: MaybeContext<BuildRESTFunction<typeof patchDataCollectionField$1> & typeof patchDataCollectionField$1>;
121
139
 
122
- export { CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, PatchDataCollectionField, PatchDataCollectionFieldIdentifiers, PatchDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, getDataCollection, listDataCollections, patchDataCollectionField, updateDataCollection, updateDataCollectionField };
140
+ export { AddDataCollectionPluginOptions, AddDataCollectionPluginResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, DeleteDataCollectionPluginOptions, DeleteDataCollectionPluginResponse, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, PatchDataCollectionField, PatchDataCollectionFieldIdentifiers, 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, [
@@ -1319,6 +1389,64 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
1319
1389
  throw transformedError;
1320
1390
  }
1321
1391
  }
1392
+ async function addDataCollectionPlugin2(dataCollectionId, options) {
1393
+ const { httpClient, sideEffects } = arguments[2];
1394
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1395
+ dataCollectionId,
1396
+ plugin: options?.plugin
1397
+ });
1398
+ const reqOpts = addDataCollectionPlugin(payload);
1399
+ sideEffects?.onSiteCall?.();
1400
+ try {
1401
+ const result = await httpClient.request(reqOpts);
1402
+ sideEffects?.onSuccess?.(result);
1403
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1404
+ } catch (err) {
1405
+ const transformedError = sdkTransformError(
1406
+ err,
1407
+ {
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: {},
1438
+ explicitPathsToArguments: {
1439
+ dataCollectionId: "$[0]",
1440
+ pluginType: "$[1].pluginType"
1441
+ },
1442
+ singleArgumentUnchanged: false
1443
+ },
1444
+ ["dataCollectionId", "options"]
1445
+ );
1446
+ sideEffects?.onError?.(err);
1447
+ throw transformedError;
1448
+ }
1449
+ }
1322
1450
  async function patchDataCollectionField2(identifiers, field) {
1323
1451
  const { httpClient, sideEffects } = arguments[2];
1324
1452
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1425,6 +1553,22 @@ function deleteDataCollectionField3(httpClient) {
1425
1553
  { httpClient }
1426
1554
  );
1427
1555
  }
1556
+ function addDataCollectionPlugin3(httpClient) {
1557
+ return (dataCollectionId, options) => addDataCollectionPlugin2(
1558
+ dataCollectionId,
1559
+ options,
1560
+ // @ts-ignore
1561
+ { httpClient }
1562
+ );
1563
+ }
1564
+ function deleteDataCollectionPlugin3(httpClient) {
1565
+ return (dataCollectionId, options) => deleteDataCollectionPlugin2(
1566
+ dataCollectionId,
1567
+ options,
1568
+ // @ts-ignore
1569
+ { httpClient }
1570
+ );
1571
+ }
1428
1572
  function patchDataCollectionField3(httpClient) {
1429
1573
  return (identifiers, field) => patchDataCollectionField2(
1430
1574
  identifiers,
@@ -1446,6 +1590,8 @@ var patchDataCollection4 = /* @__PURE__ */ createRESTModule(patchDataCollection3
1446
1590
  var createDataCollectionField4 = /* @__PURE__ */ createRESTModule(createDataCollectionField3);
1447
1591
  var updateDataCollectionField4 = /* @__PURE__ */ createRESTModule(updateDataCollectionField3);
1448
1592
  var deleteDataCollectionField4 = /* @__PURE__ */ createRESTModule(deleteDataCollectionField3);
1593
+ var addDataCollectionPlugin4 = /* @__PURE__ */ createRESTModule(addDataCollectionPlugin3);
1594
+ var deleteDataCollectionPlugin4 = /* @__PURE__ */ createRESTModule(deleteDataCollectionPlugin3);
1449
1595
  var patchDataCollectionField4 = /* @__PURE__ */ createRESTModule(patchDataCollectionField3);
1450
1596
  export {
1451
1597
  AccessLevel,
@@ -1468,10 +1614,12 @@ export {
1468
1614
  TenantMode,
1469
1615
  Type,
1470
1616
  WebhookIdentityType,
1617
+ addDataCollectionPlugin4 as addDataCollectionPlugin,
1471
1618
  createDataCollection4 as createDataCollection,
1472
1619
  createDataCollectionField4 as createDataCollectionField,
1473
1620
  deleteDataCollection4 as deleteDataCollection,
1474
1621
  deleteDataCollectionField4 as deleteDataCollectionField,
1622
+ deleteDataCollectionPlugin4 as deleteDataCollectionPlugin,
1475
1623
  getDataCollection4 as getDataCollection,
1476
1624
  listDataCollections4 as listDataCollections,
1477
1625
  patchDataCollection4 as patchDataCollection,