@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
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { DataCollection, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse } from './index.typings.js';
|
|
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, RestoreDataCollectionResponse, 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';
|
|
2
|
+
import { DataCollection, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, PatchDataCollectionFieldIdentifiers, PatchDataCollectionField, PatchDataCollectionFieldResponse } from './index.typings.js';
|
|
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, PatchDataCollection, PatchDataCollectionFieldRequest, PatchDataCollectionRequest, PatchDataCollectionResponse, Permissions, Plugin, PluginCmsOptions, PluginOptionsOneOf, PluginType, PluginTypeWithLiterals, PluginUpdate, PublishPluginOptions, QueryOperator, QueryOperatorWithLiterals, Reference, RestorationCollection, RestoreDataCollectionRequest, RestoreDataCollectionResponse, 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 {
|
|
@@ -101,6 +101,13 @@ interface DeleteDataCollectionFieldSignature {
|
|
|
101
101
|
*/
|
|
102
102
|
(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>>;
|
|
103
103
|
}
|
|
104
|
+
declare function patchDataCollectionField$1(httpClient: HttpClient): PatchDataCollectionFieldSignature;
|
|
105
|
+
interface PatchDataCollectionFieldSignature {
|
|
106
|
+
/**
|
|
107
|
+
* Patches (partial update) a field in the structure of a data collection.
|
|
108
|
+
*/
|
|
109
|
+
(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>>;
|
|
110
|
+
}
|
|
104
111
|
|
|
105
112
|
declare const createDataCollection: MaybeContext<BuildRESTFunction<typeof createDataCollection$1> & typeof createDataCollection$1>;
|
|
106
113
|
declare const getDataCollection: MaybeContext<BuildRESTFunction<typeof getDataCollection$1> & typeof getDataCollection$1>;
|
|
@@ -110,5 +117,6 @@ declare const deleteDataCollection: MaybeContext<BuildRESTFunction<typeof delete
|
|
|
110
117
|
declare const createDataCollectionField: MaybeContext<BuildRESTFunction<typeof createDataCollectionField$1> & typeof createDataCollectionField$1>;
|
|
111
118
|
declare const updateDataCollectionField: MaybeContext<BuildRESTFunction<typeof updateDataCollectionField$1> & typeof updateDataCollectionField$1>;
|
|
112
119
|
declare const deleteDataCollectionField: MaybeContext<BuildRESTFunction<typeof deleteDataCollectionField$1> & typeof deleteDataCollectionField$1>;
|
|
120
|
+
declare const patchDataCollectionField: MaybeContext<BuildRESTFunction<typeof patchDataCollectionField$1> & typeof patchDataCollectionField$1>;
|
|
113
121
|
|
|
114
|
-
export { CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, getDataCollection, listDataCollections, updateDataCollection, updateDataCollectionField };
|
|
122
|
+
export { CreateDataCollectionFieldOptions, CreateDataCollectionFieldResponse, DataCollection, DeleteDataCollectionFieldOptions, DeleteDataCollectionFieldResponse, GetDataCollectionOptions, ListDataCollectionsOptions, ListDataCollectionsResponse, PatchDataCollectionField, PatchDataCollectionFieldIdentifiers, PatchDataCollectionFieldResponse, UpdateDataCollectionFieldOptions, UpdateDataCollectionFieldResponse, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, getDataCollection, listDataCollections, patchDataCollectionField, updateDataCollection, updateDataCollectionField };
|
package/build/cjs/index.js
CHANGED
|
@@ -46,6 +46,8 @@ __export(index_exports, {
|
|
|
46
46
|
deleteDataCollectionField: () => deleteDataCollectionField4,
|
|
47
47
|
getDataCollection: () => getDataCollection4,
|
|
48
48
|
listDataCollections: () => listDataCollections4,
|
|
49
|
+
patchDataCollection: () => patchDataCollection4,
|
|
50
|
+
patchDataCollectionField: () => patchDataCollectionField4,
|
|
49
51
|
restoreDataCollection: () => restoreDataCollection4,
|
|
50
52
|
updateDataCollection: () => updateDataCollection4,
|
|
51
53
|
updateDataCollectionField: () => updateDataCollectionField4
|
|
@@ -62,6 +64,7 @@ var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
|
62
64
|
var import_float2 = require("@wix/sdk-runtime/transformations/float");
|
|
63
65
|
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
64
66
|
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
67
|
+
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
65
68
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
66
69
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
67
70
|
function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(opts) {
|
|
@@ -656,6 +659,65 @@ function restoreDataCollection(payload) {
|
|
|
656
659
|
}
|
|
657
660
|
return __restoreDataCollection;
|
|
658
661
|
}
|
|
662
|
+
function patchDataCollection(payload) {
|
|
663
|
+
function __patchDataCollection({ host }) {
|
|
664
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
665
|
+
{
|
|
666
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
667
|
+
paths: [{ path: "fieldMask" }]
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
671
|
+
paths: [
|
|
672
|
+
{ path: "dataCollection.createdDate" },
|
|
673
|
+
{ path: "dataCollection.updatedDate" }
|
|
674
|
+
]
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
678
|
+
paths: [
|
|
679
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
680
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
681
|
+
]
|
|
682
|
+
}
|
|
683
|
+
]);
|
|
684
|
+
const metadata = {
|
|
685
|
+
entityFqdn: "wix.data.v2.data_collection",
|
|
686
|
+
method: "PATCH",
|
|
687
|
+
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollection",
|
|
688
|
+
packageName: PACKAGE_NAME,
|
|
689
|
+
migrationOptions: {
|
|
690
|
+
optInTransformResponse: true
|
|
691
|
+
},
|
|
692
|
+
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
693
|
+
{
|
|
694
|
+
protoPath: "/v2/collections/{dataCollection.id}",
|
|
695
|
+
data: serializedData,
|
|
696
|
+
host
|
|
697
|
+
}
|
|
698
|
+
),
|
|
699
|
+
data: serializedData,
|
|
700
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
701
|
+
{
|
|
702
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
703
|
+
paths: [
|
|
704
|
+
{ path: "dataCollection.createdDate" },
|
|
705
|
+
{ path: "dataCollection.updatedDate" }
|
|
706
|
+
]
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
710
|
+
paths: [
|
|
711
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
712
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
713
|
+
]
|
|
714
|
+
}
|
|
715
|
+
])
|
|
716
|
+
};
|
|
717
|
+
return metadata;
|
|
718
|
+
}
|
|
719
|
+
return __patchDataCollection;
|
|
720
|
+
}
|
|
659
721
|
function createDataCollectionField(payload) {
|
|
660
722
|
function __createDataCollectionField({ host }) {
|
|
661
723
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -787,6 +849,58 @@ function deleteDataCollectionField(payload) {
|
|
|
787
849
|
}
|
|
788
850
|
return __deleteDataCollectionField;
|
|
789
851
|
}
|
|
852
|
+
function patchDataCollectionField(payload) {
|
|
853
|
+
function __patchDataCollectionField({ host }) {
|
|
854
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
855
|
+
{
|
|
856
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
857
|
+
paths: [{ path: "fieldMask" }]
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
861
|
+
paths: [
|
|
862
|
+
{ path: "field.numberRange.min" },
|
|
863
|
+
{ path: "field.numberRange.max" }
|
|
864
|
+
]
|
|
865
|
+
}
|
|
866
|
+
]);
|
|
867
|
+
const metadata = {
|
|
868
|
+
entityFqdn: "wix.data.v2.data_collection",
|
|
869
|
+
method: "PATCH",
|
|
870
|
+
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
|
|
871
|
+
packageName: PACKAGE_NAME,
|
|
872
|
+
migrationOptions: {
|
|
873
|
+
optInTransformResponse: true
|
|
874
|
+
},
|
|
875
|
+
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
|
|
876
|
+
{
|
|
877
|
+
protoPath: "/v2/collections/{dataCollectionId}/fields/{field.key}",
|
|
878
|
+
data: serializedData,
|
|
879
|
+
host
|
|
880
|
+
}
|
|
881
|
+
),
|
|
882
|
+
data: serializedData,
|
|
883
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
884
|
+
{
|
|
885
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
886
|
+
paths: [
|
|
887
|
+
{ path: "dataCollection.createdDate" },
|
|
888
|
+
{ path: "dataCollection.updatedDate" }
|
|
889
|
+
]
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
893
|
+
paths: [
|
|
894
|
+
{ path: "dataCollection.fields.numberRange.min" },
|
|
895
|
+
{ path: "dataCollection.fields.numberRange.max" }
|
|
896
|
+
]
|
|
897
|
+
}
|
|
898
|
+
])
|
|
899
|
+
};
|
|
900
|
+
return metadata;
|
|
901
|
+
}
|
|
902
|
+
return __patchDataCollectionField;
|
|
903
|
+
}
|
|
790
904
|
|
|
791
905
|
// src/data-v2-data-collection-collections.universal.ts
|
|
792
906
|
var CollectionType = /* @__PURE__ */ ((CollectionType2) => {
|
|
@@ -1146,6 +1260,31 @@ async function restoreDataCollection2(dataCollectionId) {
|
|
|
1146
1260
|
throw transformedError;
|
|
1147
1261
|
}
|
|
1148
1262
|
}
|
|
1263
|
+
async function patchDataCollection2(_id, dataCollection) {
|
|
1264
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1265
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1266
|
+
dataCollection: { ...dataCollection, id: _id }
|
|
1267
|
+
});
|
|
1268
|
+
const reqOpts = patchDataCollection(payload);
|
|
1269
|
+
sideEffects?.onSiteCall?.();
|
|
1270
|
+
try {
|
|
1271
|
+
const result = await httpClient.request(reqOpts);
|
|
1272
|
+
sideEffects?.onSuccess?.(result);
|
|
1273
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1274
|
+
} catch (err) {
|
|
1275
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1276
|
+
err,
|
|
1277
|
+
{
|
|
1278
|
+
spreadPathsToArguments: { dataCollection: "$[1]" },
|
|
1279
|
+
explicitPathsToArguments: { "dataCollection.id": "$[0]" },
|
|
1280
|
+
singleArgumentUnchanged: false
|
|
1281
|
+
},
|
|
1282
|
+
["_id", "dataCollection"]
|
|
1283
|
+
);
|
|
1284
|
+
sideEffects?.onError?.(err);
|
|
1285
|
+
throw transformedError;
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1149
1288
|
async function createDataCollectionField2(dataCollectionId, options) {
|
|
1150
1289
|
const { httpClient, sideEffects } = arguments[2];
|
|
1151
1290
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1233,6 +1372,35 @@ async function deleteDataCollectionField2(dataCollectionId, options) {
|
|
|
1233
1372
|
throw transformedError;
|
|
1234
1373
|
}
|
|
1235
1374
|
}
|
|
1375
|
+
async function patchDataCollectionField2(identifiers, field) {
|
|
1376
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1377
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1378
|
+
dataCollectionId: identifiers?.dataCollectionId,
|
|
1379
|
+
field: { ...field, key: identifiers?.fieldKey }
|
|
1380
|
+
});
|
|
1381
|
+
const reqOpts = patchDataCollectionField(payload);
|
|
1382
|
+
sideEffects?.onSiteCall?.();
|
|
1383
|
+
try {
|
|
1384
|
+
const result = await httpClient.request(reqOpts);
|
|
1385
|
+
sideEffects?.onSuccess?.(result);
|
|
1386
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1387
|
+
} catch (err) {
|
|
1388
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1389
|
+
err,
|
|
1390
|
+
{
|
|
1391
|
+
spreadPathsToArguments: { field: "$[1]" },
|
|
1392
|
+
explicitPathsToArguments: {
|
|
1393
|
+
dataCollectionId: "$[0].dataCollectionId",
|
|
1394
|
+
"field.key": "$[0].fieldKey"
|
|
1395
|
+
},
|
|
1396
|
+
singleArgumentUnchanged: false
|
|
1397
|
+
},
|
|
1398
|
+
["identifiers", "field"]
|
|
1399
|
+
);
|
|
1400
|
+
sideEffects?.onError?.(err);
|
|
1401
|
+
throw transformedError;
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1236
1404
|
|
|
1237
1405
|
// src/data-v2-data-collection-collections.public.ts
|
|
1238
1406
|
function createDataCollection3(httpClient) {
|
|
@@ -1278,6 +1446,14 @@ function restoreDataCollection3(httpClient) {
|
|
|
1278
1446
|
{ httpClient }
|
|
1279
1447
|
);
|
|
1280
1448
|
}
|
|
1449
|
+
function patchDataCollection3(httpClient) {
|
|
1450
|
+
return (_id, dataCollection) => patchDataCollection2(
|
|
1451
|
+
_id,
|
|
1452
|
+
dataCollection,
|
|
1453
|
+
// @ts-ignore
|
|
1454
|
+
{ httpClient }
|
|
1455
|
+
);
|
|
1456
|
+
}
|
|
1281
1457
|
function createDataCollectionField3(httpClient) {
|
|
1282
1458
|
return (dataCollectionId, options) => createDataCollectionField2(
|
|
1283
1459
|
dataCollectionId,
|
|
@@ -1302,6 +1478,14 @@ function deleteDataCollectionField3(httpClient) {
|
|
|
1302
1478
|
{ httpClient }
|
|
1303
1479
|
);
|
|
1304
1480
|
}
|
|
1481
|
+
function patchDataCollectionField3(httpClient) {
|
|
1482
|
+
return (identifiers, field) => patchDataCollectionField2(
|
|
1483
|
+
identifiers,
|
|
1484
|
+
field,
|
|
1485
|
+
// @ts-ignore
|
|
1486
|
+
{ httpClient }
|
|
1487
|
+
);
|
|
1488
|
+
}
|
|
1305
1489
|
|
|
1306
1490
|
// src/data-v2-data-collection-collections.context.ts
|
|
1307
1491
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
@@ -1311,9 +1495,11 @@ var listDataCollections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTMo
|
|
|
1311
1495
|
var updateDataCollection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateDataCollection3);
|
|
1312
1496
|
var deleteDataCollection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteDataCollection3);
|
|
1313
1497
|
var restoreDataCollection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(restoreDataCollection3);
|
|
1498
|
+
var patchDataCollection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(patchDataCollection3);
|
|
1314
1499
|
var createDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDataCollectionField3);
|
|
1315
1500
|
var updateDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateDataCollectionField3);
|
|
1316
1501
|
var deleteDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteDataCollectionField3);
|
|
1502
|
+
var patchDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(patchDataCollectionField3);
|
|
1317
1503
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1318
1504
|
0 && (module.exports = {
|
|
1319
1505
|
AccessLevel,
|
|
@@ -1342,6 +1528,8 @@ var deleteDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.create
|
|
|
1342
1528
|
deleteDataCollectionField,
|
|
1343
1529
|
getDataCollection,
|
|
1344
1530
|
listDataCollections,
|
|
1531
|
+
patchDataCollection,
|
|
1532
|
+
patchDataCollectionField,
|
|
1345
1533
|
restoreDataCollection,
|
|
1346
1534
|
updateDataCollection,
|
|
1347
1535
|
updateDataCollectionField
|