@wix/auto_sdk_data_collections 1.0.43 → 1.0.45
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 +24 -4
- package/build/cjs/index.js +159 -12
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +73 -78
- package/build/cjs/index.typings.js +139 -10
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +35 -4
- package/build/cjs/meta.js +116 -9
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +24 -4
- package/build/es/index.mjs +157 -12
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +73 -78
- package/build/es/index.typings.mjs +137 -10
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +35 -4
- package/build/es/meta.mjs +114 -9
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +24 -4
- package/build/internal/cjs/index.js +159 -12
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +73 -78
- package/build/internal/cjs/index.typings.js +139 -10
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +35 -4
- package/build/internal/cjs/meta.js +116 -9
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +24 -4
- package/build/internal/es/index.mjs +157 -12
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +73 -78
- package/build/internal/es/index.typings.mjs +137 -10
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +35 -4
- package/build/internal/es/meta.mjs +114 -9
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -583,6 +583,7 @@ declare enum Role {
|
|
|
583
583
|
}
|
|
584
584
|
/** @enumType */
|
|
585
585
|
type RoleWithLiterals = Role | 'UNKNOWN_ROLE' | 'ADMIN' | 'SITE_MEMBER_AUTHOR' | 'SITE_MEMBER' | 'ANYONE';
|
|
586
|
+
/** Plugins that extend collection functionality. */
|
|
586
587
|
interface Plugin extends PluginOptionsOneOf {
|
|
587
588
|
/**
|
|
588
589
|
* Options for the Publish plugin.
|
|
@@ -1094,6 +1095,35 @@ interface DeleteDataCollectionFieldResponse {
|
|
|
1094
1095
|
/** Updated data collection. */
|
|
1095
1096
|
dataCollection?: DataCollection;
|
|
1096
1097
|
}
|
|
1098
|
+
interface AddDataCollectionPluginRequest {
|
|
1099
|
+
/**
|
|
1100
|
+
* ID of the data collection to update.
|
|
1101
|
+
* @maxLength 256
|
|
1102
|
+
*/
|
|
1103
|
+
dataCollectionId: string;
|
|
1104
|
+
/**
|
|
1105
|
+
* Plugin to add to the collection. Must include the plugin type and any type-specific configuration.
|
|
1106
|
+
* If a plugin of the same type already exists, this operation will fail.
|
|
1107
|
+
*/
|
|
1108
|
+
plugin: Plugin;
|
|
1109
|
+
}
|
|
1110
|
+
interface AddDataCollectionPluginResponse {
|
|
1111
|
+
/** Updated data collection. */
|
|
1112
|
+
dataCollection?: DataCollection;
|
|
1113
|
+
}
|
|
1114
|
+
interface DeleteDataCollectionPluginRequest {
|
|
1115
|
+
/**
|
|
1116
|
+
* ID of the data collection to update.
|
|
1117
|
+
* @maxLength 256
|
|
1118
|
+
*/
|
|
1119
|
+
dataCollectionId: string;
|
|
1120
|
+
/** Plugin type to remove. */
|
|
1121
|
+
pluginType: PluginTypeWithLiterals;
|
|
1122
|
+
}
|
|
1123
|
+
interface DeleteDataCollectionPluginResponse {
|
|
1124
|
+
/** Updated data collection. */
|
|
1125
|
+
dataCollection?: DataCollection;
|
|
1126
|
+
}
|
|
1097
1127
|
interface PatchDataCollectionFieldRequest {
|
|
1098
1128
|
/**
|
|
1099
1129
|
* ID of the data collection to update.
|
|
@@ -1852,90 +1882,55 @@ interface DeleteDataCollectionFieldOptions {
|
|
|
1852
1882
|
fieldKey: string;
|
|
1853
1883
|
}
|
|
1854
1884
|
/**
|
|
1855
|
-
*
|
|
1885
|
+
* Adds a plugin to a data collection.
|
|
1886
|
+
* @param dataCollectionId - ID of the data collection to update.
|
|
1856
1887
|
* @public
|
|
1857
1888
|
* @documentationMaturity preview
|
|
1858
|
-
* @requiredField
|
|
1859
|
-
* @requiredField
|
|
1860
|
-
* @requiredField
|
|
1861
|
-
* @requiredField
|
|
1862
|
-
* @permissionId WIX_DATA.
|
|
1889
|
+
* @requiredField dataCollectionId
|
|
1890
|
+
* @requiredField options
|
|
1891
|
+
* @requiredField options.plugin
|
|
1892
|
+
* @requiredField options.plugin.type
|
|
1893
|
+
* @permissionId WIX_DATA.UPDATE_COLLECTION
|
|
1863
1894
|
* @applicableIdentity APP
|
|
1864
|
-
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.
|
|
1895
|
+
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.AddDataCollectionPlugin
|
|
1865
1896
|
*/
|
|
1866
|
-
declare function
|
|
1867
|
-
interface
|
|
1868
|
-
/**
|
|
1869
|
-
* ID of the data collection to update.
|
|
1870
|
-
* @maxLength 256
|
|
1871
|
-
*/
|
|
1872
|
-
dataCollectionId: string;
|
|
1897
|
+
declare function addDataCollectionPlugin(dataCollectionId: string, options: NonNullablePaths<AddDataCollectionPluginOptions, `plugin` | `plugin.type`, 3>): Promise<NonNullablePaths<AddDataCollectionPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes`, 7>>;
|
|
1898
|
+
interface AddDataCollectionPluginOptions {
|
|
1873
1899
|
/**
|
|
1874
|
-
*
|
|
1875
|
-
*
|
|
1900
|
+
* Plugin to add to the collection. Must include the plugin type and any type-specific configuration.
|
|
1901
|
+
* If a plugin of the same type already exists, this operation will fail.
|
|
1876
1902
|
*/
|
|
1877
|
-
|
|
1903
|
+
plugin: Plugin;
|
|
1878
1904
|
}
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
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[];
|
|
1905
|
+
/**
|
|
1906
|
+
* Deletes a plugin from a data collection.
|
|
1907
|
+
* @param dataCollectionId - ID of the data collection to update.
|
|
1908
|
+
* @public
|
|
1909
|
+
* @documentationMaturity preview
|
|
1910
|
+
* @requiredField dataCollectionId
|
|
1911
|
+
* @requiredField options
|
|
1912
|
+
* @requiredField options.pluginType
|
|
1913
|
+
* @permissionId WIX_DATA.UPDATE_COLLECTION
|
|
1914
|
+
* @applicableIdentity APP
|
|
1915
|
+
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollectionPlugin
|
|
1916
|
+
*/
|
|
1917
|
+
declare function deleteDataCollectionPlugin(dataCollectionId: string, options: NonNullablePaths<DeleteDataCollectionPluginOptions, `pluginType`, 2>): Promise<NonNullablePaths<DeleteDataCollectionPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes`, 7>>;
|
|
1918
|
+
interface DeleteDataCollectionPluginOptions {
|
|
1919
|
+
/** Plugin type to remove. */
|
|
1920
|
+
pluginType: PluginTypeWithLiterals;
|
|
1939
1921
|
}
|
|
1922
|
+
/**
|
|
1923
|
+
* Patches (partial update) a field in the structure of a data collection.
|
|
1924
|
+
* @param dataCollectionId - ID of the data collection to update.
|
|
1925
|
+
* @param field - Field to patch.
|
|
1926
|
+
* @public
|
|
1927
|
+
* @documentationMaturity preview
|
|
1928
|
+
* @requiredField dataCollectionId
|
|
1929
|
+
* @requiredField field
|
|
1930
|
+
* @permissionId WIX_DATA.UPDATE_COLLECTION_FIELD
|
|
1931
|
+
* @applicableIdentity APP
|
|
1932
|
+
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField
|
|
1933
|
+
*/
|
|
1934
|
+
declare function patchDataCollectionField(dataCollectionId: string, field: Field): 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>>;
|
|
1940
1935
|
|
|
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
|
|
1936
|
+
export { AccessLevel, type AccessLevelWithLiterals, type ActionEvent, type AddDataCollectionPluginOptions, type AddDataCollectionPluginRequest, type AddDataCollectionPluginResponse, type AllowedDataPermissions, type AppOptions, type ApplicationError, type ArraySizeRange, type BulkGetDataCollectionsPageBySnapshotsRequest, type BulkGetDataCollectionsPageBySnapshotsRequestTenantModeOptionsOneOf, type BulkGetDataCollectionsPageBySnapshotsResponse, type BulkGetDataCollectionsRequest, type BulkGetDataCollectionsResponse, type Calculator, type CalculatorPatternOneOf, type CatalogOptions, type CmsOptions, type CollectionCapabilities, type CollectionDefinition, CollectionOperation, type CollectionOperationWithLiterals, CollectionType, type CollectionTypeWithLiterals, type CreateAppCollectionsSnapshotRequest, type CreateAppCollectionsSnapshotResponse, type CreateDataCollectionFieldOptions, type CreateDataCollectionFieldRequest, type CreateDataCollectionFieldResponse, type CreateDataCollectionRequest, type CreateDataCollectionResponse, type CreateDataCollectionsSnapshotRequest, type CreateDataCollectionsSnapshotResponse, type CreateMigratedCollectionsSnapshotRequest, type CreateMigratedCollectionsSnapshotResponse, type DataCollection, type DataCollectionChangedEvent, type DataCollectionClonedEvent, type DataCollectionEvictedEvent, DataOperation, type DataOperationWithLiterals, type DataPermissions, type DeleteDataCollectionFieldOptions, type DeleteDataCollectionFieldRequest, type DeleteDataCollectionFieldResponse, type DeleteDataCollectionPluginOptions, type DeleteDataCollectionPluginRequest, type DeleteDataCollectionPluginResponse, type DeleteDataCollectionRequest, type DeleteDataCollectionResponse, type DeleteDataCollectionsSnapshotRequest, type DeleteDataCollectionsSnapshotResponse, type Destination, Direction, type DirectionWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type FailedCollection, type Failure, type Field, type FieldCapabilities, type FieldPlugin, type FieldPluginOptionsOneOf, FieldPluginType, type FieldPluginTypeWithLiterals, type FieldRangeValidationsOneOf, type FieldUpdate, type FieldsPattern, Format, type FormatWithLiterals, type GetDataCollectionOptions, type GetDataCollectionRequest, type GetDataCollectionResponse, type IdentificationData, type IdentificationDataIdOneOf, type Index, type IndexField, type IndexLimits, type IndexQuotaLimits, IndexSource, type IndexSourceWithLiterals, IndexStatus, type IndexStatusWithLiterals, type ListDataCollectionsOptions, type ListDataCollectionsRequest, type ListDataCollectionsResponse, type MessageEnvelope, type MultiReference, type MultilingualOptions, type NumberRange, type ObjectField, Order, type OrderWithLiterals, type PageLink, type PageLinkPluginOptions, type Paging, type PagingMetadataV2, PagingMode, type PagingModeWithLiterals, type PatchDataCollection, type PatchDataCollectionFieldRequest, type PatchDataCollectionFieldResponse, type PatchDataCollectionRequest, type PatchDataCollectionResponse, type Permissions, type Plugin, type PluginCmsOptions, type PluginOptionsOneOf, PluginType, type PluginTypeWithLiterals, type PluginUpdate, type PublishPluginOptions, QueryOperator, type QueryOperatorWithLiterals, type Reference, type RestorationCollection, type RestoreDataCollectionRequest, type RestoreDataCollectionResponse, type RestoreDataCollectionsFromSnapshotRequest, type RestoreDataCollectionsFromSnapshotResponse, type RestoreInfo, Role, type RoleWithLiterals, Segment, type SegmentWithLiterals, type SingleItemPluginOptions, type SiteSort, type Slug, type SnapshotCollection, type Sort, SortOrder, type SortOrderWithLiterals, type Sorting, Status, type StatusWithLiterals, type StringLengthRange, TenantMode, type TenantModeWithLiterals, Type, type TypeMetadata, type TypeMetadataMetadataOneOf, type TypeWithLiterals, type UpdateDataCollectionFieldOptions, type UpdateDataCollectionFieldRequest, type UpdateDataCollectionFieldResponse, type UpdateDataCollectionRequest, type UpdateDataCollectionResponse, type UpdateDataPermissionsRequest, type UpdateDataPermissionsResponse, type UrlizedOnlyPattern, type UrlizedPluginOptions, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type _Array, type _Object, addDataCollectionPlugin, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, deleteDataCollectionPlugin, getDataCollection, listDataCollections, patchDataCollectionField, updateDataCollection, updateDataCollectionField };
|
|
@@ -40,10 +40,12 @@ __export(index_typings_exports, {
|
|
|
40
40
|
TenantMode: () => TenantMode,
|
|
41
41
|
Type: () => Type,
|
|
42
42
|
WebhookIdentityType: () => WebhookIdentityType,
|
|
43
|
+
addDataCollectionPlugin: () => addDataCollectionPlugin2,
|
|
43
44
|
createDataCollection: () => createDataCollection2,
|
|
44
45
|
createDataCollectionField: () => createDataCollectionField2,
|
|
45
46
|
deleteDataCollection: () => deleteDataCollection2,
|
|
46
47
|
deleteDataCollectionField: () => deleteDataCollectionField2,
|
|
48
|
+
deleteDataCollectionPlugin: () => deleteDataCollectionPlugin2,
|
|
47
49
|
getDataCollection: () => getDataCollection2,
|
|
48
50
|
listDataCollections: () => listDataCollections2,
|
|
49
51
|
patchDataCollection: () => patchDataCollection2,
|
|
@@ -849,6 +851,76 @@ function deleteDataCollectionField(payload) {
|
|
|
849
851
|
}
|
|
850
852
|
return __deleteDataCollectionField;
|
|
851
853
|
}
|
|
854
|
+
function addDataCollectionPlugin(payload) {
|
|
855
|
+
function __addDataCollectionPlugin({ host }) {
|
|
856
|
+
const metadata = {
|
|
857
|
+
entityFqdn: "wix.data.v2.data_collection",
|
|
858
|
+
method: "POST",
|
|
859
|
+
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.AddDataCollectionPlugin",
|
|
860
|
+
packageName: PACKAGE_NAME,
|
|
861
|
+
migrationOptions: {
|
|
862
|
+
optInTransformResponse: true
|
|
863
|
+
},
|
|
864
|
+
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
865
|
+
{ protoPath: "/v2/collections/add-plugin", data: payload, host }
|
|
866
|
+
),
|
|
867
|
+
data: payload,
|
|
868
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
869
|
+
{
|
|
870
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
871
|
+
paths: [
|
|
872
|
+
{ path: "dataCollection.createdDate" },
|
|
873
|
+
{ path: "dataCollection.updatedDate" }
|
|
874
|
+
]
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
878
|
+
paths: [
|
|
879
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
880
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
881
|
+
]
|
|
882
|
+
}
|
|
883
|
+
])
|
|
884
|
+
};
|
|
885
|
+
return metadata;
|
|
886
|
+
}
|
|
887
|
+
return __addDataCollectionPlugin;
|
|
888
|
+
}
|
|
889
|
+
function deleteDataCollectionPlugin(payload) {
|
|
890
|
+
function __deleteDataCollectionPlugin({ host }) {
|
|
891
|
+
const metadata = {
|
|
892
|
+
entityFqdn: "wix.data.v2.data_collection",
|
|
893
|
+
method: "POST",
|
|
894
|
+
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollectionPlugin",
|
|
895
|
+
packageName: PACKAGE_NAME,
|
|
896
|
+
migrationOptions: {
|
|
897
|
+
optInTransformResponse: true
|
|
898
|
+
},
|
|
899
|
+
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
900
|
+
{ protoPath: "/v2/collections/delete-plugin", data: payload, host }
|
|
901
|
+
),
|
|
902
|
+
data: payload,
|
|
903
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
904
|
+
{
|
|
905
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
906
|
+
paths: [
|
|
907
|
+
{ path: "dataCollection.createdDate" },
|
|
908
|
+
{ path: "dataCollection.updatedDate" }
|
|
909
|
+
]
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
913
|
+
paths: [
|
|
914
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
915
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
916
|
+
]
|
|
917
|
+
}
|
|
918
|
+
])
|
|
919
|
+
};
|
|
920
|
+
return metadata;
|
|
921
|
+
}
|
|
922
|
+
return __deleteDataCollectionPlugin;
|
|
923
|
+
}
|
|
852
924
|
function patchDataCollectionField(payload) {
|
|
853
925
|
function __patchDataCollectionField({ host }) {
|
|
854
926
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -866,7 +938,7 @@ function patchDataCollectionField(payload) {
|
|
|
866
938
|
]);
|
|
867
939
|
const metadata = {
|
|
868
940
|
entityFqdn: "wix.data.v2.data_collection",
|
|
869
|
-
method: "
|
|
941
|
+
method: "POST",
|
|
870
942
|
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
|
|
871
943
|
packageName: PACKAGE_NAME,
|
|
872
944
|
migrationOptions: {
|
|
@@ -874,7 +946,7 @@ function patchDataCollectionField(payload) {
|
|
|
874
946
|
},
|
|
875
947
|
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
876
948
|
{
|
|
877
|
-
protoPath: "/v2/collections/{dataCollectionId}/
|
|
949
|
+
protoPath: "/v2/collections/{dataCollectionId}/patch-field",
|
|
878
950
|
data: serializedData,
|
|
879
951
|
host
|
|
880
952
|
}
|
|
@@ -1372,13 +1444,13 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
|
|
|
1372
1444
|
throw transformedError;
|
|
1373
1445
|
}
|
|
1374
1446
|
}
|
|
1375
|
-
async function
|
|
1447
|
+
async function addDataCollectionPlugin2(dataCollectionId, options) {
|
|
1376
1448
|
const { httpClient, sideEffects } = arguments[2];
|
|
1377
1449
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1378
|
-
dataCollectionId
|
|
1379
|
-
|
|
1450
|
+
dataCollectionId,
|
|
1451
|
+
plugin: options?.plugin
|
|
1380
1452
|
});
|
|
1381
|
-
const reqOpts =
|
|
1453
|
+
const reqOpts = addDataCollectionPlugin(payload);
|
|
1382
1454
|
sideEffects?.onSiteCall?.();
|
|
1383
1455
|
try {
|
|
1384
1456
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1388,14 +1460,69 @@ async function patchDataCollectionField2(identifiers, field) {
|
|
|
1388
1460
|
const transformedError = (0, import_transform_error.transformError)(
|
|
1389
1461
|
err,
|
|
1390
1462
|
{
|
|
1391
|
-
spreadPathsToArguments: {
|
|
1463
|
+
spreadPathsToArguments: {},
|
|
1392
1464
|
explicitPathsToArguments: {
|
|
1393
|
-
dataCollectionId: "$[0]
|
|
1394
|
-
|
|
1465
|
+
dataCollectionId: "$[0]",
|
|
1466
|
+
plugin: "$[1].plugin"
|
|
1395
1467
|
},
|
|
1396
1468
|
singleArgumentUnchanged: false
|
|
1397
1469
|
},
|
|
1398
|
-
["
|
|
1470
|
+
["dataCollectionId", "options"]
|
|
1471
|
+
);
|
|
1472
|
+
sideEffects?.onError?.(err);
|
|
1473
|
+
throw transformedError;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
async function deleteDataCollectionPlugin2(dataCollectionId, options) {
|
|
1477
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1478
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1479
|
+
dataCollectionId,
|
|
1480
|
+
pluginType: options?.pluginType
|
|
1481
|
+
});
|
|
1482
|
+
const reqOpts = deleteDataCollectionPlugin(payload);
|
|
1483
|
+
sideEffects?.onSiteCall?.();
|
|
1484
|
+
try {
|
|
1485
|
+
const result = await httpClient.request(reqOpts);
|
|
1486
|
+
sideEffects?.onSuccess?.(result);
|
|
1487
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1488
|
+
} catch (err) {
|
|
1489
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1490
|
+
err,
|
|
1491
|
+
{
|
|
1492
|
+
spreadPathsToArguments: {},
|
|
1493
|
+
explicitPathsToArguments: {
|
|
1494
|
+
dataCollectionId: "$[0]",
|
|
1495
|
+
pluginType: "$[1].pluginType"
|
|
1496
|
+
},
|
|
1497
|
+
singleArgumentUnchanged: false
|
|
1498
|
+
},
|
|
1499
|
+
["dataCollectionId", "options"]
|
|
1500
|
+
);
|
|
1501
|
+
sideEffects?.onError?.(err);
|
|
1502
|
+
throw transformedError;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
async function patchDataCollectionField2(dataCollectionId, field) {
|
|
1506
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1507
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1508
|
+
dataCollectionId,
|
|
1509
|
+
field
|
|
1510
|
+
});
|
|
1511
|
+
const reqOpts = patchDataCollectionField(payload);
|
|
1512
|
+
sideEffects?.onSiteCall?.();
|
|
1513
|
+
try {
|
|
1514
|
+
const result = await httpClient.request(reqOpts);
|
|
1515
|
+
sideEffects?.onSuccess?.(result);
|
|
1516
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1517
|
+
} catch (err) {
|
|
1518
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1519
|
+
err,
|
|
1520
|
+
{
|
|
1521
|
+
spreadPathsToArguments: {},
|
|
1522
|
+
explicitPathsToArguments: { dataCollectionId: "$[0]", field: "$[1]" },
|
|
1523
|
+
singleArgumentUnchanged: false
|
|
1524
|
+
},
|
|
1525
|
+
["dataCollectionId", "field"]
|
|
1399
1526
|
);
|
|
1400
1527
|
sideEffects?.onError?.(err);
|
|
1401
1528
|
throw transformedError;
|
|
@@ -1423,10 +1550,12 @@ async function patchDataCollectionField2(identifiers, field) {
|
|
|
1423
1550
|
TenantMode,
|
|
1424
1551
|
Type,
|
|
1425
1552
|
WebhookIdentityType,
|
|
1553
|
+
addDataCollectionPlugin,
|
|
1426
1554
|
createDataCollection,
|
|
1427
1555
|
createDataCollectionField,
|
|
1428
1556
|
deleteDataCollection,
|
|
1429
1557
|
deleteDataCollectionField,
|
|
1558
|
+
deleteDataCollectionPlugin,
|
|
1430
1559
|
getDataCollection,
|
|
1431
1560
|
listDataCollections,
|
|
1432
1561
|
patchDataCollection,
|