@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,528 @@
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
+ export var ManagementType;
6
+ (function (ManagementType) {
7
+ /** The resource is managed by a Wix user. */
8
+ ManagementType["WIX_USER"] = "WIX_USER";
9
+ })(ManagementType || (ManagementType = {}));
10
+ export var SortOrder;
11
+ (function (SortOrder) {
12
+ SortOrder["ASC"] = "ASC";
13
+ SortOrder["DESC"] = "DESC";
14
+ })(SortOrder || (SortOrder = {}));
15
+ export var SortType;
16
+ (function (SortType) {
17
+ /** Should sort by number of matches */
18
+ SortType["COUNT"] = "COUNT";
19
+ /** Should sort by value of the field alphabetically */
20
+ SortType["VALUE"] = "VALUE";
21
+ })(SortType || (SortType = {}));
22
+ export var SortDirection;
23
+ (function (SortDirection) {
24
+ /** Should sort in descending order */
25
+ SortDirection["DESC"] = "DESC";
26
+ /** Should sort in ascending order */
27
+ SortDirection["ASC"] = "ASC";
28
+ })(SortDirection || (SortDirection = {}));
29
+ export var MissingValues;
30
+ (function (MissingValues) {
31
+ /** Should missing values be excluded from the aggregation results */
32
+ MissingValues["EXCLUDE"] = "EXCLUDE";
33
+ /** Should missing values be included in the aggregation results */
34
+ MissingValues["INCLUDE"] = "INCLUDE";
35
+ })(MissingValues || (MissingValues = {}));
36
+ export var ScalarType;
37
+ (function (ScalarType) {
38
+ ScalarType["UNKNOWN_SCALAR_TYPE"] = "UNKNOWN_SCALAR_TYPE";
39
+ /** Count of distinct values */
40
+ ScalarType["COUNT_DISTINCT"] = "COUNT_DISTINCT";
41
+ /** Minimum value */
42
+ ScalarType["MIN"] = "MIN";
43
+ /** Maximum value */
44
+ ScalarType["MAX"] = "MAX";
45
+ })(ScalarType || (ScalarType = {}));
46
+ export var NestedAggregationType;
47
+ (function (NestedAggregationType) {
48
+ NestedAggregationType["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
49
+ /** An aggregation where result buckets are dynamically built - one per unique value */
50
+ NestedAggregationType["VALUE"] = "VALUE";
51
+ /** An aggregation, where user can define set of ranges - each representing a bucket */
52
+ NestedAggregationType["RANGE"] = "RANGE";
53
+ /** A single-value metric aggregation - e.g. min, max, sum, avg */
54
+ NestedAggregationType["SCALAR"] = "SCALAR";
55
+ /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
56
+ NestedAggregationType["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
57
+ })(NestedAggregationType || (NestedAggregationType = {}));
58
+ export var Interval;
59
+ (function (Interval) {
60
+ Interval["UNKNOWN_INTERVAL"] = "UNKNOWN_INTERVAL";
61
+ /** Yearly interval */
62
+ Interval["YEAR"] = "YEAR";
63
+ /** Monthly interval */
64
+ Interval["MONTH"] = "MONTH";
65
+ /** Weekly interval */
66
+ Interval["WEEK"] = "WEEK";
67
+ /** Daily interval */
68
+ Interval["DAY"] = "DAY";
69
+ /** Hourly interval */
70
+ Interval["HOUR"] = "HOUR";
71
+ /** Minute interval */
72
+ Interval["MINUTE"] = "MINUTE";
73
+ /** Second interval */
74
+ Interval["SECOND"] = "SECOND";
75
+ })(Interval || (Interval = {}));
76
+ export var AggregationType;
77
+ (function (AggregationType) {
78
+ AggregationType["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
79
+ /** An aggregation where result buckets are dynamically built - one per unique value */
80
+ AggregationType["VALUE"] = "VALUE";
81
+ /** An aggregation, where user can define set of ranges - each representing a bucket */
82
+ AggregationType["RANGE"] = "RANGE";
83
+ /** A single-value metric aggregation - e.g. min, max, sum, avg */
84
+ AggregationType["SCALAR"] = "SCALAR";
85
+ /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
86
+ AggregationType["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
87
+ /** Multi-level aggregation, where each next aggregation is nested within previous one */
88
+ AggregationType["NESTED"] = "NESTED";
89
+ })(AggregationType || (AggregationType = {}));
90
+ export var Mode;
91
+ (function (Mode) {
92
+ /** Any of the search terms must be present */
93
+ Mode["OR"] = "OR";
94
+ /** All search terms must be present */
95
+ Mode["AND"] = "AND";
96
+ })(Mode || (Mode = {}));
97
+ export var WebhookIdentityType;
98
+ (function (WebhookIdentityType) {
99
+ WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
100
+ WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
101
+ WebhookIdentityType["MEMBER"] = "MEMBER";
102
+ WebhookIdentityType["WIX_USER"] = "WIX_USER";
103
+ WebhookIdentityType["APP"] = "APP";
104
+ })(WebhookIdentityType || (WebhookIdentityType = {}));
105
+ /**
106
+ * Creates a new resource.
107
+ *
108
+ * A new events schedule is automatically created specific to this resource. This schedule will contain information
109
+ * on when the resource is booked in order to prevent double bookings.
110
+ * See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information.
111
+ *
112
+ * - If the request does not include the field `locationOptions`, then the service will create this field and set
113
+ * `availableInAllLocations` in this structure to `true`.
114
+ * - If the request includes one or more business location IDs in the `locationOptions.specificLocationOptions.businessLocations`
115
+ * field, then the field `locationOptions.specificLocationOptions.availableInBusinessLocations` must be set
116
+ * to `true`.
117
+ * @param resource - Resource to create.
118
+ * @public
119
+ * @documentationMaturity preview
120
+ * @requiredField resource
121
+ * @requiredField resource.name
122
+ * @permissionId BOOKINGS.RESOURCE_CREATE
123
+ * @permissionScope Manage Bookings
124
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
125
+ * @permissionScope Manage Bookings - all permissions
126
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
127
+ * @applicableIdentity APP
128
+ * @returns The created resource.
129
+ * @fqn wix.bookings.resources.v2.ResourcesService.CreateResource
130
+ */
131
+ export async function createResource(resource) {
132
+ // @ts-ignore
133
+ const { httpClient, sideEffects } = arguments[1];
134
+ const payload = renameKeysFromSDKRequestToRESTRequest({ resource: resource });
135
+ const reqOpts = ambassadorWixBookingsResourcesV2Resource.createResource(payload);
136
+ sideEffects?.onSiteCall?.();
137
+ try {
138
+ const result = await httpClient.request(reqOpts);
139
+ sideEffects?.onSuccess?.(result);
140
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.resource;
141
+ }
142
+ catch (err) {
143
+ const transformedError = sdkTransformError(err, {
144
+ spreadPathsToArguments: {},
145
+ explicitPathsToArguments: { resource: '$[0]' },
146
+ singleArgumentUnchanged: false,
147
+ }, ['resource']);
148
+ sideEffects?.onError?.(err);
149
+ throw transformedError;
150
+ }
151
+ }
152
+ /**
153
+ * Creates multiple resources.
154
+ * @param resources - Resources to create.
155
+ * @public
156
+ * @documentationMaturity preview
157
+ * @requiredField resources
158
+ * @requiredField resources.name
159
+ * @permissionId BOOKINGS.RESOURCE_CREATE
160
+ * @permissionScope Manage Bookings
161
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
162
+ * @permissionScope Manage Bookings - all permissions
163
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
164
+ * @applicableIdentity APP
165
+ * @fqn wix.bookings.resources.v2.ResourcesService.BulkCreateResources
166
+ */
167
+ export async function bulkCreateResources(resources, options) {
168
+ // @ts-ignore
169
+ const { httpClient, sideEffects } = arguments[2];
170
+ const payload = renameKeysFromSDKRequestToRESTRequest({
171
+ resources: resources,
172
+ returnEntity: options?.returnEntity,
173
+ });
174
+ const reqOpts = ambassadorWixBookingsResourcesV2Resource.bulkCreateResources(payload);
175
+ sideEffects?.onSiteCall?.();
176
+ try {
177
+ const result = await httpClient.request(reqOpts);
178
+ sideEffects?.onSuccess?.(result);
179
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
180
+ }
181
+ catch (err) {
182
+ const transformedError = sdkTransformError(err, {
183
+ spreadPathsToArguments: {},
184
+ explicitPathsToArguments: {
185
+ resources: '$[0]',
186
+ returnEntity: '$[1].returnEntity',
187
+ },
188
+ singleArgumentUnchanged: false,
189
+ }, ['resources', 'options']);
190
+ sideEffects?.onError?.(err);
191
+ throw transformedError;
192
+ }
193
+ }
194
+ /**
195
+ * Retrieves a resource by ID.
196
+ * @param resourceId - ID of the resource to retrieve.
197
+ * @public
198
+ * @documentationMaturity preview
199
+ * @requiredField resourceId
200
+ * @permissionId BOOKINGS.RESOURCE_READ
201
+ * @permissionScope Read Bookings - Public Data
202
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
203
+ * @permissionScope Manage Bookings
204
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
205
+ * @permissionScope Read Bookings - Including Participants
206
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
207
+ * @permissionScope Read Bookings - all read permissions
208
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
209
+ * @permissionScope Manage Bookings - all permissions
210
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
211
+ * @applicableIdentity APP
212
+ * @applicableIdentity VISITOR
213
+ * @returns The retrieved resource.
214
+ * @fqn wix.bookings.resources.v2.ResourcesService.GetResource
215
+ */
216
+ export async function getResource(resourceId) {
217
+ // @ts-ignore
218
+ const { httpClient, sideEffects } = arguments[1];
219
+ const payload = renameKeysFromSDKRequestToRESTRequest({
220
+ resourceId: resourceId,
221
+ });
222
+ const reqOpts = ambassadorWixBookingsResourcesV2Resource.getResource(payload);
223
+ sideEffects?.onSiteCall?.();
224
+ try {
225
+ const result = await httpClient.request(reqOpts);
226
+ sideEffects?.onSuccess?.(result);
227
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.resource;
228
+ }
229
+ catch (err) {
230
+ const transformedError = sdkTransformError(err, {
231
+ spreadPathsToArguments: {},
232
+ explicitPathsToArguments: { resourceId: '$[0]' },
233
+ singleArgumentUnchanged: false,
234
+ }, ['resourceId']);
235
+ sideEffects?.onError?.(err);
236
+ throw transformedError;
237
+ }
238
+ }
239
+ /**
240
+ * Updates a resource.
241
+ *
242
+ * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.
243
+ * This ensures you're working with the latest service information and prevents unintended overwrites.
244
+ * @param _id - Resource ID.
245
+ * @public
246
+ * @documentationMaturity preview
247
+ * @requiredField _id
248
+ * @requiredField resource
249
+ * @requiredField resource.revision
250
+ * @permissionId BOOKINGS.RESOURCE_UPDATE
251
+ * @permissionScope Manage Bookings
252
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
253
+ * @permissionScope Manage Bookings - all permissions
254
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
255
+ * @applicableIdentity APP
256
+ * @returns The updated resource.
257
+ * @fqn wix.bookings.resources.v2.ResourcesService.UpdateResource
258
+ */
259
+ export async function updateResource(_id, resource) {
260
+ // @ts-ignore
261
+ const { httpClient, sideEffects } = arguments[2];
262
+ const payload = renameKeysFromSDKRequestToRESTRequest({
263
+ resource: { ...resource, id: _id },
264
+ });
265
+ const reqOpts = ambassadorWixBookingsResourcesV2Resource.updateResource(payload);
266
+ sideEffects?.onSiteCall?.();
267
+ try {
268
+ const result = await httpClient.request(reqOpts);
269
+ sideEffects?.onSuccess?.(result);
270
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.resource;
271
+ }
272
+ catch (err) {
273
+ const transformedError = sdkTransformError(err, {
274
+ spreadPathsToArguments: { resource: '$[1]' },
275
+ explicitPathsToArguments: { 'resource.id': '$[0]' },
276
+ singleArgumentUnchanged: false,
277
+ }, ['_id', 'resource']);
278
+ sideEffects?.onError?.(err);
279
+ throw transformedError;
280
+ }
281
+ }
282
+ /**
283
+ * Deletes a resource.
284
+ *
285
+ * Also cancels the associated events schedule and any working hours schedule that isn’t shared among multiple resources.
286
+ * @param resourceId - ID of the resource to delete.
287
+ * @public
288
+ * @documentationMaturity preview
289
+ * @requiredField resourceId
290
+ * @permissionId BOOKINGS.RESOURCE_DELETE
291
+ * @permissionScope Manage Bookings
292
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
293
+ * @permissionScope Manage Bookings - all permissions
294
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
295
+ * @applicableIdentity APP
296
+ * @fqn wix.bookings.resources.v2.ResourcesService.DeleteResource
297
+ */
298
+ export async function deleteResource(resourceId) {
299
+ // @ts-ignore
300
+ const { httpClient, sideEffects } = arguments[1];
301
+ const payload = renameKeysFromSDKRequestToRESTRequest({
302
+ resourceId: resourceId,
303
+ });
304
+ const reqOpts = ambassadorWixBookingsResourcesV2Resource.deleteResource(payload);
305
+ sideEffects?.onSiteCall?.();
306
+ try {
307
+ const result = await httpClient.request(reqOpts);
308
+ sideEffects?.onSuccess?.(result);
309
+ }
310
+ catch (err) {
311
+ const transformedError = sdkTransformError(err, {
312
+ spreadPathsToArguments: {},
313
+ explicitPathsToArguments: { resourceId: '$[0]' },
314
+ singleArgumentUnchanged: false,
315
+ }, ['resourceId']);
316
+ sideEffects?.onError?.(err);
317
+ throw transformedError;
318
+ }
319
+ }
320
+ /**
321
+ * Deletes multiple resources.
322
+ * @param ids - The IDs of the resources to delete.
323
+ * @public
324
+ * @documentationMaturity preview
325
+ * @requiredField ids
326
+ * @permissionId BOOKINGS.RESOURCE_DELETE
327
+ * @permissionScope Manage Bookings
328
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
329
+ * @permissionScope Manage Bookings - all permissions
330
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
331
+ * @applicableIdentity APP
332
+ * @fqn wix.bookings.resources.v2.ResourcesService.BulkDeleteResources
333
+ */
334
+ export async function bulkDeleteResources(ids) {
335
+ // @ts-ignore
336
+ const { httpClient, sideEffects } = arguments[1];
337
+ const payload = renameKeysFromSDKRequestToRESTRequest({ ids: ids });
338
+ const reqOpts = ambassadorWixBookingsResourcesV2Resource.bulkDeleteResources(payload);
339
+ sideEffects?.onSiteCall?.();
340
+ try {
341
+ const result = await httpClient.request(reqOpts);
342
+ sideEffects?.onSuccess?.(result);
343
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
344
+ }
345
+ catch (err) {
346
+ const transformedError = sdkTransformError(err, {
347
+ spreadPathsToArguments: {},
348
+ explicitPathsToArguments: { ids: '$[0]' },
349
+ singleArgumentUnchanged: false,
350
+ }, ['ids']);
351
+ sideEffects?.onError?.(err);
352
+ throw transformedError;
353
+ }
354
+ }
355
+ /**
356
+ * Retrieves a list of resources matching the provided search criteria.
357
+ *
358
+ * The search endpoints allow to perform advanced search including partial text search, exact match, and more.
359
+ * The endpoint also allows to aggregate resources by type, name, app id, management type, management type and location options.
360
+ * @public
361
+ * @documentationMaturity preview
362
+ * @permissionId BOOKINGS.RESOURCE_READ
363
+ * @permissionScope Read Bookings - Public Data
364
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
365
+ * @permissionScope Manage Bookings
366
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
367
+ * @permissionScope Read Bookings - Including Participants
368
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
369
+ * @permissionScope Read Bookings - all read permissions
370
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
371
+ * @permissionScope Manage Bookings - all permissions
372
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
373
+ * @applicableIdentity APP
374
+ * @applicableIdentity VISITOR
375
+ * @fqn wix.bookings.resources.v2.ResourcesService.SearchResources
376
+ */
377
+ export async function searchResources(options) {
378
+ // @ts-ignore
379
+ const { httpClient, sideEffects } = arguments[1];
380
+ const payload = renameKeysFromSDKRequestToRESTRequest({
381
+ search: options?.search,
382
+ });
383
+ const reqOpts = ambassadorWixBookingsResourcesV2Resource.searchResources(payload);
384
+ sideEffects?.onSiteCall?.();
385
+ try {
386
+ const result = await httpClient.request(reqOpts);
387
+ sideEffects?.onSuccess?.(result);
388
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
389
+ }
390
+ catch (err) {
391
+ const transformedError = sdkTransformError(err, {
392
+ spreadPathsToArguments: {},
393
+ explicitPathsToArguments: { search: '$[0].search' },
394
+ singleArgumentUnchanged: false,
395
+ }, ['options']);
396
+ sideEffects?.onError?.(err);
397
+ throw transformedError;
398
+ }
399
+ }
400
+ /**
401
+ * Creates a query to retrieve a list of resources.
402
+ *
403
+ * The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.
404
+ *
405
+ * 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.
406
+ *
407
+ * 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.
408
+ *
409
+ * `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:
410
+ *
411
+ * + `limit` is `50`.
412
+ * + Sorted by `id` in ascending order.
413
+ *
414
+ * 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"`.
415
+ *
416
+ * 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`.
417
+ * @public
418
+ * @documentationMaturity preview
419
+ * @permissionScope Read Bookings - Public Data
420
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
421
+ * @permissionScope Manage Bookings
422
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
423
+ * @permissionScope Read Bookings - Including Participants
424
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
425
+ * @permissionScope Read Bookings - all read permissions
426
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
427
+ * @permissionScope Manage Bookings - all permissions
428
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
429
+ * @permissionId BOOKINGS.RESOURCE_READ
430
+ * @applicableIdentity APP
431
+ * @applicableIdentity VISITOR
432
+ * @fqn wix.bookings.resources.v2.ResourcesService.QueryResources
433
+ */
434
+ export function queryResources() {
435
+ // @ts-ignore
436
+ const { httpClient, sideEffects } = arguments[0];
437
+ return queryBuilder({
438
+ func: async (payload) => {
439
+ const reqOpts = ambassadorWixBookingsResourcesV2Resource.queryResources(payload);
440
+ sideEffects?.onSiteCall?.();
441
+ try {
442
+ const result = await httpClient.request(reqOpts);
443
+ sideEffects?.onSuccess?.(result);
444
+ return result;
445
+ }
446
+ catch (err) {
447
+ sideEffects?.onError?.(err);
448
+ throw err;
449
+ }
450
+ },
451
+ requestTransformer: (query) => {
452
+ const args = [query, {}];
453
+ return renameKeysFromSDKRequestToRESTRequest({
454
+ ...args?.[1],
455
+ query: args?.[0],
456
+ });
457
+ },
458
+ responseTransformer: ({ data }) => {
459
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(data);
460
+ return {
461
+ items: transformedData?.resources,
462
+ pagingMetadata: transformedData?.pagingMetadata,
463
+ };
464
+ },
465
+ errorTransformer: (err) => {
466
+ const transformedError = sdkTransformError(err, {
467
+ spreadPathsToArguments: {},
468
+ explicitPathsToArguments: { query: '$[0]' },
469
+ singleArgumentUnchanged: false,
470
+ });
471
+ throw transformedError;
472
+ },
473
+ pagingMethod: 'CURSOR',
474
+ transformationPaths: {},
475
+ });
476
+ }
477
+ /**
478
+ * Counts resources according to given criteria.
479
+ *
480
+ * Use [WQL filter](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section) to define the criteria.
481
+ * @public
482
+ * @documentationMaturity preview
483
+ * @param options - Filter to base the count on. See
484
+ * [queryResources()](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/query-resources)
485
+ * for supported filters.
486
+ * @permissionId BOOKINGS.RESOURCE_READ
487
+ * @permissionScope Read Bookings - Public Data
488
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
489
+ * @permissionScope Manage Bookings
490
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
491
+ * @permissionScope Read Bookings - Including Participants
492
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
493
+ * @permissionScope Read Bookings - all read permissions
494
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
495
+ * @permissionScope Manage Bookings - all permissions
496
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
497
+ * @applicableIdentity APP
498
+ * @applicableIdentity VISITOR
499
+ * @fqn wix.bookings.resources.v2.ResourcesService.CountResources
500
+ */
501
+ export async function countResources(options) {
502
+ // @ts-ignore
503
+ const { httpClient, sideEffects } = arguments[1];
504
+ const payload = renameKeysFromSDKRequestToRESTRequest({
505
+ filter: options?.filter,
506
+ search: options?.search,
507
+ });
508
+ const reqOpts = ambassadorWixBookingsResourcesV2Resource.countResources(payload);
509
+ sideEffects?.onSiteCall?.();
510
+ try {
511
+ const result = await httpClient.request(reqOpts);
512
+ sideEffects?.onSuccess?.(result);
513
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
514
+ }
515
+ catch (err) {
516
+ const transformedError = sdkTransformError(err, {
517
+ spreadPathsToArguments: {},
518
+ explicitPathsToArguments: {
519
+ filter: '$[0].filter',
520
+ search: '$[0].search',
521
+ },
522
+ singleArgumentUnchanged: false,
523
+ }, ['options']);
524
+ sideEffects?.onError?.(err);
525
+ throw transformedError;
526
+ }
527
+ }
528
+ //# sourceMappingURL=bookings-resources-v2-resource-resources.universal.js.map
@@ -0,0 +1 @@
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,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,wCAAwC,MAAM,oDAAoD,CAAC;AA4J/G,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,6CAA6C;IAC7C,uCAAqB,CAAA;AACvB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AA0OD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAiDD,MAAM,CAAN,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,uCAAuC;IACvC,2BAAe,CAAA;IACf,uDAAuD;IACvD,2BAAe,CAAA;AACjB,CAAC,EALW,QAAQ,KAAR,QAAQ,QAKnB;AAED,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,sCAAsC;IACtC,8BAAa,CAAA;IACb,qCAAqC;IACrC,4BAAW,CAAA;AACb,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,qEAAqE;IACrE,oCAAmB,CAAA;IACnB,mEAAmE;IACnE,oCAAmB,CAAA;AACrB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAOD,MAAM,CAAN,IAAY,UAQX;AARD,WAAY,UAAU;IACpB,yDAA2C,CAAA;IAC3C,+BAA+B;IAC/B,+CAAiC,CAAA;IACjC,oBAAoB;IACpB,yBAAW,CAAA;IACX,oBAAoB;IACpB,yBAAW,CAAA;AACb,CAAC,EAR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AS,EAAE,CAAC,MAAM,CAAC,CAAC;QAEjC,OAAO,uCAAuC,CAAC,MAAM,CAAC,IAAI,CAAE,CAAC;IAC/D,CAAC;IAAC,OAAO,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"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "main": "../build/cjs/meta.js"
3
+ }
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@wix/auto_sdk_bookings_resources",
3
+ "version": "1.0.0",
4
+ "publishConfig": {
5
+ "registry": "https://registry.npmjs.org/",
6
+ "access": "public"
7
+ },
8
+ "keywords": [],
9
+ "sideEffects": false,
10
+ "main": "./build/cjs/index.js",
11
+ "types": "./build/es/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./build/es/index.js",
15
+ "require": "./build/cjs/index.js",
16
+ "types": "./build/es/index.d.ts"
17
+ },
18
+ "./package.json": "./package.json",
19
+ "./meta": {
20
+ "import": "./build/es/meta.js",
21
+ "require": "./build/cjs/meta.js",
22
+ "types": "./build/es/meta.d.ts"
23
+ }
24
+ },
25
+ "files": [
26
+ "build",
27
+ "meta",
28
+ "service-plugins"
29
+ ],
30
+ "dependencies": {
31
+ "@wix/sdk-runtime": "^0.3.35",
32
+ "@wix/sdk-types": "^1.12.4"
33
+ },
34
+ "devDependencies": {
35
+ "typescript": "^5.3.2"
36
+ },
37
+ "scripts": {
38
+ "build": "tsc -b tsconfig.json tsconfig.esm.json tsconfig.internal.json tsconfig.internal.esm.json",
39
+ "test": ":"
40
+ },
41
+ "wix": {
42
+ "artifact": {
43
+ "artifactId": "auto-sdk-bookings-resources",
44
+ "groupId": "com.wixpress.public-sdk-dependencies"
45
+ },
46
+ "sdkDependency": {
47
+ "fqdnNamespace": "resources",
48
+ "fqdn": "wix.bookings.resources.v2.resource"
49
+ }
50
+ },
51
+ "falconPackageHash": "d0087c18b2ea472508348581fbbe3491c8582ba1b979a4d7530aac92"
52
+ }