@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.mjs';
|
|
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.mjs';
|
|
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 };
|
|
@@ -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;
|
|
@@ -1570,8 +1567,8 @@ function deleteDataCollectionPlugin3(httpClient) {
|
|
|
1570
1567
|
);
|
|
1571
1568
|
}
|
|
1572
1569
|
function patchDataCollectionField3(httpClient) {
|
|
1573
|
-
return (
|
|
1574
|
-
|
|
1570
|
+
return (dataCollectionId, field) => patchDataCollectionField2(
|
|
1571
|
+
dataCollectionId,
|
|
1575
1572
|
field,
|
|
1576
1573
|
// @ts-ignore
|
|
1577
1574
|
{ httpClient }
|