@wix/auto_sdk_data_collections 1.0.43 → 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 +2 -2
@@ -1094,6 +1094,32 @@ interface DeleteDataCollectionFieldResponse {
1094
1094
  /** Updated data collection. */
1095
1095
  dataCollection?: DataCollection;
1096
1096
  }
1097
+ interface AddDataCollectionPluginRequest {
1098
+ /**
1099
+ * ID of the data collection to update.
1100
+ * @maxLength 256
1101
+ */
1102
+ dataCollectionId: string;
1103
+ /** Plugin to add. */
1104
+ plugin: Plugin;
1105
+ }
1106
+ interface AddDataCollectionPluginResponse {
1107
+ /** Updated data collection. */
1108
+ dataCollection?: DataCollection;
1109
+ }
1110
+ interface DeleteDataCollectionPluginRequest {
1111
+ /**
1112
+ * ID of the data collection to update.
1113
+ * @maxLength 256
1114
+ */
1115
+ dataCollectionId: string;
1116
+ /** Plugin type to remove. */
1117
+ pluginType: PluginTypeWithLiterals;
1118
+ }
1119
+ interface DeleteDataCollectionPluginResponse {
1120
+ /** Updated data collection. */
1121
+ dataCollection?: DataCollection;
1122
+ }
1097
1123
  interface PatchDataCollectionFieldRequest {
1098
1124
  /**
1099
1125
  * ID of the data collection to update.
@@ -1851,6 +1877,41 @@ interface DeleteDataCollectionFieldOptions {
1851
1877
  */
1852
1878
  fieldKey: string;
1853
1879
  }
1880
+ /**
1881
+ * Adds a plugin to a data collection.
1882
+ * @param dataCollectionId - ID of the data collection to update.
1883
+ * @public
1884
+ * @documentationMaturity preview
1885
+ * @requiredField dataCollectionId
1886
+ * @requiredField options
1887
+ * @requiredField options.plugin
1888
+ * @requiredField options.plugin.type
1889
+ * @permissionId WIX_DATA.UPDATE_COLLECTION
1890
+ * @applicableIdentity APP
1891
+ * @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.AddDataCollectionPlugin
1892
+ */
1893
+ declare function addDataCollectionPlugin(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>>;
1894
+ interface AddDataCollectionPluginOptions {
1895
+ /** Plugin to add. */
1896
+ plugin: Plugin;
1897
+ }
1898
+ /**
1899
+ * Deletes a plugin from a data collection.
1900
+ * @param dataCollectionId - ID of the data collection to update.
1901
+ * @public
1902
+ * @documentationMaturity preview
1903
+ * @requiredField dataCollectionId
1904
+ * @requiredField options
1905
+ * @requiredField options.pluginType
1906
+ * @permissionId WIX_DATA.UPDATE_COLLECTION
1907
+ * @applicableIdentity APP
1908
+ * @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollectionPlugin
1909
+ */
1910
+ declare function deleteDataCollectionPlugin(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>>;
1911
+ interface DeleteDataCollectionPluginOptions {
1912
+ /** Plugin type to remove. */
1913
+ pluginType: PluginTypeWithLiterals;
1914
+ }
1854
1915
  /**
1855
1916
  * Patches (partial update) a field in the structure of a data collection.
1856
1917
  * @public
@@ -1938,4 +1999,4 @@ interface PatchDataCollectionField {
1938
1999
  plugins?: FieldPlugin[];
1939
2000
  }
1940
2001
 
1941
- export { AccessLevel, type AccessLevelWithLiterals, type ActionEvent, type AllowedDataPermissions, type AppOptions, type ApplicationError, type ArraySizeRange, type BulkGetDataCollectionsPageBySnapshotsRequest, type BulkGetDataCollectionsPageBySnapshotsRequestTenantModeOptionsOneOf, type BulkGetDataCollectionsPageBySnapshotsResponse, type BulkGetDataCollectionsRequest, type BulkGetDataCollectionsResponse, type Calculator, type CalculatorPatternOneOf, type CatalogOptions, type CmsOptions, type CollectionCapabilities, type CollectionDefinition, CollectionOperation, type CollectionOperationWithLiterals, CollectionType, type CollectionTypeWithLiterals, type CreateAppCollectionsSnapshotRequest, type CreateAppCollectionsSnapshotResponse, type CreateDataCollectionFieldOptions, type CreateDataCollectionFieldRequest, type CreateDataCollectionFieldResponse, type CreateDataCollectionRequest, type CreateDataCollectionResponse, type CreateDataCollectionsSnapshotRequest, type CreateDataCollectionsSnapshotResponse, type CreateMigratedCollectionsSnapshotRequest, type CreateMigratedCollectionsSnapshotResponse, type DataCollection, type DataCollectionChangedEvent, type DataCollectionClonedEvent, type DataCollectionEvictedEvent, DataOperation, type DataOperationWithLiterals, type DataPermissions, type DeleteDataCollectionFieldOptions, type DeleteDataCollectionFieldRequest, type DeleteDataCollectionFieldResponse, type DeleteDataCollectionRequest, type DeleteDataCollectionResponse, type DeleteDataCollectionsSnapshotRequest, type DeleteDataCollectionsSnapshotResponse, type Destination, Direction, type DirectionWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type FailedCollection, type Failure, type Field, type FieldCapabilities, type FieldPlugin, type FieldPluginOptionsOneOf, FieldPluginType, type FieldPluginTypeWithLiterals, type FieldRangeValidationsOneOf, type FieldUpdate, type FieldsPattern, Format, type FormatWithLiterals, type GetDataCollectionOptions, type GetDataCollectionRequest, type GetDataCollectionResponse, type IdentificationData, type IdentificationDataIdOneOf, type Index, type IndexField, type IndexLimits, type IndexQuotaLimits, IndexSource, type IndexSourceWithLiterals, IndexStatus, type IndexStatusWithLiterals, type ListDataCollectionsOptions, type ListDataCollectionsRequest, type ListDataCollectionsResponse, type MessageEnvelope, type MultiReference, type MultilingualOptions, type NumberRange, type ObjectField, Order, type OrderWithLiterals, type PageLink, type PageLinkPluginOptions, type Paging, type PagingMetadataV2, PagingMode, type PagingModeWithLiterals, type PatchDataCollection, type PatchDataCollectionField, type PatchDataCollectionFieldIdentifiers, type PatchDataCollectionFieldRequest, type PatchDataCollectionFieldResponse, type PatchDataCollectionRequest, type PatchDataCollectionResponse, type Permissions, type Plugin, type PluginCmsOptions, type PluginOptionsOneOf, PluginType, type PluginTypeWithLiterals, type PluginUpdate, type PublishPluginOptions, QueryOperator, type QueryOperatorWithLiterals, type Reference, type RestorationCollection, type RestoreDataCollectionRequest, type RestoreDataCollectionResponse, type RestoreDataCollectionsFromSnapshotRequest, type RestoreDataCollectionsFromSnapshotResponse, type RestoreInfo, Role, type RoleWithLiterals, Segment, type SegmentWithLiterals, type SingleItemPluginOptions, type SiteSort, type Slug, type SnapshotCollection, type Sort, SortOrder, type SortOrderWithLiterals, type Sorting, Status, type StatusWithLiterals, type StringLengthRange, TenantMode, type TenantModeWithLiterals, Type, type TypeMetadata, type TypeMetadataMetadataOneOf, type TypeWithLiterals, type UpdateDataCollectionFieldOptions, type UpdateDataCollectionFieldRequest, type UpdateDataCollectionFieldResponse, type UpdateDataCollectionRequest, type UpdateDataCollectionResponse, type UpdateDataPermissionsRequest, type UpdateDataPermissionsResponse, type UrlizedOnlyPattern, type UrlizedPluginOptions, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type _Array, type _Object, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, getDataCollection, listDataCollections, patchDataCollectionField, updateDataCollection, updateDataCollectionField };
2002
+ export { AccessLevel, type AccessLevelWithLiterals, type ActionEvent, type AddDataCollectionPluginOptions, type AddDataCollectionPluginRequest, type AddDataCollectionPluginResponse, type AllowedDataPermissions, type AppOptions, type ApplicationError, type ArraySizeRange, type BulkGetDataCollectionsPageBySnapshotsRequest, type BulkGetDataCollectionsPageBySnapshotsRequestTenantModeOptionsOneOf, type BulkGetDataCollectionsPageBySnapshotsResponse, type BulkGetDataCollectionsRequest, type BulkGetDataCollectionsResponse, type Calculator, type CalculatorPatternOneOf, type CatalogOptions, type CmsOptions, type CollectionCapabilities, type CollectionDefinition, CollectionOperation, type CollectionOperationWithLiterals, CollectionType, type CollectionTypeWithLiterals, type CreateAppCollectionsSnapshotRequest, type CreateAppCollectionsSnapshotResponse, type CreateDataCollectionFieldOptions, type CreateDataCollectionFieldRequest, type CreateDataCollectionFieldResponse, type CreateDataCollectionRequest, type CreateDataCollectionResponse, type CreateDataCollectionsSnapshotRequest, type CreateDataCollectionsSnapshotResponse, type CreateMigratedCollectionsSnapshotRequest, type CreateMigratedCollectionsSnapshotResponse, type DataCollection, type DataCollectionChangedEvent, type DataCollectionClonedEvent, type DataCollectionEvictedEvent, DataOperation, type DataOperationWithLiterals, type DataPermissions, type DeleteDataCollectionFieldOptions, type DeleteDataCollectionFieldRequest, type DeleteDataCollectionFieldResponse, type DeleteDataCollectionPluginOptions, type DeleteDataCollectionPluginRequest, type DeleteDataCollectionPluginResponse, type DeleteDataCollectionRequest, type DeleteDataCollectionResponse, type DeleteDataCollectionsSnapshotRequest, type DeleteDataCollectionsSnapshotResponse, type Destination, Direction, type DirectionWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type FailedCollection, type Failure, type Field, type FieldCapabilities, type FieldPlugin, type FieldPluginOptionsOneOf, FieldPluginType, type FieldPluginTypeWithLiterals, type FieldRangeValidationsOneOf, type FieldUpdate, type FieldsPattern, Format, type FormatWithLiterals, type GetDataCollectionOptions, type GetDataCollectionRequest, type GetDataCollectionResponse, type IdentificationData, type IdentificationDataIdOneOf, type Index, type IndexField, type IndexLimits, type IndexQuotaLimits, IndexSource, type IndexSourceWithLiterals, IndexStatus, type IndexStatusWithLiterals, type ListDataCollectionsOptions, type ListDataCollectionsRequest, type ListDataCollectionsResponse, type MessageEnvelope, type MultiReference, type MultilingualOptions, type NumberRange, type ObjectField, Order, type OrderWithLiterals, type PageLink, type PageLinkPluginOptions, type Paging, type PagingMetadataV2, PagingMode, type PagingModeWithLiterals, type PatchDataCollection, type PatchDataCollectionField, type PatchDataCollectionFieldIdentifiers, type PatchDataCollectionFieldRequest, type PatchDataCollectionFieldResponse, type PatchDataCollectionRequest, type PatchDataCollectionResponse, type Permissions, type Plugin, type PluginCmsOptions, type PluginOptionsOneOf, PluginType, type PluginTypeWithLiterals, type PluginUpdate, type PublishPluginOptions, QueryOperator, type QueryOperatorWithLiterals, type Reference, type RestorationCollection, type RestoreDataCollectionRequest, type RestoreDataCollectionResponse, type RestoreDataCollectionsFromSnapshotRequest, type RestoreDataCollectionsFromSnapshotResponse, type RestoreInfo, Role, type RoleWithLiterals, Segment, type SegmentWithLiterals, type SingleItemPluginOptions, type SiteSort, type Slug, type SnapshotCollection, type Sort, SortOrder, type SortOrderWithLiterals, type Sorting, Status, type StatusWithLiterals, type StringLengthRange, TenantMode, type TenantModeWithLiterals, Type, type TypeMetadata, type TypeMetadataMetadataOneOf, type TypeWithLiterals, type UpdateDataCollectionFieldOptions, type UpdateDataCollectionFieldRequest, type UpdateDataCollectionFieldResponse, type UpdateDataCollectionRequest, type UpdateDataCollectionResponse, type UpdateDataPermissionsRequest, type UpdateDataPermissionsResponse, type UrlizedOnlyPattern, type UrlizedPluginOptions, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type _Array, type _Object, addDataCollectionPlugin, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, deleteDataCollectionPlugin, getDataCollection, listDataCollections, patchDataCollectionField, updateDataCollection, updateDataCollectionField };
@@ -40,10 +40,12 @@ __export(index_typings_exports, {
40
40
  TenantMode: () => TenantMode,
41
41
  Type: () => Type,
42
42
  WebhookIdentityType: () => WebhookIdentityType,
43
+ addDataCollectionPlugin: () => addDataCollectionPlugin2,
43
44
  createDataCollection: () => createDataCollection2,
44
45
  createDataCollectionField: () => createDataCollectionField2,
45
46
  deleteDataCollection: () => deleteDataCollection2,
46
47
  deleteDataCollectionField: () => deleteDataCollectionField2,
48
+ deleteDataCollectionPlugin: () => deleteDataCollectionPlugin2,
47
49
  getDataCollection: () => getDataCollection2,
48
50
  listDataCollections: () => listDataCollections2,
49
51
  patchDataCollection: () => patchDataCollection2,
@@ -849,6 +851,76 @@ function deleteDataCollectionField(payload) {
849
851
  }
850
852
  return __deleteDataCollectionField;
851
853
  }
854
+ function addDataCollectionPlugin(payload) {
855
+ function __addDataCollectionPlugin({ host }) {
856
+ const metadata = {
857
+ entityFqdn: "wix.data.v2.data_collection",
858
+ method: "POST",
859
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.AddDataCollectionPlugin",
860
+ packageName: PACKAGE_NAME,
861
+ migrationOptions: {
862
+ optInTransformResponse: true
863
+ },
864
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
865
+ { protoPath: "/v2/collections/add-plugin", data: payload, host }
866
+ ),
867
+ data: payload,
868
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
869
+ {
870
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
871
+ paths: [
872
+ { path: "dataCollection.createdDate" },
873
+ { path: "dataCollection.updatedDate" }
874
+ ]
875
+ },
876
+ {
877
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
878
+ paths: [
879
+ { path: "dataCollection.fields.numberRange.min" },
880
+ { path: "dataCollection.fields.numberRange.max" }
881
+ ]
882
+ }
883
+ ])
884
+ };
885
+ return metadata;
886
+ }
887
+ return __addDataCollectionPlugin;
888
+ }
889
+ function deleteDataCollectionPlugin(payload) {
890
+ function __deleteDataCollectionPlugin({ host }) {
891
+ const metadata = {
892
+ entityFqdn: "wix.data.v2.data_collection",
893
+ method: "POST",
894
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollectionPlugin",
895
+ packageName: PACKAGE_NAME,
896
+ migrationOptions: {
897
+ optInTransformResponse: true
898
+ },
899
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
900
+ { protoPath: "/v2/collections/delete-plugin", data: payload, host }
901
+ ),
902
+ data: payload,
903
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
904
+ {
905
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
906
+ paths: [
907
+ { path: "dataCollection.createdDate" },
908
+ { path: "dataCollection.updatedDate" }
909
+ ]
910
+ },
911
+ {
912
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
913
+ paths: [
914
+ { path: "dataCollection.fields.numberRange.min" },
915
+ { path: "dataCollection.fields.numberRange.max" }
916
+ ]
917
+ }
918
+ ])
919
+ };
920
+ return metadata;
921
+ }
922
+ return __deleteDataCollectionPlugin;
923
+ }
852
924
  function patchDataCollectionField(payload) {
853
925
  function __patchDataCollectionField({ host }) {
854
926
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -1372,6 +1444,64 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
1372
1444
  throw transformedError;
1373
1445
  }
1374
1446
  }
1447
+ async function addDataCollectionPlugin2(dataCollectionId, options) {
1448
+ const { httpClient, sideEffects } = arguments[2];
1449
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1450
+ dataCollectionId,
1451
+ plugin: options?.plugin
1452
+ });
1453
+ const reqOpts = addDataCollectionPlugin(payload);
1454
+ sideEffects?.onSiteCall?.();
1455
+ try {
1456
+ const result = await httpClient.request(reqOpts);
1457
+ sideEffects?.onSuccess?.(result);
1458
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1459
+ } catch (err) {
1460
+ const transformedError = (0, import_transform_error.transformError)(
1461
+ err,
1462
+ {
1463
+ spreadPathsToArguments: {},
1464
+ explicitPathsToArguments: {
1465
+ dataCollectionId: "$[0]",
1466
+ plugin: "$[1].plugin"
1467
+ },
1468
+ singleArgumentUnchanged: false
1469
+ },
1470
+ ["dataCollectionId", "options"]
1471
+ );
1472
+ sideEffects?.onError?.(err);
1473
+ throw transformedError;
1474
+ }
1475
+ }
1476
+ async function deleteDataCollectionPlugin2(dataCollectionId, options) {
1477
+ const { httpClient, sideEffects } = arguments[2];
1478
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1479
+ dataCollectionId,
1480
+ pluginType: options?.pluginType
1481
+ });
1482
+ const reqOpts = deleteDataCollectionPlugin(payload);
1483
+ sideEffects?.onSiteCall?.();
1484
+ try {
1485
+ const result = await httpClient.request(reqOpts);
1486
+ sideEffects?.onSuccess?.(result);
1487
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1488
+ } catch (err) {
1489
+ const transformedError = (0, import_transform_error.transformError)(
1490
+ err,
1491
+ {
1492
+ spreadPathsToArguments: {},
1493
+ explicitPathsToArguments: {
1494
+ dataCollectionId: "$[0]",
1495
+ pluginType: "$[1].pluginType"
1496
+ },
1497
+ singleArgumentUnchanged: false
1498
+ },
1499
+ ["dataCollectionId", "options"]
1500
+ );
1501
+ sideEffects?.onError?.(err);
1502
+ throw transformedError;
1503
+ }
1504
+ }
1375
1505
  async function patchDataCollectionField2(identifiers, field) {
1376
1506
  const { httpClient, sideEffects } = arguments[2];
1377
1507
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -1423,10 +1553,12 @@ async function patchDataCollectionField2(identifiers, field) {
1423
1553
  TenantMode,
1424
1554
  Type,
1425
1555
  WebhookIdentityType,
1556
+ addDataCollectionPlugin,
1426
1557
  createDataCollection,
1427
1558
  createDataCollectionField,
1428
1559
  deleteDataCollection,
1429
1560
  deleteDataCollectionField,
1561
+ deleteDataCollectionPlugin,
1430
1562
  getDataCollection,
1431
1563
  listDataCollections,
1432
1564
  patchDataCollection,