@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 };
|
|
@@ -796,6 +796,76 @@ function deleteDataCollectionField(payload) {
|
|
|
796
796
|
}
|
|
797
797
|
return __deleteDataCollectionField;
|
|
798
798
|
}
|
|
799
|
+
function addDataCollectionPlugin(payload) {
|
|
800
|
+
function __addDataCollectionPlugin({ host }) {
|
|
801
|
+
const metadata = {
|
|
802
|
+
entityFqdn: "wix.data.v2.data_collection",
|
|
803
|
+
method: "POST",
|
|
804
|
+
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.AddDataCollectionPlugin",
|
|
805
|
+
packageName: PACKAGE_NAME,
|
|
806
|
+
migrationOptions: {
|
|
807
|
+
optInTransformResponse: true
|
|
808
|
+
},
|
|
809
|
+
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
810
|
+
{ protoPath: "/v2/collections/add-plugin", data: payload, host }
|
|
811
|
+
),
|
|
812
|
+
data: payload,
|
|
813
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
814
|
+
{
|
|
815
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
816
|
+
paths: [
|
|
817
|
+
{ path: "dataCollection.createdDate" },
|
|
818
|
+
{ path: "dataCollection.updatedDate" }
|
|
819
|
+
]
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
823
|
+
paths: [
|
|
824
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
825
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
826
|
+
]
|
|
827
|
+
}
|
|
828
|
+
])
|
|
829
|
+
};
|
|
830
|
+
return metadata;
|
|
831
|
+
}
|
|
832
|
+
return __addDataCollectionPlugin;
|
|
833
|
+
}
|
|
834
|
+
function deleteDataCollectionPlugin(payload) {
|
|
835
|
+
function __deleteDataCollectionPlugin({ host }) {
|
|
836
|
+
const metadata = {
|
|
837
|
+
entityFqdn: "wix.data.v2.data_collection",
|
|
838
|
+
method: "POST",
|
|
839
|
+
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollectionPlugin",
|
|
840
|
+
packageName: PACKAGE_NAME,
|
|
841
|
+
migrationOptions: {
|
|
842
|
+
optInTransformResponse: true
|
|
843
|
+
},
|
|
844
|
+
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
845
|
+
{ protoPath: "/v2/collections/delete-plugin", data: payload, host }
|
|
846
|
+
),
|
|
847
|
+
data: payload,
|
|
848
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
849
|
+
{
|
|
850
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
851
|
+
paths: [
|
|
852
|
+
{ path: "dataCollection.createdDate" },
|
|
853
|
+
{ path: "dataCollection.updatedDate" }
|
|
854
|
+
]
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
858
|
+
paths: [
|
|
859
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
860
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
861
|
+
]
|
|
862
|
+
}
|
|
863
|
+
])
|
|
864
|
+
};
|
|
865
|
+
return metadata;
|
|
866
|
+
}
|
|
867
|
+
return __deleteDataCollectionPlugin;
|
|
868
|
+
}
|
|
799
869
|
function patchDataCollectionField(payload) {
|
|
800
870
|
function __patchDataCollectionField({ host }) {
|
|
801
871
|
const serializedData = transformPaths(payload, [
|
|
@@ -813,7 +883,7 @@ function patchDataCollectionField(payload) {
|
|
|
813
883
|
]);
|
|
814
884
|
const metadata = {
|
|
815
885
|
entityFqdn: "wix.data.v2.data_collection",
|
|
816
|
-
method: "
|
|
886
|
+
method: "POST",
|
|
817
887
|
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
|
|
818
888
|
packageName: PACKAGE_NAME,
|
|
819
889
|
migrationOptions: {
|
|
@@ -821,7 +891,7 @@ function patchDataCollectionField(payload) {
|
|
|
821
891
|
},
|
|
822
892
|
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
823
893
|
{
|
|
824
|
-
protoPath: "/v2/collections/{dataCollectionId}/
|
|
894
|
+
protoPath: "/v2/collections/{dataCollectionId}/patch-field",
|
|
825
895
|
data: serializedData,
|
|
826
896
|
host
|
|
827
897
|
}
|
|
@@ -1319,13 +1389,13 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
|
|
|
1319
1389
|
throw transformedError;
|
|
1320
1390
|
}
|
|
1321
1391
|
}
|
|
1322
|
-
async function
|
|
1392
|
+
async function addDataCollectionPlugin2(dataCollectionId, options) {
|
|
1323
1393
|
const { httpClient, sideEffects } = arguments[2];
|
|
1324
1394
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1325
|
-
dataCollectionId
|
|
1326
|
-
|
|
1395
|
+
dataCollectionId,
|
|
1396
|
+
plugin: options?.plugin
|
|
1327
1397
|
});
|
|
1328
|
-
const reqOpts =
|
|
1398
|
+
const reqOpts = addDataCollectionPlugin(payload);
|
|
1329
1399
|
sideEffects?.onSiteCall?.();
|
|
1330
1400
|
try {
|
|
1331
1401
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1335,14 +1405,69 @@ async function patchDataCollectionField2(identifiers, field) {
|
|
|
1335
1405
|
const transformedError = sdkTransformError(
|
|
1336
1406
|
err,
|
|
1337
1407
|
{
|
|
1338
|
-
spreadPathsToArguments: {
|
|
1408
|
+
spreadPathsToArguments: {},
|
|
1339
1409
|
explicitPathsToArguments: {
|
|
1340
|
-
dataCollectionId: "$[0]
|
|
1341
|
-
|
|
1410
|
+
dataCollectionId: "$[0]",
|
|
1411
|
+
plugin: "$[1].plugin"
|
|
1342
1412
|
},
|
|
1343
1413
|
singleArgumentUnchanged: false
|
|
1344
1414
|
},
|
|
1345
|
-
["
|
|
1415
|
+
["dataCollectionId", "options"]
|
|
1416
|
+
);
|
|
1417
|
+
sideEffects?.onError?.(err);
|
|
1418
|
+
throw transformedError;
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
async function deleteDataCollectionPlugin2(dataCollectionId, options) {
|
|
1422
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1423
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1424
|
+
dataCollectionId,
|
|
1425
|
+
pluginType: options?.pluginType
|
|
1426
|
+
});
|
|
1427
|
+
const reqOpts = deleteDataCollectionPlugin(payload);
|
|
1428
|
+
sideEffects?.onSiteCall?.();
|
|
1429
|
+
try {
|
|
1430
|
+
const result = await httpClient.request(reqOpts);
|
|
1431
|
+
sideEffects?.onSuccess?.(result);
|
|
1432
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1433
|
+
} catch (err) {
|
|
1434
|
+
const transformedError = sdkTransformError(
|
|
1435
|
+
err,
|
|
1436
|
+
{
|
|
1437
|
+
spreadPathsToArguments: {},
|
|
1438
|
+
explicitPathsToArguments: {
|
|
1439
|
+
dataCollectionId: "$[0]",
|
|
1440
|
+
pluginType: "$[1].pluginType"
|
|
1441
|
+
},
|
|
1442
|
+
singleArgumentUnchanged: false
|
|
1443
|
+
},
|
|
1444
|
+
["dataCollectionId", "options"]
|
|
1445
|
+
);
|
|
1446
|
+
sideEffects?.onError?.(err);
|
|
1447
|
+
throw transformedError;
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
async function patchDataCollectionField2(dataCollectionId, field) {
|
|
1451
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1452
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1453
|
+
dataCollectionId,
|
|
1454
|
+
field
|
|
1455
|
+
});
|
|
1456
|
+
const reqOpts = patchDataCollectionField(payload);
|
|
1457
|
+
sideEffects?.onSiteCall?.();
|
|
1458
|
+
try {
|
|
1459
|
+
const result = await httpClient.request(reqOpts);
|
|
1460
|
+
sideEffects?.onSuccess?.(result);
|
|
1461
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1462
|
+
} catch (err) {
|
|
1463
|
+
const transformedError = sdkTransformError(
|
|
1464
|
+
err,
|
|
1465
|
+
{
|
|
1466
|
+
spreadPathsToArguments: {},
|
|
1467
|
+
explicitPathsToArguments: { dataCollectionId: "$[0]", field: "$[1]" },
|
|
1468
|
+
singleArgumentUnchanged: false
|
|
1469
|
+
},
|
|
1470
|
+
["dataCollectionId", "field"]
|
|
1346
1471
|
);
|
|
1347
1472
|
sideEffects?.onError?.(err);
|
|
1348
1473
|
throw transformedError;
|
|
@@ -1369,10 +1494,12 @@ export {
|
|
|
1369
1494
|
TenantMode,
|
|
1370
1495
|
Type,
|
|
1371
1496
|
WebhookIdentityType,
|
|
1497
|
+
addDataCollectionPlugin2 as addDataCollectionPlugin,
|
|
1372
1498
|
createDataCollection2 as createDataCollection,
|
|
1373
1499
|
createDataCollectionField2 as createDataCollectionField,
|
|
1374
1500
|
deleteDataCollection2 as deleteDataCollection,
|
|
1375
1501
|
deleteDataCollectionField2 as deleteDataCollectionField,
|
|
1502
|
+
deleteDataCollectionPlugin2 as deleteDataCollectionPlugin,
|
|
1376
1503
|
getDataCollection2 as getDataCollection,
|
|
1377
1504
|
listDataCollections2 as listDataCollections,
|
|
1378
1505
|
patchDataCollection2 as patchDataCollection,
|