@wix/events 1.0.150 → 1.0.151

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 (147) hide show
  1. package/build/cjs/index.d.ts +7 -3
  2. package/build/cjs/index.js +8 -4
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +7 -3
  5. package/build/cjs/index.typings.js +8 -4
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +7 -3
  8. package/build/cjs/meta.js +8 -4
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.d.ts +97 -0
  11. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js +550 -0
  12. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js.map +1 -0
  13. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.d.ts +19 -0
  14. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.js +85 -0
  15. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.js.map +1 -0
  16. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.d.ts +9 -0
  17. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js +28 -0
  18. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js.map +1 -0
  19. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.d.ts +410 -0
  20. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js +27 -0
  21. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js.map +1 -0
  22. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.d.ts +454 -0
  23. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js +254 -0
  24. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js.map +1 -0
  25. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.d.ts +97 -0
  26. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.js +550 -0
  27. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.js.map +1 -0
  28. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.meta.d.ts +25 -0
  29. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.meta.js +199 -0
  30. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.meta.js.map +1 -0
  31. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.public.d.ts +26 -0
  32. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.public.js +64 -0
  33. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.public.js.map +1 -0
  34. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.types.d.ts +410 -0
  35. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.types.js +27 -0
  36. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.types.js.map +1 -0
  37. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.d.ts +669 -0
  38. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.js +677 -0
  39. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.js.map +1 -0
  40. package/build/cjs/src/events-v1-category.http.d.ts +35 -0
  41. package/build/cjs/src/events-v1-category.http.js +570 -0
  42. package/build/cjs/src/events-v1-category.http.js.map +1 -0
  43. package/build/cjs/src/events-v1-category.meta.d.ts +37 -0
  44. package/build/cjs/src/events-v1-category.meta.js +275 -0
  45. package/build/cjs/src/events-v1-category.meta.js.map +1 -0
  46. package/build/cjs/src/events-v1-category.public.d.ts +28 -0
  47. package/build/cjs/src/events-v1-category.public.js +88 -0
  48. package/build/cjs/src/events-v1-category.public.js.map +1 -0
  49. package/build/cjs/src/events-v1-category.types.d.ts +364 -0
  50. package/build/cjs/src/events-v1-category.types.js +27 -0
  51. package/build/cjs/src/events-v1-category.types.js.map +1 -0
  52. package/build/cjs/src/events-v1-category.universal.d.ts +586 -0
  53. package/build/cjs/src/events-v1-category.universal.js +830 -0
  54. package/build/cjs/src/events-v1-category.universal.js.map +1 -0
  55. package/build/cjs/src/events-v1-order-checkout.http.js +7 -4
  56. package/build/cjs/src/events-v1-order-checkout.http.js.map +1 -1
  57. package/build/cjs/src/events-v1-order-orders.http.js +7 -4
  58. package/build/cjs/src/events-v1-order-orders.http.js.map +1 -1
  59. package/build/cjs/src/events-v1-rsvp.http.d.ts +20 -0
  60. package/build/cjs/src/events-v1-rsvp.http.js +433 -0
  61. package/build/cjs/src/events-v1-rsvp.http.js.map +1 -0
  62. package/build/cjs/src/events-v1-rsvp.meta.d.ts +25 -0
  63. package/build/cjs/src/events-v1-rsvp.meta.js +199 -0
  64. package/build/cjs/src/events-v1-rsvp.meta.js.map +1 -0
  65. package/build/cjs/src/events-v1-rsvp.public.d.ts +39 -0
  66. package/build/cjs/src/events-v1-rsvp.public.js +65 -0
  67. package/build/cjs/src/events-v1-rsvp.public.js.map +1 -0
  68. package/build/cjs/src/events-v1-rsvp.types.d.ts +804 -0
  69. package/build/cjs/src/events-v1-rsvp.types.js +44 -0
  70. package/build/cjs/src/events-v1-rsvp.types.js.map +1 -0
  71. package/build/cjs/src/events-v1-rsvp.universal.d.ts +905 -0
  72. package/build/cjs/src/events-v1-rsvp.universal.js +725 -0
  73. package/build/cjs/src/events-v1-rsvp.universal.js.map +1 -0
  74. package/build/es/index.d.ts +7 -3
  75. package/build/es/index.js +7 -3
  76. package/build/es/index.js.map +1 -1
  77. package/build/es/index.typings.d.ts +7 -3
  78. package/build/es/index.typings.js +7 -3
  79. package/build/es/index.typings.js.map +1 -1
  80. package/build/es/meta.d.ts +7 -3
  81. package/build/es/meta.js +7 -3
  82. package/build/es/meta.js.map +1 -1
  83. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.d.ts +97 -0
  84. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js +535 -0
  85. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js.map +1 -0
  86. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.d.ts +19 -0
  87. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.js +56 -0
  88. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.js.map +1 -0
  89. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.d.ts +9 -0
  90. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js +19 -0
  91. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js.map +1 -0
  92. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.d.ts +410 -0
  93. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js +24 -0
  94. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js.map +1 -0
  95. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.d.ts +454 -0
  96. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js +225 -0
  97. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js.map +1 -0
  98. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.d.ts +97 -0
  99. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.js +535 -0
  100. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.js.map +1 -0
  101. package/build/es/src/events-schedule-v1-schedule-item-schedule.meta.d.ts +25 -0
  102. package/build/es/src/events-schedule-v1-schedule-item-schedule.meta.js +164 -0
  103. package/build/es/src/events-schedule-v1-schedule-item-schedule.meta.js.map +1 -0
  104. package/build/es/src/events-schedule-v1-schedule-item-schedule.public.d.ts +26 -0
  105. package/build/es/src/events-schedule-v1-schedule-item-schedule.public.js +49 -0
  106. package/build/es/src/events-schedule-v1-schedule-item-schedule.public.js.map +1 -0
  107. package/build/es/src/events-schedule-v1-schedule-item-schedule.types.d.ts +410 -0
  108. package/build/es/src/events-schedule-v1-schedule-item-schedule.types.js +24 -0
  109. package/build/es/src/events-schedule-v1-schedule-item-schedule.types.js.map +1 -0
  110. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.d.ts +669 -0
  111. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.js +642 -0
  112. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.js.map +1 -0
  113. package/build/es/src/events-v1-category.http.d.ts +35 -0
  114. package/build/es/src/events-v1-category.http.js +554 -0
  115. package/build/es/src/events-v1-category.http.js.map +1 -0
  116. package/build/es/src/events-v1-category.meta.d.ts +37 -0
  117. package/build/es/src/events-v1-category.meta.js +236 -0
  118. package/build/es/src/events-v1-category.meta.js.map +1 -0
  119. package/build/es/src/events-v1-category.public.d.ts +28 -0
  120. package/build/es/src/events-v1-category.public.js +69 -0
  121. package/build/es/src/events-v1-category.public.js.map +1 -0
  122. package/build/es/src/events-v1-category.types.d.ts +364 -0
  123. package/build/es/src/events-v1-category.types.js +24 -0
  124. package/build/es/src/events-v1-category.types.js.map +1 -0
  125. package/build/es/src/events-v1-category.universal.d.ts +586 -0
  126. package/build/es/src/events-v1-category.universal.js +791 -0
  127. package/build/es/src/events-v1-category.universal.js.map +1 -0
  128. package/build/es/src/events-v1-order-checkout.http.js +7 -4
  129. package/build/es/src/events-v1-order-checkout.http.js.map +1 -1
  130. package/build/es/src/events-v1-order-orders.http.js +7 -4
  131. package/build/es/src/events-v1-order-orders.http.js.map +1 -1
  132. package/build/es/src/events-v1-rsvp.http.d.ts +20 -0
  133. package/build/es/src/events-v1-rsvp.http.js +421 -0
  134. package/build/es/src/events-v1-rsvp.http.js.map +1 -0
  135. package/build/es/src/events-v1-rsvp.meta.d.ts +25 -0
  136. package/build/es/src/events-v1-rsvp.meta.js +164 -0
  137. package/build/es/src/events-v1-rsvp.meta.js.map +1 -0
  138. package/build/es/src/events-v1-rsvp.public.d.ts +39 -0
  139. package/build/es/src/events-v1-rsvp.public.js +49 -0
  140. package/build/es/src/events-v1-rsvp.public.js.map +1 -0
  141. package/build/es/src/events-v1-rsvp.types.d.ts +804 -0
  142. package/build/es/src/events-v1-rsvp.types.js +41 -0
  143. package/build/es/src/events-v1-rsvp.types.js.map +1 -0
  144. package/build/es/src/events-v1-rsvp.universal.d.ts +905 -0
  145. package/build/es/src/events-v1-rsvp.universal.js +690 -0
  146. package/build/es/src/events-v1-rsvp.universal.js.map +1 -0
  147. package/package.json +2 -2
@@ -0,0 +1,791 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { serializer, transformError, resolveQueryFieldsTransformationPaths, } from '@wix/metro-runtime/velo';
11
+ import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
12
+ import * as ambassadorWixEventsV1Category from './events-v1-category.http';
13
+ // @ts-ignore
14
+ import { wrapWithQueryBuilder } from '@wix/motion-edm-autogen-query-wrapper';
15
+ let __verbose = false;
16
+ function __log(...args) {
17
+ __verbose && console.log(...args);
18
+ }
19
+ function __inspect(obj) {
20
+ return obj;
21
+ }
22
+ export const __debug = {
23
+ verboseLogging: {
24
+ on: () => (__verbose = true),
25
+ off: () => (__verbose = false),
26
+ },
27
+ };
28
+ const _toVeloEntity = '$';
29
+ const _fromVeloEntity = '$';
30
+ export var State;
31
+ (function (State) {
32
+ /** Created manually by the user. */
33
+ State["MANUAL"] = "MANUAL";
34
+ /** Created automatically. */
35
+ State["AUTO"] = "AUTO";
36
+ /** Created when publishing recurring events. */
37
+ State["RECURRING_EVENT"] = "RECURRING_EVENT";
38
+ /** Category is hidden. */
39
+ State["HIDDEN"] = "HIDDEN";
40
+ /** Category is used to store component events. */
41
+ State["COMPONENT"] = "COMPONENT";
42
+ })(State || (State = {}));
43
+ export var SortOrder;
44
+ (function (SortOrder) {
45
+ SortOrder["ASC"] = "ASC";
46
+ SortOrder["DESC"] = "DESC";
47
+ })(SortOrder || (SortOrder = {}));
48
+ export var CategoryFieldset;
49
+ (function (CategoryFieldset) {
50
+ /** Include `assignedEventsCount` in the response. */
51
+ CategoryFieldset["COUNTS"] = "COUNTS";
52
+ })(CategoryFieldset || (CategoryFieldset = {}));
53
+ const _assignEventsRequest = {};
54
+ const _assignEventsResponse = {};
55
+ const _bulkAssignEventsAsyncRequest = {};
56
+ const _bulkAssignEventsAsyncResponse = {};
57
+ const _bulkAssignEventsRequest = {};
58
+ const _bulkAssignEventsResponse = {};
59
+ const _bulkCreateCategoryRequest = {};
60
+ const _bulkCreateCategoryResponse = {};
61
+ const _bulkUnassignEventsAsyncRequest = {};
62
+ const _bulkUnassignEventsAsyncResponse = {};
63
+ const _bulkUnassignEventsRequest = {};
64
+ const _bulkUnassignEventsResponse = {};
65
+ const _createCategoryRequest = {};
66
+ const _createCategoryResponse = {};
67
+ const _deleteCategoryRequest = {};
68
+ const _deleteCategoryResponse = {};
69
+ const _listEventCategoriesRequest = {};
70
+ const _listEventCategoriesResponse = {};
71
+ const _queryCategoriesRequest = {};
72
+ const _queryCategoriesResponse = {};
73
+ const _reorderCategoryEventsRequest = {};
74
+ const _reorderCategoryEventsResponse = {};
75
+ const _unassignEventsRequest = {};
76
+ const _unassignEventsResponse = {};
77
+ const _updateCategoryRequest = {};
78
+ const _updateCategoryResponse = {};
79
+ /**
80
+ * Creates a new category.
81
+ * @param category - Category to be created.
82
+ * @public
83
+ * @documentationMaturity preview
84
+ * @requiredField category
85
+ * @returns Created category.
86
+ */
87
+ export function createCategory(category) {
88
+ var _a, _b, _c;
89
+ return __awaiter(this, arguments, void 0, function* () {
90
+ const requestTransformation = { category: '$[0]' };
91
+ const responseTransformation = '$.category';
92
+ // @ts-ignore
93
+ const { httpClient, sideEffects } = arguments[1];
94
+ const { toAmbassadorRequest } = serializer({
95
+ rootSchema: _createCategoryRequest,
96
+ depSchemas: {},
97
+ fqdnTransformation: {
98
+ paths: [...['category']],
99
+ transformation: _fromVeloEntity,
100
+ },
101
+ customTransformation: requestTransformation,
102
+ });
103
+ const { fromJSON } = serializer({
104
+ rootSchema: _createCategoryResponse,
105
+ depSchemas: {},
106
+ fqdnTransformation: {
107
+ paths: [...['category']],
108
+ transformation: _toVeloEntity,
109
+ },
110
+ customTransformation: responseTransformation,
111
+ });
112
+ const payload = toAmbassadorRequest([category]);
113
+ const reqOpts = ambassadorWixEventsV1Category.createCategory(payload);
114
+ __log(`"CreateCategory" sending request with: ${__inspect(reqOpts)}`);
115
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
116
+ try {
117
+ const result = yield httpClient.request(reqOpts);
118
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
119
+ return fromJSON(result.data);
120
+ }
121
+ catch (err) {
122
+ const transformedError = sdkTransformError(err, {
123
+ spreadPathsToArguments: {},
124
+ explicitPathsToArguments: { category: '$[0]' },
125
+ singleArgumentUnchanged: false,
126
+ }, ['category']);
127
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
128
+ throw transformedError;
129
+ }
130
+ });
131
+ }
132
+ /**
133
+ * Creates new categories.
134
+ * @param categories - Categories to be created.
135
+ * @public
136
+ * @documentationMaturity preview
137
+ * @requiredField categories
138
+ */
139
+ export function bulkCreateCategory(categories) {
140
+ var _a, _b, _c;
141
+ return __awaiter(this, arguments, void 0, function* () {
142
+ const requestTransformation = { categories: '$[0]' };
143
+ const responseTransformation = '$';
144
+ // @ts-ignore
145
+ const { httpClient, sideEffects } = arguments[1];
146
+ const { toAmbassadorRequest } = serializer({
147
+ rootSchema: _bulkCreateCategoryRequest,
148
+ depSchemas: {},
149
+ fqdnTransformation: {
150
+ paths: [...['Array#categories']],
151
+ transformation: _fromVeloEntity,
152
+ },
153
+ customTransformation: requestTransformation,
154
+ });
155
+ const { fromJSON } = serializer({
156
+ rootSchema: _bulkCreateCategoryResponse,
157
+ depSchemas: {},
158
+ fqdnTransformation: {
159
+ paths: [...['Array#results.item']],
160
+ transformation: _toVeloEntity,
161
+ },
162
+ customTransformation: responseTransformation,
163
+ });
164
+ const payload = toAmbassadorRequest([categories]);
165
+ const reqOpts = ambassadorWixEventsV1Category.bulkCreateCategory(payload);
166
+ __log(`"BulkCreateCategory" sending request with: ${__inspect(reqOpts)}`);
167
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
168
+ try {
169
+ const result = yield httpClient.request(reqOpts);
170
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
171
+ return fromJSON(result.data);
172
+ }
173
+ catch (err) {
174
+ const transformedError = sdkTransformError(err, {
175
+ spreadPathsToArguments: {},
176
+ explicitPathsToArguments: { categories: '$[0]' },
177
+ singleArgumentUnchanged: false,
178
+ }, ['categories']);
179
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
180
+ throw transformedError;
181
+ }
182
+ });
183
+ }
184
+ /**
185
+ * Updates an existing category.
186
+ * @param _id - Category ID.
187
+ * @public
188
+ * @documentationMaturity preview
189
+ * @requiredField _id
190
+ * @requiredField category
191
+ * @returns Updated category.
192
+ */
193
+ export function updateCategory(_id, category) {
194
+ var _a, _b, _c;
195
+ return __awaiter(this, arguments, void 0, function* () {
196
+ const requestTransformation = { category: { '*': '$[1]', id: '$[0]' } };
197
+ const responseTransformation = '$.category';
198
+ // @ts-ignore
199
+ const { httpClient, sideEffects } = arguments[2];
200
+ const { toAmbassadorRequest } = serializer({
201
+ rootSchema: _updateCategoryRequest,
202
+ depSchemas: {},
203
+ fqdnTransformation: {
204
+ paths: [...['category']],
205
+ transformation: _fromVeloEntity,
206
+ },
207
+ customTransformation: requestTransformation,
208
+ });
209
+ const { fromJSON } = serializer({
210
+ rootSchema: _updateCategoryResponse,
211
+ depSchemas: {},
212
+ fqdnTransformation: {
213
+ paths: [...['category']],
214
+ transformation: _toVeloEntity,
215
+ },
216
+ customTransformation: responseTransformation,
217
+ });
218
+ const payload = toAmbassadorRequest([_id, category]);
219
+ const reqOpts = ambassadorWixEventsV1Category.updateCategory(payload);
220
+ __log(`"UpdateCategory" sending request with: ${__inspect(reqOpts)}`);
221
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
222
+ try {
223
+ const result = yield httpClient.request(reqOpts);
224
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
225
+ return fromJSON(result.data);
226
+ }
227
+ catch (err) {
228
+ const transformedError = sdkTransformError(err, {
229
+ spreadPathsToArguments: { category: '$[1]' },
230
+ explicitPathsToArguments: { 'category.id': '$[0]' },
231
+ singleArgumentUnchanged: false,
232
+ }, ['_id', 'category']);
233
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
234
+ throw transformedError;
235
+ }
236
+ });
237
+ }
238
+ /**
239
+ * Deletes existing category.
240
+ * @param categoryId - ID of category to be deleted.
241
+ * @public
242
+ * @documentationMaturity preview
243
+ * @requiredField categoryId
244
+ */
245
+ export function deleteCategory(categoryId) {
246
+ var _a, _b, _c;
247
+ return __awaiter(this, arguments, void 0, function* () {
248
+ const requestTransformation = { categoryId: '$[0]' };
249
+ const responseTransformation = '$';
250
+ // @ts-ignore
251
+ const { httpClient, sideEffects } = arguments[1];
252
+ const { toAmbassadorRequest } = serializer({
253
+ rootSchema: _deleteCategoryRequest,
254
+ depSchemas: {},
255
+ fqdnTransformation: {
256
+ paths: [],
257
+ transformation: _fromVeloEntity,
258
+ },
259
+ customTransformation: requestTransformation,
260
+ });
261
+ const { fromJSON } = serializer({
262
+ rootSchema: _deleteCategoryResponse,
263
+ depSchemas: {},
264
+ fqdnTransformation: {
265
+ paths: [],
266
+ transformation: _toVeloEntity,
267
+ },
268
+ customTransformation: responseTransformation,
269
+ });
270
+ const payload = toAmbassadorRequest([categoryId]);
271
+ const reqOpts = ambassadorWixEventsV1Category.deleteCategory(payload);
272
+ __log(`"DeleteCategory" sending request with: ${__inspect(reqOpts)}`);
273
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
274
+ try {
275
+ const result = yield httpClient.request(reqOpts);
276
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
277
+ }
278
+ catch (err) {
279
+ const transformedError = sdkTransformError(err, {
280
+ spreadPathsToArguments: {},
281
+ explicitPathsToArguments: { categoryId: '$[0]' },
282
+ singleArgumentUnchanged: false,
283
+ }, ['categoryId']);
284
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
285
+ throw transformedError;
286
+ }
287
+ });
288
+ }
289
+ /**
290
+ * - `filter` - supported for `name`, `id` and `states` fields.
291
+ * - `sort` - supported for `created` and `name` fields.
292
+ * - `paging` - supported, see [paging](https://dev.wix.com/api/rest/getting-started/pagination).
293
+ * - `fields` - not supported.
294
+ * - `fieldsets` - not supported.
295
+ * - `cursorPaging` - not supported, use offset pagination instead.
296
+ * @public
297
+ * @documentationMaturity preview
298
+ * @applicableIdentity MEMBER
299
+ * @applicableIdentity VISITOR
300
+ */
301
+ export function queryCategories(options) {
302
+ const requestTransformation = { '*': '$[1]', query: '$[0]' };
303
+ const responseTransformation = {
304
+ items: '$.categories',
305
+ pagingMetadata: '$.metadata',
306
+ };
307
+ // @ts-ignore
308
+ const { httpClient, sideEffects } = arguments[1];
309
+ const { toAmbassadorRequest } = serializer({
310
+ rootSchema: _queryCategoriesRequest,
311
+ depSchemas: {},
312
+ fqdnTransformation: {
313
+ paths: [],
314
+ transformation: _fromVeloEntity,
315
+ },
316
+ customTransformation: requestTransformation,
317
+ });
318
+ const { fromJSON } = serializer({
319
+ rootSchema: _queryCategoriesResponse,
320
+ depSchemas: {},
321
+ fqdnTransformation: {
322
+ paths: [...['Array#categories']],
323
+ transformation: _toVeloEntity,
324
+ },
325
+ customTransformation: responseTransformation,
326
+ });
327
+ return wrapWithQueryBuilder({
328
+ func: (payload) => __awaiter(this, void 0, void 0, function* () {
329
+ var _a, _b, _c;
330
+ const reqOpts = ambassadorWixEventsV1Category.queryCategories(Object.assign(Object.assign({}, payload), (options !== null && options !== void 0 ? options : {})));
331
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
332
+ try {
333
+ const result = yield httpClient.request(reqOpts);
334
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
335
+ return result;
336
+ }
337
+ catch (err) {
338
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
339
+ throw err;
340
+ }
341
+ }),
342
+ requestTransformer: (...args) => toAmbassadorRequest(args),
343
+ responseTransformer: ({ data }) => fromJSON(data),
344
+ errorTransformer: (err) => {
345
+ const transformedError = transformError(err, requestTransformation);
346
+ throw transformedError;
347
+ },
348
+ pagingMethod: 'CURSOR',
349
+ transformationPaths: resolveQueryFieldsTransformationPaths(_toVeloEntity),
350
+ })({ cursorWithEmptyFilterAndSort: true });
351
+ }
352
+ /**
353
+ * Assigns events to a single category.
354
+ * @param categoryId - ID of category to which events should be assigned.
355
+ * @param eventId - A list of events IDs.
356
+ * @public
357
+ * @documentationMaturity preview
358
+ * @requiredField categoryId
359
+ * @requiredField eventId
360
+ */
361
+ export function assignEvents(categoryId, eventId) {
362
+ var _a, _b, _c;
363
+ return __awaiter(this, arguments, void 0, function* () {
364
+ const requestTransformation = { categoryId: '$[0]', eventId: '$[1]' };
365
+ const responseTransformation = '$';
366
+ // @ts-ignore
367
+ const { httpClient, sideEffects } = arguments[2];
368
+ const { toAmbassadorRequest } = serializer({
369
+ rootSchema: _assignEventsRequest,
370
+ depSchemas: {},
371
+ fqdnTransformation: {
372
+ paths: [],
373
+ transformation: _fromVeloEntity,
374
+ },
375
+ customTransformation: requestTransformation,
376
+ });
377
+ const { fromJSON } = serializer({
378
+ rootSchema: _assignEventsResponse,
379
+ depSchemas: {},
380
+ fqdnTransformation: {
381
+ paths: [],
382
+ transformation: _toVeloEntity,
383
+ },
384
+ customTransformation: responseTransformation,
385
+ });
386
+ const payload = toAmbassadorRequest([categoryId, eventId]);
387
+ const reqOpts = ambassadorWixEventsV1Category.assignEvents(payload);
388
+ __log(`"AssignEvents" sending request with: ${__inspect(reqOpts)}`);
389
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
390
+ try {
391
+ const result = yield httpClient.request(reqOpts);
392
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
393
+ }
394
+ catch (err) {
395
+ const transformedError = sdkTransformError(err, {
396
+ spreadPathsToArguments: {},
397
+ explicitPathsToArguments: { categoryId: '$[0]', eventId: '$[1]' },
398
+ singleArgumentUnchanged: false,
399
+ }, ['categoryId', 'eventId']);
400
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
401
+ throw transformedError;
402
+ }
403
+ });
404
+ }
405
+ /**
406
+ * Assigns events to multiple categories.
407
+ * @param categoryId - A list of category ids to which events should be assigned.
408
+ * @public
409
+ * @documentationMaturity preview
410
+ * @requiredField categoryId
411
+ * @requiredField options
412
+ * @requiredField options.eventId
413
+ */
414
+ export function bulkAssignEvents(categoryId, options) {
415
+ var _a, _b, _c;
416
+ return __awaiter(this, arguments, void 0, function* () {
417
+ const requestTransformation = { categoryId: '$[0]', eventId: '$[1].eventId' };
418
+ const responseTransformation = '$';
419
+ // @ts-ignore
420
+ const { httpClient, sideEffects } = arguments[2];
421
+ const { toAmbassadorRequest } = serializer({
422
+ rootSchema: _bulkAssignEventsRequest,
423
+ depSchemas: {},
424
+ fqdnTransformation: {
425
+ paths: [],
426
+ transformation: _fromVeloEntity,
427
+ },
428
+ customTransformation: requestTransformation,
429
+ });
430
+ const { fromJSON } = serializer({
431
+ rootSchema: _bulkAssignEventsResponse,
432
+ depSchemas: {},
433
+ fqdnTransformation: {
434
+ paths: [...['Array#results.item']],
435
+ transformation: _toVeloEntity,
436
+ },
437
+ customTransformation: responseTransformation,
438
+ });
439
+ const payload = toAmbassadorRequest([categoryId, options]);
440
+ const reqOpts = ambassadorWixEventsV1Category.bulkAssignEvents(payload);
441
+ __log(`"BulkAssignEvents" sending request with: ${__inspect(reqOpts)}`);
442
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
443
+ try {
444
+ const result = yield httpClient.request(reqOpts);
445
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
446
+ return fromJSON(result.data);
447
+ }
448
+ catch (err) {
449
+ const transformedError = sdkTransformError(err, {
450
+ spreadPathsToArguments: {},
451
+ explicitPathsToArguments: {
452
+ categoryId: '$[0]',
453
+ eventId: '$[1].eventId',
454
+ },
455
+ singleArgumentUnchanged: false,
456
+ }, ['categoryId', 'options']);
457
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
458
+ throw transformedError;
459
+ }
460
+ });
461
+ }
462
+ /**
463
+ * Assigns filtered events to multiple categories.
464
+ * @param categoryId - Category IDs.
465
+ * @public
466
+ * @documentationMaturity preview
467
+ * @requiredField categoryId
468
+ * @requiredField options
469
+ * @requiredField options.filter
470
+ */
471
+ export function bulkAssignEventsAsync(categoryId, options) {
472
+ var _a, _b, _c;
473
+ return __awaiter(this, arguments, void 0, function* () {
474
+ const requestTransformation = { categoryId: '$[0]', filter: '$[1].filter' };
475
+ const responseTransformation = '$';
476
+ // @ts-ignore
477
+ const { httpClient, sideEffects } = arguments[2];
478
+ const { toAmbassadorRequest } = serializer({
479
+ rootSchema: _bulkAssignEventsAsyncRequest,
480
+ depSchemas: {},
481
+ fqdnTransformation: {
482
+ paths: [],
483
+ transformation: _fromVeloEntity,
484
+ },
485
+ customTransformation: requestTransformation,
486
+ });
487
+ const { fromJSON } = serializer({
488
+ rootSchema: _bulkAssignEventsAsyncResponse,
489
+ depSchemas: {},
490
+ fqdnTransformation: {
491
+ paths: [],
492
+ transformation: _toVeloEntity,
493
+ },
494
+ customTransformation: responseTransformation,
495
+ });
496
+ const payload = toAmbassadorRequest([categoryId, options]);
497
+ const reqOpts = ambassadorWixEventsV1Category.bulkAssignEventsAsync(payload);
498
+ __log(`"BulkAssignEventsAsync" sending request with: ${__inspect(reqOpts)}`);
499
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
500
+ try {
501
+ const result = yield httpClient.request(reqOpts);
502
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
503
+ }
504
+ catch (err) {
505
+ const transformedError = sdkTransformError(err, {
506
+ spreadPathsToArguments: {},
507
+ explicitPathsToArguments: { categoryId: '$[0]', filter: '$[1].filter' },
508
+ singleArgumentUnchanged: false,
509
+ }, ['categoryId', 'options']);
510
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
511
+ throw transformedError;
512
+ }
513
+ });
514
+ }
515
+ /**
516
+ * Unassigns events from a single category.
517
+ * @param categoryId - Category ID.
518
+ * @param eventId - A list of events IDs.
519
+ * @public
520
+ * @documentationMaturity preview
521
+ * @requiredField categoryId
522
+ * @requiredField eventId
523
+ */
524
+ export function unassignEvents(categoryId, eventId) {
525
+ var _a, _b, _c;
526
+ return __awaiter(this, arguments, void 0, function* () {
527
+ const requestTransformation = { categoryId: '$[0]', eventId: '$[1]' };
528
+ const responseTransformation = '$';
529
+ // @ts-ignore
530
+ const { httpClient, sideEffects } = arguments[2];
531
+ const { toAmbassadorRequest } = serializer({
532
+ rootSchema: _unassignEventsRequest,
533
+ depSchemas: {},
534
+ fqdnTransformation: {
535
+ paths: [],
536
+ transformation: _fromVeloEntity,
537
+ },
538
+ customTransformation: requestTransformation,
539
+ });
540
+ const { fromJSON } = serializer({
541
+ rootSchema: _unassignEventsResponse,
542
+ depSchemas: {},
543
+ fqdnTransformation: {
544
+ paths: [],
545
+ transformation: _toVeloEntity,
546
+ },
547
+ customTransformation: responseTransformation,
548
+ });
549
+ const payload = toAmbassadorRequest([categoryId, eventId]);
550
+ const reqOpts = ambassadorWixEventsV1Category.unassignEvents(payload);
551
+ __log(`"UnassignEvents" sending request with: ${__inspect(reqOpts)}`);
552
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
553
+ try {
554
+ const result = yield httpClient.request(reqOpts);
555
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
556
+ }
557
+ catch (err) {
558
+ const transformedError = sdkTransformError(err, {
559
+ spreadPathsToArguments: {},
560
+ explicitPathsToArguments: { categoryId: '$[0]', eventId: '$[1]' },
561
+ singleArgumentUnchanged: false,
562
+ }, ['categoryId', 'eventId']);
563
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
564
+ throw transformedError;
565
+ }
566
+ });
567
+ }
568
+ /**
569
+ * Unassigns events from multiple categories.
570
+ * @param categoryId - A list of category IDs.
571
+ * @public
572
+ * @documentationMaturity preview
573
+ * @requiredField categoryId
574
+ */
575
+ export function bulkUnassignEvents(categoryId, options) {
576
+ var _a, _b, _c;
577
+ return __awaiter(this, arguments, void 0, function* () {
578
+ const requestTransformation = { categoryId: '$[0]', eventId: '$[1].eventId' };
579
+ const responseTransformation = '$';
580
+ // @ts-ignore
581
+ const { httpClient, sideEffects } = arguments[2];
582
+ const { toAmbassadorRequest } = serializer({
583
+ rootSchema: _bulkUnassignEventsRequest,
584
+ depSchemas: {},
585
+ fqdnTransformation: {
586
+ paths: [],
587
+ transformation: _fromVeloEntity,
588
+ },
589
+ customTransformation: requestTransformation,
590
+ });
591
+ const { fromJSON } = serializer({
592
+ rootSchema: _bulkUnassignEventsResponse,
593
+ depSchemas: {},
594
+ fqdnTransformation: {
595
+ paths: [...['Array#results.item']],
596
+ transformation: _toVeloEntity,
597
+ },
598
+ customTransformation: responseTransformation,
599
+ });
600
+ const payload = toAmbassadorRequest([categoryId, options]);
601
+ const reqOpts = ambassadorWixEventsV1Category.bulkUnassignEvents(payload);
602
+ __log(`"BulkUnassignEvents" sending request with: ${__inspect(reqOpts)}`);
603
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
604
+ try {
605
+ const result = yield httpClient.request(reqOpts);
606
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
607
+ return fromJSON(result.data);
608
+ }
609
+ catch (err) {
610
+ const transformedError = sdkTransformError(err, {
611
+ spreadPathsToArguments: {},
612
+ explicitPathsToArguments: {
613
+ categoryId: '$[0]',
614
+ eventId: '$[1].eventId',
615
+ },
616
+ singleArgumentUnchanged: false,
617
+ }, ['categoryId', 'options']);
618
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
619
+ throw transformedError;
620
+ }
621
+ });
622
+ }
623
+ /**
624
+ * Unassigns filtered events from multiple categories.
625
+ * @param categoryId - Category ID.
626
+ * @public
627
+ * @documentationMaturity preview
628
+ * @requiredField categoryId
629
+ * @requiredField options
630
+ * @requiredField options.filter
631
+ */
632
+ export function bulkUnassignEventsAsync(categoryId, options) {
633
+ var _a, _b, _c;
634
+ return __awaiter(this, arguments, void 0, function* () {
635
+ const requestTransformation = { categoryId: '$[0]', filter: '$[1].filter' };
636
+ const responseTransformation = '$';
637
+ // @ts-ignore
638
+ const { httpClient, sideEffects } = arguments[2];
639
+ const { toAmbassadorRequest } = serializer({
640
+ rootSchema: _bulkUnassignEventsAsyncRequest,
641
+ depSchemas: {},
642
+ fqdnTransformation: {
643
+ paths: [],
644
+ transformation: _fromVeloEntity,
645
+ },
646
+ customTransformation: requestTransformation,
647
+ });
648
+ const { fromJSON } = serializer({
649
+ rootSchema: _bulkUnassignEventsAsyncResponse,
650
+ depSchemas: {},
651
+ fqdnTransformation: {
652
+ paths: [],
653
+ transformation: _toVeloEntity,
654
+ },
655
+ customTransformation: responseTransformation,
656
+ });
657
+ const payload = toAmbassadorRequest([categoryId, options]);
658
+ const reqOpts = ambassadorWixEventsV1Category.bulkUnassignEventsAsync(payload);
659
+ __log(`"BulkUnassignEventsAsync" sending request with: ${__inspect(reqOpts)}`);
660
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
661
+ try {
662
+ const result = yield httpClient.request(reqOpts);
663
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
664
+ }
665
+ catch (err) {
666
+ const transformedError = sdkTransformError(err, {
667
+ spreadPathsToArguments: {},
668
+ explicitPathsToArguments: { categoryId: '$[0]', filter: '$[1].filter' },
669
+ singleArgumentUnchanged: false,
670
+ }, ['categoryId', 'options']);
671
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
672
+ throw transformedError;
673
+ }
674
+ });
675
+ }
676
+ /**
677
+ * Lists visible event categories.
678
+ * @param eventId - Event ID.
679
+ * @public
680
+ * @documentationMaturity preview
681
+ * @requiredField eventId
682
+ * @applicableIdentity MEMBER
683
+ * @applicableIdentity VISITOR
684
+ */
685
+ export function listEventCategories(eventId) {
686
+ var _a, _b, _c;
687
+ return __awaiter(this, arguments, void 0, function* () {
688
+ const requestTransformation = { eventId: '$[0]' };
689
+ const responseTransformation = '$';
690
+ // @ts-ignore
691
+ const { httpClient, sideEffects } = arguments[1];
692
+ const { toAmbassadorRequest } = serializer({
693
+ rootSchema: _listEventCategoriesRequest,
694
+ depSchemas: {},
695
+ fqdnTransformation: {
696
+ paths: [],
697
+ transformation: _fromVeloEntity,
698
+ },
699
+ customTransformation: requestTransformation,
700
+ });
701
+ const { fromJSON } = serializer({
702
+ rootSchema: _listEventCategoriesResponse,
703
+ depSchemas: {},
704
+ fqdnTransformation: {
705
+ paths: [...['Array#categories']],
706
+ transformation: _toVeloEntity,
707
+ },
708
+ customTransformation: responseTransformation,
709
+ });
710
+ const payload = toAmbassadorRequest([eventId]);
711
+ const reqOpts = ambassadorWixEventsV1Category.listEventCategories(payload);
712
+ __log(`"ListEventCategories" sending request with: ${__inspect(reqOpts)}`);
713
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
714
+ try {
715
+ const result = yield httpClient.request(reqOpts);
716
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
717
+ return fromJSON(result.data);
718
+ }
719
+ catch (err) {
720
+ const transformedError = sdkTransformError(err, {
721
+ spreadPathsToArguments: {},
722
+ explicitPathsToArguments: { eventId: '$[0]' },
723
+ singleArgumentUnchanged: false,
724
+ }, ['eventId']);
725
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
726
+ throw transformedError;
727
+ }
728
+ });
729
+ }
730
+ /**
731
+ * Change the order of category events.
732
+ * @param categoryId - Category ID
733
+ * @public
734
+ * @documentationMaturity preview
735
+ * @requiredField categoryId
736
+ */
737
+ export function reorderCategoryEvents(categoryId, options) {
738
+ var _a, _b, _c;
739
+ return __awaiter(this, arguments, void 0, function* () {
740
+ const requestTransformation = {
741
+ categoryId: '$[0]',
742
+ eventId: '$[1].eventId',
743
+ beforeEventId: '$[1].beforeEventId',
744
+ afterEventId: '$[1].afterEventId',
745
+ };
746
+ const responseTransformation = '$';
747
+ // @ts-ignore
748
+ const { httpClient, sideEffects } = arguments[2];
749
+ const { toAmbassadorRequest } = serializer({
750
+ rootSchema: _reorderCategoryEventsRequest,
751
+ depSchemas: {},
752
+ fqdnTransformation: {
753
+ paths: [],
754
+ transformation: _fromVeloEntity,
755
+ },
756
+ customTransformation: requestTransformation,
757
+ });
758
+ const { fromJSON } = serializer({
759
+ rootSchema: _reorderCategoryEventsResponse,
760
+ depSchemas: {},
761
+ fqdnTransformation: {
762
+ paths: [],
763
+ transformation: _toVeloEntity,
764
+ },
765
+ customTransformation: responseTransformation,
766
+ });
767
+ const payload = toAmbassadorRequest([categoryId, options]);
768
+ const reqOpts = ambassadorWixEventsV1Category.reorderCategoryEvents(payload);
769
+ __log(`"ReorderCategoryEvents" sending request with: ${__inspect(reqOpts)}`);
770
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
771
+ try {
772
+ const result = yield httpClient.request(reqOpts);
773
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
774
+ }
775
+ catch (err) {
776
+ const transformedError = sdkTransformError(err, {
777
+ spreadPathsToArguments: {},
778
+ explicitPathsToArguments: {
779
+ categoryId: '$[0]',
780
+ eventId: '$[1].eventId',
781
+ beforeEventId: '$[1].beforeEventId',
782
+ afterEventId: '$[1].afterEventId',
783
+ },
784
+ singleArgumentUnchanged: false,
785
+ }, ['categoryId', 'options']);
786
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
787
+ throw transformedError;
788
+ }
789
+ });
790
+ }
791
+ //# sourceMappingURL=events-v1-category.universal.js.map