@wix/auto_sdk_data_collections 1.0.40 → 1.0.42
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 +11 -3
- package/build/cjs/index.js +188 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +194 -1
- package/build/cjs/index.typings.js +170 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +30 -2
- package/build/cjs/meta.js +155 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +11 -3
- package/build/es/index.mjs +186 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +194 -1
- package/build/es/index.typings.mjs +168 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +30 -2
- package/build/es/meta.mjs +153 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +22 -3
- package/build/internal/cjs/index.js +188 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +218 -1
- package/build/internal/cjs/index.typings.js +170 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +30 -2
- package/build/internal/cjs/meta.js +155 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +22 -3
- package/build/internal/es/index.mjs +186 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +218 -1
- package/build/internal/es/index.typings.mjs +168 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +30 -2
- package/build/internal/es/meta.mjs +153 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { DataCollection, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, RestoreDataCollectionResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse } from './index.typings.mjs';
|
|
3
|
-
export { AccessLevel, AccessLevelWithLiterals, ActionEvent, 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, DeleteDataCollectionRequest, DeleteDataCollectionResponse, DeleteDataCollectionsSnapshotRequest, DeleteDataCollectionsSnapshotResponse, Destination, Direction, DirectionWithLiterals, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FailedCollection, Failure, Field, 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, 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';
|
|
2
|
+
import { DataCollection, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, RestoreDataCollectionResponse, PatchDataCollection, PatchDataCollectionResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, PatchDataCollectionFieldIdentifiers, PatchDataCollectionField, PatchDataCollectionFieldResponse } from './index.typings.mjs';
|
|
3
|
+
export { AccessLevel, AccessLevelWithLiterals, ActionEvent, 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, DeleteDataCollectionRequest, DeleteDataCollectionResponse, DeleteDataCollectionsSnapshotRequest, DeleteDataCollectionsSnapshotResponse, Destination, Direction, DirectionWithLiterals, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FailedCollection, Failure, Field, 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 {
|
|
@@ -85,6 +85,15 @@ interface RestoreDataCollectionSignature {
|
|
|
85
85
|
*/
|
|
86
86
|
(dataCollectionId: string): Promise<NonNullablePaths<RestoreDataCollectionResponse, `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>>;
|
|
87
87
|
}
|
|
88
|
+
/** @internal */
|
|
89
|
+
declare function patchDataCollection$1(httpClient: HttpClient): PatchDataCollectionSignature;
|
|
90
|
+
interface PatchDataCollectionSignature {
|
|
91
|
+
/**
|
|
92
|
+
* Patches (partial update) a data collection.
|
|
93
|
+
* @param - Collection ID. For example, `my-first-collection`. May include a namespace.
|
|
94
|
+
*/
|
|
95
|
+
(_id: string, dataCollection: NonNullablePaths<PatchDataCollection, `revision`, 2>): 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
|
+
}
|
|
88
97
|
declare function createDataCollectionField$1(httpClient: HttpClient): CreateDataCollectionFieldSignature;
|
|
89
98
|
interface CreateDataCollectionFieldSignature {
|
|
90
99
|
/**
|
|
@@ -112,6 +121,13 @@ interface DeleteDataCollectionFieldSignature {
|
|
|
112
121
|
*/
|
|
113
122
|
(dataCollectionId: string, options: NonNullablePaths<DeleteDataCollectionFieldOptions, `fieldKey`, 2>): Promise<NonNullablePaths<DeleteDataCollectionFieldResponse, `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>>;
|
|
114
123
|
}
|
|
124
|
+
declare function patchDataCollectionField$1(httpClient: HttpClient): PatchDataCollectionFieldSignature;
|
|
125
|
+
interface PatchDataCollectionFieldSignature {
|
|
126
|
+
/**
|
|
127
|
+
* Patches (partial update) a field in the structure of a data collection.
|
|
128
|
+
*/
|
|
129
|
+
(identifiers: NonNullablePaths<PatchDataCollectionFieldIdentifiers, `dataCollectionId` | `fieldKey`, 2>, field: PatchDataCollectionField): 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>>;
|
|
130
|
+
}
|
|
115
131
|
|
|
116
132
|
declare const createDataCollection: MaybeContext<BuildRESTFunction<typeof createDataCollection$1> & typeof createDataCollection$1>;
|
|
117
133
|
declare const getDataCollection: MaybeContext<BuildRESTFunction<typeof getDataCollection$1> & typeof getDataCollection$1>;
|
|
@@ -120,8 +136,11 @@ declare const updateDataCollection: MaybeContext<BuildRESTFunction<typeof update
|
|
|
120
136
|
declare const deleteDataCollection: MaybeContext<BuildRESTFunction<typeof deleteDataCollection$1> & typeof deleteDataCollection$1>;
|
|
121
137
|
/** @internal */
|
|
122
138
|
declare const restoreDataCollection: MaybeContext<BuildRESTFunction<typeof restoreDataCollection$1> & typeof restoreDataCollection$1>;
|
|
139
|
+
/** @internal */
|
|
140
|
+
declare const patchDataCollection: MaybeContext<BuildRESTFunction<typeof patchDataCollection$1> & typeof patchDataCollection$1>;
|
|
123
141
|
declare const createDataCollectionField: MaybeContext<BuildRESTFunction<typeof createDataCollectionField$1> & typeof createDataCollectionField$1>;
|
|
124
142
|
declare const updateDataCollectionField: MaybeContext<BuildRESTFunction<typeof updateDataCollectionField$1> & typeof updateDataCollectionField$1>;
|
|
125
143
|
declare const deleteDataCollectionField: MaybeContext<BuildRESTFunction<typeof deleteDataCollectionField$1> & typeof deleteDataCollectionField$1>;
|
|
144
|
+
declare const patchDataCollectionField: MaybeContext<BuildRESTFunction<typeof patchDataCollectionField$1> & typeof patchDataCollectionField$1>;
|
|
126
145
|
|
|
127
|
-
export { CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, RestoreDataCollectionResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, getDataCollection, listDataCollections, restoreDataCollection, updateDataCollection, updateDataCollectionField };
|
|
146
|
+
export { CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, PatchDataCollection, PatchDataCollectionField, PatchDataCollectionFieldIdentifiers, PatchDataCollectionFieldResponse, PatchDataCollectionResponse, RestoreDataCollectionResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, getDataCollection, listDataCollections, patchDataCollection, patchDataCollectionField, restoreDataCollection, updateDataCollection, updateDataCollectionField };
|
|
@@ -11,6 +11,7 @@ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/f
|
|
|
11
11
|
import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
|
|
12
12
|
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
13
13
|
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
14
|
+
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
14
15
|
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
15
16
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
16
17
|
function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(opts) {
|
|
@@ -605,6 +606,65 @@ function restoreDataCollection(payload) {
|
|
|
605
606
|
}
|
|
606
607
|
return __restoreDataCollection;
|
|
607
608
|
}
|
|
609
|
+
function patchDataCollection(payload) {
|
|
610
|
+
function __patchDataCollection({ host }) {
|
|
611
|
+
const serializedData = transformPaths(payload, [
|
|
612
|
+
{
|
|
613
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
614
|
+
paths: [{ path: "fieldMask" }]
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
618
|
+
paths: [
|
|
619
|
+
{ path: "dataCollection.createdDate" },
|
|
620
|
+
{ path: "dataCollection.updatedDate" }
|
|
621
|
+
]
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
625
|
+
paths: [
|
|
626
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
627
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
628
|
+
]
|
|
629
|
+
}
|
|
630
|
+
]);
|
|
631
|
+
const metadata = {
|
|
632
|
+
entityFqdn: "wix.data.v2.data_collection",
|
|
633
|
+
method: "PATCH",
|
|
634
|
+
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollection",
|
|
635
|
+
packageName: PACKAGE_NAME,
|
|
636
|
+
migrationOptions: {
|
|
637
|
+
optInTransformResponse: true
|
|
638
|
+
},
|
|
639
|
+
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
640
|
+
{
|
|
641
|
+
protoPath: "/v2/collections/{dataCollection.id}",
|
|
642
|
+
data: serializedData,
|
|
643
|
+
host
|
|
644
|
+
}
|
|
645
|
+
),
|
|
646
|
+
data: serializedData,
|
|
647
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
648
|
+
{
|
|
649
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
650
|
+
paths: [
|
|
651
|
+
{ path: "dataCollection.createdDate" },
|
|
652
|
+
{ path: "dataCollection.updatedDate" }
|
|
653
|
+
]
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
657
|
+
paths: [
|
|
658
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
659
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
660
|
+
]
|
|
661
|
+
}
|
|
662
|
+
])
|
|
663
|
+
};
|
|
664
|
+
return metadata;
|
|
665
|
+
}
|
|
666
|
+
return __patchDataCollection;
|
|
667
|
+
}
|
|
608
668
|
function createDataCollectionField(payload) {
|
|
609
669
|
function __createDataCollectionField({ host }) {
|
|
610
670
|
const serializedData = transformPaths(payload, [
|
|
@@ -736,6 +796,58 @@ function deleteDataCollectionField(payload) {
|
|
|
736
796
|
}
|
|
737
797
|
return __deleteDataCollectionField;
|
|
738
798
|
}
|
|
799
|
+
function patchDataCollectionField(payload) {
|
|
800
|
+
function __patchDataCollectionField({ host }) {
|
|
801
|
+
const serializedData = transformPaths(payload, [
|
|
802
|
+
{
|
|
803
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
804
|
+
paths: [{ path: "fieldMask" }]
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
808
|
+
paths: [
|
|
809
|
+
{ path: "field.numberRange.min" },
|
|
810
|
+
{ path: "field.numberRange.max" }
|
|
811
|
+
]
|
|
812
|
+
}
|
|
813
|
+
]);
|
|
814
|
+
const metadata = {
|
|
815
|
+
entityFqdn: "wix.data.v2.data_collection",
|
|
816
|
+
method: "PATCH",
|
|
817
|
+
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
|
|
818
|
+
packageName: PACKAGE_NAME,
|
|
819
|
+
migrationOptions: {
|
|
820
|
+
optInTransformResponse: true
|
|
821
|
+
},
|
|
822
|
+
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
823
|
+
{
|
|
824
|
+
protoPath: "/v2/collections/{dataCollectionId}/fields/{field.key}",
|
|
825
|
+
data: serializedData,
|
|
826
|
+
host
|
|
827
|
+
}
|
|
828
|
+
),
|
|
829
|
+
data: serializedData,
|
|
830
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
831
|
+
{
|
|
832
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
833
|
+
paths: [
|
|
834
|
+
{ path: "dataCollection.createdDate" },
|
|
835
|
+
{ path: "dataCollection.updatedDate" }
|
|
836
|
+
]
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
840
|
+
paths: [
|
|
841
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
842
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
843
|
+
]
|
|
844
|
+
}
|
|
845
|
+
])
|
|
846
|
+
};
|
|
847
|
+
return metadata;
|
|
848
|
+
}
|
|
849
|
+
return __patchDataCollectionField;
|
|
850
|
+
}
|
|
739
851
|
|
|
740
852
|
// src/data-v2-data-collection-collections.universal.ts
|
|
741
853
|
var CollectionType = /* @__PURE__ */ ((CollectionType2) => {
|
|
@@ -1095,6 +1207,31 @@ async function restoreDataCollection2(dataCollectionId) {
|
|
|
1095
1207
|
throw transformedError;
|
|
1096
1208
|
}
|
|
1097
1209
|
}
|
|
1210
|
+
async function patchDataCollection2(_id, dataCollection) {
|
|
1211
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1212
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1213
|
+
dataCollection: { ...dataCollection, id: _id }
|
|
1214
|
+
});
|
|
1215
|
+
const reqOpts = patchDataCollection(payload);
|
|
1216
|
+
sideEffects?.onSiteCall?.();
|
|
1217
|
+
try {
|
|
1218
|
+
const result = await httpClient.request(reqOpts);
|
|
1219
|
+
sideEffects?.onSuccess?.(result);
|
|
1220
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1221
|
+
} catch (err) {
|
|
1222
|
+
const transformedError = sdkTransformError(
|
|
1223
|
+
err,
|
|
1224
|
+
{
|
|
1225
|
+
spreadPathsToArguments: { dataCollection: "$[1]" },
|
|
1226
|
+
explicitPathsToArguments: { "dataCollection.id": "$[0]" },
|
|
1227
|
+
singleArgumentUnchanged: false
|
|
1228
|
+
},
|
|
1229
|
+
["_id", "dataCollection"]
|
|
1230
|
+
);
|
|
1231
|
+
sideEffects?.onError?.(err);
|
|
1232
|
+
throw transformedError;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1098
1235
|
async function createDataCollectionField2(dataCollectionId, options) {
|
|
1099
1236
|
const { httpClient, sideEffects } = arguments[2];
|
|
1100
1237
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1182,6 +1319,35 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
|
|
|
1182
1319
|
throw transformedError;
|
|
1183
1320
|
}
|
|
1184
1321
|
}
|
|
1322
|
+
async function patchDataCollectionField2(identifiers, field) {
|
|
1323
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1324
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1325
|
+
dataCollectionId: identifiers?.dataCollectionId,
|
|
1326
|
+
field: { ...field, key: identifiers?.fieldKey }
|
|
1327
|
+
});
|
|
1328
|
+
const reqOpts = patchDataCollectionField(payload);
|
|
1329
|
+
sideEffects?.onSiteCall?.();
|
|
1330
|
+
try {
|
|
1331
|
+
const result = await httpClient.request(reqOpts);
|
|
1332
|
+
sideEffects?.onSuccess?.(result);
|
|
1333
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1334
|
+
} catch (err) {
|
|
1335
|
+
const transformedError = sdkTransformError(
|
|
1336
|
+
err,
|
|
1337
|
+
{
|
|
1338
|
+
spreadPathsToArguments: { field: "$[1]" },
|
|
1339
|
+
explicitPathsToArguments: {
|
|
1340
|
+
dataCollectionId: "$[0].dataCollectionId",
|
|
1341
|
+
"field.key": "$[0].fieldKey"
|
|
1342
|
+
},
|
|
1343
|
+
singleArgumentUnchanged: false
|
|
1344
|
+
},
|
|
1345
|
+
["identifiers", "field"]
|
|
1346
|
+
);
|
|
1347
|
+
sideEffects?.onError?.(err);
|
|
1348
|
+
throw transformedError;
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1185
1351
|
|
|
1186
1352
|
// src/data-v2-data-collection-collections.public.ts
|
|
1187
1353
|
function createDataCollection3(httpClient) {
|
|
@@ -1227,6 +1393,14 @@ function restoreDataCollection3(httpClient) {
|
|
|
1227
1393
|
{ httpClient }
|
|
1228
1394
|
);
|
|
1229
1395
|
}
|
|
1396
|
+
function patchDataCollection3(httpClient) {
|
|
1397
|
+
return (_id, dataCollection) => patchDataCollection2(
|
|
1398
|
+
_id,
|
|
1399
|
+
dataCollection,
|
|
1400
|
+
// @ts-ignore
|
|
1401
|
+
{ httpClient }
|
|
1402
|
+
);
|
|
1403
|
+
}
|
|
1230
1404
|
function createDataCollectionField3(httpClient) {
|
|
1231
1405
|
return (dataCollectionId, options) => createDataCollectionField2(
|
|
1232
1406
|
dataCollectionId,
|
|
@@ -1251,6 +1425,14 @@ function deleteDataCollectionField3(httpClient) {
|
|
|
1251
1425
|
{ httpClient }
|
|
1252
1426
|
);
|
|
1253
1427
|
}
|
|
1428
|
+
function patchDataCollectionField3(httpClient) {
|
|
1429
|
+
return (identifiers, field) => patchDataCollectionField2(
|
|
1430
|
+
identifiers,
|
|
1431
|
+
field,
|
|
1432
|
+
// @ts-ignore
|
|
1433
|
+
{ httpClient }
|
|
1434
|
+
);
|
|
1435
|
+
}
|
|
1254
1436
|
|
|
1255
1437
|
// src/data-v2-data-collection-collections.context.ts
|
|
1256
1438
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
@@ -1260,9 +1442,11 @@ var listDataCollections4 = /* @__PURE__ */ createRESTModule(listDataCollections3
|
|
|
1260
1442
|
var updateDataCollection4 = /* @__PURE__ */ createRESTModule(updateDataCollection3);
|
|
1261
1443
|
var deleteDataCollection4 = /* @__PURE__ */ createRESTModule(deleteDataCollection3);
|
|
1262
1444
|
var restoreDataCollection4 = /* @__PURE__ */ createRESTModule(restoreDataCollection3);
|
|
1445
|
+
var patchDataCollection4 = /* @__PURE__ */ createRESTModule(patchDataCollection3);
|
|
1263
1446
|
var createDataCollectionField4 = /* @__PURE__ */ createRESTModule(createDataCollectionField3);
|
|
1264
1447
|
var updateDataCollectionField4 = /* @__PURE__ */ createRESTModule(updateDataCollectionField3);
|
|
1265
1448
|
var deleteDataCollectionField4 = /* @__PURE__ */ createRESTModule(deleteDataCollectionField3);
|
|
1449
|
+
var patchDataCollectionField4 = /* @__PURE__ */ createRESTModule(patchDataCollectionField3);
|
|
1266
1450
|
export {
|
|
1267
1451
|
AccessLevel,
|
|
1268
1452
|
CollectionOperation,
|
|
@@ -1290,6 +1474,8 @@ export {
|
|
|
1290
1474
|
deleteDataCollectionField4 as deleteDataCollectionField,
|
|
1291
1475
|
getDataCollection4 as getDataCollection,
|
|
1292
1476
|
listDataCollections4 as listDataCollections,
|
|
1477
|
+
patchDataCollection4 as patchDataCollection,
|
|
1478
|
+
patchDataCollectionField4 as patchDataCollectionField,
|
|
1293
1479
|
restoreDataCollection4 as restoreDataCollection,
|
|
1294
1480
|
updateDataCollection4 as updateDataCollection,
|
|
1295
1481
|
updateDataCollectionField4 as updateDataCollectionField
|