@wix/auto_sdk_data_collections 1.0.40 → 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 +188 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +194 -1
  5. package/build/cjs/index.typings.js +170 -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 +155 -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 +186 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +194 -1
  14. package/build/es/index.typings.mjs +168 -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 +153 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +22 -3
  20. package/build/internal/cjs/index.js +188 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +218 -1
  23. package/build/internal/cjs/index.typings.js +170 -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 +155 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +22 -3
  29. package/build/internal/es/index.mjs +186 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +218 -1
  32. package/build/internal/es/index.typings.mjs +168 -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 +153 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -1075,6 +1075,14 @@ interface RestoreDataCollectionResponse {
1075
1075
  /** Restored data collection */
1076
1076
  dataCollection?: DataCollection;
1077
1077
  }
1078
+ interface PatchDataCollectionRequest {
1079
+ /** Data collection to patch. Only fields specified in the field_mask are updated. */
1080
+ dataCollection: DataCollection;
1081
+ }
1082
+ interface PatchDataCollectionResponse {
1083
+ /** The updated data collection. */
1084
+ dataCollection?: DataCollection;
1085
+ }
1078
1086
  interface CreateDataCollectionFieldRequest {
1079
1087
  /**
1080
1088
  * ID of the data collection to update.
@@ -1117,6 +1125,19 @@ interface DeleteDataCollectionFieldResponse {
1117
1125
  /** Updated data collection. */
1118
1126
  dataCollection?: DataCollection;
1119
1127
  }
1128
+ interface PatchDataCollectionFieldRequest {
1129
+ /**
1130
+ * ID of the data collection to update.
1131
+ * @maxLength 256
1132
+ */
1133
+ dataCollectionId: string;
1134
+ /** Field to patch. */
1135
+ field: Field;
1136
+ }
1137
+ interface PatchDataCollectionFieldResponse {
1138
+ /** Updated data collection. */
1139
+ dataCollection?: DataCollection;
1140
+ }
1120
1141
  interface UpdateDataPermissionsRequest {
1121
1142
  /**
1122
1143
  * ID of data collections to update
@@ -1737,6 +1758,116 @@ declare function deleteDataCollection(dataCollectionId: string): Promise<void>;
1737
1758
  * @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.RestoreDataCollection
1738
1759
  */
1739
1760
  declare function restoreDataCollection(dataCollectionId: string): Promise<NonNullablePaths<RestoreDataCollectionResponse, `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>>;
1761
+ /**
1762
+ * Patches (partial update) a data collection.
1763
+ * @param _id - Collection ID. For example, `my-first-collection`. May include a namespace.
1764
+ * @internal
1765
+ * @documentationMaturity preview
1766
+ * @requiredField _id
1767
+ * @requiredField dataCollection
1768
+ * @requiredField dataCollection.revision
1769
+ * @permissionId WIX_DATA.UPDATE_COLLECTION
1770
+ * @applicableIdentity APP
1771
+ * @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollection
1772
+ */
1773
+ declare function patchDataCollection(_id: string, dataCollection: NonNullablePaths<PatchDataCollection, `revision`, 2>): Promise<NonNullablePaths<PatchDataCollectionResponse, `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>>;
1774
+ interface PatchDataCollection {
1775
+ /**
1776
+ * Collection ID. For example, `my-first-collection`. May include a namespace.
1777
+ * @immutable
1778
+ * @maxLength 256
1779
+ */
1780
+ _id?: string;
1781
+ /**
1782
+ * Collection type. Indicates how the collection was created and how it is stored.
1783
+ * @readonly
1784
+ */
1785
+ collectionType?: CollectionTypeWithLiterals;
1786
+ /**
1787
+ * ID of the app that defined this collection. For collections defined by Wix users, this value is null.
1788
+ * @format GUID
1789
+ * @readonly
1790
+ */
1791
+ ownerAppId?: string | null;
1792
+ /**
1793
+ * Maximum number of items returned in a single query, based on the underlying storage.
1794
+ * Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
1795
+ * External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
1796
+ * @readonly
1797
+ */
1798
+ maxPageSize?: number | null;
1799
+ /**
1800
+ * Collection's display name as shown in the CMS. For example, `My First Collection`.
1801
+ * @maxLength 1000
1802
+ */
1803
+ displayName?: string | null;
1804
+ /**
1805
+ * Default item sorting order when a query doesn't specify one.
1806
+ * @readonly
1807
+ */
1808
+ defaultDisplayOrder?: Sort;
1809
+ /**
1810
+ * UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
1811
+ * Empty for all data collections not owned by Wix apps.
1812
+ * @readonly
1813
+ * @maxLength 1000
1814
+ */
1815
+ displayNamespace?: string | null;
1816
+ /**
1817
+ * Field whose value the CMS displays to represent the collection item when referenced in a different collection.
1818
+ * @maxLength 1000
1819
+ */
1820
+ displayField?: string | null;
1821
+ /**
1822
+ * Capabilities the collection supports.
1823
+ * @readonly
1824
+ */
1825
+ capabilities?: CollectionCapabilities;
1826
+ /**
1827
+ * Collection's field structure.
1828
+ * @maxSize 1000
1829
+ */
1830
+ fields?: Field[];
1831
+ /** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
1832
+ permissions?: Permissions;
1833
+ /**
1834
+ * Collection's current revision number, which increments each time the collection is updated. For an update operation to succeed, you must specify the latest revision number.
1835
+ * @readonly
1836
+ */
1837
+ revision?: string | null;
1838
+ /**
1839
+ * Plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality.
1840
+ * @maxSize 100
1841
+ */
1842
+ plugins?: Plugin[];
1843
+ /**
1844
+ * Paging modes the collection supports. In native collections, offset-based paging is supported by default.
1845
+ * @readonly
1846
+ * @maxSize 2
1847
+ */
1848
+ pagingModes?: PagingModeWithLiterals[];
1849
+ /**
1850
+ * Date the collection was created.
1851
+ * @readonly
1852
+ */
1853
+ _createdDate?: Date | null;
1854
+ /**
1855
+ * Date the collection was last updated.
1856
+ * @readonly
1857
+ */
1858
+ _updatedDate?: Date | null;
1859
+ /**
1860
+ * Levels of permission for accessing and modifying data.
1861
+ * @internal
1862
+ */
1863
+ dataPermissions?: DataPermissions;
1864
+ /**
1865
+ * Actual data operations permitted for the caller. Included only if requested by `include_allowed_data_permissions`
1866
+ * @internal
1867
+ * @readonly
1868
+ */
1869
+ allowedDataPermissions?: AllowedDataPermissions;
1870
+ }
1740
1871
  /**
1741
1872
  * Adds a new field to the structure of a data collection.
1742
1873
  * @param dataCollectionId - ID of the data collection to update.
@@ -1798,5 +1929,91 @@ interface DeleteDataCollectionFieldOptions {
1798
1929
  */
1799
1930
  fieldKey: string;
1800
1931
  }
1932
+ /**
1933
+ * Patches (partial update) a field in the structure of a data collection.
1934
+ * @public
1935
+ * @documentationMaturity preview
1936
+ * @requiredField field
1937
+ * @requiredField identifiers
1938
+ * @requiredField identifiers.dataCollectionId
1939
+ * @requiredField identifiers.fieldKey
1940
+ * @permissionId WIX_DATA.UPDATE_COLLECTION_FIELD
1941
+ * @applicableIdentity APP
1942
+ * @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField
1943
+ */
1944
+ declare function patchDataCollectionField(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>>;
1945
+ interface PatchDataCollectionFieldIdentifiers {
1946
+ /**
1947
+ * ID of the data collection to update.
1948
+ * @maxLength 256
1949
+ */
1950
+ dataCollectionId: string;
1951
+ /**
1952
+ * Unique identifier for the field. For example, `firstName`.
1953
+ * @maxLength 1000
1954
+ */
1955
+ fieldKey?: string;
1956
+ }
1957
+ interface PatchDataCollectionField {
1958
+ /** Range of possible values for a numerical field. */
1959
+ numberRange?: NumberRange;
1960
+ /** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
1961
+ stringLengthRange?: StringLengthRange;
1962
+ /** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
1963
+ arraySizeRange?: ArraySizeRange;
1964
+ /**
1965
+ * Field's display name when displayed in the CMS. For example, `First Name`.
1966
+ * @maxLength 1000
1967
+ */
1968
+ displayName?: string | null;
1969
+ /**
1970
+ * Field's data type.
1971
+ *
1972
+ * Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data).
1973
+ */
1974
+ type?: TypeWithLiterals;
1975
+ /** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
1976
+ typeMetadata?: TypeMetadata;
1977
+ /**
1978
+ * Whether the field is a system field.
1979
+ * @readonly
1980
+ */
1981
+ systemField?: boolean;
1982
+ /**
1983
+ * Capabilities the field supports.
1984
+ * @readonly
1985
+ */
1986
+ capabilities?: FieldCapabilities;
1987
+ /** Whether the field is encrypted. */
1988
+ encrypted?: boolean;
1989
+ /**
1990
+ * Field description.
1991
+ * @maxLength 16000
1992
+ */
1993
+ description?: string | null;
1994
+ /**
1995
+ * Whether the field is read-only. A read-only field can't be changed.
1996
+ *
1997
+ * Default: `false`
1998
+ */
1999
+ readOnly?: boolean | null;
2000
+ /**
2001
+ * Whether the field is immutable. An immutable field can be set once, but then cannot be updated.
2002
+ *
2003
+ * Default: `false`
2004
+ */
2005
+ immutable?: boolean | null;
2006
+ /**
2007
+ * Whether the field is required.
2008
+ *
2009
+ * Default: `false`
2010
+ */
2011
+ required?: boolean | null;
2012
+ /**
2013
+ * Additional optional plugins for the field.
2014
+ * @maxSize 100
2015
+ */
2016
+ plugins?: FieldPlugin[];
2017
+ }
1801
2018
 
1802
- 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 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, restoreDataCollection, updateDataCollection, updateDataCollectionField };
2019
+ 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, patchDataCollection, patchDataCollectionField, restoreDataCollection, updateDataCollection, updateDataCollectionField };
@@ -11,6 +11,7 @@ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/f
11
11
  import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
12
12
  import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
13
13
  import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
14
+ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
14
15
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
15
16
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
16
17
  function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(opts) {
@@ -605,6 +606,65 @@ function restoreDataCollection(payload) {
605
606
  }
606
607
  return __restoreDataCollection;
607
608
  }
609
+ function patchDataCollection(payload) {
610
+ function __patchDataCollection({ host }) {
611
+ const serializedData = transformPaths(payload, [
612
+ {
613
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
614
+ paths: [{ path: "fieldMask" }]
615
+ },
616
+ {
617
+ transformFn: transformSDKTimestampToRESTTimestamp,
618
+ paths: [
619
+ { path: "dataCollection.createdDate" },
620
+ { path: "dataCollection.updatedDate" }
621
+ ]
622
+ },
623
+ {
624
+ transformFn: transformSDKFloatToRESTFloat,
625
+ paths: [
626
+ { path: "dataCollection.fields.numberRange.min" },
627
+ { path: "dataCollection.fields.numberRange.max" }
628
+ ]
629
+ }
630
+ ]);
631
+ const metadata = {
632
+ entityFqdn: "wix.data.v2.data_collection",
633
+ method: "PATCH",
634
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollection",
635
+ packageName: PACKAGE_NAME,
636
+ migrationOptions: {
637
+ optInTransformResponse: true
638
+ },
639
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
640
+ {
641
+ protoPath: "/v2/collections/{dataCollection.id}",
642
+ data: serializedData,
643
+ host
644
+ }
645
+ ),
646
+ data: serializedData,
647
+ transformResponse: (payload2) => transformPaths(payload2, [
648
+ {
649
+ transformFn: transformRESTTimestampToSDKTimestamp,
650
+ paths: [
651
+ { path: "dataCollection.createdDate" },
652
+ { path: "dataCollection.updatedDate" }
653
+ ]
654
+ },
655
+ {
656
+ transformFn: transformRESTFloatToSDKFloat,
657
+ paths: [
658
+ { path: "dataCollection.fields.numberRange.min" },
659
+ { path: "dataCollection.fields.numberRange.max" }
660
+ ]
661
+ }
662
+ ])
663
+ };
664
+ return metadata;
665
+ }
666
+ return __patchDataCollection;
667
+ }
608
668
  function createDataCollectionField(payload) {
609
669
  function __createDataCollectionField({ host }) {
610
670
  const serializedData = transformPaths(payload, [
@@ -736,6 +796,58 @@ function deleteDataCollectionField(payload) {
736
796
  }
737
797
  return __deleteDataCollectionField;
738
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
+ }
739
851
 
740
852
  // src/data-v2-data-collection-collections.universal.ts
741
853
  var CollectionType = /* @__PURE__ */ ((CollectionType2) => {
@@ -1095,6 +1207,31 @@ async function restoreDataCollection2(dataCollectionId) {
1095
1207
  throw transformedError;
1096
1208
  }
1097
1209
  }
1210
+ async function patchDataCollection2(_id, dataCollection) {
1211
+ const { httpClient, sideEffects } = arguments[2];
1212
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1213
+ dataCollection: { ...dataCollection, id: _id }
1214
+ });
1215
+ const reqOpts = patchDataCollection(payload);
1216
+ sideEffects?.onSiteCall?.();
1217
+ try {
1218
+ const result = await httpClient.request(reqOpts);
1219
+ sideEffects?.onSuccess?.(result);
1220
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1221
+ } catch (err) {
1222
+ const transformedError = sdkTransformError(
1223
+ err,
1224
+ {
1225
+ spreadPathsToArguments: { dataCollection: "$[1]" },
1226
+ explicitPathsToArguments: { "dataCollection.id": "$[0]" },
1227
+ singleArgumentUnchanged: false
1228
+ },
1229
+ ["_id", "dataCollection"]
1230
+ );
1231
+ sideEffects?.onError?.(err);
1232
+ throw transformedError;
1233
+ }
1234
+ }
1098
1235
  async function createDataCollectionField2(dataCollectionId, options) {
1099
1236
  const { httpClient, sideEffects } = arguments[2];
1100
1237
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1182,6 +1319,35 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
1182
1319
  throw transformedError;
1183
1320
  }
1184
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
+ }
1185
1351
  export {
1186
1352
  AccessLevel,
1187
1353
  CollectionOperation,
@@ -1209,6 +1375,8 @@ export {
1209
1375
  deleteDataCollectionField2 as deleteDataCollectionField,
1210
1376
  getDataCollection2 as getDataCollection,
1211
1377
  listDataCollections2 as listDataCollections,
1378
+ patchDataCollection2 as patchDataCollection,
1379
+ patchDataCollectionField2 as patchDataCollectionField,
1212
1380
  restoreDataCollection2 as restoreDataCollection,
1213
1381
  updateDataCollection2 as updateDataCollection,
1214
1382
  updateDataCollectionField2 as updateDataCollectionField