@wix/auto_sdk_bookings_resources 1.0.52 → 1.0.53
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.js +30 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +30 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +30 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +30 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +30 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +30 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js +30 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +30 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js +30 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs +30 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +30 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs +30 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/meta.mjs
CHANGED
|
@@ -65,6 +65,9 @@ function createResource(payload) {
|
|
|
65
65
|
method: "POST",
|
|
66
66
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.CreateResource",
|
|
67
67
|
packageName: PACKAGE_NAME,
|
|
68
|
+
migrationOptions: {
|
|
69
|
+
optInTransformResponse: true
|
|
70
|
+
},
|
|
68
71
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
69
72
|
protoPath: "/v2/resources",
|
|
70
73
|
data: serializedData,
|
|
@@ -101,6 +104,9 @@ function bulkCreateResources(payload) {
|
|
|
101
104
|
method: "POST",
|
|
102
105
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.BulkCreateResources",
|
|
103
106
|
packageName: PACKAGE_NAME,
|
|
107
|
+
migrationOptions: {
|
|
108
|
+
optInTransformResponse: true
|
|
109
|
+
},
|
|
104
110
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
105
111
|
protoPath: "/v2/bulk/resources/create",
|
|
106
112
|
data: serializedData,
|
|
@@ -128,6 +134,9 @@ function getResource(payload) {
|
|
|
128
134
|
method: "GET",
|
|
129
135
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.GetResource",
|
|
130
136
|
packageName: PACKAGE_NAME,
|
|
137
|
+
migrationOptions: {
|
|
138
|
+
optInTransformResponse: true
|
|
139
|
+
},
|
|
131
140
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
132
141
|
protoPath: "/v2/resources/{resourceId}",
|
|
133
142
|
data: payload,
|
|
@@ -168,6 +177,9 @@ function updateResource(payload) {
|
|
|
168
177
|
method: "PATCH",
|
|
169
178
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.UpdateResource",
|
|
170
179
|
packageName: PACKAGE_NAME,
|
|
180
|
+
migrationOptions: {
|
|
181
|
+
optInTransformResponse: true
|
|
182
|
+
},
|
|
171
183
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
172
184
|
protoPath: "/v2/resources/{resource.id}",
|
|
173
185
|
data: serializedData,
|
|
@@ -208,6 +220,9 @@ function bulkUpdateResources(payload) {
|
|
|
208
220
|
method: "POST",
|
|
209
221
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.BulkUpdateResources",
|
|
210
222
|
packageName: PACKAGE_NAME,
|
|
223
|
+
migrationOptions: {
|
|
224
|
+
optInTransformResponse: true
|
|
225
|
+
},
|
|
211
226
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
212
227
|
protoPath: "/v2/bulk/resources/update",
|
|
213
228
|
data: serializedData,
|
|
@@ -235,6 +250,9 @@ function deleteResource(payload) {
|
|
|
235
250
|
method: "DELETE",
|
|
236
251
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.DeleteResource",
|
|
237
252
|
packageName: PACKAGE_NAME,
|
|
253
|
+
migrationOptions: {
|
|
254
|
+
optInTransformResponse: true
|
|
255
|
+
},
|
|
238
256
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
239
257
|
protoPath: "/v2/resources/{resourceId}",
|
|
240
258
|
data: payload,
|
|
@@ -253,6 +271,9 @@ function bulkDeleteResources(payload) {
|
|
|
253
271
|
method: "POST",
|
|
254
272
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.BulkDeleteResources",
|
|
255
273
|
packageName: PACKAGE_NAME,
|
|
274
|
+
migrationOptions: {
|
|
275
|
+
optInTransformResponse: true
|
|
276
|
+
},
|
|
256
277
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
257
278
|
protoPath: "/v2/bulk/resources/delete",
|
|
258
279
|
data: payload,
|
|
@@ -295,6 +316,9 @@ function searchResources(payload) {
|
|
|
295
316
|
method: "POST",
|
|
296
317
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.SearchResources",
|
|
297
318
|
packageName: PACKAGE_NAME,
|
|
319
|
+
migrationOptions: {
|
|
320
|
+
optInTransformResponse: true
|
|
321
|
+
},
|
|
298
322
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
299
323
|
protoPath: "/v2/resources/search",
|
|
300
324
|
data: serializedData,
|
|
@@ -348,6 +372,9 @@ function queryResources(payload) {
|
|
|
348
372
|
method: "POST",
|
|
349
373
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.QueryResources",
|
|
350
374
|
packageName: PACKAGE_NAME,
|
|
375
|
+
migrationOptions: {
|
|
376
|
+
optInTransformResponse: true
|
|
377
|
+
},
|
|
351
378
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
352
379
|
protoPath: "/v2/resources/query",
|
|
353
380
|
data: payload,
|
|
@@ -375,6 +402,9 @@ function countResources(payload) {
|
|
|
375
402
|
method: "POST",
|
|
376
403
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.CountResources",
|
|
377
404
|
packageName: PACKAGE_NAME,
|
|
405
|
+
migrationOptions: {
|
|
406
|
+
optInTransformResponse: true
|
|
407
|
+
},
|
|
378
408
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
379
409
|
protoPath: "/v2/resources/count",
|
|
380
410
|
data: payload,
|
package/build/es/meta.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bookings-resources-v2-resource-resources.http.ts","../../src/bookings-resources-v2-resource-resources.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBookingsResourcesV2ResourcesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/bookings/v2/resources',\n destPath: '/v2/resources',\n },\n {\n srcPath: '/_api/bookings/v2/resources',\n destPath: '/v2/resources',\n },\n {\n srcPath: '/v2/bulk/resources',\n destPath: '/v2/bulk/resources',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/resources-2',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v2/resources',\n destPath: '/v2/resources',\n },\n {\n srcPath: '/bookings/v2/bulk/resources',\n destPath: '/v2/bulk/resources',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/resources-2',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_resources';\n\n/**\n * Creates a new resource.\n *\n *\n * ### Connected schedules\n *\n * A new event *schedule*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration))\n * is automatically created for the resource.\n *\n * ### Locations\n *\n * If you don't specify `locationOptions`, Wix Bookings automatically sets\n * `locationOptions.availableInAllLocations` to `true`.\n *\n * If you specify 1 business location ID in `locationOptions.specificLocationOptions.businessLocations`,\n * you must specify `locationOptions.specificLocationOptions.availableInBusinessLocations`\n * as `true`. Currently, you can specify only a single business location.\n */\nexport function createResource(payload: object): RequestOptionsFactory<any> {\n function __createResource({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.CreateResource',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createResource;\n}\n\n/**\n * Creates up to 50 resources.\n *\n *\n * Refer to *Create Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/create-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/create-resource))\n * for more details.\n */\nexport function bulkCreateResources(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateResources({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resources.createdDate' },\n { path: 'resources.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.resources.v2.ResourcesService.BulkCreateResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/bulk/resources/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateResources;\n}\n\n/** Retrieves a resource. */\nexport function getResource(payload: object): RequestOptionsFactory<any> {\n function __getResource({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'GET' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.GetResource',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/{resourceId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getResource;\n}\n\n/**\n * Updates a resource.\n *\n *\n * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.\n * This ensures you're working with the latest service information and prevents unintended overwrites.\n */\nexport function updateResource(payload: object): RequestOptionsFactory<any> {\n function __updateResource({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'PATCH' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.UpdateResource',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/{resource.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateResource;\n}\n\n/**\n * Updates multiple resources.\n *\n *\n * Refer to *Update Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/update-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/update-resource))\n * for more details.\n */\nexport function bulkUpdateResources(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateResources({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'resources.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resources.resource.createdDate' },\n { path: 'resources.resource.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.resources.v2.ResourcesService.BulkUpdateResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/bulk/resources/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateResources;\n}\n\n/**\n * Deletes a resource.\n *\n *\n * Deleting a resource cancels its event schedule and all its working hour\n * schedules that aren't shared with another resource. Learn more about\n * _how Bookings uses the Calendar APIs_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration)).\n */\nexport function deleteResource(payload: object): RequestOptionsFactory<any> {\n function __deleteResource({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'DELETE' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.DeleteResource',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/{resourceId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteResource;\n}\n\n/**\n * Deletes multiple resources.\n *\n *\n * Refer to *Delete Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/delete-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/delete-resource))\n * for more details.\n */\nexport function bulkDeleteResources(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteResources({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.resources.v2.ResourcesService.BulkDeleteResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/bulk/resources/delete',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkDeleteResources;\n}\n\n/**\n * Retrieves a list of resources matching the provided search criteria.\n *\n *\n * Refer to the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)) for complete filter and sorting options.\n */\nexport function searchResources(payload: object): RequestOptionsFactory<any> {\n function __searchResources({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'search.aggregations.range.buckets.from' },\n { path: 'search.aggregations.range.buckets.to' },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',\n },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.SearchResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/search',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resources.createdDate' },\n { path: 'resources.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'aggregationData.results.ranges.results.from' },\n { path: 'aggregationData.results.ranges.results.to' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from',\n },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.from',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.to',\n },\n { path: 'aggregationData.results.scalar.value' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.scalar.value',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.scalar.value',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchResources;\n}\n\n/**\n * Creates a query to retrieve a list of resources.\n *\n * The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/resources-query-builder/find) function.\n *\n * You can refine the query by chaining `ResourcesQueryBuilder` functions onto the query. `ResourcesQueryBuilder` functions enable you to sort, filter, and control the results that `queryResources()` returns.\n *\n * `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `id` in ascending order.\n *\n * The functions that are chained to `queryResources()` are applied in the order they are called. For example, if you apply `ascending(\"typeId\")` and then `ascending(\"name\")`, the results are sorted first by the `\"typeId\"`, and then, if there are multiple results with the same `\"typeId\"`, the items are sorted by `\"name\"`.\n *\n * The following `ResourcesQueryBuilder` functions are supported for the `queryResources()` function. For a full description of the resource object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/resources-query-result/items) property in `ResourcesQueryResult`.\n */\nexport function queryResources(payload: object): RequestOptionsFactory<any> {\n function __queryResources({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.QueryResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resources.createdDate' },\n { path: 'resources.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryResources;\n}\n\n/**\n * Counts resources according to given criteria.\n *\n *\n * Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n */\nexport function countResources(payload: object): RequestOptionsFactory<any> {\n function __countResources({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.CountResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countResources;\n}\n","import * as ambassadorWixBookingsResourcesV2Resource from './bookings-resources-v2-resource-resources.http.js';\nimport * as ambassadorWixBookingsResourcesV2ResourceTypes from './bookings-resources-v2-resource-resources.types.js';\nimport * as ambassadorWixBookingsResourcesV2ResourceUniversalTypes from './bookings-resources-v2-resource-resources.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createResource(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CreateResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.CreateResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CreateResourceResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.CreateResourceResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.createResource(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/resources',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkCreateResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkCreateResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkCreateResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkCreateResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkCreateResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.bulkCreateResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/bulk/resources/create',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getResource(): __PublicMethodMetaInfo<\n 'GET',\n { resourceId: string },\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.GetResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.GetResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.GetResourceResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.GetResourceResponse\n> {\n const payload = { resourceId: ':resourceId' } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.getResource(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/resources/{resourceId}',\n pathParams: { resourceId: 'resourceId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateResource(): __PublicMethodMetaInfo<\n 'PATCH',\n { resourceId: string },\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.UpdateResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.UpdateResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.UpdateResourceResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.UpdateResourceResponse\n> {\n const payload = { resource: { id: ':resourceId' } } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.updateResource(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v2/resources/{resource.id}',\n pathParams: { resourceId: 'resourceId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkUpdateResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkUpdateResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkUpdateResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkUpdateResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkUpdateResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.bulkUpdateResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/bulk/resources/update',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteResource(): __PublicMethodMetaInfo<\n 'DELETE',\n { resourceId: string },\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.DeleteResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.DeleteResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.DeleteResourceResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.DeleteResourceResponse\n> {\n const payload = { resourceId: ':resourceId' } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.deleteResource(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v2/resources/{resourceId}',\n pathParams: { resourceId: 'resourceId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkDeleteResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkDeleteResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkDeleteResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkDeleteResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkDeleteResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.bulkDeleteResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/bulk/resources/delete',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function searchResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.SearchResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.SearchResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.SearchResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.SearchResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.searchResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/resources/search',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.QueryResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.QueryResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.QueryResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.QueryResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.queryResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/resources/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function countResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CountResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.CountResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CountResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.CountResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.countResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/resources/count',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,S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AI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,kBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACqC,eAAe,OAAO;AAEjE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","createResource","bulkCreateResources","getResource","updateResource","bulkUpdateResources","deleteResource","bulkDeleteResources","searchResources","queryResources","countResources"]}
|
|
1
|
+
{"version":3,"sources":["../../src/bookings-resources-v2-resource-resources.http.ts","../../src/bookings-resources-v2-resource-resources.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBookingsResourcesV2ResourcesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/bookings/v2/resources',\n destPath: '/v2/resources',\n },\n {\n srcPath: '/_api/bookings/v2/resources',\n destPath: '/v2/resources',\n },\n {\n srcPath: '/v2/bulk/resources',\n destPath: '/v2/bulk/resources',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/resources-2',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v2/resources',\n destPath: '/v2/resources',\n },\n {\n srcPath: '/bookings/v2/bulk/resources',\n destPath: '/v2/bulk/resources',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/resources-2',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_resources';\n\n/**\n * Creates a new resource.\n *\n *\n * ### Connected schedules\n *\n * A new event *schedule*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration))\n * is automatically created for the resource.\n *\n * ### Locations\n *\n * If you don't specify `locationOptions`, Wix Bookings automatically sets\n * `locationOptions.availableInAllLocations` to `true`.\n *\n * If you specify 1 business location ID in `locationOptions.specificLocationOptions.businessLocations`,\n * you must specify `locationOptions.specificLocationOptions.availableInBusinessLocations`\n * as `true`. Currently, you can specify only a single business location.\n */\nexport function createResource(payload: object): RequestOptionsFactory<any> {\n function __createResource({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.CreateResource',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createResource;\n}\n\n/**\n * Creates up to 50 resources.\n *\n *\n * Refer to *Create Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/create-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/create-resource))\n * for more details.\n */\nexport function bulkCreateResources(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateResources({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resources.createdDate' },\n { path: 'resources.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.resources.v2.ResourcesService.BulkCreateResources',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/bulk/resources/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateResources;\n}\n\n/** Retrieves a resource. */\nexport function getResource(payload: object): RequestOptionsFactory<any> {\n function __getResource({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'GET' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.GetResource',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/{resourceId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getResource;\n}\n\n/**\n * Updates a resource.\n *\n *\n * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.\n * This ensures you're working with the latest service information and prevents unintended overwrites.\n */\nexport function updateResource(payload: object): RequestOptionsFactory<any> {\n function __updateResource({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'PATCH' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.UpdateResource',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/{resource.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateResource;\n}\n\n/**\n * Updates multiple resources.\n *\n *\n * Refer to *Update Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/update-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/update-resource))\n * for more details.\n */\nexport function bulkUpdateResources(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateResources({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'resources.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resources.resource.createdDate' },\n { path: 'resources.resource.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.resources.v2.ResourcesService.BulkUpdateResources',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/bulk/resources/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateResources;\n}\n\n/**\n * Deletes a resource.\n *\n *\n * Deleting a resource cancels its event schedule and all its working hour\n * schedules that aren't shared with another resource. Learn more about\n * _how Bookings uses the Calendar APIs_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration)).\n */\nexport function deleteResource(payload: object): RequestOptionsFactory<any> {\n function __deleteResource({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'DELETE' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.DeleteResource',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/{resourceId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteResource;\n}\n\n/**\n * Deletes multiple resources.\n *\n *\n * Refer to *Delete Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/delete-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/delete-resource))\n * for more details.\n */\nexport function bulkDeleteResources(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteResources({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.resources.v2.ResourcesService.BulkDeleteResources',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/bulk/resources/delete',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkDeleteResources;\n}\n\n/**\n * Retrieves a list of resources matching the provided search criteria.\n *\n *\n * Refer to the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)) for complete filter and sorting options.\n */\nexport function searchResources(payload: object): RequestOptionsFactory<any> {\n function __searchResources({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'search.aggregations.range.buckets.from' },\n { path: 'search.aggregations.range.buckets.to' },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',\n },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.SearchResources',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/search',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resources.createdDate' },\n { path: 'resources.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'aggregationData.results.ranges.results.from' },\n { path: 'aggregationData.results.ranges.results.to' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from',\n },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.from',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.to',\n },\n { path: 'aggregationData.results.scalar.value' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.scalar.value',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.scalar.value',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchResources;\n}\n\n/**\n * Creates a query to retrieve a list of resources.\n *\n * The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/resources-query-builder/find) function.\n *\n * You can refine the query by chaining `ResourcesQueryBuilder` functions onto the query. `ResourcesQueryBuilder` functions enable you to sort, filter, and control the results that `queryResources()` returns.\n *\n * `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `id` in ascending order.\n *\n * The functions that are chained to `queryResources()` are applied in the order they are called. For example, if you apply `ascending(\"typeId\")` and then `ascending(\"name\")`, the results are sorted first by the `\"typeId\"`, and then, if there are multiple results with the same `\"typeId\"`, the items are sorted by `\"name\"`.\n *\n * The following `ResourcesQueryBuilder` functions are supported for the `queryResources()` function. For a full description of the resource object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/resources-query-result/items) property in `ResourcesQueryResult`.\n */\nexport function queryResources(payload: object): RequestOptionsFactory<any> {\n function __queryResources({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.QueryResources',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resources.createdDate' },\n { path: 'resources.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryResources;\n}\n\n/**\n * Counts resources according to given criteria.\n *\n *\n * Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n */\nexport function countResources(payload: object): RequestOptionsFactory<any> {\n function __countResources({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.CountResources',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countResources;\n}\n","import * as ambassadorWixBookingsResourcesV2Resource from './bookings-resources-v2-resource-resources.http.js';\nimport * as ambassadorWixBookingsResourcesV2ResourceTypes from './bookings-resources-v2-resource-resources.types.js';\nimport * as ambassadorWixBookingsResourcesV2ResourceUniversalTypes from './bookings-resources-v2-resource-resources.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createResource(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CreateResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.CreateResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CreateResourceResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.CreateResourceResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.createResource(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/resources',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkCreateResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkCreateResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkCreateResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkCreateResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkCreateResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.bulkCreateResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/bulk/resources/create',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getResource(): __PublicMethodMetaInfo<\n 'GET',\n { resourceId: string },\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.GetResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.GetResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.GetResourceResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.GetResourceResponse\n> {\n const payload = { resourceId: ':resourceId' } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.getResource(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/resources/{resourceId}',\n pathParams: { resourceId: 'resourceId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateResource(): __PublicMethodMetaInfo<\n 'PATCH',\n { resourceId: string },\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.UpdateResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.UpdateResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.UpdateResourceResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.UpdateResourceResponse\n> {\n const payload = { resource: { id: ':resourceId' } } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.updateResource(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v2/resources/{resource.id}',\n pathParams: { resourceId: 'resourceId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkUpdateResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkUpdateResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkUpdateResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkUpdateResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkUpdateResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.bulkUpdateResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/bulk/resources/update',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteResource(): __PublicMethodMetaInfo<\n 'DELETE',\n { resourceId: string },\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.DeleteResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.DeleteResourceRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.DeleteResourceResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.DeleteResourceResponse\n> {\n const payload = { resourceId: ':resourceId' } as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.deleteResource(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v2/resources/{resourceId}',\n pathParams: { resourceId: 'resourceId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkDeleteResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkDeleteResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkDeleteResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkDeleteResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.BulkDeleteResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.bulkDeleteResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/bulk/resources/delete',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function searchResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.SearchResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.SearchResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.SearchResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.SearchResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.searchResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/resources/search',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.QueryResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.QueryResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.QueryResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.QueryResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.queryResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/resources/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function countResources(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CountResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceTypes.CountResourcesRequest,\n ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CountResourcesResponse,\n ambassadorWixBookingsResourcesV2ResourceTypes.CountResourcesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsResourcesV2Resource.countResources(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/resources/count',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAA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BAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,kBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACqC,eAAe,OAAO;AAEjE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","createResource","bulkCreateResources","getResource","updateResource","bulkUpdateResources","deleteResource","bulkDeleteResources","searchResources","queryResources","countResources"]}
|
|
@@ -125,6 +125,9 @@ function createResource(payload) {
|
|
|
125
125
|
method: "POST",
|
|
126
126
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.CreateResource",
|
|
127
127
|
packageName: PACKAGE_NAME,
|
|
128
|
+
migrationOptions: {
|
|
129
|
+
optInTransformResponse: true
|
|
130
|
+
},
|
|
128
131
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
129
132
|
protoPath: "/v2/resources",
|
|
130
133
|
data: serializedData,
|
|
@@ -161,6 +164,9 @@ function bulkCreateResources(payload) {
|
|
|
161
164
|
method: "POST",
|
|
162
165
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.BulkCreateResources",
|
|
163
166
|
packageName: PACKAGE_NAME,
|
|
167
|
+
migrationOptions: {
|
|
168
|
+
optInTransformResponse: true
|
|
169
|
+
},
|
|
164
170
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
165
171
|
protoPath: "/v2/bulk/resources/create",
|
|
166
172
|
data: serializedData,
|
|
@@ -188,6 +194,9 @@ function getResource(payload) {
|
|
|
188
194
|
method: "GET",
|
|
189
195
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.GetResource",
|
|
190
196
|
packageName: PACKAGE_NAME,
|
|
197
|
+
migrationOptions: {
|
|
198
|
+
optInTransformResponse: true
|
|
199
|
+
},
|
|
191
200
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
192
201
|
protoPath: "/v2/resources/{resourceId}",
|
|
193
202
|
data: payload,
|
|
@@ -228,6 +237,9 @@ function updateResource(payload) {
|
|
|
228
237
|
method: "PATCH",
|
|
229
238
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.UpdateResource",
|
|
230
239
|
packageName: PACKAGE_NAME,
|
|
240
|
+
migrationOptions: {
|
|
241
|
+
optInTransformResponse: true
|
|
242
|
+
},
|
|
231
243
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
232
244
|
protoPath: "/v2/resources/{resource.id}",
|
|
233
245
|
data: serializedData,
|
|
@@ -268,6 +280,9 @@ function bulkUpdateResources(payload) {
|
|
|
268
280
|
method: "POST",
|
|
269
281
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.BulkUpdateResources",
|
|
270
282
|
packageName: PACKAGE_NAME,
|
|
283
|
+
migrationOptions: {
|
|
284
|
+
optInTransformResponse: true
|
|
285
|
+
},
|
|
271
286
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
272
287
|
protoPath: "/v2/bulk/resources/update",
|
|
273
288
|
data: serializedData,
|
|
@@ -295,6 +310,9 @@ function deleteResource(payload) {
|
|
|
295
310
|
method: "DELETE",
|
|
296
311
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.DeleteResource",
|
|
297
312
|
packageName: PACKAGE_NAME,
|
|
313
|
+
migrationOptions: {
|
|
314
|
+
optInTransformResponse: true
|
|
315
|
+
},
|
|
298
316
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
299
317
|
protoPath: "/v2/resources/{resourceId}",
|
|
300
318
|
data: payload,
|
|
@@ -313,6 +331,9 @@ function bulkDeleteResources(payload) {
|
|
|
313
331
|
method: "POST",
|
|
314
332
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.BulkDeleteResources",
|
|
315
333
|
packageName: PACKAGE_NAME,
|
|
334
|
+
migrationOptions: {
|
|
335
|
+
optInTransformResponse: true
|
|
336
|
+
},
|
|
316
337
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
317
338
|
protoPath: "/v2/bulk/resources/delete",
|
|
318
339
|
data: payload,
|
|
@@ -355,6 +376,9 @@ function searchResources(payload) {
|
|
|
355
376
|
method: "POST",
|
|
356
377
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.SearchResources",
|
|
357
378
|
packageName: PACKAGE_NAME,
|
|
379
|
+
migrationOptions: {
|
|
380
|
+
optInTransformResponse: true
|
|
381
|
+
},
|
|
358
382
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
359
383
|
protoPath: "/v2/resources/search",
|
|
360
384
|
data: serializedData,
|
|
@@ -408,6 +432,9 @@ function queryResources(payload) {
|
|
|
408
432
|
method: "POST",
|
|
409
433
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.QueryResources",
|
|
410
434
|
packageName: PACKAGE_NAME,
|
|
435
|
+
migrationOptions: {
|
|
436
|
+
optInTransformResponse: true
|
|
437
|
+
},
|
|
411
438
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
412
439
|
protoPath: "/v2/resources/query",
|
|
413
440
|
data: payload,
|
|
@@ -435,6 +462,9 @@ function countResources(payload) {
|
|
|
435
462
|
method: "POST",
|
|
436
463
|
methodFqn: "wix.bookings.resources.v2.ResourcesService.CountResources",
|
|
437
464
|
packageName: PACKAGE_NAME,
|
|
465
|
+
migrationOptions: {
|
|
466
|
+
optInTransformResponse: true
|
|
467
|
+
},
|
|
438
468
|
url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
|
|
439
469
|
protoPath: "/v2/resources/count",
|
|
440
470
|
data: payload,
|