@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.
- package/build/cjs/index.d.ts +11 -3
- package/build/cjs/index.js +188 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +194 -1
- package/build/cjs/index.typings.js +170 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +30 -2
- package/build/cjs/meta.js +155 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +11 -3
- package/build/es/index.mjs +186 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +194 -1
- package/build/es/index.typings.mjs +168 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +30 -2
- package/build/es/meta.mjs +153 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +22 -3
- package/build/internal/cjs/index.js +188 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +218 -1
- package/build/internal/cjs/index.typings.js +170 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +30 -2
- package/build/internal/cjs/meta.js +155 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +22 -3
- package/build/internal/es/index.mjs +186 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +218 -1
- package/build/internal/es/index.typings.mjs +168 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +30 -2
- package/build/internal/es/meta.mjs +153 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1044,6 +1044,14 @@ interface RestoreDataCollectionResponse {
|
|
|
1044
1044
|
/** Restored data collection */
|
|
1045
1045
|
dataCollection?: DataCollection;
|
|
1046
1046
|
}
|
|
1047
|
+
interface PatchDataCollectionRequest {
|
|
1048
|
+
/** Data collection to patch. Only fields specified in the field_mask are updated. */
|
|
1049
|
+
dataCollection: DataCollection;
|
|
1050
|
+
}
|
|
1051
|
+
interface PatchDataCollectionResponse {
|
|
1052
|
+
/** The updated data collection. */
|
|
1053
|
+
dataCollection?: DataCollection;
|
|
1054
|
+
}
|
|
1047
1055
|
interface CreateDataCollectionFieldRequest {
|
|
1048
1056
|
/**
|
|
1049
1057
|
* ID of the data collection to update.
|
|
@@ -1086,6 +1094,19 @@ interface DeleteDataCollectionFieldResponse {
|
|
|
1086
1094
|
/** Updated data collection. */
|
|
1087
1095
|
dataCollection?: DataCollection;
|
|
1088
1096
|
}
|
|
1097
|
+
interface PatchDataCollectionFieldRequest {
|
|
1098
|
+
/**
|
|
1099
|
+
* ID of the data collection to update.
|
|
1100
|
+
* @maxLength 256
|
|
1101
|
+
*/
|
|
1102
|
+
dataCollectionId: string;
|
|
1103
|
+
/** Field to patch. */
|
|
1104
|
+
field: Field;
|
|
1105
|
+
}
|
|
1106
|
+
interface PatchDataCollectionFieldResponse {
|
|
1107
|
+
/** Updated data collection. */
|
|
1108
|
+
dataCollection?: DataCollection;
|
|
1109
|
+
}
|
|
1089
1110
|
interface UpdateDataPermissionsRequest {
|
|
1090
1111
|
/**
|
|
1091
1112
|
* ID of data collections to update
|
|
@@ -1683,6 +1704,92 @@ declare function updateDataCollection(collection: NonNullablePaths<DataCollectio
|
|
|
1683
1704
|
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollection
|
|
1684
1705
|
*/
|
|
1685
1706
|
declare function deleteDataCollection(dataCollectionId: string): Promise<void>;
|
|
1707
|
+
interface PatchDataCollection {
|
|
1708
|
+
/**
|
|
1709
|
+
* Collection ID. For example, `my-first-collection`. May include a namespace.
|
|
1710
|
+
* @immutable
|
|
1711
|
+
* @maxLength 256
|
|
1712
|
+
*/
|
|
1713
|
+
_id?: string;
|
|
1714
|
+
/**
|
|
1715
|
+
* Collection type. Indicates how the collection was created and how it is stored.
|
|
1716
|
+
* @readonly
|
|
1717
|
+
*/
|
|
1718
|
+
collectionType?: CollectionTypeWithLiterals;
|
|
1719
|
+
/**
|
|
1720
|
+
* ID of the app that defined this collection. For collections defined by Wix users, this value is null.
|
|
1721
|
+
* @format GUID
|
|
1722
|
+
* @readonly
|
|
1723
|
+
*/
|
|
1724
|
+
ownerAppId?: string | null;
|
|
1725
|
+
/**
|
|
1726
|
+
* Maximum number of items returned in a single query, based on the underlying storage.
|
|
1727
|
+
* Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
|
|
1728
|
+
* External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
|
|
1729
|
+
* @readonly
|
|
1730
|
+
*/
|
|
1731
|
+
maxPageSize?: number | null;
|
|
1732
|
+
/**
|
|
1733
|
+
* Collection's display name as shown in the CMS. For example, `My First Collection`.
|
|
1734
|
+
* @maxLength 1000
|
|
1735
|
+
*/
|
|
1736
|
+
displayName?: string | null;
|
|
1737
|
+
/**
|
|
1738
|
+
* Default item sorting order when a query doesn't specify one.
|
|
1739
|
+
* @readonly
|
|
1740
|
+
*/
|
|
1741
|
+
defaultDisplayOrder?: Sort;
|
|
1742
|
+
/**
|
|
1743
|
+
* UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
|
|
1744
|
+
* Empty for all data collections not owned by Wix apps.
|
|
1745
|
+
* @readonly
|
|
1746
|
+
* @maxLength 1000
|
|
1747
|
+
*/
|
|
1748
|
+
displayNamespace?: string | null;
|
|
1749
|
+
/**
|
|
1750
|
+
* Field whose value the CMS displays to represent the collection item when referenced in a different collection.
|
|
1751
|
+
* @maxLength 1000
|
|
1752
|
+
*/
|
|
1753
|
+
displayField?: string | null;
|
|
1754
|
+
/**
|
|
1755
|
+
* Capabilities the collection supports.
|
|
1756
|
+
* @readonly
|
|
1757
|
+
*/
|
|
1758
|
+
capabilities?: CollectionCapabilities;
|
|
1759
|
+
/**
|
|
1760
|
+
* Collection's field structure.
|
|
1761
|
+
* @maxSize 1000
|
|
1762
|
+
*/
|
|
1763
|
+
fields?: Field[];
|
|
1764
|
+
/** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
|
|
1765
|
+
permissions?: Permissions;
|
|
1766
|
+
/**
|
|
1767
|
+
* 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.
|
|
1768
|
+
* @readonly
|
|
1769
|
+
*/
|
|
1770
|
+
revision?: string | null;
|
|
1771
|
+
/**
|
|
1772
|
+
* Plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality.
|
|
1773
|
+
* @maxSize 100
|
|
1774
|
+
*/
|
|
1775
|
+
plugins?: Plugin[];
|
|
1776
|
+
/**
|
|
1777
|
+
* Paging modes the collection supports. In native collections, offset-based paging is supported by default.
|
|
1778
|
+
* @readonly
|
|
1779
|
+
* @maxSize 2
|
|
1780
|
+
*/
|
|
1781
|
+
pagingModes?: PagingModeWithLiterals[];
|
|
1782
|
+
/**
|
|
1783
|
+
* Date the collection was created.
|
|
1784
|
+
* @readonly
|
|
1785
|
+
*/
|
|
1786
|
+
_createdDate?: Date | null;
|
|
1787
|
+
/**
|
|
1788
|
+
* Date the collection was last updated.
|
|
1789
|
+
* @readonly
|
|
1790
|
+
*/
|
|
1791
|
+
_updatedDate?: Date | null;
|
|
1792
|
+
}
|
|
1686
1793
|
/**
|
|
1687
1794
|
* Adds a new field to the structure of a data collection.
|
|
1688
1795
|
* @param dataCollectionId - ID of the data collection to update.
|
|
@@ -1744,5 +1851,91 @@ interface DeleteDataCollectionFieldOptions {
|
|
|
1744
1851
|
*/
|
|
1745
1852
|
fieldKey: string;
|
|
1746
1853
|
}
|
|
1854
|
+
/**
|
|
1855
|
+
* Patches (partial update) a field in the structure of a data collection.
|
|
1856
|
+
* @public
|
|
1857
|
+
* @documentationMaturity preview
|
|
1858
|
+
* @requiredField field
|
|
1859
|
+
* @requiredField identifiers
|
|
1860
|
+
* @requiredField identifiers.dataCollectionId
|
|
1861
|
+
* @requiredField identifiers.fieldKey
|
|
1862
|
+
* @permissionId WIX_DATA.UPDATE_COLLECTION_FIELD
|
|
1863
|
+
* @applicableIdentity APP
|
|
1864
|
+
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField
|
|
1865
|
+
*/
|
|
1866
|
+
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>>;
|
|
1867
|
+
interface PatchDataCollectionFieldIdentifiers {
|
|
1868
|
+
/**
|
|
1869
|
+
* ID of the data collection to update.
|
|
1870
|
+
* @maxLength 256
|
|
1871
|
+
*/
|
|
1872
|
+
dataCollectionId: string;
|
|
1873
|
+
/**
|
|
1874
|
+
* Unique identifier for the field. For example, `firstName`.
|
|
1875
|
+
* @maxLength 1000
|
|
1876
|
+
*/
|
|
1877
|
+
fieldKey?: string;
|
|
1878
|
+
}
|
|
1879
|
+
interface PatchDataCollectionField {
|
|
1880
|
+
/** Range of possible values for a numerical field. */
|
|
1881
|
+
numberRange?: NumberRange;
|
|
1882
|
+
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
1883
|
+
stringLengthRange?: StringLengthRange;
|
|
1884
|
+
/** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
|
|
1885
|
+
arraySizeRange?: ArraySizeRange;
|
|
1886
|
+
/**
|
|
1887
|
+
* Field's display name when displayed in the CMS. For example, `First Name`.
|
|
1888
|
+
* @maxLength 1000
|
|
1889
|
+
*/
|
|
1890
|
+
displayName?: string | null;
|
|
1891
|
+
/**
|
|
1892
|
+
* Field's data type.
|
|
1893
|
+
*
|
|
1894
|
+
* Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data).
|
|
1895
|
+
*/
|
|
1896
|
+
type?: TypeWithLiterals;
|
|
1897
|
+
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
1898
|
+
typeMetadata?: TypeMetadata;
|
|
1899
|
+
/**
|
|
1900
|
+
* Whether the field is a system field.
|
|
1901
|
+
* @readonly
|
|
1902
|
+
*/
|
|
1903
|
+
systemField?: boolean;
|
|
1904
|
+
/**
|
|
1905
|
+
* Capabilities the field supports.
|
|
1906
|
+
* @readonly
|
|
1907
|
+
*/
|
|
1908
|
+
capabilities?: FieldCapabilities;
|
|
1909
|
+
/** Whether the field is encrypted. */
|
|
1910
|
+
encrypted?: boolean;
|
|
1911
|
+
/**
|
|
1912
|
+
* Field description.
|
|
1913
|
+
* @maxLength 16000
|
|
1914
|
+
*/
|
|
1915
|
+
description?: string | null;
|
|
1916
|
+
/**
|
|
1917
|
+
* Whether the field is read-only. A read-only field can't be changed.
|
|
1918
|
+
*
|
|
1919
|
+
* Default: `false`
|
|
1920
|
+
*/
|
|
1921
|
+
readOnly?: boolean | null;
|
|
1922
|
+
/**
|
|
1923
|
+
* Whether the field is immutable. An immutable field can be set once, but then cannot be updated.
|
|
1924
|
+
*
|
|
1925
|
+
* Default: `false`
|
|
1926
|
+
*/
|
|
1927
|
+
immutable?: boolean | null;
|
|
1928
|
+
/**
|
|
1929
|
+
* Whether the field is required.
|
|
1930
|
+
*
|
|
1931
|
+
* Default: `false`
|
|
1932
|
+
*/
|
|
1933
|
+
required?: boolean | null;
|
|
1934
|
+
/**
|
|
1935
|
+
* Additional optional plugins for the field.
|
|
1936
|
+
* @maxSize 100
|
|
1937
|
+
*/
|
|
1938
|
+
plugins?: FieldPlugin[];
|
|
1939
|
+
}
|
|
1747
1940
|
|
|
1748
|
-
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, updateDataCollection, updateDataCollectionField };
|
|
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 };
|
|
@@ -46,6 +46,8 @@ __export(index_typings_exports, {
|
|
|
46
46
|
deleteDataCollectionField: () => deleteDataCollectionField2,
|
|
47
47
|
getDataCollection: () => getDataCollection2,
|
|
48
48
|
listDataCollections: () => listDataCollections2,
|
|
49
|
+
patchDataCollection: () => patchDataCollection2,
|
|
50
|
+
patchDataCollectionField: () => patchDataCollectionField2,
|
|
49
51
|
restoreDataCollection: () => restoreDataCollection2,
|
|
50
52
|
updateDataCollection: () => updateDataCollection2,
|
|
51
53
|
updateDataCollectionField: () => updateDataCollectionField2
|
|
@@ -62,6 +64,7 @@ var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
|
62
64
|
var import_float2 = require("@wix/sdk-runtime/transformations/float");
|
|
63
65
|
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
64
66
|
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
67
|
+
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
65
68
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
66
69
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
67
70
|
function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(opts) {
|
|
@@ -656,6 +659,65 @@ function restoreDataCollection(payload) {
|
|
|
656
659
|
}
|
|
657
660
|
return __restoreDataCollection;
|
|
658
661
|
}
|
|
662
|
+
function patchDataCollection(payload) {
|
|
663
|
+
function __patchDataCollection({ host }) {
|
|
664
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
665
|
+
{
|
|
666
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
667
|
+
paths: [{ path: "fieldMask" }]
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
671
|
+
paths: [
|
|
672
|
+
{ path: "dataCollection.createdDate" },
|
|
673
|
+
{ path: "dataCollection.updatedDate" }
|
|
674
|
+
]
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
678
|
+
paths: [
|
|
679
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
680
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
681
|
+
]
|
|
682
|
+
}
|
|
683
|
+
]);
|
|
684
|
+
const metadata = {
|
|
685
|
+
entityFqdn: "wix.data.v2.data_collection",
|
|
686
|
+
method: "PATCH",
|
|
687
|
+
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollection",
|
|
688
|
+
packageName: PACKAGE_NAME,
|
|
689
|
+
migrationOptions: {
|
|
690
|
+
optInTransformResponse: true
|
|
691
|
+
},
|
|
692
|
+
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
693
|
+
{
|
|
694
|
+
protoPath: "/v2/collections/{dataCollection.id}",
|
|
695
|
+
data: serializedData,
|
|
696
|
+
host
|
|
697
|
+
}
|
|
698
|
+
),
|
|
699
|
+
data: serializedData,
|
|
700
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
701
|
+
{
|
|
702
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
703
|
+
paths: [
|
|
704
|
+
{ path: "dataCollection.createdDate" },
|
|
705
|
+
{ path: "dataCollection.updatedDate" }
|
|
706
|
+
]
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
710
|
+
paths: [
|
|
711
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
712
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
713
|
+
]
|
|
714
|
+
}
|
|
715
|
+
])
|
|
716
|
+
};
|
|
717
|
+
return metadata;
|
|
718
|
+
}
|
|
719
|
+
return __patchDataCollection;
|
|
720
|
+
}
|
|
659
721
|
function createDataCollectionField(payload) {
|
|
660
722
|
function __createDataCollectionField({ host }) {
|
|
661
723
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -787,6 +849,58 @@ function deleteDataCollectionField(payload) {
|
|
|
787
849
|
}
|
|
788
850
|
return __deleteDataCollectionField;
|
|
789
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
|
+
}
|
|
790
904
|
|
|
791
905
|
// src/data-v2-data-collection-collections.universal.ts
|
|
792
906
|
var CollectionType = /* @__PURE__ */ ((CollectionType2) => {
|
|
@@ -1146,6 +1260,31 @@ async function restoreDataCollection2(dataCollectionId) {
|
|
|
1146
1260
|
throw transformedError;
|
|
1147
1261
|
}
|
|
1148
1262
|
}
|
|
1263
|
+
async function patchDataCollection2(_id, dataCollection) {
|
|
1264
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1265
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1266
|
+
dataCollection: { ...dataCollection, id: _id }
|
|
1267
|
+
});
|
|
1268
|
+
const reqOpts = patchDataCollection(payload);
|
|
1269
|
+
sideEffects?.onSiteCall?.();
|
|
1270
|
+
try {
|
|
1271
|
+
const result = await httpClient.request(reqOpts);
|
|
1272
|
+
sideEffects?.onSuccess?.(result);
|
|
1273
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1274
|
+
} catch (err) {
|
|
1275
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1276
|
+
err,
|
|
1277
|
+
{
|
|
1278
|
+
spreadPathsToArguments: { dataCollection: "$[1]" },
|
|
1279
|
+
explicitPathsToArguments: { "dataCollection.id": "$[0]" },
|
|
1280
|
+
singleArgumentUnchanged: false
|
|
1281
|
+
},
|
|
1282
|
+
["_id", "dataCollection"]
|
|
1283
|
+
);
|
|
1284
|
+
sideEffects?.onError?.(err);
|
|
1285
|
+
throw transformedError;
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1149
1288
|
async function createDataCollectionField2(dataCollectionId, options) {
|
|
1150
1289
|
const { httpClient, sideEffects } = arguments[2];
|
|
1151
1290
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1233,6 +1372,35 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
|
|
|
1233
1372
|
throw transformedError;
|
|
1234
1373
|
}
|
|
1235
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
|
+
}
|
|
1236
1404
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1237
1405
|
0 && (module.exports = {
|
|
1238
1406
|
AccessLevel,
|
|
@@ -1261,6 +1429,8 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
|
|
|
1261
1429
|
deleteDataCollectionField,
|
|
1262
1430
|
getDataCollection,
|
|
1263
1431
|
listDataCollections,
|
|
1432
|
+
patchDataCollection,
|
|
1433
|
+
patchDataCollectionField,
|
|
1264
1434
|
restoreDataCollection,
|
|
1265
1435
|
updateDataCollection,
|
|
1266
1436
|
updateDataCollectionField
|