@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
|
@@ -599,6 +599,7 @@ declare enum Role {
|
|
|
599
599
|
}
|
|
600
600
|
/** @enumType */
|
|
601
601
|
type RoleWithLiterals = Role | 'UNKNOWN_ROLE' | 'ADMIN' | 'SITE_MEMBER_AUTHOR' | 'SITE_MEMBER' | 'ANYONE';
|
|
602
|
+
/** Plugins that extend collection functionality. */
|
|
602
603
|
interface Plugin extends PluginOptionsOneOf {
|
|
603
604
|
/**
|
|
604
605
|
* Options for the Publish plugin.
|
|
@@ -1125,6 +1126,35 @@ interface DeleteDataCollectionFieldResponse {
|
|
|
1125
1126
|
/** Updated data collection. */
|
|
1126
1127
|
dataCollection?: DataCollection;
|
|
1127
1128
|
}
|
|
1129
|
+
interface AddDataCollectionPluginRequest {
|
|
1130
|
+
/**
|
|
1131
|
+
* ID of the data collection to update.
|
|
1132
|
+
* @maxLength 256
|
|
1133
|
+
*/
|
|
1134
|
+
dataCollectionId: string;
|
|
1135
|
+
/**
|
|
1136
|
+
* Plugin to add to the collection. Must include the plugin type and any type-specific configuration.
|
|
1137
|
+
* If a plugin of the same type already exists, this operation will fail.
|
|
1138
|
+
*/
|
|
1139
|
+
plugin: Plugin;
|
|
1140
|
+
}
|
|
1141
|
+
interface AddDataCollectionPluginResponse {
|
|
1142
|
+
/** Updated data collection. */
|
|
1143
|
+
dataCollection?: DataCollection;
|
|
1144
|
+
}
|
|
1145
|
+
interface DeleteDataCollectionPluginRequest {
|
|
1146
|
+
/**
|
|
1147
|
+
* ID of the data collection to update.
|
|
1148
|
+
* @maxLength 256
|
|
1149
|
+
*/
|
|
1150
|
+
dataCollectionId: string;
|
|
1151
|
+
/** Plugin type to remove. */
|
|
1152
|
+
pluginType: PluginTypeWithLiterals;
|
|
1153
|
+
}
|
|
1154
|
+
interface DeleteDataCollectionPluginResponse {
|
|
1155
|
+
/** Updated data collection. */
|
|
1156
|
+
dataCollection?: DataCollection;
|
|
1157
|
+
}
|
|
1128
1158
|
interface PatchDataCollectionFieldRequest {
|
|
1129
1159
|
/**
|
|
1130
1160
|
* ID of the data collection to update.
|
|
@@ -1930,90 +1960,55 @@ interface DeleteDataCollectionFieldOptions {
|
|
|
1930
1960
|
fieldKey: string;
|
|
1931
1961
|
}
|
|
1932
1962
|
/**
|
|
1933
|
-
*
|
|
1963
|
+
* Adds a plugin to a data collection.
|
|
1964
|
+
* @param dataCollectionId - ID of the data collection to update.
|
|
1934
1965
|
* @public
|
|
1935
1966
|
* @documentationMaturity preview
|
|
1936
|
-
* @requiredField
|
|
1937
|
-
* @requiredField
|
|
1938
|
-
* @requiredField
|
|
1939
|
-
* @requiredField
|
|
1940
|
-
* @permissionId WIX_DATA.
|
|
1967
|
+
* @requiredField dataCollectionId
|
|
1968
|
+
* @requiredField options
|
|
1969
|
+
* @requiredField options.plugin
|
|
1970
|
+
* @requiredField options.plugin.type
|
|
1971
|
+
* @permissionId WIX_DATA.UPDATE_COLLECTION
|
|
1941
1972
|
* @applicableIdentity APP
|
|
1942
|
-
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.
|
|
1973
|
+
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.AddDataCollectionPlugin
|
|
1943
1974
|
*/
|
|
1944
|
-
declare function
|
|
1945
|
-
interface
|
|
1946
|
-
/**
|
|
1947
|
-
* ID of the data collection to update.
|
|
1948
|
-
* @maxLength 256
|
|
1949
|
-
*/
|
|
1950
|
-
dataCollectionId: string;
|
|
1975
|
+
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>>;
|
|
1976
|
+
interface AddDataCollectionPluginOptions {
|
|
1951
1977
|
/**
|
|
1952
|
-
*
|
|
1953
|
-
*
|
|
1978
|
+
* Plugin to add to the collection. Must include the plugin type and any type-specific configuration.
|
|
1979
|
+
* If a plugin of the same type already exists, this operation will fail.
|
|
1954
1980
|
*/
|
|
1955
|
-
|
|
1981
|
+
plugin: Plugin;
|
|
1956
1982
|
}
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
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[];
|
|
1983
|
+
/**
|
|
1984
|
+
* Deletes a plugin from a data collection.
|
|
1985
|
+
* @param dataCollectionId - ID of the data collection to update.
|
|
1986
|
+
* @public
|
|
1987
|
+
* @documentationMaturity preview
|
|
1988
|
+
* @requiredField dataCollectionId
|
|
1989
|
+
* @requiredField options
|
|
1990
|
+
* @requiredField options.pluginType
|
|
1991
|
+
* @permissionId WIX_DATA.UPDATE_COLLECTION
|
|
1992
|
+
* @applicableIdentity APP
|
|
1993
|
+
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollectionPlugin
|
|
1994
|
+
*/
|
|
1995
|
+
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>>;
|
|
1996
|
+
interface DeleteDataCollectionPluginOptions {
|
|
1997
|
+
/** Plugin type to remove. */
|
|
1998
|
+
pluginType: PluginTypeWithLiterals;
|
|
2017
1999
|
}
|
|
2000
|
+
/**
|
|
2001
|
+
* Patches (partial update) a field in the structure of a data collection.
|
|
2002
|
+
* @param dataCollectionId - ID of the data collection to update.
|
|
2003
|
+
* @param field - Field to patch.
|
|
2004
|
+
* @public
|
|
2005
|
+
* @documentationMaturity preview
|
|
2006
|
+
* @requiredField dataCollectionId
|
|
2007
|
+
* @requiredField field
|
|
2008
|
+
* @permissionId WIX_DATA.UPDATE_COLLECTION_FIELD
|
|
2009
|
+
* @applicableIdentity APP
|
|
2010
|
+
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField
|
|
2011
|
+
*/
|
|
2012
|
+
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>>;
|
|
2018
2013
|
|
|
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
|
|
2014
|
+
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, patchDataCollection, patchDataCollectionField, restoreDataCollection, 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,
|