@wix/auto_sdk_bookings_resources 1.0.0

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.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
  11. package/build/cjs/src/bookings-resources-v2-resource-resources.context.js +47 -0
  12. package/build/cjs/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
  13. package/build/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
  14. package/build/cjs/src/bookings-resources-v2-resource-resources.http.js +416 -0
  15. package/build/cjs/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
  16. package/build/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
  17. package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js +199 -0
  18. package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
  19. package/build/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
  20. package/build/cjs/src/bookings-resources-v2-resource-resources.public.js +106 -0
  21. package/build/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
  22. package/build/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
  23. package/build/cjs/src/bookings-resources-v2-resource-resources.types.js +104 -0
  24. package/build/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
  25. package/build/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
  26. package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js +563 -0
  27. package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
  39. package/build/es/src/bookings-resources-v2-resource-resources.context.js +33 -0
  40. package/build/es/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
  41. package/build/es/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
  42. package/build/es/src/bookings-resources-v2-resource-resources.http.js +404 -0
  43. package/build/es/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
  44. package/build/es/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
  45. package/build/es/src/bookings-resources-v2-resource-resources.meta.js +164 -0
  46. package/build/es/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
  47. package/build/es/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
  48. package/build/es/src/bookings-resources-v2-resource-resources.public.js +83 -0
  49. package/build/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
  50. package/build/es/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
  51. package/build/es/src/bookings-resources-v2-resource-resources.types.js +101 -0
  52. package/build/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
  53. package/build/es/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
  54. package/build/es/src/bookings-resources-v2-resource-resources.universal.js +528 -0
  55. package/build/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
  66. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js +47 -0
  67. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
  68. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
  69. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js +416 -0
  70. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
  71. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
  72. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js +199 -0
  73. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
  74. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
  75. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js +106 -0
  76. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
  77. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
  78. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js +104 -0
  79. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
  80. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
  81. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js +563 -0
  82. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
  93. package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js +33 -0
  94. package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
  95. package/build/internal/es/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
  96. package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js +404 -0
  97. package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
  98. package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
  99. package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js +164 -0
  100. package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
  101. package/build/internal/es/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
  102. package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js +83 -0
  103. package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
  104. package/build/internal/es/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
  105. package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js +101 -0
  106. package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
  107. package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
  108. package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js +528 -0
  109. package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,33 @@
1
+ import { createResource as publicCreateResource, bulkCreateResources as publicBulkCreateResources, getResource as publicGetResource, updateResource as publicUpdateResource, deleteResource as publicDeleteResource, bulkDeleteResources as publicBulkDeleteResources, searchResources as publicSearchResources, queryResources as publicQueryResources, countResources as publicCountResources, } from './bookings-resources-v2-resource-resources.public.js';
2
+ import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
3
+ import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
4
+ import { onResourceCreated as publicOnResourceCreated } from './bookings-resources-v2-resource-resources.public.js';
5
+ import { onResourceDeleted as publicOnResourceDeleted } from './bookings-resources-v2-resource-resources.public.js';
6
+ import { onResourceUpdated as publicOnResourceUpdated } from './bookings-resources-v2-resource-resources.public.js';
7
+ export const createResource = /*#__PURE__*/ createRESTModule(publicCreateResource);
8
+ export const bulkCreateResources = /*#__PURE__*/ createRESTModule(publicBulkCreateResources);
9
+ export const getResource = /*#__PURE__*/ createRESTModule(publicGetResource);
10
+ export const updateResource = /*#__PURE__*/ createRESTModule(publicUpdateResource);
11
+ export const deleteResource = /*#__PURE__*/ createRESTModule(publicDeleteResource);
12
+ export const bulkDeleteResources = /*#__PURE__*/ createRESTModule(publicBulkDeleteResources);
13
+ export const searchResources = /*#__PURE__*/ createRESTModule(publicSearchResources);
14
+ export const queryResources = /*#__PURE__*/ createRESTModule(publicQueryResources);
15
+ export const countResources = /*#__PURE__*/ createRESTModule(publicCountResources);
16
+ /**
17
+ * Triggered for each resource that is created.
18
+ *
19
+ * This event has the same structure as [Resource Created](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/create-resource#resource-created).
20
+ */
21
+ export const onResourceCreated = createEventModule(publicOnResourceCreated);
22
+ /**
23
+ * Triggered for each resource that is deleted.
24
+ *
25
+ * This event has the same structure as [Resource Deleted](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/bulk-delete-resources#resource-deleted).
26
+ */
27
+ export const onResourceDeleted = createEventModule(publicOnResourceDeleted);
28
+ /**
29
+ * Triggered when a resource is updated.
30
+ */
31
+ export const onResourceUpdated = createEventModule(publicOnResourceUpdated);
32
+ export { ManagementType, SortOrder, SortType, SortDirection, MissingValues, ScalarType, NestedAggregationType, Interval, AggregationType, Mode, WebhookIdentityType, } from './bookings-resources-v2-resource-resources.universal.js';
33
+ //# sourceMappingURL=bookings-resources-v2-resource-resources.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-resources-v2-resource-resources.context.js","sourceRoot":"","sources":["../../../../src/bookings-resources-v2-resource-resources.context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,IAAI,oBAAoB,EACtC,mBAAmB,IAAI,yBAAyB,EAChD,WAAW,IAAI,iBAAiB,EAChC,cAAc,IAAI,oBAAoB,EACtC,cAAc,IAAI,oBAAoB,EACtC,mBAAmB,IAAI,yBAAyB,EAChD,eAAe,IAAI,qBAAqB,EACxC,cAAc,IAAI,oBAAoB,EACtC,cAAc,IAAI,oBAAoB,GACvC,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E,OAAO,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AACpH,OAAO,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AACpH,OAAO,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AAEpH,MAAM,CAAC,MAAM,cAAc,GAEvB,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,mBAAmB,GAG5B,aAAa,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;AAC9D,MAAM,CAAC,MAAM,WAAW,GAEpB,aAAa,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;AACtD,MAAM,CAAC,MAAM,cAAc,GAEvB,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,cAAc,GAEvB,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,mBAAmB,GAG5B,aAAa,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;AAC9D,MAAM,CAAC,MAAM,eAAe,GAExB,aAAa,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;AAC1D,MAAM,CAAC,MAAM,cAAc,GAEvB,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,cAAc,GAEvB,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AACzD;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAE1B,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;AAC/C;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAE1B,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;AAC/C;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAE1B,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;AAE/C,OAAO,EACL,cAAc,EACd,SAAS,EACT,QAAQ,EACR,aAAa,EACb,aAAa,EACb,UAAU,EACV,qBAAqB,EACrB,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,mBAAmB,GACpB,MAAM,yDAAyD,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { RequestOptionsFactory } from '@wix/sdk-types';
2
+ /**
3
+ * Creates a new resource.
4
+ *
5
+ * A new events schedule is automatically created specific to this resource. This schedule will contain information
6
+ * on when the resource is booked in order to prevent double bookings.
7
+ * See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information.
8
+ *
9
+ * - If the request does not include the field `locationOptions`, then the service will create this field and set
10
+ * `availableInAllLocations` in this structure to `true`.
11
+ * - If the request includes one or more business location IDs in the `locationOptions.specificLocationOptions.businessLocations`
12
+ * field, then the field `locationOptions.specificLocationOptions.availableInBusinessLocations` must be set
13
+ * to `true`.
14
+ */
15
+ export declare function createResource(payload: object): RequestOptionsFactory<any>;
16
+ /** Creates multiple resources. */
17
+ export declare function bulkCreateResources(payload: object): RequestOptionsFactory<any>;
18
+ /** Retrieves a resource by ID. */
19
+ export declare function getResource(payload: object): RequestOptionsFactory<any>;
20
+ /**
21
+ * Updates a resource.
22
+ *
23
+ * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.
24
+ * This ensures you're working with the latest service information and prevents unintended overwrites.
25
+ */
26
+ export declare function updateResource(payload: object): RequestOptionsFactory<any>;
27
+ /**
28
+ * Deletes a resource.
29
+ *
30
+ * Also cancels the associated events schedule and any working hours schedule that isn’t shared among multiple resources.
31
+ */
32
+ export declare function deleteResource(payload: object): RequestOptionsFactory<any>;
33
+ /** Deletes multiple resources. */
34
+ export declare function bulkDeleteResources(payload: object): RequestOptionsFactory<any>;
35
+ /**
36
+ * Retrieves a list of resources matching the provided search criteria.
37
+ *
38
+ * The search endpoints allow to perform advanced search including partial text search, exact match, and more.
39
+ * The endpoint also allows to aggregate resources by type, name, app id, management type, management type and location options.
40
+ */
41
+ export declare function searchResources(payload: object): RequestOptionsFactory<any>;
42
+ /**
43
+ * Creates a query to retrieve a list of resources.
44
+ *
45
+ * The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.
46
+ *
47
+ * 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.
48
+ *
49
+ * 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.
50
+ *
51
+ * `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:
52
+ *
53
+ * + `limit` is `50`.
54
+ * + Sorted by `id` in ascending order.
55
+ *
56
+ * 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("id")`, the results are sorted first by the `"typeId"`, and then, if there are multiple results with the same `"typeId"`, the items are sorted by `"id"`.
57
+ *
58
+ * 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`.
59
+ */
60
+ export declare function queryResources(payload: object): RequestOptionsFactory<any>;
61
+ /**
62
+ * Counts resources according to given criteria.
63
+ *
64
+ * Use [WQL filter](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section) to define the criteria.
65
+ */
66
+ export declare function countResources(payload: object): RequestOptionsFactory<any>;
@@ -0,0 +1,404 @@
1
+ import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';
2
+ import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';
3
+ import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';
4
+ import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
5
+ import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
6
+ import { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';
7
+ import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
8
+ import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
9
+ function resolveWixBookingsResourcesV2ResourcesServiceUrl(opts) {
10
+ const domainToMappings = {
11
+ 'manage._base_domain_': [
12
+ {
13
+ srcPath: '/bookings/v2/resources',
14
+ destPath: '/v2/resources',
15
+ },
16
+ {
17
+ srcPath: '/_api/bookings/v2/resources',
18
+ destPath: '/v2/resources',
19
+ },
20
+ {
21
+ srcPath: '/v2/bulk/resources',
22
+ destPath: '/v2/bulk/resources',
23
+ },
24
+ ],
25
+ 'api._api_base_domain_': [
26
+ {
27
+ srcPath: '/resources-2',
28
+ destPath: '',
29
+ },
30
+ ],
31
+ 'www.wixapis.com': [
32
+ {
33
+ srcPath: '/bookings/v2/resources',
34
+ destPath: '/v2/resources',
35
+ },
36
+ {
37
+ srcPath: '/bookings/v2/bulk/resources',
38
+ destPath: '/v2/bulk/resources',
39
+ },
40
+ ],
41
+ '*.dev.wix-code.com': [
42
+ {
43
+ srcPath: '/_api/resources-2',
44
+ destPath: '',
45
+ },
46
+ ],
47
+ };
48
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
49
+ }
50
+ const PACKAGE_NAME = '@wix/auto_sdk_bookings_resources';
51
+ /**
52
+ * Creates a new resource.
53
+ *
54
+ * A new events schedule is automatically created specific to this resource. This schedule will contain information
55
+ * on when the resource is booked in order to prevent double bookings.
56
+ * See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information.
57
+ *
58
+ * - If the request does not include the field `locationOptions`, then the service will create this field and set
59
+ * `availableInAllLocations` in this structure to `true`.
60
+ * - If the request includes one or more business location IDs in the `locationOptions.specificLocationOptions.businessLocations`
61
+ * field, then the field `locationOptions.specificLocationOptions.availableInBusinessLocations` must be set
62
+ * to `true`.
63
+ */
64
+ export function createResource(payload) {
65
+ function __createResource({ host }) {
66
+ const serializedData = transformPaths(payload, [
67
+ {
68
+ transformFn: transformSDKTimestampToRESTTimestamp,
69
+ paths: [
70
+ { path: 'resource.createdDate' },
71
+ { path: 'resource.updatedDate' },
72
+ ],
73
+ },
74
+ ]);
75
+ const metadata = {
76
+ entityFqdn: 'wix.bookings.resources.v2.resource',
77
+ method: 'POST',
78
+ methodFqn: 'wix.bookings.resources.v2.ResourcesService.CreateResource',
79
+ packageName: PACKAGE_NAME,
80
+ url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
81
+ protoPath: '/v2/resources',
82
+ data: serializedData,
83
+ host,
84
+ }),
85
+ data: serializedData,
86
+ transformResponse: (payload) => transformPaths(payload, [
87
+ {
88
+ transformFn: transformRESTTimestampToSDKTimestamp,
89
+ paths: [
90
+ { path: 'resource.createdDate' },
91
+ { path: 'resource.updatedDate' },
92
+ ],
93
+ },
94
+ ]),
95
+ };
96
+ return metadata;
97
+ }
98
+ return __createResource;
99
+ }
100
+ /** Creates multiple resources. */
101
+ export function bulkCreateResources(payload) {
102
+ function __bulkCreateResources({ host }) {
103
+ const serializedData = transformPaths(payload, [
104
+ {
105
+ transformFn: transformSDKTimestampToRESTTimestamp,
106
+ paths: [
107
+ { path: 'resources.createdDate' },
108
+ { path: 'resources.updatedDate' },
109
+ ],
110
+ },
111
+ ]);
112
+ const metadata = {
113
+ entityFqdn: 'wix.bookings.resources.v2.resource',
114
+ method: 'POST',
115
+ methodFqn: 'wix.bookings.resources.v2.ResourcesService.BulkCreateResources',
116
+ packageName: PACKAGE_NAME,
117
+ url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
118
+ protoPath: '/v2/bulk/resources/create',
119
+ data: serializedData,
120
+ host,
121
+ }),
122
+ data: serializedData,
123
+ transformResponse: (payload) => transformPaths(payload, [
124
+ {
125
+ transformFn: transformRESTTimestampToSDKTimestamp,
126
+ paths: [
127
+ { path: 'results.item.createdDate' },
128
+ { path: 'results.item.updatedDate' },
129
+ ],
130
+ },
131
+ ]),
132
+ };
133
+ return metadata;
134
+ }
135
+ return __bulkCreateResources;
136
+ }
137
+ /** Retrieves a resource by ID. */
138
+ export function getResource(payload) {
139
+ function __getResource({ host }) {
140
+ const metadata = {
141
+ entityFqdn: 'wix.bookings.resources.v2.resource',
142
+ method: 'GET',
143
+ methodFqn: 'wix.bookings.resources.v2.ResourcesService.GetResource',
144
+ packageName: PACKAGE_NAME,
145
+ url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
146
+ protoPath: '/v2/resources/{resourceId}',
147
+ data: payload,
148
+ host,
149
+ }),
150
+ params: toURLSearchParams(payload),
151
+ transformResponse: (payload) => transformPaths(payload, [
152
+ {
153
+ transformFn: transformRESTTimestampToSDKTimestamp,
154
+ paths: [
155
+ { path: 'resource.createdDate' },
156
+ { path: 'resource.updatedDate' },
157
+ ],
158
+ },
159
+ ]),
160
+ };
161
+ return metadata;
162
+ }
163
+ return __getResource;
164
+ }
165
+ /**
166
+ * Updates a resource.
167
+ *
168
+ * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.
169
+ * This ensures you're working with the latest service information and prevents unintended overwrites.
170
+ */
171
+ export function updateResource(payload) {
172
+ function __updateResource({ host }) {
173
+ const serializedData = transformPaths(payload, [
174
+ {
175
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
176
+ paths: [{ path: 'mask' }],
177
+ },
178
+ {
179
+ transformFn: transformSDKTimestampToRESTTimestamp,
180
+ paths: [
181
+ { path: 'resource.createdDate' },
182
+ { path: 'resource.updatedDate' },
183
+ ],
184
+ },
185
+ ]);
186
+ const metadata = {
187
+ entityFqdn: 'wix.bookings.resources.v2.resource',
188
+ method: 'PATCH',
189
+ methodFqn: 'wix.bookings.resources.v2.ResourcesService.UpdateResource',
190
+ packageName: PACKAGE_NAME,
191
+ url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
192
+ protoPath: '/v2/resources/{resource.id}',
193
+ data: serializedData,
194
+ host,
195
+ }),
196
+ data: serializedData,
197
+ transformResponse: (payload) => transformPaths(payload, [
198
+ {
199
+ transformFn: transformRESTTimestampToSDKTimestamp,
200
+ paths: [
201
+ { path: 'resource.createdDate' },
202
+ { path: 'resource.updatedDate' },
203
+ ],
204
+ },
205
+ ]),
206
+ };
207
+ return metadata;
208
+ }
209
+ return __updateResource;
210
+ }
211
+ /**
212
+ * Deletes a resource.
213
+ *
214
+ * Also cancels the associated events schedule and any working hours schedule that isn’t shared among multiple resources.
215
+ */
216
+ export function deleteResource(payload) {
217
+ function __deleteResource({ host }) {
218
+ const metadata = {
219
+ entityFqdn: 'wix.bookings.resources.v2.resource',
220
+ method: 'DELETE',
221
+ methodFqn: 'wix.bookings.resources.v2.ResourcesService.DeleteResource',
222
+ packageName: PACKAGE_NAME,
223
+ url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
224
+ protoPath: '/v2/resources/{resourceId}',
225
+ data: payload,
226
+ host,
227
+ }),
228
+ params: toURLSearchParams(payload),
229
+ };
230
+ return metadata;
231
+ }
232
+ return __deleteResource;
233
+ }
234
+ /** Deletes multiple resources. */
235
+ export function bulkDeleteResources(payload) {
236
+ function __bulkDeleteResources({ host }) {
237
+ const metadata = {
238
+ entityFqdn: 'wix.bookings.resources.v2.resource',
239
+ method: 'POST',
240
+ methodFqn: 'wix.bookings.resources.v2.ResourcesService.BulkDeleteResources',
241
+ packageName: PACKAGE_NAME,
242
+ url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
243
+ protoPath: '/v2/bulk/resources/delete',
244
+ data: payload,
245
+ host,
246
+ }),
247
+ data: payload,
248
+ transformResponse: (payload) => transformPaths(payload, [
249
+ {
250
+ transformFn: transformRESTTimestampToSDKTimestamp,
251
+ paths: [
252
+ { path: 'results.item.createdDate' },
253
+ { path: 'results.item.updatedDate' },
254
+ ],
255
+ },
256
+ ]),
257
+ };
258
+ return metadata;
259
+ }
260
+ return __bulkDeleteResources;
261
+ }
262
+ /**
263
+ * Retrieves a list of resources matching the provided search criteria.
264
+ *
265
+ * The search endpoints allow to perform advanced search including partial text search, exact match, and more.
266
+ * The endpoint also allows to aggregate resources by type, name, app id, management type, management type and location options.
267
+ */
268
+ export function searchResources(payload) {
269
+ function __searchResources({ host }) {
270
+ const serializedData = transformPaths(payload, [
271
+ {
272
+ transformFn: transformSDKFloatToRESTFloat,
273
+ paths: [
274
+ { path: 'search.aggregations.range.buckets.from' },
275
+ { path: 'search.aggregations.range.buckets.to' },
276
+ {
277
+ path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',
278
+ },
279
+ {
280
+ path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',
281
+ },
282
+ ],
283
+ },
284
+ ]);
285
+ const metadata = {
286
+ entityFqdn: 'wix.bookings.resources.v2.resource',
287
+ method: 'POST',
288
+ methodFqn: 'wix.bookings.resources.v2.ResourcesService.SearchResources',
289
+ packageName: PACKAGE_NAME,
290
+ url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
291
+ protoPath: '/v2/resources/search',
292
+ data: serializedData,
293
+ host,
294
+ }),
295
+ data: serializedData,
296
+ transformResponse: (payload) => transformPaths(payload, [
297
+ {
298
+ transformFn: transformRESTTimestampToSDKTimestamp,
299
+ paths: [
300
+ { path: 'resources.createdDate' },
301
+ { path: 'resources.updatedDate' },
302
+ ],
303
+ },
304
+ {
305
+ transformFn: transformRESTFloatToSDKFloat,
306
+ paths: [
307
+ { path: 'aggregationData.results.ranges.results.from' },
308
+ { path: 'aggregationData.results.ranges.results.to' },
309
+ {
310
+ path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from',
311
+ },
312
+ {
313
+ path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to',
314
+ },
315
+ {
316
+ path: 'aggregationData.results.nested.results.results.range.from',
317
+ },
318
+ {
319
+ path: 'aggregationData.results.nested.results.results.range.to',
320
+ },
321
+ { path: 'aggregationData.results.scalar.value' },
322
+ {
323
+ path: 'aggregationData.results.groupedByValue.results.nestedResults.scalar.value',
324
+ },
325
+ {
326
+ path: 'aggregationData.results.nested.results.results.scalar.value',
327
+ },
328
+ ],
329
+ },
330
+ ]),
331
+ };
332
+ return metadata;
333
+ }
334
+ return __searchResources;
335
+ }
336
+ /**
337
+ * Creates a query to retrieve a list of resources.
338
+ *
339
+ * The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.
340
+ *
341
+ * 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.
342
+ *
343
+ * 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.
344
+ *
345
+ * `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:
346
+ *
347
+ * + `limit` is `50`.
348
+ * + Sorted by `id` in ascending order.
349
+ *
350
+ * 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("id")`, the results are sorted first by the `"typeId"`, and then, if there are multiple results with the same `"typeId"`, the items are sorted by `"id"`.
351
+ *
352
+ * 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`.
353
+ */
354
+ export function queryResources(payload) {
355
+ function __queryResources({ host }) {
356
+ const metadata = {
357
+ entityFqdn: 'wix.bookings.resources.v2.resource',
358
+ method: 'POST',
359
+ methodFqn: 'wix.bookings.resources.v2.ResourcesService.QueryResources',
360
+ packageName: PACKAGE_NAME,
361
+ url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
362
+ protoPath: '/v2/resources/query',
363
+ data: payload,
364
+ host,
365
+ }),
366
+ data: payload,
367
+ transformResponse: (payload) => transformPaths(payload, [
368
+ {
369
+ transformFn: transformRESTTimestampToSDKTimestamp,
370
+ paths: [
371
+ { path: 'resources.createdDate' },
372
+ { path: 'resources.updatedDate' },
373
+ ],
374
+ },
375
+ ]),
376
+ };
377
+ return metadata;
378
+ }
379
+ return __queryResources;
380
+ }
381
+ /**
382
+ * Counts resources according to given criteria.
383
+ *
384
+ * Use [WQL filter](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section) to define the criteria.
385
+ */
386
+ export function countResources(payload) {
387
+ function __countResources({ host }) {
388
+ const metadata = {
389
+ entityFqdn: 'wix.bookings.resources.v2.resource',
390
+ method: 'POST',
391
+ methodFqn: 'wix.bookings.resources.v2.ResourcesService.CountResources',
392
+ packageName: PACKAGE_NAME,
393
+ url: resolveWixBookingsResourcesV2ResourcesServiceUrl({
394
+ protoPath: '/v2/resources/count',
395
+ data: payload,
396
+ host,
397
+ }),
398
+ data: payload,
399
+ };
400
+ return metadata;
401
+ }
402
+ return __countResources;
403
+ }
404
+ //# sourceMappingURL=bookings-resources-v2-resource-resources.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-resources-v2-resource-resources.http.js","sourceRoot":"","sources":["../../../../src/bookings-resources-v2-resource-resources.http.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AE,gDAAgD,CAAC;gBACpD,SAAS,EAAE,qBAAqB;gBAChC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;YACb,iBAAiB,EAAE,CAAC,OAAY,EAAE,EAAE,CAClC,cAAc,CAAC,OAAO,EAAE;gBACtB;oBACE,WAAW,EAAE,oCAAoC;oBACjD,KAAK,EAAE;wBACL,EAAE,IAAI,EAAE,uBAAuB,EAAE;wBACjC,EAAE,IAAI,EAAE,uBAAuB,EAAE;qBAClC;iBACF;aACF,CAAC;SACL,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,SAAS,gBAAgB,CAAC,EAAE,IAAI,EAAO;QACrC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,oCAAoC;YAChD,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,2DAA2D;YACtE,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,gDAAgD,CAAC;gBACpD,SAAS,EAAE,qBAAqB;gBAChC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,27 @@
1
+ import * as ambassadorWixBookingsResourcesV2ResourceTypes from './bookings-resources-v2-resource-resources.types.js';
2
+ import * as ambassadorWixBookingsResourcesV2ResourceUniversalTypes from './bookings-resources-v2-resource-resources.universal.js';
3
+ export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
4
+ getUrl: (context: any) => string;
5
+ httpMethod: K;
6
+ path: string;
7
+ pathParams: M;
8
+ __requestType: T;
9
+ __originalRequestType: S;
10
+ __responseType: Q;
11
+ __originalResponseType: R;
12
+ };
13
+ export declare function createResource(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CreateResourceRequest, ambassadorWixBookingsResourcesV2ResourceTypes.CreateResourceRequest, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CreateResourceResponse & ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CreateResourceResponseNonNullableFields, ambassadorWixBookingsResourcesV2ResourceTypes.CreateResourceResponse & ambassadorWixBookingsResourcesV2ResourceTypes.CreateResourceResponseNonNullableFields>;
14
+ export declare function bulkCreateResources(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkCreateResourcesRequest, ambassadorWixBookingsResourcesV2ResourceTypes.BulkCreateResourcesRequest, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkCreateResourcesResponse & ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkCreateResourcesResponseNonNullableFields, ambassadorWixBookingsResourcesV2ResourceTypes.BulkCreateResourcesResponse & ambassadorWixBookingsResourcesV2ResourceTypes.BulkCreateResourcesResponseNonNullableFields>;
15
+ export declare function getResource(): __PublicMethodMetaInfo<'GET', {
16
+ resourceId: string;
17
+ }, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.GetResourceRequest, ambassadorWixBookingsResourcesV2ResourceTypes.GetResourceRequest, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.GetResourceResponse & ambassadorWixBookingsResourcesV2ResourceUniversalTypes.GetResourceResponseNonNullableFields, ambassadorWixBookingsResourcesV2ResourceTypes.GetResourceResponse & ambassadorWixBookingsResourcesV2ResourceTypes.GetResourceResponseNonNullableFields>;
18
+ export declare function updateResource(): __PublicMethodMetaInfo<'PATCH', {
19
+ resourceId: string;
20
+ }, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.UpdateResourceRequest, ambassadorWixBookingsResourcesV2ResourceTypes.UpdateResourceRequest, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.UpdateResourceResponse & ambassadorWixBookingsResourcesV2ResourceUniversalTypes.UpdateResourceResponseNonNullableFields, ambassadorWixBookingsResourcesV2ResourceTypes.UpdateResourceResponse & ambassadorWixBookingsResourcesV2ResourceTypes.UpdateResourceResponseNonNullableFields>;
21
+ export declare function deleteResource(): __PublicMethodMetaInfo<'DELETE', {
22
+ resourceId: string;
23
+ }, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.DeleteResourceRequest, ambassadorWixBookingsResourcesV2ResourceTypes.DeleteResourceRequest, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.DeleteResourceResponse, ambassadorWixBookingsResourcesV2ResourceTypes.DeleteResourceResponse>;
24
+ export declare function bulkDeleteResources(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkDeleteResourcesRequest, ambassadorWixBookingsResourcesV2ResourceTypes.BulkDeleteResourcesRequest, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkDeleteResourcesResponse & ambassadorWixBookingsResourcesV2ResourceUniversalTypes.BulkDeleteResourcesResponseNonNullableFields, ambassadorWixBookingsResourcesV2ResourceTypes.BulkDeleteResourcesResponse & ambassadorWixBookingsResourcesV2ResourceTypes.BulkDeleteResourcesResponseNonNullableFields>;
25
+ export declare function searchResources(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.SearchResourcesRequest, ambassadorWixBookingsResourcesV2ResourceTypes.SearchResourcesRequest, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.SearchResourcesResponse & ambassadorWixBookingsResourcesV2ResourceUniversalTypes.SearchResourcesResponseNonNullableFields, ambassadorWixBookingsResourcesV2ResourceTypes.SearchResourcesResponse & ambassadorWixBookingsResourcesV2ResourceTypes.SearchResourcesResponseNonNullableFields>;
26
+ export declare function queryResources(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.QueryResourcesRequest, ambassadorWixBookingsResourcesV2ResourceTypes.QueryResourcesRequest, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.QueryResourcesResponse & ambassadorWixBookingsResourcesV2ResourceUniversalTypes.QueryResourcesResponseNonNullableFields, ambassadorWixBookingsResourcesV2ResourceTypes.QueryResourcesResponse & ambassadorWixBookingsResourcesV2ResourceTypes.QueryResourcesResponseNonNullableFields>;
27
+ export declare function countResources(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CountResourcesRequest, ambassadorWixBookingsResourcesV2ResourceTypes.CountResourcesRequest, ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CountResourcesResponse & ambassadorWixBookingsResourcesV2ResourceUniversalTypes.CountResourcesResponseNonNullableFields, ambassadorWixBookingsResourcesV2ResourceTypes.CountResourcesResponse & ambassadorWixBookingsResourcesV2ResourceTypes.CountResourcesResponseNonNullableFields>;