@wix/auto_sdk_data_collections 1.0.41 → 1.0.43

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 +11 -3
  2. package/build/cjs/index.js +92 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +100 -1
  5. package/build/cjs/index.typings.js +83 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +19 -2
  8. package/build/cjs/meta.js +75 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +11 -3
  11. package/build/es/index.mjs +91 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +100 -1
  14. package/build/es/index.typings.mjs +82 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +19 -2
  17. package/build/es/meta.mjs +74 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +11 -3
  20. package/build/internal/cjs/index.js +92 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +100 -1
  23. package/build/internal/cjs/index.typings.js +83 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +19 -2
  26. package/build/internal/cjs/meta.js +75 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +11 -3
  29. package/build/internal/es/index.mjs +91 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +100 -1
  32. package/build/internal/es/index.typings.mjs +82 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +19 -2
  35. package/build/internal/es/meta.mjs +74 -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, RestoreDataCollectionResponse, PatchDataCollection, PatchDataCollectionResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse } 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, PatchDataCollectionRequest, Permissions, Plugin, PluginCmsOptions, PluginOptionsOneOf, PluginType, PluginTypeWithLiterals, PluginUpdate, PublishPluginOptions, QueryOperator, QueryOperatorWithLiterals, Reference, RestorationCollection, RestoreDataCollectionRequest, 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, RestoreDataCollectionResponse, PatchDataCollection, PatchDataCollectionResponse, 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, PatchDataCollectionFieldRequest, PatchDataCollectionRequest, Permissions, Plugin, PluginCmsOptions, PluginOptionsOneOf, PluginType, PluginTypeWithLiterals, PluginUpdate, PublishPluginOptions, QueryOperator, QueryOperatorWithLiterals, Reference, RestorationCollection, RestoreDataCollectionRequest, 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 {
@@ -121,6 +121,13 @@ interface DeleteDataCollectionFieldSignature {
121
121
  */
122
122
  (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>>;
123
123
  }
124
+ declare function patchDataCollectionField$1(httpClient: HttpClient): PatchDataCollectionFieldSignature;
125
+ interface PatchDataCollectionFieldSignature {
126
+ /**
127
+ * Patches (partial update) a field in the structure of a data collection.
128
+ */
129
+ (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>>;
130
+ }
124
131
 
125
132
  declare const createDataCollection: MaybeContext<BuildRESTFunction<typeof createDataCollection$1> & typeof createDataCollection$1>;
126
133
  declare const getDataCollection: MaybeContext<BuildRESTFunction<typeof getDataCollection$1> & typeof getDataCollection$1>;
@@ -134,5 +141,6 @@ declare const patchDataCollection: MaybeContext<BuildRESTFunction<typeof patchDa
134
141
  declare const createDataCollectionField: MaybeContext<BuildRESTFunction<typeof createDataCollectionField$1> & typeof createDataCollectionField$1>;
135
142
  declare const updateDataCollectionField: MaybeContext<BuildRESTFunction<typeof updateDataCollectionField$1> & typeof updateDataCollectionField$1>;
136
143
  declare const deleteDataCollectionField: MaybeContext<BuildRESTFunction<typeof deleteDataCollectionField$1> & typeof deleteDataCollectionField$1>;
144
+ declare const patchDataCollectionField: MaybeContext<BuildRESTFunction<typeof patchDataCollectionField$1> & typeof patchDataCollectionField$1>;
137
145
 
138
- export { CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, PatchDataCollection, PatchDataCollectionResponse, RestoreDataCollectionResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, getDataCollection, listDataCollections, patchDataCollection, restoreDataCollection, updateDataCollection, updateDataCollectionField };
146
+ export { CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, PatchDataCollection, PatchDataCollectionField, PatchDataCollectionFieldIdentifiers, PatchDataCollectionFieldResponse, PatchDataCollectionResponse, RestoreDataCollectionResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, getDataCollection, listDataCollections, patchDataCollection, patchDataCollectionField, restoreDataCollection, updateDataCollection, updateDataCollectionField };
@@ -796,6 +796,58 @@ function deleteDataCollectionField(payload) {
796
796
  }
797
797
  return __deleteDataCollectionField;
798
798
  }
799
+ function patchDataCollectionField(payload) {
800
+ function __patchDataCollectionField({ host }) {
801
+ const serializedData = transformPaths(payload, [
802
+ {
803
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
804
+ paths: [{ path: "fieldMask" }]
805
+ },
806
+ {
807
+ transformFn: transformSDKFloatToRESTFloat,
808
+ paths: [
809
+ { path: "field.numberRange.min" },
810
+ { path: "field.numberRange.max" }
811
+ ]
812
+ }
813
+ ]);
814
+ const metadata = {
815
+ entityFqdn: "wix.data.v2.data_collection",
816
+ method: "PATCH",
817
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
818
+ packageName: PACKAGE_NAME,
819
+ migrationOptions: {
820
+ optInTransformResponse: true
821
+ },
822
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
823
+ {
824
+ protoPath: "/v2/collections/{dataCollectionId}/fields/{field.key}",
825
+ data: serializedData,
826
+ host
827
+ }
828
+ ),
829
+ data: serializedData,
830
+ transformResponse: (payload2) => transformPaths(payload2, [
831
+ {
832
+ transformFn: transformRESTTimestampToSDKTimestamp,
833
+ paths: [
834
+ { path: "dataCollection.createdDate" },
835
+ { path: "dataCollection.updatedDate" }
836
+ ]
837
+ },
838
+ {
839
+ transformFn: transformRESTFloatToSDKFloat,
840
+ paths: [
841
+ { path: "dataCollection.fields.numberRange.min" },
842
+ { path: "dataCollection.fields.numberRange.max" }
843
+ ]
844
+ }
845
+ ])
846
+ };
847
+ return metadata;
848
+ }
849
+ return __patchDataCollectionField;
850
+ }
799
851
 
800
852
  // src/data-v2-data-collection-collections.universal.ts
801
853
  var CollectionType = /* @__PURE__ */ ((CollectionType2) => {
@@ -1267,6 +1319,35 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
1267
1319
  throw transformedError;
1268
1320
  }
1269
1321
  }
1322
+ async function patchDataCollectionField2(identifiers, field) {
1323
+ const { httpClient, sideEffects } = arguments[2];
1324
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1325
+ dataCollectionId: identifiers?.dataCollectionId,
1326
+ field: { ...field, key: identifiers?.fieldKey }
1327
+ });
1328
+ const reqOpts = patchDataCollectionField(payload);
1329
+ sideEffects?.onSiteCall?.();
1330
+ try {
1331
+ const result = await httpClient.request(reqOpts);
1332
+ sideEffects?.onSuccess?.(result);
1333
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1334
+ } catch (err) {
1335
+ const transformedError = sdkTransformError(
1336
+ err,
1337
+ {
1338
+ spreadPathsToArguments: { field: "$[1]" },
1339
+ explicitPathsToArguments: {
1340
+ dataCollectionId: "$[0].dataCollectionId",
1341
+ "field.key": "$[0].fieldKey"
1342
+ },
1343
+ singleArgumentUnchanged: false
1344
+ },
1345
+ ["identifiers", "field"]
1346
+ );
1347
+ sideEffects?.onError?.(err);
1348
+ throw transformedError;
1349
+ }
1350
+ }
1270
1351
 
1271
1352
  // src/data-v2-data-collection-collections.public.ts
1272
1353
  function createDataCollection3(httpClient) {
@@ -1344,6 +1425,14 @@ function deleteDataCollectionField3(httpClient) {
1344
1425
  { httpClient }
1345
1426
  );
1346
1427
  }
1428
+ function patchDataCollectionField3(httpClient) {
1429
+ return (identifiers, field) => patchDataCollectionField2(
1430
+ identifiers,
1431
+ field,
1432
+ // @ts-ignore
1433
+ { httpClient }
1434
+ );
1435
+ }
1347
1436
 
1348
1437
  // src/data-v2-data-collection-collections.context.ts
1349
1438
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
@@ -1357,6 +1446,7 @@ var patchDataCollection4 = /* @__PURE__ */ createRESTModule(patchDataCollection3
1357
1446
  var createDataCollectionField4 = /* @__PURE__ */ createRESTModule(createDataCollectionField3);
1358
1447
  var updateDataCollectionField4 = /* @__PURE__ */ createRESTModule(updateDataCollectionField3);
1359
1448
  var deleteDataCollectionField4 = /* @__PURE__ */ createRESTModule(deleteDataCollectionField3);
1449
+ var patchDataCollectionField4 = /* @__PURE__ */ createRESTModule(patchDataCollectionField3);
1360
1450
  export {
1361
1451
  AccessLevel,
1362
1452
  CollectionOperation,
@@ -1385,6 +1475,7 @@ export {
1385
1475
  getDataCollection4 as getDataCollection,
1386
1476
  listDataCollections4 as listDataCollections,
1387
1477
  patchDataCollection4 as patchDataCollection,
1478
+ patchDataCollectionField4 as patchDataCollectionField,
1388
1479
  restoreDataCollection4 as restoreDataCollection,
1389
1480
  updateDataCollection4 as updateDataCollection,
1390
1481
  updateDataCollectionField4 as updateDataCollectionField