@wix/events 1.0.11 → 1.0.13

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 (121) hide show
  1. package/build/cjs/index.d.ts +5 -0
  2. package/build/cjs/index.js +6 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.d.ts +6 -0
  5. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js +27 -0
  6. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js.map +1 -0
  7. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.d.ts +353 -0
  8. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js +237 -0
  9. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js.map +1 -0
  10. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.public.d.ts +13 -0
  11. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.public.js +63 -0
  12. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.public.js.map +1 -0
  13. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.d.ts +490 -0
  14. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.js +600 -0
  15. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.js.map +1 -0
  16. package/build/cjs/src/events-schedule-v1-schedule-item.http.d.ts +49 -0
  17. package/build/cjs/src/events-schedule-v1-schedule-item.http.js +485 -0
  18. package/build/cjs/src/events-schedule-v1-schedule-item.http.js.map +1 -0
  19. package/build/cjs/src/events-schedule-v1-schedule-item.types.d.ts +318 -0
  20. package/build/cjs/src/events-schedule-v1-schedule-item.types.js +27 -0
  21. package/build/cjs/src/events-schedule-v1-schedule-item.types.js.map +1 -0
  22. package/build/cjs/src/events-v1-category.http.d.ts +35 -0
  23. package/build/cjs/src/events-v1-category.http.js +592 -0
  24. package/build/cjs/src/events-v1-category.http.js.map +1 -0
  25. package/build/cjs/src/events-v1-category.public.d.ts +17 -0
  26. package/build/cjs/src/events-v1-category.public.js +87 -0
  27. package/build/cjs/src/events-v1-category.public.js.map +1 -0
  28. package/build/cjs/src/events-v1-category.types.d.ts +234 -0
  29. package/build/cjs/src/events-v1-category.types.js +27 -0
  30. package/build/cjs/src/events-v1-category.types.js.map +1 -0
  31. package/build/cjs/src/events-v1-category.universal.d.ts +399 -0
  32. package/build/cjs/src/events-v1-category.universal.js +778 -0
  33. package/build/cjs/src/events-v1-category.universal.js.map +1 -0
  34. package/build/cjs/src/events-v1-event.http.d.ts +90 -0
  35. package/build/cjs/src/events-v1-event.http.js +932 -0
  36. package/build/cjs/src/events-v1-event.http.js.map +1 -0
  37. package/build/cjs/src/events-v1-event.public.d.ts +19 -0
  38. package/build/cjs/src/events-v1-event.public.js +112 -0
  39. package/build/cjs/src/events-v1-event.public.js.map +1 -0
  40. package/build/cjs/src/events-v1-event.types.d.ts +1473 -0
  41. package/build/cjs/src/events-v1-event.types.js +198 -0
  42. package/build/cjs/src/events-v1-event.types.js.map +1 -0
  43. package/build/cjs/src/events-v1-event.universal.d.ts +1784 -0
  44. package/build/cjs/src/events-v1-event.universal.js +1130 -0
  45. package/build/cjs/src/events-v1-event.universal.js.map +1 -0
  46. package/build/cjs/src/events-v1-form.http.d.ts +25 -0
  47. package/build/cjs/src/events-v1-form.http.js +431 -0
  48. package/build/cjs/src/events-v1-form.http.js.map +1 -0
  49. package/build/cjs/src/events-v1-form.public.d.ts +11 -0
  50. package/build/cjs/src/events-v1-form.public.js +53 -0
  51. package/build/cjs/src/events-v1-form.public.js.map +1 -0
  52. package/build/cjs/src/events-v1-form.types.d.ts +657 -0
  53. package/build/cjs/src/events-v1-form.types.js +69 -0
  54. package/build/cjs/src/events-v1-form.types.js.map +1 -0
  55. package/build/cjs/src/events-v1-form.universal.d.ts +778 -0
  56. package/build/cjs/src/events-v1-form.universal.js +528 -0
  57. package/build/cjs/src/events-v1-form.universal.js.map +1 -0
  58. package/build/cjs/src/events-v2-policy.universal.d.ts +8 -1
  59. package/build/cjs/src/events-v2-policy.universal.js +8 -1
  60. package/build/cjs/src/events-v2-policy.universal.js.map +1 -1
  61. package/build/es/index.d.ts +5 -0
  62. package/build/es/index.js +5 -0
  63. package/build/es/index.js.map +1 -1
  64. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.d.ts +6 -0
  65. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js +18 -0
  66. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js.map +1 -0
  67. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.d.ts +353 -0
  68. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js +212 -0
  69. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js.map +1 -0
  70. package/build/es/src/events-schedule-v1-schedule-item-schedule.public.d.ts +13 -0
  71. package/build/es/src/events-schedule-v1-schedule-item-schedule.public.js +48 -0
  72. package/build/es/src/events-schedule-v1-schedule-item-schedule.public.js.map +1 -0
  73. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.d.ts +490 -0
  74. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.js +569 -0
  75. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.js.map +1 -0
  76. package/build/es/src/events-schedule-v1-schedule-item.http.d.ts +49 -0
  77. package/build/es/src/events-schedule-v1-schedule-item.http.js +470 -0
  78. package/build/es/src/events-schedule-v1-schedule-item.http.js.map +1 -0
  79. package/build/es/src/events-schedule-v1-schedule-item.types.d.ts +318 -0
  80. package/build/es/src/events-schedule-v1-schedule-item.types.js +24 -0
  81. package/build/es/src/events-schedule-v1-schedule-item.types.js.map +1 -0
  82. package/build/es/src/events-v1-category.http.d.ts +35 -0
  83. package/build/es/src/events-v1-category.http.js +576 -0
  84. package/build/es/src/events-v1-category.http.js.map +1 -0
  85. package/build/es/src/events-v1-category.public.d.ts +17 -0
  86. package/build/es/src/events-v1-category.public.js +68 -0
  87. package/build/es/src/events-v1-category.public.js.map +1 -0
  88. package/build/es/src/events-v1-category.types.d.ts +234 -0
  89. package/build/es/src/events-v1-category.types.js +24 -0
  90. package/build/es/src/events-v1-category.types.js.map +1 -0
  91. package/build/es/src/events-v1-category.universal.d.ts +399 -0
  92. package/build/es/src/events-v1-category.universal.js +743 -0
  93. package/build/es/src/events-v1-category.universal.js.map +1 -0
  94. package/build/es/src/events-v1-event.http.d.ts +90 -0
  95. package/build/es/src/events-v1-event.http.js +914 -0
  96. package/build/es/src/events-v1-event.http.js.map +1 -0
  97. package/build/es/src/events-v1-event.public.d.ts +19 -0
  98. package/build/es/src/events-v1-event.public.js +78 -0
  99. package/build/es/src/events-v1-event.public.js.map +1 -0
  100. package/build/es/src/events-v1-event.types.d.ts +1473 -0
  101. package/build/es/src/events-v1-event.types.js +195 -0
  102. package/build/es/src/events-v1-event.types.js.map +1 -0
  103. package/build/es/src/events-v1-event.universal.d.ts +1784 -0
  104. package/build/es/src/events-v1-event.universal.js +1093 -0
  105. package/build/es/src/events-v1-event.universal.js.map +1 -0
  106. package/build/es/src/events-v1-form.http.d.ts +25 -0
  107. package/build/es/src/events-v1-form.http.js +421 -0
  108. package/build/es/src/events-v1-form.http.js.map +1 -0
  109. package/build/es/src/events-v1-form.public.d.ts +11 -0
  110. package/build/es/src/events-v1-form.public.js +38 -0
  111. package/build/es/src/events-v1-form.public.js.map +1 -0
  112. package/build/es/src/events-v1-form.types.d.ts +657 -0
  113. package/build/es/src/events-v1-form.types.js +66 -0
  114. package/build/es/src/events-v1-form.types.js.map +1 -0
  115. package/build/es/src/events-v1-form.universal.d.ts +778 -0
  116. package/build/es/src/events-v1-form.universal.js +499 -0
  117. package/build/es/src/events-v1-form.universal.js.map +1 -0
  118. package/build/es/src/events-v2-policy.universal.d.ts +8 -1
  119. package/build/es/src/events-v2-policy.universal.js +8 -1
  120. package/build/es/src/events-v2-policy.universal.js.map +1 -1
  121. package/package.json +2 -2
@@ -0,0 +1,932 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bulkDeleteEvents = exports.deleteEvent = exports.bulkCancelEvents = exports.cancelEvent = exports.publishDraftEvent = exports.updateEvent = exports.copyEventV2 = exports.copy = exports.createEventV2 = exports.findEvent = exports.getEvent = exports.listCategoryEvents = exports.listEvents = exports.queryEventsV2 = exports.query = void 0;
4
+ const metro_runtime_1 = require("@wix/metro-runtime");
5
+ const ambassador_1 = require("@wix/metro-runtime/ambassador");
6
+ const metro_runtime_2 = require("@wix/metro-runtime");
7
+ const _address = { geocode: '_addressLocation' };
8
+ const _addressLocation = {
9
+ latitude: 'google.protobuf.DoubleValue',
10
+ longitude: 'google.protobuf.DoubleValue',
11
+ };
12
+ const _bulkCancelEventsRequest = {};
13
+ const _bulkCancelEventsResponse = {};
14
+ const _bulkDeleteEventsRequest = {};
15
+ const _bulkDeleteEventsResponse = {};
16
+ const _cancelEventRequest = {};
17
+ const _cancelEventResponse = { event: '_event' };
18
+ const _category = { createdDate: 'google.protobuf.Timestamp' };
19
+ const _copyEventRequest = {};
20
+ const _copyEventResponse = { event: '_event' };
21
+ const _copyEventV2Request = {
22
+ fields: 'google.protobuf.FieldMask',
23
+ event: '_eventData',
24
+ };
25
+ const _copyEventV2Response = { event: '_event' };
26
+ const _createEventV2Request = { event: '_eventData' };
27
+ const _createEventV2Response = { event: '_event' };
28
+ const _deleteEventRequest = {};
29
+ const _deleteEventResponse = {};
30
+ const _event = {
31
+ created: 'google.protobuf.Timestamp',
32
+ modified: 'google.protobuf.Timestamp',
33
+ location: '_location',
34
+ scheduling: '_scheduling',
35
+ mainImage: '_image',
36
+ registration: '_registration',
37
+ categories: '_category',
38
+ };
39
+ const _eventData = {
40
+ location: '_location',
41
+ scheduleConfig: '_scheduleConfig',
42
+ mainImage: '_image',
43
+ rsvpCollectionConfig: '_rsvpCollectionConfig',
44
+ };
45
+ const _findEventRequest = {};
46
+ const _findEventResponse = { event: '_event' };
47
+ const _getEventRequest = {};
48
+ const _getEventResponse = { event: '_event' };
49
+ const _image = { urlExpirationDate: 'google.protobuf.Timestamp' };
50
+ const _listCategoryEventsRequest = {};
51
+ const _listCategoryEventsResponse = { events: '_event' };
52
+ const _listEventsRequest = {};
53
+ const _listEventsResponse = { events: '_event' };
54
+ const _location = { coordinates: '_mapCoordinates', fullAddress: '_address' };
55
+ const _mapCoordinates = { lat: 'DOUBLE', lng: 'DOUBLE' };
56
+ const _occurrence = {
57
+ startDate: 'google.protobuf.Timestamp',
58
+ endDate: 'google.protobuf.Timestamp',
59
+ };
60
+ const _publishDraftEventRequest = {};
61
+ const _publishDraftEventResponse = { event: '_event' };
62
+ const _queryEventsRequest = {};
63
+ const _queryEventsResponse = { events: '_event' };
64
+ const _queryEventsV2Request = {};
65
+ const _queryEventsV2Response = { events: '_event' };
66
+ const _recurrences = { occurrences: '_occurrence' };
67
+ const _registration = { rsvpCollection: '_rsvpCollection' };
68
+ const _rsvpCollection = { config: '_rsvpCollectionConfig' };
69
+ const _rsvpCollectionConfig = {
70
+ startDate: 'google.protobuf.Timestamp',
71
+ endDate: 'google.protobuf.Timestamp',
72
+ };
73
+ const _scheduleConfig = {
74
+ startDate: 'google.protobuf.Timestamp',
75
+ endDate: 'google.protobuf.Timestamp',
76
+ recurrences: '_recurrences',
77
+ };
78
+ const _scheduling = { config: '_scheduleConfig' };
79
+ const _updateEventRequest = {
80
+ fields: 'google.protobuf.FieldMask',
81
+ event: '_eventData',
82
+ };
83
+ const _updateEventResponse = { event: '_event' };
84
+ function resolveWixEventsEventManagementUrl(opts) {
85
+ const domainToMappings = {
86
+ 'events._base_domain_': [
87
+ {
88
+ srcPath: '',
89
+ destPath: '',
90
+ },
91
+ {
92
+ srcPath: '/_api/wix-events-web',
93
+ destPath: '/api',
94
+ },
95
+ ],
96
+ 'www.wixevents.com': [
97
+ {
98
+ srcPath: '',
99
+ destPath: '',
100
+ },
101
+ {
102
+ srcPath: '/_api/wix-events-web',
103
+ destPath: '/api',
104
+ },
105
+ ],
106
+ 'api._api_base_domain_': [
107
+ {
108
+ srcPath: '/wix-events-web',
109
+ destPath: '',
110
+ },
111
+ ],
112
+ 'events.wixapps.net': [
113
+ {
114
+ srcPath: '/_api/wix-events-web',
115
+ destPath: '/api',
116
+ },
117
+ {
118
+ srcPath: '/events',
119
+ destPath: '',
120
+ },
121
+ ],
122
+ 'www._base_domain_': [
123
+ {
124
+ srcPath: '/_api/wix-events-web',
125
+ destPath: '/api',
126
+ },
127
+ {
128
+ srcPath: '/_api/wix-events-web/v1',
129
+ destPath: '/v1',
130
+ },
131
+ ],
132
+ 'api._base_domain_': [
133
+ {
134
+ srcPath: '/events/v1',
135
+ destPath: '/v1',
136
+ },
137
+ {
138
+ srcPath: '/events/v2',
139
+ destPath: '/v2',
140
+ },
141
+ ],
142
+ 'apps._base_domain_': [
143
+ {
144
+ srcPath: '/_api/wix-events-web',
145
+ destPath: '/api',
146
+ },
147
+ {
148
+ srcPath: '/events',
149
+ destPath: '',
150
+ },
151
+ ],
152
+ 'editor._base_domain_': [
153
+ {
154
+ srcPath: '/_api/wix-events-web/v1',
155
+ destPath: '/v1',
156
+ },
157
+ ],
158
+ 'blocks._base_domain_': [
159
+ {
160
+ srcPath: '/_api/wix-events-web/v1',
161
+ destPath: '/v1',
162
+ },
163
+ ],
164
+ 'create.editorx': [
165
+ {
166
+ srcPath: '/_api/wix-events-web/v1',
167
+ destPath: '/v1',
168
+ },
169
+ ],
170
+ _: [
171
+ {
172
+ srcPath: '/_api/wix-events-web/v1',
173
+ destPath: '/v1',
174
+ },
175
+ {
176
+ srcPath: '/_api/wix-events-web/v2',
177
+ destPath: '/v2',
178
+ },
179
+ ],
180
+ '*.dev.wix-code.com': [
181
+ {
182
+ srcPath: '/_api/wix-events-web/v1',
183
+ destPath: '/v1',
184
+ },
185
+ ],
186
+ '*.pub.wix-code.com': [
187
+ {
188
+ srcPath: '/_api/wix-events-web/v1',
189
+ destPath: '/v1',
190
+ },
191
+ ],
192
+ 'manage._base_domain_': [
193
+ {
194
+ srcPath: '/_api/wix-events-web',
195
+ destPath: '/api',
196
+ },
197
+ {
198
+ srcPath: '/_api/wix-events-web/v1/events',
199
+ destPath: '/v1/events',
200
+ },
201
+ {
202
+ srcPath: '/_api/wix-events-web/v1/categories',
203
+ destPath: '/v1/categories',
204
+ },
205
+ {
206
+ srcPath: '/_api/wix-events-web/v2/events',
207
+ destPath: '/v2/events',
208
+ },
209
+ {
210
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
211
+ destPath: '/v1/bulk/categories',
212
+ },
213
+ {
214
+ srcPath: '/_api/wix-events-web/v1/bulk/events',
215
+ destPath: '/v1/bulk/events',
216
+ },
217
+ {
218
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
219
+ destPath: '/v1/bulk-async/categories',
220
+ },
221
+ {
222
+ srcPath: '/_api/wix-events-web/v1/tickets',
223
+ destPath: '/v1/tickets',
224
+ },
225
+ {
226
+ srcPath: '/events/v1/events',
227
+ destPath: '/v1/events',
228
+ },
229
+ {
230
+ srcPath: '/events/v1/categories',
231
+ destPath: '/v1/categories',
232
+ },
233
+ {
234
+ srcPath: '/events/v1/bulk/categories',
235
+ destPath: '/v1/bulk/categories',
236
+ },
237
+ {
238
+ srcPath: '/events/v1/bulk-async/categories',
239
+ destPath: '/v1/bulk-async/categories',
240
+ },
241
+ {
242
+ srcPath: '/events/v1/bulk/events',
243
+ destPath: '/v1/bulk/events',
244
+ },
245
+ {
246
+ srcPath: '/events/v1/notifications',
247
+ destPath: '/v1/notifications',
248
+ },
249
+ {
250
+ srcPath: '/events/v1/reports',
251
+ destPath: '/v1/reports',
252
+ },
253
+ {
254
+ srcPath: '/events/v1/checkout',
255
+ destPath: '/v1/checkout',
256
+ },
257
+ {
258
+ srcPath: '/events/v1/tickets',
259
+ destPath: '/v1/tickets',
260
+ },
261
+ {
262
+ srcPath: '/events/v1/orders',
263
+ destPath: '/v1/orders',
264
+ },
265
+ {
266
+ srcPath: '/events/v1/site',
267
+ destPath: '/v1/site',
268
+ },
269
+ {
270
+ srcPath: '/events/v1/web',
271
+ destPath: '/v1/web',
272
+ },
273
+ {
274
+ srcPath: '/events/v2/tickets',
275
+ destPath: '/v2/tickets',
276
+ },
277
+ {
278
+ srcPath: '/events/v2/events',
279
+ destPath: '/v2/events',
280
+ },
281
+ ],
282
+ 'www.wixapis.com': [
283
+ {
284
+ srcPath: '/events/v1/events',
285
+ destPath: '/v1/events',
286
+ },
287
+ {
288
+ srcPath: '/events/v1/tickets',
289
+ destPath: '/v1/tickets',
290
+ },
291
+ {
292
+ srcPath: '/events/v1/categories',
293
+ destPath: '/v1/categories',
294
+ },
295
+ {
296
+ srcPath: '/events/v1/orders',
297
+ destPath: '/v1/orders',
298
+ },
299
+ {
300
+ srcPath: '/events/v1/bulk/categories',
301
+ destPath: '/v1/bulk/categories',
302
+ },
303
+ {
304
+ srcPath: '/events/v2/events',
305
+ destPath: '/v2/events',
306
+ },
307
+ {
308
+ srcPath: '/events/v1/bulk-async/categories',
309
+ destPath: '/v1/bulk-async/categories',
310
+ },
311
+ ],
312
+ 'editor-flow.wixapps.net': [
313
+ {
314
+ srcPath: '/_api/wix-events-web/v1',
315
+ destPath: '/v1',
316
+ },
317
+ ],
318
+ 'editor.wixapps.net': [
319
+ {
320
+ srcPath: '/_api/wix-events-web/v1',
321
+ destPath: '/v1',
322
+ },
323
+ {
324
+ srcPath: '/events/v2/events',
325
+ destPath: '/v2/events',
326
+ },
327
+ ],
328
+ };
329
+ return metro_runtime_2.resolveUrl(Object.assign(opts, { domainToMappings }));
330
+ }
331
+ /** Retrieves a list of up to 1,000 events, given the provided [paging](https://dev.wix.com/api/rest/getting-started/pagination), [filtering and sorting](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events). */
332
+ function query(payload) {
333
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_queryEventsRequest, {});
334
+ const { fromJSON: fromRes } = ambassador_1.serializer(_queryEventsResponse, {
335
+ _address,
336
+ _addressLocation,
337
+ _category,
338
+ _event,
339
+ _image,
340
+ _location,
341
+ _mapCoordinates,
342
+ _occurrence,
343
+ _recurrences,
344
+ _registration,
345
+ _rsvpCollection,
346
+ _rsvpCollectionConfig,
347
+ _scheduleConfig,
348
+ _scheduling,
349
+ });
350
+ function __query({ host }) {
351
+ const serializedData = toReq(payload);
352
+ const metadata = {
353
+ method: 'POST',
354
+ url: resolveWixEventsEventManagementUrl({
355
+ protoPath: '/v1/events/query',
356
+ data: serializedData,
357
+ host,
358
+ }),
359
+ data: serializedData,
360
+ transformResponse: fromRes,
361
+ };
362
+ return metadata;
363
+ }
364
+ __query.fromReq = fromReq;
365
+ return __query;
366
+ }
367
+ exports.query = query;
368
+ /**
369
+ * Retrieves a list of up to 1,000 events, given the provided paging, filtering and sorting.
370
+ *
371
+ * ** Important **:
372
+ * - All results are for one specific business, resolved from the request context.
373
+ *
374
+ * Query object support:
375
+ * - `filter` - supported, see [filtering and sorting](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events).
376
+ * - `sort` - supported, see [filtering and sorting](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events).
377
+ * - `paging` - supported, see [paging](https://dev.wix.com/api/rest/getting-started/pagination).
378
+ * - `fields` - not supported.
379
+ * - `fieldsets` - not supported, use request-level `fieldset` instead.
380
+ * - `cursorPaging` - not supported, use offset pagination instead.
381
+ *
382
+ * Defaults:
383
+ * - When filter is not specified, returns all events that caller is authorized to read.
384
+ * - When sorting is not specified, defaults to `created` in `DESC` order.
385
+ */
386
+ function queryEventsV2(payload) {
387
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_queryEventsV2Request, {});
388
+ const { fromJSON: fromRes } = ambassador_1.serializer(_queryEventsV2Response, {
389
+ _address,
390
+ _addressLocation,
391
+ _category,
392
+ _event,
393
+ _image,
394
+ _location,
395
+ _mapCoordinates,
396
+ _occurrence,
397
+ _recurrences,
398
+ _registration,
399
+ _rsvpCollection,
400
+ _rsvpCollectionConfig,
401
+ _scheduleConfig,
402
+ _scheduling,
403
+ });
404
+ function __queryEventsV2({ host }) {
405
+ const serializedData = toReq(payload);
406
+ const metadata = {
407
+ method: 'POST',
408
+ url: resolveWixEventsEventManagementUrl({
409
+ protoPath: '/v2/events/query',
410
+ data: serializedData,
411
+ host,
412
+ }),
413
+ data: serializedData,
414
+ transformResponse: fromRes,
415
+ };
416
+ return metadata;
417
+ }
418
+ __queryEventsV2.fromReq = fromReq;
419
+ return __queryEventsV2;
420
+ }
421
+ exports.queryEventsV2 = queryEventsV2;
422
+ /** Retrieves a list of up to 100 events, given the provided [paging](https://dev.wix.com/api/rest/getting-started/pagination), [filtering & sorting](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events). */
423
+ function listEvents(payload) {
424
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_listEventsRequest, {});
425
+ const { fromJSON: fromRes } = ambassador_1.serializer(_listEventsResponse, {
426
+ _address,
427
+ _addressLocation,
428
+ _category,
429
+ _event,
430
+ _image,
431
+ _location,
432
+ _mapCoordinates,
433
+ _occurrence,
434
+ _recurrences,
435
+ _registration,
436
+ _rsvpCollection,
437
+ _rsvpCollectionConfig,
438
+ _scheduleConfig,
439
+ _scheduling,
440
+ });
441
+ function __listEvents({ host }) {
442
+ const serializedData = toReq(payload);
443
+ const metadata = {
444
+ method: 'GET',
445
+ url: resolveWixEventsEventManagementUrl({
446
+ protoPath: '/v1/events',
447
+ data: serializedData,
448
+ host,
449
+ }),
450
+ params: metro_runtime_1.toURLSearchParams(serializedData),
451
+ transformResponse: fromRes,
452
+ };
453
+ return metadata;
454
+ }
455
+ __listEvents.fromReq = fromReq;
456
+ return __listEvents;
457
+ }
458
+ exports.listEvents = listEvents;
459
+ /**
460
+ * Retrieves a list of up to 100 events, given the provided [paging](https://dev.wix.com/api/rest/getting-started/pagination) and category_id.
461
+ * Events are sorted by the sort index defined by CategoryManagement.
462
+ */
463
+ function listCategoryEvents(payload) {
464
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_listCategoryEventsRequest, {});
465
+ const { fromJSON: fromRes } = ambassador_1.serializer(_listCategoryEventsResponse, {
466
+ _address,
467
+ _addressLocation,
468
+ _category,
469
+ _event,
470
+ _image,
471
+ _location,
472
+ _mapCoordinates,
473
+ _occurrence,
474
+ _recurrences,
475
+ _registration,
476
+ _rsvpCollection,
477
+ _rsvpCollectionConfig,
478
+ _scheduleConfig,
479
+ _scheduling,
480
+ });
481
+ function __listCategoryEvents({ host }) {
482
+ const serializedData = toReq(payload);
483
+ const metadata = {
484
+ method: 'GET',
485
+ url: resolveWixEventsEventManagementUrl({
486
+ protoPath: '/v1/events/category/{categoryId}',
487
+ data: serializedData,
488
+ host,
489
+ }),
490
+ params: metro_runtime_1.toURLSearchParams(serializedData),
491
+ transformResponse: fromRes,
492
+ };
493
+ return metadata;
494
+ }
495
+ __listCategoryEvents.fromReq = fromReq;
496
+ return __listCategoryEvents;
497
+ }
498
+ exports.listCategoryEvents = listCategoryEvents;
499
+ /** Retrieves an event by ID or URL slug. */
500
+ function getEvent(payload) {
501
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_getEventRequest, {});
502
+ const { fromJSON: fromRes } = ambassador_1.serializer(_getEventResponse, {
503
+ _address,
504
+ _addressLocation,
505
+ _category,
506
+ _event,
507
+ _image,
508
+ _location,
509
+ _mapCoordinates,
510
+ _occurrence,
511
+ _recurrences,
512
+ _registration,
513
+ _rsvpCollection,
514
+ _rsvpCollectionConfig,
515
+ _scheduleConfig,
516
+ _scheduling,
517
+ });
518
+ function __getEvent({ host }) {
519
+ const serializedData = toReq(payload);
520
+ const metadata = {
521
+ method: 'GET',
522
+ url: resolveWixEventsEventManagementUrl({
523
+ protoPath: '/v1/events/event',
524
+ data: serializedData,
525
+ host,
526
+ }),
527
+ params: metro_runtime_1.toURLSearchParams(serializedData),
528
+ transformResponse: fromRes,
529
+ };
530
+ return metadata;
531
+ }
532
+ __getEvent.fromReq = fromReq;
533
+ return __getEvent;
534
+ }
535
+ exports.getEvent = getEvent;
536
+ /**
537
+ * Finds an event by ID or URL slug. In contrast to Get Event endpoint which returns not found error,
538
+ * Find Event returns empty response when an event is not found.
539
+ */
540
+ function findEvent(payload) {
541
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_findEventRequest, {});
542
+ const { fromJSON: fromRes } = ambassador_1.serializer(_findEventResponse, {
543
+ _address,
544
+ _addressLocation,
545
+ _category,
546
+ _event,
547
+ _image,
548
+ _location,
549
+ _mapCoordinates,
550
+ _occurrence,
551
+ _recurrences,
552
+ _registration,
553
+ _rsvpCollection,
554
+ _rsvpCollectionConfig,
555
+ _scheduleConfig,
556
+ _scheduling,
557
+ });
558
+ function __findEvent({ host }) {
559
+ const serializedData = toReq(payload);
560
+ const metadata = {
561
+ method: 'GET',
562
+ url: resolveWixEventsEventManagementUrl({
563
+ protoPath: '/v1/events/event/find',
564
+ data: serializedData,
565
+ host,
566
+ }),
567
+ params: metro_runtime_1.toURLSearchParams(serializedData),
568
+ transformResponse: fromRes,
569
+ };
570
+ return metadata;
571
+ }
572
+ __findEvent.fromReq = fromReq;
573
+ return __findEvent;
574
+ }
575
+ exports.findEvent = findEvent;
576
+ /**
577
+ * Creates a new event, with a default registration form in the given language.
578
+ * Default registration form includes first name, last name, and email inputs.
579
+ * To learn more about registration form and customize it, see [Registration Form](https://dev.wix.com/api/rest/wix-events/wix-events/registration-form/about-the-registration-form-api).
580
+ * The event is automatically configured to send daily summary reports of new registrations to site business email.
581
+ * RegistrationConfig.initialType is required - allowed value when creating is RSVP or TICKETS.
582
+ */
583
+ function createEventV2(payload) {
584
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_createEventV2Request, {
585
+ _address,
586
+ _addressLocation,
587
+ _eventData,
588
+ _image,
589
+ _location,
590
+ _mapCoordinates,
591
+ _occurrence,
592
+ _recurrences,
593
+ _rsvpCollectionConfig,
594
+ _scheduleConfig,
595
+ });
596
+ const { fromJSON: fromRes } = ambassador_1.serializer(_createEventV2Response, {
597
+ _address,
598
+ _addressLocation,
599
+ _category,
600
+ _event,
601
+ _image,
602
+ _location,
603
+ _mapCoordinates,
604
+ _occurrence,
605
+ _recurrences,
606
+ _registration,
607
+ _rsvpCollection,
608
+ _rsvpCollectionConfig,
609
+ _scheduleConfig,
610
+ _scheduling,
611
+ });
612
+ function __createEventV2({ host }) {
613
+ const serializedData = toReq(payload);
614
+ const metadata = {
615
+ method: 'POST',
616
+ url: resolveWixEventsEventManagementUrl({
617
+ protoPath: '/v2/events',
618
+ data: serializedData,
619
+ host,
620
+ }),
621
+ data: serializedData,
622
+ transformResponse: fromRes,
623
+ };
624
+ return metadata;
625
+ }
626
+ __createEventV2.fromReq = fromReq;
627
+ return __createEventV2;
628
+ }
629
+ exports.createEventV2 = createEventV2;
630
+ /**
631
+ * Copies an event, including its registration form, notifications and tickets configuration - scheduled two weeks from the original event.
632
+ * Multilingual translations are also copied to the new event.
633
+ *
634
+ * When an event with same title already exists, appends (1), (2), ... to it. For example, copying an event titled "My Event" creates "My Event (1)".
635
+ * Very long event titles are cropped: "Daily stand-up ev... (2)".
636
+ */
637
+ function copy(payload) {
638
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_copyEventRequest, {});
639
+ const { fromJSON: fromRes } = ambassador_1.serializer(_copyEventResponse, {
640
+ _address,
641
+ _addressLocation,
642
+ _category,
643
+ _event,
644
+ _image,
645
+ _location,
646
+ _mapCoordinates,
647
+ _occurrence,
648
+ _recurrences,
649
+ _registration,
650
+ _rsvpCollection,
651
+ _rsvpCollectionConfig,
652
+ _scheduleConfig,
653
+ _scheduling,
654
+ });
655
+ function __copy({ host }) {
656
+ const serializedData = toReq(payload);
657
+ const metadata = {
658
+ method: 'POST',
659
+ url: resolveWixEventsEventManagementUrl({
660
+ protoPath: '/v1/events/{eventId}/copy',
661
+ data: serializedData,
662
+ host,
663
+ }),
664
+ data: serializedData,
665
+ transformResponse: fromRes,
666
+ };
667
+ return metadata;
668
+ }
669
+ __copy.fromReq = fromReq;
670
+ return __copy;
671
+ }
672
+ exports.copy = copy;
673
+ /**
674
+ * Copies an event, including its registration form, notifications and tickets configuration - scheduled two weeks from the original event.
675
+ * Multilingual translations are also copied to the new event.
676
+ * Supports partial update of the original event fields. See [Partial Updates](https://dev.wix.com/api/rest/wix-events/wix-events/partial-updates) for more information.
677
+ *
678
+ * When an event with same title already exists, appends (1), (2), ... to it. For example, copying an event titled "My Event" creates "My Event (1)".
679
+ * Very long event titles are cropped: "Daily stand-up ev... (2)".
680
+ */
681
+ function copyEventV2(payload) {
682
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_copyEventV2Request, {
683
+ _address,
684
+ _addressLocation,
685
+ _eventData,
686
+ _image,
687
+ _location,
688
+ _mapCoordinates,
689
+ _occurrence,
690
+ _recurrences,
691
+ _rsvpCollectionConfig,
692
+ _scheduleConfig,
693
+ });
694
+ const { fromJSON: fromRes } = ambassador_1.serializer(_copyEventV2Response, {
695
+ _address,
696
+ _addressLocation,
697
+ _category,
698
+ _event,
699
+ _image,
700
+ _location,
701
+ _mapCoordinates,
702
+ _occurrence,
703
+ _recurrences,
704
+ _registration,
705
+ _rsvpCollection,
706
+ _rsvpCollectionConfig,
707
+ _scheduleConfig,
708
+ _scheduling,
709
+ });
710
+ function __copyEventV2({ host }) {
711
+ const serializedData = toReq(payload);
712
+ const metadata = {
713
+ method: 'POST',
714
+ url: resolveWixEventsEventManagementUrl({
715
+ protoPath: '/v2/events/{id}/copy',
716
+ data: serializedData,
717
+ host,
718
+ }),
719
+ data: serializedData,
720
+ transformResponse: fromRes,
721
+ };
722
+ return metadata;
723
+ }
724
+ __copyEventV2.fromReq = fromReq;
725
+ return __copyEventV2;
726
+ }
727
+ exports.copyEventV2 = copyEventV2;
728
+ /** Updates an event's parameters. See [Partial Updates](https://dev.wix.com/api/rest/wix-events/wix-events/partial-updates) for more information. */
729
+ function updateEvent(payload) {
730
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_updateEventRequest, {
731
+ _address,
732
+ _addressLocation,
733
+ _eventData,
734
+ _image,
735
+ _location,
736
+ _mapCoordinates,
737
+ _occurrence,
738
+ _recurrences,
739
+ _rsvpCollectionConfig,
740
+ _scheduleConfig,
741
+ });
742
+ const { fromJSON: fromRes } = ambassador_1.serializer(_updateEventResponse, {
743
+ _address,
744
+ _addressLocation,
745
+ _category,
746
+ _event,
747
+ _image,
748
+ _location,
749
+ _mapCoordinates,
750
+ _occurrence,
751
+ _recurrences,
752
+ _registration,
753
+ _rsvpCollection,
754
+ _rsvpCollectionConfig,
755
+ _scheduleConfig,
756
+ _scheduling,
757
+ });
758
+ function __updateEvent({ host }) {
759
+ const serializedData = toReq(payload);
760
+ const metadata = {
761
+ method: 'PATCH',
762
+ url: resolveWixEventsEventManagementUrl({
763
+ protoPath: '/v1/events/{id}',
764
+ data: serializedData,
765
+ host,
766
+ }),
767
+ data: serializedData,
768
+ transformResponse: fromRes,
769
+ };
770
+ return metadata;
771
+ }
772
+ __updateEvent.fromReq = fromReq;
773
+ return __updateEvent;
774
+ }
775
+ exports.updateEvent = updateEvent;
776
+ /**
777
+ * Publishes draft event so that it becomes available to site visitors.
778
+ * If recurring events are set, category with state RECURRING_EVENT will be created.
779
+ * All recurring events will be assigned to this category.
780
+ */
781
+ function publishDraftEvent(payload) {
782
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_publishDraftEventRequest, {});
783
+ const { fromJSON: fromRes } = ambassador_1.serializer(_publishDraftEventResponse, {
784
+ _address,
785
+ _addressLocation,
786
+ _category,
787
+ _event,
788
+ _image,
789
+ _location,
790
+ _mapCoordinates,
791
+ _occurrence,
792
+ _recurrences,
793
+ _registration,
794
+ _rsvpCollection,
795
+ _rsvpCollectionConfig,
796
+ _scheduleConfig,
797
+ _scheduling,
798
+ });
799
+ function __publishDraftEvent({ host }) {
800
+ const serializedData = toReq(payload);
801
+ const metadata = {
802
+ method: 'POST',
803
+ url: resolveWixEventsEventManagementUrl({
804
+ protoPath: '/v1/events/{id}/publish',
805
+ data: serializedData,
806
+ host,
807
+ }),
808
+ data: serializedData,
809
+ transformResponse: fromRes,
810
+ };
811
+ return metadata;
812
+ }
813
+ __publishDraftEvent.fromReq = fromReq;
814
+ return __publishDraftEvent;
815
+ }
816
+ exports.publishDraftEvent = publishDraftEvent;
817
+ /**
818
+ * Cancels an event and closes registration.
819
+ * If event cancellation notifications are enabled, canceling an event automatically sends cancellation emails and/or push notifications to registered guests.
820
+ */
821
+ function cancelEvent(payload) {
822
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_cancelEventRequest, {});
823
+ const { fromJSON: fromRes } = ambassador_1.serializer(_cancelEventResponse, {
824
+ _address,
825
+ _addressLocation,
826
+ _category,
827
+ _event,
828
+ _image,
829
+ _location,
830
+ _mapCoordinates,
831
+ _occurrence,
832
+ _recurrences,
833
+ _registration,
834
+ _rsvpCollection,
835
+ _rsvpCollectionConfig,
836
+ _scheduleConfig,
837
+ _scheduling,
838
+ });
839
+ function __cancelEvent({ host }) {
840
+ const serializedData = toReq(payload);
841
+ const metadata = {
842
+ method: 'POST',
843
+ url: resolveWixEventsEventManagementUrl({
844
+ protoPath: '/v1/events/{id}/cancel',
845
+ data: serializedData,
846
+ host,
847
+ }),
848
+ data: serializedData,
849
+ transformResponse: fromRes,
850
+ };
851
+ return metadata;
852
+ }
853
+ __cancelEvent.fromReq = fromReq;
854
+ return __cancelEvent;
855
+ }
856
+ exports.cancelEvent = cancelEvent;
857
+ /**
858
+ * Cancels events by filter.
859
+ * If event cancellation notifications are enabled, canceling an event automatically sends cancellation emails and/or push notifications to registered guests.
860
+ */
861
+ function bulkCancelEvents(payload) {
862
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_bulkCancelEventsRequest, {});
863
+ const { fromJSON: fromRes } = ambassador_1.serializer(_bulkCancelEventsResponse, {});
864
+ function __bulkCancelEvents({ host }) {
865
+ const serializedData = toReq(payload);
866
+ const metadata = {
867
+ method: 'POST',
868
+ url: resolveWixEventsEventManagementUrl({
869
+ protoPath: '/v1/bulk/events/cancel-by-filter',
870
+ data: serializedData,
871
+ host,
872
+ }),
873
+ data: serializedData,
874
+ transformResponse: fromRes,
875
+ };
876
+ return metadata;
877
+ }
878
+ __bulkCancelEvents.fromReq = fromReq;
879
+ return __bulkCancelEvents;
880
+ }
881
+ exports.bulkCancelEvents = bulkCancelEvents;
882
+ /**
883
+ * Deletes an event.
884
+ * Deleted events are not returned via API. The only way to retrieve them is via GDPR access request.
885
+ */
886
+ function deleteEvent(payload) {
887
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_deleteEventRequest, {});
888
+ const { fromJSON: fromRes } = ambassador_1.serializer(_deleteEventResponse, {});
889
+ function __deleteEvent({ host }) {
890
+ const serializedData = toReq(payload);
891
+ const metadata = {
892
+ method: 'DELETE',
893
+ url: resolveWixEventsEventManagementUrl({
894
+ protoPath: '/v1/events/{id}',
895
+ data: serializedData,
896
+ host,
897
+ }),
898
+ params: metro_runtime_1.toURLSearchParams(serializedData),
899
+ transformResponse: fromRes,
900
+ };
901
+ return metadata;
902
+ }
903
+ __deleteEvent.fromReq = fromReq;
904
+ return __deleteEvent;
905
+ }
906
+ exports.deleteEvent = deleteEvent;
907
+ /**
908
+ * Deletes events by filter.
909
+ * Deleted events are not returned via API. The only way to retrieve them is via GDPR access request.
910
+ */
911
+ function bulkDeleteEvents(payload) {
912
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_bulkDeleteEventsRequest, {});
913
+ const { fromJSON: fromRes } = ambassador_1.serializer(_bulkDeleteEventsResponse, {});
914
+ function __bulkDeleteEvents({ host }) {
915
+ const serializedData = toReq(payload);
916
+ const metadata = {
917
+ method: 'POST',
918
+ url: resolveWixEventsEventManagementUrl({
919
+ protoPath: '/v1/bulk/events/delete-by-filter',
920
+ data: serializedData,
921
+ host,
922
+ }),
923
+ data: serializedData,
924
+ transformResponse: fromRes,
925
+ };
926
+ return metadata;
927
+ }
928
+ __bulkDeleteEvents.fromReq = fromReq;
929
+ return __bulkDeleteEvents;
930
+ }
931
+ exports.bulkDeleteEvents = bulkDeleteEvents;
932
+ //# sourceMappingURL=events-v1-event.http.js.map