@wix/auto_sdk_data_collections 1.0.44 → 1.0.46
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 +7 -5
- 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 +15 -82
- 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 +7 -5
- 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 +15 -82
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { DataCollection, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, RestoreDataCollectionResponse, PatchDataCollection, PatchDataCollectionResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, AddDataCollectionPluginOptions, AddDataCollectionPluginResponse, DeleteDataCollectionPluginOptions, DeleteDataCollectionPluginResponse,
|
|
3
|
-
export { AccessLevel, AccessLevelWithLiterals, ActionEvent, AddDataCollectionPluginRequest, AllowedDataPermissions, AppOptions, ApplicationError, ArraySizeRange, BulkGetDataCollectionsPageBySnapshotsRequest, BulkGetDataCollectionsPageBySnapshotsRequestTenantModeOptionsOneOf, BulkGetDataCollectionsPageBySnapshotsResponse, BulkGetDataCollectionsRequest, BulkGetDataCollectionsResponse, Calculator, CalculatorPatternOneOf, CatalogOptions, CmsOptions, CollectionCapabilities, CollectionDefinition, CollectionOperation, CollectionOperationWithLiterals, CollectionType, CollectionTypeWithLiterals, CreateAppCollectionsSnapshotRequest, CreateAppCollectionsSnapshotResponse, CreateDataCollectionFieldRequest, CreateDataCollectionRequest, CreateDataCollectionResponse, CreateDataCollectionsSnapshotRequest, CreateDataCollectionsSnapshotResponse, CreateMigratedCollectionsSnapshotRequest, CreateMigratedCollectionsSnapshotResponse, DataCollectionChangedEvent, DataCollectionClonedEvent, DataCollectionEvictedEvent, DataOperation, DataOperationWithLiterals, DataPermissions, DeleteDataCollectionFieldRequest, DeleteDataCollectionPluginRequest, DeleteDataCollectionRequest, DeleteDataCollectionResponse, DeleteDataCollectionsSnapshotRequest, DeleteDataCollectionsSnapshotResponse, Destination, Direction, DirectionWithLiterals, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FailedCollection, Failure,
|
|
2
|
+
import { DataCollection, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, RestoreDataCollectionResponse, PatchDataCollection, PatchDataCollectionResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, AddDataCollectionPluginOptions, AddDataCollectionPluginResponse, DeleteDataCollectionPluginOptions, DeleteDataCollectionPluginResponse, Field, PatchDataCollectionFieldResponse } from './index.typings.js';
|
|
3
|
+
export { AccessLevel, AccessLevelWithLiterals, ActionEvent, AddDataCollectionPluginRequest, AllowedDataPermissions, AppOptions, ApplicationError, ArraySizeRange, BulkGetDataCollectionsPageBySnapshotsRequest, BulkGetDataCollectionsPageBySnapshotsRequestTenantModeOptionsOneOf, BulkGetDataCollectionsPageBySnapshotsResponse, BulkGetDataCollectionsRequest, BulkGetDataCollectionsResponse, Calculator, CalculatorPatternOneOf, CatalogOptions, CmsOptions, CollectionCapabilities, CollectionDefinition, CollectionOperation, CollectionOperationWithLiterals, CollectionType, CollectionTypeWithLiterals, CreateAppCollectionsSnapshotRequest, CreateAppCollectionsSnapshotResponse, CreateDataCollectionFieldRequest, CreateDataCollectionRequest, CreateDataCollectionResponse, CreateDataCollectionsSnapshotRequest, CreateDataCollectionsSnapshotResponse, CreateMigratedCollectionsSnapshotRequest, CreateMigratedCollectionsSnapshotResponse, DataCollectionChangedEvent, DataCollectionClonedEvent, DataCollectionEvictedEvent, DataOperation, DataOperationWithLiterals, DataPermissions, DeleteDataCollectionFieldRequest, DeleteDataCollectionPluginRequest, DeleteDataCollectionRequest, DeleteDataCollectionResponse, DeleteDataCollectionsSnapshotRequest, DeleteDataCollectionsSnapshotResponse, Destination, Direction, DirectionWithLiterals, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FailedCollection, Failure, FieldCapabilities, FieldPlugin, FieldPluginOptionsOneOf, FieldPluginType, FieldPluginTypeWithLiterals, FieldRangeValidationsOneOf, FieldUpdate, FieldsPattern, Format, FormatWithLiterals, GetDataCollectionRequest, GetDataCollectionResponse, IdentificationData, IdentificationDataIdOneOf, Index, IndexField, IndexLimits, IndexQuotaLimits, IndexSource, IndexSourceWithLiterals, IndexStatus, IndexStatusWithLiterals, ListDataCollectionsRequest, MessageEnvelope, MultiReference, MultilingualOptions, NumberRange, ObjectField, Order, OrderWithLiterals, PageLink, PageLinkPluginOptions, Paging, PagingMetadataV2, PagingMode, PagingModeWithLiterals, PatchDataCollectionFieldRequest, PatchDataCollectionRequest, Permissions, Plugin, PluginCmsOptions, PluginOptionsOneOf, PluginType, PluginTypeWithLiterals, PluginUpdate, PublishPluginOptions, QueryOperator, QueryOperatorWithLiterals, Reference, RestorationCollection, RestoreDataCollectionRequest, RestoreDataCollectionsFromSnapshotRequest, RestoreDataCollectionsFromSnapshotResponse, RestoreInfo, Role, RoleWithLiterals, Segment, SegmentWithLiterals, SingleItemPluginOptions, SiteSort, Slug, SnapshotCollection, Sort, SortOrder, SortOrderWithLiterals, Sorting, Status, StatusWithLiterals, StringLengthRange, TenantMode, TenantModeWithLiterals, Type, TypeMetadata, TypeMetadataMetadataOneOf, TypeWithLiterals, UpdateDataCollectionFieldRequest, UpdateDataCollectionRequest, UpdateDataCollectionResponse, UpdateDataPermissionsRequest, UpdateDataPermissionsResponse, UrlizedOnlyPattern, UrlizedPluginOptions, WebhookIdentityType, WebhookIdentityTypeWithLiterals, _Array, _Object } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createDataCollection$1(httpClient: HttpClient): CreateDataCollectionSignature;
|
|
6
6
|
interface CreateDataCollectionSignature {
|
|
@@ -92,7 +92,7 @@ interface PatchDataCollectionSignature {
|
|
|
92
92
|
* Patches (partial update) a data collection.
|
|
93
93
|
* @param - Collection ID. For example, `my-first-collection`. May include a namespace.
|
|
94
94
|
*/
|
|
95
|
-
(_id: string, dataCollection:
|
|
95
|
+
(_id: string, dataCollection: PatchDataCollection): Promise<NonNullablePaths<PatchDataCollectionResponse, `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>>;
|
|
96
96
|
}
|
|
97
97
|
declare function createDataCollectionField$1(httpClient: HttpClient): CreateDataCollectionFieldSignature;
|
|
98
98
|
interface CreateDataCollectionFieldSignature {
|
|
@@ -141,8 +141,10 @@ declare function patchDataCollectionField$1(httpClient: HttpClient): PatchDataCo
|
|
|
141
141
|
interface PatchDataCollectionFieldSignature {
|
|
142
142
|
/**
|
|
143
143
|
* Patches (partial update) a field in the structure of a data collection.
|
|
144
|
+
* @param - ID of the data collection to update.
|
|
145
|
+
* @param - Field to patch.
|
|
144
146
|
*/
|
|
145
|
-
(
|
|
147
|
+
(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>>;
|
|
146
148
|
}
|
|
147
149
|
|
|
148
150
|
declare const createDataCollection: MaybeContext<BuildRESTFunction<typeof createDataCollection$1> & typeof createDataCollection$1>;
|
|
@@ -161,4 +163,4 @@ declare const addDataCollectionPlugin: MaybeContext<BuildRESTFunction<typeof add
|
|
|
161
163
|
declare const deleteDataCollectionPlugin: MaybeContext<BuildRESTFunction<typeof deleteDataCollectionPlugin$1> & typeof deleteDataCollectionPlugin$1>;
|
|
162
164
|
declare const patchDataCollectionField: MaybeContext<BuildRESTFunction<typeof patchDataCollectionField$1> & typeof patchDataCollectionField$1>;
|
|
163
165
|
|
|
164
|
-
export { AddDataCollectionPluginOptions, AddDataCollectionPluginResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, DeleteDataCollectionPluginOptions, DeleteDataCollectionPluginResponse, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, PatchDataCollection,
|
|
166
|
+
export { AddDataCollectionPluginOptions, AddDataCollectionPluginResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, DeleteDataCollectionPluginOptions, DeleteDataCollectionPluginResponse, Field, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, PatchDataCollection, PatchDataCollectionFieldResponse, PatchDataCollectionResponse, RestoreDataCollectionResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, addDataCollectionPlugin, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, deleteDataCollectionPlugin, getDataCollection, listDataCollections, patchDataCollection, patchDataCollectionField, restoreDataCollection, updateDataCollection, updateDataCollectionField };
|
|
@@ -938,7 +938,7 @@ function patchDataCollectionField(payload) {
|
|
|
938
938
|
]);
|
|
939
939
|
const metadata = {
|
|
940
940
|
entityFqdn: "wix.data.v2.data_collection",
|
|
941
|
-
method: "
|
|
941
|
+
method: "POST",
|
|
942
942
|
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
|
|
943
943
|
packageName: PACKAGE_NAME,
|
|
944
944
|
migrationOptions: {
|
|
@@ -946,7 +946,7 @@ function patchDataCollectionField(payload) {
|
|
|
946
946
|
},
|
|
947
947
|
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
948
948
|
{
|
|
949
|
-
protoPath: "/v2/collections/{dataCollectionId}/
|
|
949
|
+
protoPath: "/v2/collections/{dataCollectionId}/patch-field",
|
|
950
950
|
data: serializedData,
|
|
951
951
|
host
|
|
952
952
|
}
|
|
@@ -1502,11 +1502,11 @@ async function deleteDataCollectionPlugin2(dataCollectionId, options) {
|
|
|
1502
1502
|
throw transformedError;
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
|
-
async function patchDataCollectionField2(
|
|
1505
|
+
async function patchDataCollectionField2(dataCollectionId, field) {
|
|
1506
1506
|
const { httpClient, sideEffects } = arguments[2];
|
|
1507
1507
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1508
|
-
dataCollectionId
|
|
1509
|
-
field
|
|
1508
|
+
dataCollectionId,
|
|
1509
|
+
field
|
|
1510
1510
|
});
|
|
1511
1511
|
const reqOpts = patchDataCollectionField(payload);
|
|
1512
1512
|
sideEffects?.onSiteCall?.();
|
|
@@ -1518,14 +1518,11 @@ async function patchDataCollectionField2(identifiers, field) {
|
|
|
1518
1518
|
const transformedError = (0, import_transform_error.transformError)(
|
|
1519
1519
|
err,
|
|
1520
1520
|
{
|
|
1521
|
-
spreadPathsToArguments: {
|
|
1522
|
-
explicitPathsToArguments: {
|
|
1523
|
-
dataCollectionId: "$[0].dataCollectionId",
|
|
1524
|
-
"field.key": "$[0].fieldKey"
|
|
1525
|
-
},
|
|
1521
|
+
spreadPathsToArguments: {},
|
|
1522
|
+
explicitPathsToArguments: { dataCollectionId: "$[0]", field: "$[1]" },
|
|
1526
1523
|
singleArgumentUnchanged: false
|
|
1527
1524
|
},
|
|
1528
|
-
["
|
|
1525
|
+
["dataCollectionId", "field"]
|
|
1529
1526
|
);
|
|
1530
1527
|
sideEffects?.onError?.(err);
|
|
1531
1528
|
throw transformedError;
|
|
@@ -1625,8 +1622,8 @@ function deleteDataCollectionPlugin3(httpClient) {
|
|
|
1625
1622
|
);
|
|
1626
1623
|
}
|
|
1627
1624
|
function patchDataCollectionField3(httpClient) {
|
|
1628
|
-
return (
|
|
1629
|
-
|
|
1625
|
+
return (dataCollectionId, field) => patchDataCollectionField2(
|
|
1626
|
+
dataCollectionId,
|
|
1630
1627
|
field,
|
|
1631
1628
|
// @ts-ignore
|
|
1632
1629
|
{ httpClient }
|