@wix/auto_sdk_bookings_resources 1.0.22 → 1.0.24
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/{bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.mts → bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.mts} +39 -24
- package/build/{bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.ts → bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.ts} +39 -24
- package/build/index.d.mts +17 -4
- package/build/index.d.ts +17 -4
- package/build/index.js +80 -0
- package/build/index.js.map +1 -1
- package/build/index.mjs +79 -0
- package/build/index.mjs.map +1 -1
- package/build/internal/{bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.ts → bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.mts} +39 -24
- package/build/internal/{bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.mts → bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.ts} +39 -24
- package/build/internal/index.d.mts +17 -4
- package/build/internal/index.d.ts +17 -4
- package/build/internal/index.js +80 -0
- package/build/internal/index.js.map +1 -1
- package/build/internal/index.mjs +79 -0
- package/build/internal/index.mjs.map +1 -1
- package/build/internal/meta.d.mts +29 -2
- package/build/internal/meta.d.ts +29 -2
- package/build/internal/meta.js +60 -0
- package/build/internal/meta.js.map +1 -1
- package/build/internal/meta.mjs +59 -0
- package/build/internal/meta.mjs.map +1 -1
- package/build/meta.d.mts +29 -2
- package/build/meta.d.ts +29 -2
- package/build/meta.js +60 -0
- package/build/meta.js.map +1 -1
- package/build/meta.mjs +59 -0
- package/build/meta.mjs.map +1 -1
- package/package.json +2 -2
- package/build/es/package.json +0 -3
package/build/index.mjs
CHANGED
|
@@ -202,6 +202,46 @@ function updateResource(payload) {
|
|
|
202
202
|
}
|
|
203
203
|
return __updateResource;
|
|
204
204
|
}
|
|
205
|
+
function bulkUpdateResources(payload) {
|
|
206
|
+
function __bulkUpdateResources({ host }) {
|
|
207
|
+
const serializedData = transformPaths(payload, [
|
|
208
|
+
{
|
|
209
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
210
|
+
paths: [{ path: "resources.fieldMask" }]
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
214
|
+
paths: [
|
|
215
|
+
{ path: "resources.resource.createdDate" },
|
|
216
|
+
{ path: "resources.resource.updatedDate" }
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
]);
|
|
220
|
+
const metadata = {
|
|
221
|
+
entityFqdn: "wix.bookings.resources.v2.resource",
|
|
222
|
+
method: "POST",
|
|
223
|
+
methodFqn: "wix.bookings.resources.v2.ResourcesService.BulkUpdateResources",
|
|
224
|
+
packageName: PACKAGE_NAME,
|
|
225
|
+
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
226
|
+
protoPath: "/v2/bulk/resources/update",
|
|
227
|
+
data: serializedData,
|
|
228
|
+
host
|
|
229
|
+
}),
|
|
230
|
+
data: serializedData,
|
|
231
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
232
|
+
{
|
|
233
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
234
|
+
paths: [
|
|
235
|
+
{ path: "results.item.createdDate" },
|
|
236
|
+
{ path: "results.item.updatedDate" }
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
])
|
|
240
|
+
};
|
|
241
|
+
return metadata;
|
|
242
|
+
}
|
|
243
|
+
return __bulkUpdateResources;
|
|
244
|
+
}
|
|
205
245
|
function deleteResource(payload) {
|
|
206
246
|
function __deleteResource({ host }) {
|
|
207
247
|
const metadata = {
|
|
@@ -537,6 +577,35 @@ async function updateResource2(_id, resource) {
|
|
|
537
577
|
throw transformedError;
|
|
538
578
|
}
|
|
539
579
|
}
|
|
580
|
+
async function bulkUpdateResources2(resources, options) {
|
|
581
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
582
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
583
|
+
resources,
|
|
584
|
+
returnEntity: options?.returnEntity
|
|
585
|
+
});
|
|
586
|
+
const reqOpts = bulkUpdateResources(payload);
|
|
587
|
+
sideEffects?.onSiteCall?.();
|
|
588
|
+
try {
|
|
589
|
+
const result = await httpClient.request(reqOpts);
|
|
590
|
+
sideEffects?.onSuccess?.(result);
|
|
591
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
592
|
+
} catch (err) {
|
|
593
|
+
const transformedError = sdkTransformError(
|
|
594
|
+
err,
|
|
595
|
+
{
|
|
596
|
+
spreadPathsToArguments: {},
|
|
597
|
+
explicitPathsToArguments: {
|
|
598
|
+
resources: "$[0]",
|
|
599
|
+
returnEntity: "$[1].returnEntity"
|
|
600
|
+
},
|
|
601
|
+
singleArgumentUnchanged: false
|
|
602
|
+
},
|
|
603
|
+
["resources", "options"]
|
|
604
|
+
);
|
|
605
|
+
sideEffects?.onError?.(err);
|
|
606
|
+
throw transformedError;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
540
609
|
async function deleteResource2(resourceId) {
|
|
541
610
|
const { httpClient, sideEffects } = arguments[1];
|
|
542
611
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -711,6 +780,14 @@ function updateResource3(httpClient) {
|
|
|
711
780
|
{ httpClient }
|
|
712
781
|
);
|
|
713
782
|
}
|
|
783
|
+
function bulkUpdateResources3(httpClient) {
|
|
784
|
+
return (resources, options) => bulkUpdateResources2(
|
|
785
|
+
resources,
|
|
786
|
+
options,
|
|
787
|
+
// @ts-ignore
|
|
788
|
+
{ httpClient }
|
|
789
|
+
);
|
|
790
|
+
}
|
|
714
791
|
function deleteResource3(httpClient) {
|
|
715
792
|
return (resourceId) => deleteResource2(
|
|
716
793
|
resourceId,
|
|
@@ -801,6 +878,7 @@ var createResource4 = /* @__PURE__ */ createRESTModule(createResource3);
|
|
|
801
878
|
var bulkCreateResources4 = /* @__PURE__ */ createRESTModule(bulkCreateResources3);
|
|
802
879
|
var getResource4 = /* @__PURE__ */ createRESTModule(getResource3);
|
|
803
880
|
var updateResource4 = /* @__PURE__ */ createRESTModule(updateResource3);
|
|
881
|
+
var bulkUpdateResources4 = /* @__PURE__ */ createRESTModule(bulkUpdateResources3);
|
|
804
882
|
var deleteResource4 = /* @__PURE__ */ createRESTModule(deleteResource3);
|
|
805
883
|
var bulkDeleteResources4 = /* @__PURE__ */ createRESTModule(bulkDeleteResources3);
|
|
806
884
|
var searchResources4 = /* @__PURE__ */ createRESTModule(searchResources3);
|
|
@@ -823,6 +901,7 @@ export {
|
|
|
823
901
|
WebhookIdentityType,
|
|
824
902
|
bulkCreateResources4 as bulkCreateResources,
|
|
825
903
|
bulkDeleteResources4 as bulkDeleteResources,
|
|
904
|
+
bulkUpdateResources4 as bulkUpdateResources,
|
|
826
905
|
countResources4 as countResources,
|
|
827
906
|
createResource4 as createResource,
|
|
828
907
|
deleteResource4 as deleteResource,
|