@wix/auto_sdk_data_collections 1.0.41 → 1.0.42

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 +2 -2
@@ -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.js';
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.js';
2
+ import { DataCollection, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, RestoreDataCollectionResponse, PatchDataCollection, PatchDataCollectionResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, PatchDataCollectionFieldIdentifiers, PatchDataCollectionField, PatchDataCollectionFieldResponse } from './index.typings.js';
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.js';
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 };
@@ -47,6 +47,7 @@ __export(index_exports, {
47
47
  getDataCollection: () => getDataCollection4,
48
48
  listDataCollections: () => listDataCollections4,
49
49
  patchDataCollection: () => patchDataCollection4,
50
+ patchDataCollectionField: () => patchDataCollectionField4,
50
51
  restoreDataCollection: () => restoreDataCollection4,
51
52
  updateDataCollection: () => updateDataCollection4,
52
53
  updateDataCollectionField: () => updateDataCollectionField4
@@ -848,6 +849,58 @@ function deleteDataCollectionField(payload) {
848
849
  }
849
850
  return __deleteDataCollectionField;
850
851
  }
852
+ function patchDataCollectionField(payload) {
853
+ function __patchDataCollectionField({ host }) {
854
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
855
+ {
856
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
857
+ paths: [{ path: "fieldMask" }]
858
+ },
859
+ {
860
+ transformFn: import_float.transformSDKFloatToRESTFloat,
861
+ paths: [
862
+ { path: "field.numberRange.min" },
863
+ { path: "field.numberRange.max" }
864
+ ]
865
+ }
866
+ ]);
867
+ const metadata = {
868
+ entityFqdn: "wix.data.v2.data_collection",
869
+ method: "PATCH",
870
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
871
+ packageName: PACKAGE_NAME,
872
+ migrationOptions: {
873
+ optInTransformResponse: true
874
+ },
875
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
876
+ {
877
+ protoPath: "/v2/collections/{dataCollectionId}/fields/{field.key}",
878
+ data: serializedData,
879
+ host
880
+ }
881
+ ),
882
+ data: serializedData,
883
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
884
+ {
885
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
886
+ paths: [
887
+ { path: "dataCollection.createdDate" },
888
+ { path: "dataCollection.updatedDate" }
889
+ ]
890
+ },
891
+ {
892
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
893
+ paths: [
894
+ { path: "dataCollection.fields.numberRange.min" },
895
+ { path: "dataCollection.fields.numberRange.max" }
896
+ ]
897
+ }
898
+ ])
899
+ };
900
+ return metadata;
901
+ }
902
+ return __patchDataCollectionField;
903
+ }
851
904
 
852
905
  // src/data-v2-data-collection-collections.universal.ts
853
906
  var CollectionType = /* @__PURE__ */ ((CollectionType2) => {
@@ -1319,6 +1372,35 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
1319
1372
  throw transformedError;
1320
1373
  }
1321
1374
  }
1375
+ async function patchDataCollectionField2(identifiers, field) {
1376
+ const { httpClient, sideEffects } = arguments[2];
1377
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1378
+ dataCollectionId: identifiers?.dataCollectionId,
1379
+ field: { ...field, key: identifiers?.fieldKey }
1380
+ });
1381
+ const reqOpts = patchDataCollectionField(payload);
1382
+ sideEffects?.onSiteCall?.();
1383
+ try {
1384
+ const result = await httpClient.request(reqOpts);
1385
+ sideEffects?.onSuccess?.(result);
1386
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1387
+ } catch (err) {
1388
+ const transformedError = (0, import_transform_error.transformError)(
1389
+ err,
1390
+ {
1391
+ spreadPathsToArguments: { field: "$[1]" },
1392
+ explicitPathsToArguments: {
1393
+ dataCollectionId: "$[0].dataCollectionId",
1394
+ "field.key": "$[0].fieldKey"
1395
+ },
1396
+ singleArgumentUnchanged: false
1397
+ },
1398
+ ["identifiers", "field"]
1399
+ );
1400
+ sideEffects?.onError?.(err);
1401
+ throw transformedError;
1402
+ }
1403
+ }
1322
1404
 
1323
1405
  // src/data-v2-data-collection-collections.public.ts
1324
1406
  function createDataCollection3(httpClient) {
@@ -1396,6 +1478,14 @@ function deleteDataCollectionField3(httpClient) {
1396
1478
  { httpClient }
1397
1479
  );
1398
1480
  }
1481
+ function patchDataCollectionField3(httpClient) {
1482
+ return (identifiers, field) => patchDataCollectionField2(
1483
+ identifiers,
1484
+ field,
1485
+ // @ts-ignore
1486
+ { httpClient }
1487
+ );
1488
+ }
1399
1489
 
1400
1490
  // src/data-v2-data-collection-collections.context.ts
1401
1491
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
@@ -1409,6 +1499,7 @@ var patchDataCollection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTMo
1409
1499
  var createDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDataCollectionField3);
1410
1500
  var updateDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateDataCollectionField3);
1411
1501
  var deleteDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteDataCollectionField3);
1502
+ var patchDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(patchDataCollectionField3);
1412
1503
  // Annotate the CommonJS export names for ESM import in node:
1413
1504
  0 && (module.exports = {
1414
1505
  AccessLevel,
@@ -1438,6 +1529,7 @@ var deleteDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.create
1438
1529
  getDataCollection,
1439
1530
  listDataCollections,
1440
1531
  patchDataCollection,
1532
+ patchDataCollectionField,
1441
1533
  restoreDataCollection,
1442
1534
  updateDataCollection,
1443
1535
  updateDataCollectionField