@wix/auto_sdk_data_collections 1.0.44 → 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 +6 -4
- package/build/cjs/index.js +10 -13
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +14 -80
- package/build/cjs/index.typings.js +8 -11
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +6 -3
- package/build/cjs/meta.js +6 -9
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +6 -4
- package/build/es/index.mjs +10 -13
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +14 -80
- package/build/es/index.typings.mjs +8 -11
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +6 -3
- package/build/es/meta.mjs +6 -9
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +6 -4
- package/build/internal/cjs/index.js +10 -13
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +14 -80
- package/build/internal/cjs/index.typings.js +8 -11
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +6 -3
- package/build/internal/cjs/meta.js +6 -9
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +6 -4
- package/build/internal/es/index.mjs +10 -13
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +14 -80
- package/build/internal/es/index.typings.mjs +8 -11
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +6 -3
- package/build/internal/es/meta.mjs +6 -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.
|
|
@@ -1131,7 +1132,10 @@ interface AddDataCollectionPluginRequest {
|
|
|
1131
1132
|
* @maxLength 256
|
|
1132
1133
|
*/
|
|
1133
1134
|
dataCollectionId: string;
|
|
1134
|
-
/**
|
|
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
|
+
*/
|
|
1135
1139
|
plugin: Plugin;
|
|
1136
1140
|
}
|
|
1137
1141
|
interface AddDataCollectionPluginResponse {
|
|
@@ -1970,7 +1974,10 @@ interface DeleteDataCollectionFieldOptions {
|
|
|
1970
1974
|
*/
|
|
1971
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>>;
|
|
1972
1976
|
interface AddDataCollectionPluginOptions {
|
|
1973
|
-
/**
|
|
1977
|
+
/**
|
|
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.
|
|
1980
|
+
*/
|
|
1974
1981
|
plugin: Plugin;
|
|
1975
1982
|
}
|
|
1976
1983
|
/**
|
|
@@ -1992,89 +1999,16 @@ interface DeleteDataCollectionPluginOptions {
|
|
|
1992
1999
|
}
|
|
1993
2000
|
/**
|
|
1994
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.
|
|
1995
2004
|
* @public
|
|
1996
2005
|
* @documentationMaturity preview
|
|
2006
|
+
* @requiredField dataCollectionId
|
|
1997
2007
|
* @requiredField field
|
|
1998
|
-
* @requiredField identifiers
|
|
1999
|
-
* @requiredField identifiers.dataCollectionId
|
|
2000
|
-
* @requiredField identifiers.fieldKey
|
|
2001
2008
|
* @permissionId WIX_DATA.UPDATE_COLLECTION_FIELD
|
|
2002
2009
|
* @applicableIdentity APP
|
|
2003
2010
|
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField
|
|
2004
2011
|
*/
|
|
2005
|
-
declare function patchDataCollectionField(
|
|
2006
|
-
interface PatchDataCollectionFieldIdentifiers {
|
|
2007
|
-
/**
|
|
2008
|
-
* ID of the data collection to update.
|
|
2009
|
-
* @maxLength 256
|
|
2010
|
-
*/
|
|
2011
|
-
dataCollectionId: string;
|
|
2012
|
-
/**
|
|
2013
|
-
* Unique identifier for the field. For example, `firstName`.
|
|
2014
|
-
* @maxLength 1000
|
|
2015
|
-
*/
|
|
2016
|
-
fieldKey?: string;
|
|
2017
|
-
}
|
|
2018
|
-
interface PatchDataCollectionField {
|
|
2019
|
-
/** Range of possible values for a numerical field. */
|
|
2020
|
-
numberRange?: NumberRange;
|
|
2021
|
-
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
2022
|
-
stringLengthRange?: StringLengthRange;
|
|
2023
|
-
/** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
|
|
2024
|
-
arraySizeRange?: ArraySizeRange;
|
|
2025
|
-
/**
|
|
2026
|
-
* Field's display name when displayed in the CMS. For example, `First Name`.
|
|
2027
|
-
* @maxLength 1000
|
|
2028
|
-
*/
|
|
2029
|
-
displayName?: string | null;
|
|
2030
|
-
/**
|
|
2031
|
-
* Field's data type.
|
|
2032
|
-
*
|
|
2033
|
-
* Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data).
|
|
2034
|
-
*/
|
|
2035
|
-
type?: TypeWithLiterals;
|
|
2036
|
-
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
2037
|
-
typeMetadata?: TypeMetadata;
|
|
2038
|
-
/**
|
|
2039
|
-
* Whether the field is a system field.
|
|
2040
|
-
* @readonly
|
|
2041
|
-
*/
|
|
2042
|
-
systemField?: boolean;
|
|
2043
|
-
/**
|
|
2044
|
-
* Capabilities the field supports.
|
|
2045
|
-
* @readonly
|
|
2046
|
-
*/
|
|
2047
|
-
capabilities?: FieldCapabilities;
|
|
2048
|
-
/** Whether the field is encrypted. */
|
|
2049
|
-
encrypted?: boolean;
|
|
2050
|
-
/**
|
|
2051
|
-
* Field description.
|
|
2052
|
-
* @maxLength 16000
|
|
2053
|
-
*/
|
|
2054
|
-
description?: string | null;
|
|
2055
|
-
/**
|
|
2056
|
-
* Whether the field is read-only. A read-only field can't be changed.
|
|
2057
|
-
*
|
|
2058
|
-
* Default: `false`
|
|
2059
|
-
*/
|
|
2060
|
-
readOnly?: boolean | null;
|
|
2061
|
-
/**
|
|
2062
|
-
* Whether the field is immutable. An immutable field can be set once, but then cannot be updated.
|
|
2063
|
-
*
|
|
2064
|
-
* Default: `false`
|
|
2065
|
-
*/
|
|
2066
|
-
immutable?: boolean | null;
|
|
2067
|
-
/**
|
|
2068
|
-
* Whether the field is required.
|
|
2069
|
-
*
|
|
2070
|
-
* Default: `false`
|
|
2071
|
-
*/
|
|
2072
|
-
required?: boolean | null;
|
|
2073
|
-
/**
|
|
2074
|
-
* Additional optional plugins for the field.
|
|
2075
|
-
* @maxSize 100
|
|
2076
|
-
*/
|
|
2077
|
-
plugins?: FieldPlugin[];
|
|
2078
|
-
}
|
|
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>>;
|
|
2079
2013
|
|
|
2080
|
-
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
|
|
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 };
|
|
@@ -883,7 +883,7 @@ function patchDataCollectionField(payload) {
|
|
|
883
883
|
]);
|
|
884
884
|
const metadata = {
|
|
885
885
|
entityFqdn: "wix.data.v2.data_collection",
|
|
886
|
-
method: "
|
|
886
|
+
method: "POST",
|
|
887
887
|
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
|
|
888
888
|
packageName: PACKAGE_NAME,
|
|
889
889
|
migrationOptions: {
|
|
@@ -891,7 +891,7 @@ function patchDataCollectionField(payload) {
|
|
|
891
891
|
},
|
|
892
892
|
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
893
893
|
{
|
|
894
|
-
protoPath: "/v2/collections/{dataCollectionId}/
|
|
894
|
+
protoPath: "/v2/collections/{dataCollectionId}/patch-field",
|
|
895
895
|
data: serializedData,
|
|
896
896
|
host
|
|
897
897
|
}
|
|
@@ -1447,11 +1447,11 @@ async function deleteDataCollectionPlugin2(dataCollectionId, options) {
|
|
|
1447
1447
|
throw transformedError;
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
1450
|
-
async function patchDataCollectionField2(
|
|
1450
|
+
async function patchDataCollectionField2(dataCollectionId, field) {
|
|
1451
1451
|
const { httpClient, sideEffects } = arguments[2];
|
|
1452
1452
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1453
|
-
dataCollectionId
|
|
1454
|
-
field
|
|
1453
|
+
dataCollectionId,
|
|
1454
|
+
field
|
|
1455
1455
|
});
|
|
1456
1456
|
const reqOpts = patchDataCollectionField(payload);
|
|
1457
1457
|
sideEffects?.onSiteCall?.();
|
|
@@ -1463,14 +1463,11 @@ async function patchDataCollectionField2(identifiers, field) {
|
|
|
1463
1463
|
const transformedError = sdkTransformError(
|
|
1464
1464
|
err,
|
|
1465
1465
|
{
|
|
1466
|
-
spreadPathsToArguments: {
|
|
1467
|
-
explicitPathsToArguments: {
|
|
1468
|
-
dataCollectionId: "$[0].dataCollectionId",
|
|
1469
|
-
"field.key": "$[0].fieldKey"
|
|
1470
|
-
},
|
|
1466
|
+
spreadPathsToArguments: {},
|
|
1467
|
+
explicitPathsToArguments: { dataCollectionId: "$[0]", field: "$[1]" },
|
|
1471
1468
|
singleArgumentUnchanged: false
|
|
1472
1469
|
},
|
|
1473
|
-
["
|
|
1470
|
+
["dataCollectionId", "field"]
|
|
1474
1471
|
);
|
|
1475
1472
|
sideEffects?.onError?.(err);
|
|
1476
1473
|
throw transformedError;
|