@wix/auto_sdk_bookings_resources 1.0.21 → 1.0.22

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 (125) hide show
  1. package/build/{internal/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.mts} +139 -403
  2. package/build/{cjs/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.ts} +139 -403
  3. package/build/{cjs/src/bookings-resources-v2-resource-resources.public.d.ts → index.d.mts} +40 -18
  4. package/build/{internal/cjs/src/bookings-resources-v2-resource-resources.public.d.ts → index.d.ts} +40 -18
  5. package/build/index.js +883 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +837 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{es/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.mts} +139 -403
  10. package/build/{es/src/bookings-resources-v2-resource-resources.universal.d.ts → internal/bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.ts} +139 -403
  11. package/build/{es/src/bookings-resources-v2-resource-resources.public.d.ts → internal/index.d.mts} +40 -18
  12. package/build/internal/{es/src/bookings-resources-v2-resource-resources.public.d.ts → index.d.ts} +40 -18
  13. package/build/internal/index.js +883 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +837 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/{es/src/bookings-resources-v2-resource-resources.types.d.ts → internal/meta.d.mts} +124 -348
  18. package/build/internal/{cjs/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.ts} +124 -348
  19. package/build/internal/meta.js +559 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +524 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/{cjs/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.mts} +124 -348
  24. package/build/{internal/es/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.ts} +124 -348
  25. package/build/meta.js +559 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +524 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -33
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
  40. package/build/cjs/src/bookings-resources-v2-resource-resources.context.js +0 -43
  41. package/build/cjs/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
  42. package/build/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
  43. package/build/cjs/src/bookings-resources-v2-resource-resources.http.js +0 -446
  44. package/build/cjs/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
  45. package/build/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
  46. package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js +0 -199
  47. package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
  48. package/build/cjs/src/bookings-resources-v2-resource-resources.public.js +0 -106
  49. package/build/cjs/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
  50. package/build/cjs/src/bookings-resources-v2-resource-resources.types.js +0 -104
  51. package/build/cjs/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
  52. package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js +0 -591
  53. package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
  54. package/build/es/index.d.ts +0 -1
  55. package/build/es/index.js +0 -2
  56. package/build/es/index.js.map +0 -1
  57. package/build/es/index.typings.d.ts +0 -33
  58. package/build/es/index.typings.js +0 -2
  59. package/build/es/index.typings.js.map +0 -1
  60. package/build/es/meta.d.ts +0 -1
  61. package/build/es/meta.js +0 -2
  62. package/build/es/meta.js.map +0 -1
  63. package/build/es/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
  64. package/build/es/src/bookings-resources-v2-resource-resources.context.js +0 -29
  65. package/build/es/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
  66. package/build/es/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
  67. package/build/es/src/bookings-resources-v2-resource-resources.http.js +0 -434
  68. package/build/es/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
  69. package/build/es/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
  70. package/build/es/src/bookings-resources-v2-resource-resources.meta.js +0 -164
  71. package/build/es/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
  72. package/build/es/src/bookings-resources-v2-resource-resources.public.js +0 -83
  73. package/build/es/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
  74. package/build/es/src/bookings-resources-v2-resource-resources.types.js +0 -101
  75. package/build/es/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
  76. package/build/es/src/bookings-resources-v2-resource-resources.universal.js +0 -556
  77. package/build/es/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
  78. package/build/internal/cjs/index.d.ts +0 -1
  79. package/build/internal/cjs/index.js +0 -18
  80. package/build/internal/cjs/index.js.map +0 -1
  81. package/build/internal/cjs/index.typings.d.ts +0 -33
  82. package/build/internal/cjs/index.typings.js +0 -18
  83. package/build/internal/cjs/index.typings.js.map +0 -1
  84. package/build/internal/cjs/meta.d.ts +0 -1
  85. package/build/internal/cjs/meta.js +0 -18
  86. package/build/internal/cjs/meta.js.map +0 -1
  87. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
  88. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js +0 -43
  89. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
  90. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
  91. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js +0 -446
  92. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
  93. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
  94. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js +0 -199
  95. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
  96. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js +0 -106
  97. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
  98. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js +0 -104
  99. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
  100. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js +0 -591
  101. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
  102. package/build/internal/es/index.d.ts +0 -1
  103. package/build/internal/es/index.js +0 -2
  104. package/build/internal/es/index.js.map +0 -1
  105. package/build/internal/es/index.typings.d.ts +0 -33
  106. package/build/internal/es/index.typings.js +0 -2
  107. package/build/internal/es/index.typings.js.map +0 -1
  108. package/build/internal/es/meta.d.ts +0 -1
  109. package/build/internal/es/meta.js +0 -2
  110. package/build/internal/es/meta.js.map +0 -1
  111. package/build/internal/es/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
  112. package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js +0 -29
  113. package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
  114. package/build/internal/es/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
  115. package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js +0 -434
  116. package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
  117. package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
  118. package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js +0 -164
  119. package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
  120. package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js +0 -83
  121. package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
  122. package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js +0 -101
  123. package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
  124. package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js +0 -556
  125. package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
@@ -1,556 +0,0 @@
1
- import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
- import { queryBuilder } from '@wix/sdk-runtime/query-builder';
3
- import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
4
- import * as ambassadorWixBookingsResourcesV2Resource from './bookings-resources-v2-resource-resources.http.js';
5
- // @ts-ignore
6
- import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
7
- export var ManagementType;
8
- (function (ManagementType) {
9
- /** The resource is managed by a Wix user. */
10
- ManagementType["WIX_USER"] = "WIX_USER";
11
- })(ManagementType || (ManagementType = {}));
12
- export var SortOrder;
13
- (function (SortOrder) {
14
- SortOrder["ASC"] = "ASC";
15
- SortOrder["DESC"] = "DESC";
16
- })(SortOrder || (SortOrder = {}));
17
- export var SortType;
18
- (function (SortType) {
19
- /** Should sort by number of matches */
20
- SortType["COUNT"] = "COUNT";
21
- /** Should sort by value of the field alphabetically */
22
- SortType["VALUE"] = "VALUE";
23
- })(SortType || (SortType = {}));
24
- export var SortDirection;
25
- (function (SortDirection) {
26
- /** Should sort in descending order */
27
- SortDirection["DESC"] = "DESC";
28
- /** Should sort in ascending order */
29
- SortDirection["ASC"] = "ASC";
30
- })(SortDirection || (SortDirection = {}));
31
- export var MissingValues;
32
- (function (MissingValues) {
33
- /** Should missing values be excluded from the aggregation results */
34
- MissingValues["EXCLUDE"] = "EXCLUDE";
35
- /** Should missing values be included in the aggregation results */
36
- MissingValues["INCLUDE"] = "INCLUDE";
37
- })(MissingValues || (MissingValues = {}));
38
- export var ScalarType;
39
- (function (ScalarType) {
40
- ScalarType["UNKNOWN_SCALAR_TYPE"] = "UNKNOWN_SCALAR_TYPE";
41
- /** Count of distinct values */
42
- ScalarType["COUNT_DISTINCT"] = "COUNT_DISTINCT";
43
- /** Minimum value */
44
- ScalarType["MIN"] = "MIN";
45
- /** Maximum value */
46
- ScalarType["MAX"] = "MAX";
47
- })(ScalarType || (ScalarType = {}));
48
- export var NestedAggregationType;
49
- (function (NestedAggregationType) {
50
- NestedAggregationType["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
51
- /** An aggregation where result buckets are dynamically built - one per unique value */
52
- NestedAggregationType["VALUE"] = "VALUE";
53
- /** An aggregation, where user can define set of ranges - each representing a bucket */
54
- NestedAggregationType["RANGE"] = "RANGE";
55
- /** A single-value metric aggregation - e.g. min, max, sum, avg */
56
- NestedAggregationType["SCALAR"] = "SCALAR";
57
- /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
58
- NestedAggregationType["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
59
- })(NestedAggregationType || (NestedAggregationType = {}));
60
- export var Interval;
61
- (function (Interval) {
62
- Interval["UNKNOWN_INTERVAL"] = "UNKNOWN_INTERVAL";
63
- /** Yearly interval */
64
- Interval["YEAR"] = "YEAR";
65
- /** Monthly interval */
66
- Interval["MONTH"] = "MONTH";
67
- /** Weekly interval */
68
- Interval["WEEK"] = "WEEK";
69
- /** Daily interval */
70
- Interval["DAY"] = "DAY";
71
- /** Hourly interval */
72
- Interval["HOUR"] = "HOUR";
73
- /** Minute interval */
74
- Interval["MINUTE"] = "MINUTE";
75
- /** Second interval */
76
- Interval["SECOND"] = "SECOND";
77
- })(Interval || (Interval = {}));
78
- export var AggregationType;
79
- (function (AggregationType) {
80
- AggregationType["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
81
- /** An aggregation where result buckets are dynamically built - one per unique value */
82
- AggregationType["VALUE"] = "VALUE";
83
- /** An aggregation, where user can define set of ranges - each representing a bucket */
84
- AggregationType["RANGE"] = "RANGE";
85
- /** A single-value metric aggregation - e.g. min, max, sum, avg */
86
- AggregationType["SCALAR"] = "SCALAR";
87
- /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
88
- AggregationType["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
89
- /** Multi-level aggregation, where each next aggregation is nested within previous one */
90
- AggregationType["NESTED"] = "NESTED";
91
- })(AggregationType || (AggregationType = {}));
92
- export var Mode;
93
- (function (Mode) {
94
- /** Any of the search terms must be present */
95
- Mode["OR"] = "OR";
96
- /** All search terms must be present */
97
- Mode["AND"] = "AND";
98
- })(Mode || (Mode = {}));
99
- export var WebhookIdentityType;
100
- (function (WebhookIdentityType) {
101
- WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
102
- WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
103
- WebhookIdentityType["MEMBER"] = "MEMBER";
104
- WebhookIdentityType["WIX_USER"] = "WIX_USER";
105
- WebhookIdentityType["APP"] = "APP";
106
- })(WebhookIdentityType || (WebhookIdentityType = {}));
107
- /**
108
- * Creates a new resource.
109
- *
110
- *
111
- * ## Connected schedules
112
- *
113
- * A new event *schedule*
114
- * ([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))
115
- * is automatically created for the resource.
116
- *
117
- * ## Locations
118
- *
119
- * If you don't specify `locationOptions`, Wix Bookings automatically sets
120
- * `locationOptions.availableInAllLocations` to `true`.
121
- *
122
- * If you specify 1 business location ID in `locationOptions.specificLocationOptions.businessLocations`,
123
- * you must specify `locationOptions.specificLocationOptions.availableInBusinessLocations`
124
- * as `true`. Currently, you can specify only a single business location.
125
- * @param resource - Resource to create.
126
- * @public
127
- * @documentationMaturity preview
128
- * @requiredField resource
129
- * @requiredField resource.name
130
- * @permissionId BOOKINGS.RESOURCE_CREATE
131
- * @permissionScope Manage Bookings
132
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
133
- * @permissionScope Manage Bookings - all permissions
134
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
135
- * @applicableIdentity APP
136
- * @returns Created resource.
137
- * @fqn wix.bookings.resources.v2.ResourcesService.CreateResource
138
- */
139
- export async function createResource(resource) {
140
- // @ts-ignore
141
- const { httpClient, sideEffects } = arguments[1];
142
- const payload = renameKeysFromSDKRequestToRESTRequest({ resource: resource });
143
- const reqOpts = ambassadorWixBookingsResourcesV2Resource.createResource(payload);
144
- sideEffects?.onSiteCall?.();
145
- try {
146
- const result = await httpClient.request(reqOpts);
147
- sideEffects?.onSuccess?.(result);
148
- return renameKeysFromRESTResponseToSDKResponse(result.data)?.resource;
149
- }
150
- catch (err) {
151
- const transformedError = sdkTransformError(err, {
152
- spreadPathsToArguments: {},
153
- explicitPathsToArguments: { resource: '$[0]' },
154
- singleArgumentUnchanged: false,
155
- }, ['resource']);
156
- sideEffects?.onError?.(err);
157
- throw transformedError;
158
- }
159
- }
160
- /**
161
- * Creates up to 50 resources.
162
- *
163
- *
164
- * Refer to *Create Resource*
165
- * ([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))
166
- * for more details.
167
- * @param resources - Resources to create.
168
- * @public
169
- * @documentationMaturity preview
170
- * @requiredField resources
171
- * @requiredField resources.name
172
- * @permissionId BOOKINGS.RESOURCE_CREATE
173
- * @permissionScope Manage Bookings
174
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
175
- * @permissionScope Manage Bookings - all permissions
176
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
177
- * @applicableIdentity APP
178
- * @fqn wix.bookings.resources.v2.ResourcesService.BulkCreateResources
179
- */
180
- export async function bulkCreateResources(resources, options) {
181
- // @ts-ignore
182
- const { httpClient, sideEffects } = arguments[2];
183
- const payload = renameKeysFromSDKRequestToRESTRequest({
184
- resources: resources,
185
- returnEntity: options?.returnEntity,
186
- });
187
- const reqOpts = ambassadorWixBookingsResourcesV2Resource.bulkCreateResources(payload);
188
- sideEffects?.onSiteCall?.();
189
- try {
190
- const result = await httpClient.request(reqOpts);
191
- sideEffects?.onSuccess?.(result);
192
- return renameKeysFromRESTResponseToSDKResponse(result.data);
193
- }
194
- catch (err) {
195
- const transformedError = sdkTransformError(err, {
196
- spreadPathsToArguments: {},
197
- explicitPathsToArguments: {
198
- resources: '$[0]',
199
- returnEntity: '$[1].returnEntity',
200
- },
201
- singleArgumentUnchanged: false,
202
- }, ['resources', 'options']);
203
- sideEffects?.onError?.(err);
204
- throw transformedError;
205
- }
206
- }
207
- /**
208
- * Retrieves a resource.
209
- * @param resourceId - ID of the resource to retrieve.
210
- * @public
211
- * @documentationMaturity preview
212
- * @requiredField resourceId
213
- * @permissionId BOOKINGS.RESOURCE_READ
214
- * @permissionScope Read Bookings - Public Data
215
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
216
- * @permissionScope Manage Bookings
217
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
218
- * @permissionScope Read Bookings - Including Participants
219
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
220
- * @permissionScope Read Bookings - all read permissions
221
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
222
- * @permissionScope Manage Bookings - all permissions
223
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
224
- * @applicableIdentity APP
225
- * @applicableIdentity VISITOR
226
- * @returns Retrieved resource.
227
- * @fqn wix.bookings.resources.v2.ResourcesService.GetResource
228
- */
229
- export async function getResource(resourceId) {
230
- // @ts-ignore
231
- const { httpClient, sideEffects } = arguments[1];
232
- const payload = renameKeysFromSDKRequestToRESTRequest({
233
- resourceId: resourceId,
234
- });
235
- const reqOpts = ambassadorWixBookingsResourcesV2Resource.getResource(payload);
236
- sideEffects?.onSiteCall?.();
237
- try {
238
- const result = await httpClient.request(reqOpts);
239
- sideEffects?.onSuccess?.(result);
240
- return renameKeysFromRESTResponseToSDKResponse(result.data)?.resource;
241
- }
242
- catch (err) {
243
- const transformedError = sdkTransformError(err, {
244
- spreadPathsToArguments: {},
245
- explicitPathsToArguments: { resourceId: '$[0]' },
246
- singleArgumentUnchanged: false,
247
- }, ['resourceId']);
248
- sideEffects?.onError?.(err);
249
- throw transformedError;
250
- }
251
- }
252
- /**
253
- * Updates a resource.
254
- *
255
- *
256
- * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.
257
- * This ensures you're working with the latest service information and prevents unintended overwrites.
258
- * @param _id - Resource ID.
259
- * @public
260
- * @documentationMaturity preview
261
- * @requiredField _id
262
- * @requiredField resource
263
- * @requiredField resource.revision
264
- * @permissionId BOOKINGS.RESOURCE_UPDATE
265
- * @permissionScope Manage Bookings
266
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
267
- * @permissionScope Manage Bookings - all permissions
268
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
269
- * @applicableIdentity APP
270
- * @returns Updated resource.
271
- * @fqn wix.bookings.resources.v2.ResourcesService.UpdateResource
272
- */
273
- export async function updateResource(_id, resource) {
274
- // @ts-ignore
275
- const { httpClient, sideEffects } = arguments[2];
276
- const payload = renameKeysFromSDKRequestToRESTRequest({
277
- resource: { ...resource, id: _id },
278
- });
279
- const reqOpts = ambassadorWixBookingsResourcesV2Resource.updateResource(payload);
280
- sideEffects?.onSiteCall?.();
281
- try {
282
- const result = await httpClient.request(reqOpts);
283
- sideEffects?.onSuccess?.(result);
284
- return renameKeysFromRESTResponseToSDKResponse(result.data)?.resource;
285
- }
286
- catch (err) {
287
- const transformedError = sdkTransformError(err, {
288
- spreadPathsToArguments: { resource: '$[1]' },
289
- explicitPathsToArguments: { 'resource.id': '$[0]' },
290
- singleArgumentUnchanged: false,
291
- }, ['_id', 'resource']);
292
- sideEffects?.onError?.(err);
293
- throw transformedError;
294
- }
295
- }
296
- /**
297
- * Deletes a resource.
298
- *
299
- *
300
- * Deleting a resource cancels its event schedule and all its working hour
301
- * schedules that aren't shared with another resource. Learn more about
302
- * _how Bookings uses the Calendar APIs_
303
- * ([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)).
304
- * @param resourceId - ID of the resource to delete.
305
- * @public
306
- * @documentationMaturity preview
307
- * @requiredField resourceId
308
- * @permissionId BOOKINGS.RESOURCE_DELETE
309
- * @permissionScope Manage Bookings
310
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
311
- * @permissionScope Manage Bookings - all permissions
312
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
313
- * @applicableIdentity APP
314
- * @fqn wix.bookings.resources.v2.ResourcesService.DeleteResource
315
- */
316
- export async function deleteResource(resourceId) {
317
- // @ts-ignore
318
- const { httpClient, sideEffects } = arguments[1];
319
- const payload = renameKeysFromSDKRequestToRESTRequest({
320
- resourceId: resourceId,
321
- });
322
- const reqOpts = ambassadorWixBookingsResourcesV2Resource.deleteResource(payload);
323
- sideEffects?.onSiteCall?.();
324
- try {
325
- const result = await httpClient.request(reqOpts);
326
- sideEffects?.onSuccess?.(result);
327
- }
328
- catch (err) {
329
- const transformedError = sdkTransformError(err, {
330
- spreadPathsToArguments: {},
331
- explicitPathsToArguments: { resourceId: '$[0]' },
332
- singleArgumentUnchanged: false,
333
- }, ['resourceId']);
334
- sideEffects?.onError?.(err);
335
- throw transformedError;
336
- }
337
- }
338
- /**
339
- * Deletes multiple resources.
340
- *
341
- *
342
- * Refer to *Delete Resource*
343
- * ([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))
344
- * for more details.
345
- * @param ids - IDs of the resources to delete.
346
- * @public
347
- * @documentationMaturity preview
348
- * @requiredField ids
349
- * @permissionId BOOKINGS.RESOURCE_DELETE
350
- * @permissionScope Manage Bookings
351
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
352
- * @permissionScope Manage Bookings - all permissions
353
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
354
- * @applicableIdentity APP
355
- * @fqn wix.bookings.resources.v2.ResourcesService.BulkDeleteResources
356
- */
357
- export async function bulkDeleteResources(ids) {
358
- // @ts-ignore
359
- const { httpClient, sideEffects } = arguments[1];
360
- const payload = renameKeysFromSDKRequestToRESTRequest({ ids: ids });
361
- const reqOpts = ambassadorWixBookingsResourcesV2Resource.bulkDeleteResources(payload);
362
- sideEffects?.onSiteCall?.();
363
- try {
364
- const result = await httpClient.request(reqOpts);
365
- sideEffects?.onSuccess?.(result);
366
- return renameKeysFromRESTResponseToSDKResponse(result.data);
367
- }
368
- catch (err) {
369
- const transformedError = sdkTransformError(err, {
370
- spreadPathsToArguments: {},
371
- explicitPathsToArguments: { ids: '$[0]' },
372
- singleArgumentUnchanged: false,
373
- }, ['ids']);
374
- sideEffects?.onError?.(err);
375
- throw transformedError;
376
- }
377
- }
378
- /**
379
- * Retrieves a list of resources matching the provided search criteria.
380
- *
381
- *
382
- * Refer to the *supported filters article*
383
- * ([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))
384
- * for a complete list of supported filters and sorting options.
385
- * @param search - Search condition. Refer to the *supported filters article*
386
- * ([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))
387
- * for a complete list of supported filters and sorting options.
388
- * @public
389
- * @documentationMaturity preview
390
- * @requiredField search
391
- * @permissionId BOOKINGS.RESOURCE_READ
392
- * @permissionScope Read Bookings - Public Data
393
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
394
- * @permissionScope Manage Bookings
395
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
396
- * @permissionScope Read Bookings - Including Participants
397
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
398
- * @permissionScope Read Bookings - all read permissions
399
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
400
- * @permissionScope Manage Bookings - all permissions
401
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
402
- * @applicableIdentity APP
403
- * @applicableIdentity VISITOR
404
- * @fqn wix.bookings.resources.v2.ResourcesService.SearchResources
405
- */
406
- export async function searchResources(search) {
407
- // @ts-ignore
408
- const { httpClient, sideEffects } = arguments[1];
409
- const payload = renameKeysFromSDKRequestToRESTRequest({ search: search });
410
- const reqOpts = ambassadorWixBookingsResourcesV2Resource.searchResources(payload);
411
- sideEffects?.onSiteCall?.();
412
- try {
413
- const result = await httpClient.request(reqOpts);
414
- sideEffects?.onSuccess?.(result);
415
- return renameKeysFromRESTResponseToSDKResponse(result.data);
416
- }
417
- catch (err) {
418
- const transformedError = sdkTransformError(err, {
419
- spreadPathsToArguments: {},
420
- explicitPathsToArguments: { search: '$[0]' },
421
- singleArgumentUnchanged: false,
422
- }, ['search']);
423
- sideEffects?.onError?.(err);
424
- throw transformedError;
425
- }
426
- }
427
- /**
428
- * Creates a query to retrieve a list of resources.
429
- *
430
- * The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.
431
- *
432
- * 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.
433
- *
434
- * 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.
435
- *
436
- * `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:
437
- *
438
- * + `limit` is `50`.
439
- * + Sorted by `id` in ascending order.
440
- *
441
- * 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"`.
442
- *
443
- * 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`.
444
- * @public
445
- * @documentationMaturity preview
446
- * @permissionScope Read Bookings - Public Data
447
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
448
- * @permissionScope Manage Bookings
449
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
450
- * @permissionScope Read Bookings - Including Participants
451
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
452
- * @permissionScope Read Bookings - all read permissions
453
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
454
- * @permissionScope Manage Bookings - all permissions
455
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
456
- * @permissionId BOOKINGS.RESOURCE_READ
457
- * @applicableIdentity APP
458
- * @applicableIdentity VISITOR
459
- * @fqn wix.bookings.resources.v2.ResourcesService.QueryResources
460
- */
461
- export function queryResources() {
462
- // @ts-ignore
463
- const { httpClient, sideEffects } = arguments[0];
464
- return queryBuilder({
465
- func: async (payload) => {
466
- const reqOpts = ambassadorWixBookingsResourcesV2Resource.queryResources(payload);
467
- sideEffects?.onSiteCall?.();
468
- try {
469
- const result = await httpClient.request(reqOpts);
470
- sideEffects?.onSuccess?.(result);
471
- return result;
472
- }
473
- catch (err) {
474
- sideEffects?.onError?.(err);
475
- throw err;
476
- }
477
- },
478
- requestTransformer: (query) => {
479
- const args = [query, {}];
480
- return renameKeysFromSDKRequestToRESTRequest({
481
- ...args?.[1],
482
- query: args?.[0],
483
- });
484
- },
485
- responseTransformer: ({ data }) => {
486
- const transformedData = renameKeysFromRESTResponseToSDKResponse(transformPaths(data, []));
487
- return {
488
- items: transformedData?.resources,
489
- pagingMetadata: transformedData?.pagingMetadata,
490
- };
491
- },
492
- errorTransformer: (err) => {
493
- const transformedError = sdkTransformError(err, {
494
- spreadPathsToArguments: {},
495
- explicitPathsToArguments: { query: '$[0]' },
496
- singleArgumentUnchanged: false,
497
- });
498
- throw transformedError;
499
- },
500
- pagingMethod: 'CURSOR',
501
- transformationPaths: {},
502
- });
503
- }
504
- /**
505
- * Counts resources according to given criteria.
506
- *
507
- *
508
- * Refer to the *supported filters article*
509
- * ([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))
510
- * for a complete list of supported filters and sorting options.
511
- * @public
512
- * @documentationMaturity preview
513
- * @param options - Filter to base the count on. See *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 a complete list of filtering options.
514
- * @permissionId BOOKINGS.RESOURCE_READ
515
- * @permissionScope Read Bookings - Public Data
516
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
517
- * @permissionScope Manage Bookings
518
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
519
- * @permissionScope Read Bookings - Including Participants
520
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
521
- * @permissionScope Read Bookings - all read permissions
522
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
523
- * @permissionScope Manage Bookings - all permissions
524
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
525
- * @applicableIdentity APP
526
- * @applicableIdentity VISITOR
527
- * @fqn wix.bookings.resources.v2.ResourcesService.CountResources
528
- */
529
- export async function countResources(options) {
530
- // @ts-ignore
531
- const { httpClient, sideEffects } = arguments[1];
532
- const payload = renameKeysFromSDKRequestToRESTRequest({
533
- filter: options?.filter,
534
- search: options?.search,
535
- });
536
- const reqOpts = ambassadorWixBookingsResourcesV2Resource.countResources(payload);
537
- sideEffects?.onSiteCall?.();
538
- try {
539
- const result = await httpClient.request(reqOpts);
540
- sideEffects?.onSuccess?.(result);
541
- return renameKeysFromRESTResponseToSDKResponse(result.data);
542
- }
543
- catch (err) {
544
- const transformedError = sdkTransformError(err, {
545
- spreadPathsToArguments: {},
546
- explicitPathsToArguments: {
547
- filter: '$[0].filter',
548
- search: '$[0].search',
549
- },
550
- singleArgumentUnchanged: false,
551
- }, ['options']);
552
- sideEffects?.onError?.(err);
553
- throw transformedError;
554
- }
555
- }
556
- //# sourceMappingURL=bookings-resources-v2-resource-resources.universal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bookings-resources-v2-resource-resources.universal.js","sourceRoot":"","sources":["../../../src/bookings-resources-v2-resource-resources.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EACL,qCAAqC,EACrC,u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AO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,iBAAiB,CACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE;gBACxB,MAAM,EAAE,aAAa;gBACrB,MAAM,EAAE,aAAa;aACtB;YACD,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC"}
@@ -1 +0,0 @@
1
- export * from './src/bookings-resources-v2-resource-resources.context.js';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/bookings-resources-v2-resource-resources.context.js"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4FAA0E"}
@@ -1,33 +0,0 @@
1
- import { SearchResourcesResponse, CursorSearch } from './src/bookings-resources-v2-resource-resources.universal';
2
- export * from './src/bookings-resources-v2-resource-resources.universal.js';
3
- /** @hidden */
4
- export type ResourceSearch = {};
5
- /**
6
- * Retrieves a list of resources matching the provided search criteria.
7
- *
8
- *
9
- * Refer to the *supported filters article*
10
- * ([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))
11
- * for a complete list of supported filters and sorting options.
12
- * @param search - Search condition. Refer to the *supported filters article*
13
- * ([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))
14
- * for a complete list of supported filters and sorting options.
15
- * @public
16
- * @documentationMaturity preview
17
- * @requiredField search
18
- * @permissionId BOOKINGS.RESOURCE_READ
19
- * @permissionScope Read Bookings - Public Data
20
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
21
- * @permissionScope Manage Bookings
22
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
23
- * @permissionScope Read Bookings - Including Participants
24
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
25
- * @permissionScope Read Bookings - all read permissions
26
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
27
- * @permissionScope Manage Bookings - all permissions
28
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
29
- * @applicableIdentity APP
30
- * @applicableIdentity VISITOR
31
- * @fqn wix.bookings.resources.v2.ResourcesService.SearchResources
32
- */
33
- export declare function searchResources(search: CursorSearch): Promise<SearchResourcesResponse>;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/bookings-resources-v2-resource-resources.universal.js"), exports);
18
- //# sourceMappingURL=index.typings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKA,8FAA4E"}
@@ -1 +0,0 @@
1
- export * from './src/bookings-resources-v2-resource-resources.meta.js';