@wix/events 1.0.146 → 1.0.147
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.
- package/build/cjs/index.d.ts +7 -1
- package/build/cjs/index.js +8 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -1
- package/build/cjs/index.typings.js +8 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +7 -1
- package/build/cjs/meta.js +8 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/events-guests-v1-guest.http.d.ts +23 -0
- package/build/cjs/src/events-guests-v1-guest.http.js +116 -0
- package/build/cjs/src/events-guests-v1-guest.http.js.map +1 -0
- package/build/cjs/src/events-guests-v1-guest.meta.d.ts +13 -0
- package/build/cjs/src/events-guests-v1-guest.meta.js +47 -0
- package/build/cjs/src/events-guests-v1-guest.meta.js.map +1 -0
- package/build/cjs/src/events-guests-v1-guest.public.d.ts +7 -0
- package/build/cjs/src/events-guests-v1-guest.public.js +24 -0
- package/build/cjs/src/events-guests-v1-guest.public.js.map +1 -0
- package/build/cjs/src/events-guests-v1-guest.types.d.ts +800 -0
- package/build/cjs/src/events-guests-v1-guest.types.js +105 -0
- package/build/cjs/src/events-guests-v1-guest.types.js.map +1 -0
- package/build/cjs/src/events-guests-v1-guest.universal.d.ts +864 -0
- package/build/cjs/src/events-guests-v1-guest.universal.js +241 -0
- package/build/cjs/src/events-guests-v1-guest.universal.js.map +1 -0
- package/build/cjs/src/events-v1-order-checkout.http.d.ts +89 -0
- package/build/cjs/src/events-v1-order-checkout.http.js +1073 -0
- package/build/cjs/src/events-v1-order-checkout.http.js.map +1 -0
- package/build/cjs/src/events-v1-order-checkout.meta.d.ts +26 -0
- package/build/cjs/src/events-v1-order-checkout.meta.js +180 -0
- package/build/cjs/src/events-v1-order-checkout.meta.js.map +1 -0
- package/build/cjs/src/events-v1-order-checkout.public.d.ts +15 -0
- package/build/cjs/src/events-v1-order-checkout.public.js +69 -0
- package/build/cjs/src/events-v1-order-checkout.public.js.map +1 -0
- package/build/cjs/src/events-v1-order-checkout.types.d.ts +3626 -0
- package/build/cjs/src/events-v1-order-checkout.types.js +145 -0
- package/build/cjs/src/events-v1-order-checkout.types.js.map +1 -0
- package/build/cjs/src/events-v1-order-checkout.universal.d.ts +3645 -0
- package/build/cjs/src/events-v1-order-checkout.universal.js +824 -0
- package/build/cjs/src/events-v1-order-checkout.universal.js.map +1 -0
- package/build/cjs/src/events-v1-order-orders.http.d.ts +121 -0
- package/build/cjs/src/events-v1-order-orders.http.js +1105 -0
- package/build/cjs/src/events-v1-order-orders.http.js.map +1 -0
- package/build/cjs/src/events-v1-order-orders.meta.d.ts +28 -0
- package/build/cjs/src/events-v1-order-orders.meta.js +142 -0
- package/build/cjs/src/events-v1-order-orders.meta.js.map +1 -0
- package/build/cjs/src/events-v1-order-orders.public.d.ts +220 -0
- package/build/cjs/src/events-v1-order-orders.public.js +57 -0
- package/build/cjs/src/events-v1-order-orders.public.js.map +1 -0
- package/build/cjs/src/events-v1-order-orders.types.d.ts +3626 -0
- package/build/cjs/src/events-v1-order-orders.types.js +145 -0
- package/build/cjs/src/events-v1-order-orders.types.js.map +1 -0
- package/build/cjs/src/events-v1-order-orders.universal.d.ts +3615 -0
- package/build/cjs/src/events-v1-order-orders.universal.js +679 -0
- package/build/cjs/src/events-v1-order-orders.universal.js.map +1 -0
- package/build/cjs/src/events-v1-ticket-definition.http.d.ts +50 -0
- package/build/cjs/src/events-v1-ticket-definition.http.js +413 -0
- package/build/cjs/src/events-v1-ticket-definition.http.js.map +1 -0
- package/build/cjs/src/events-v1-ticket-definition.meta.d.ts +23 -0
- package/build/cjs/src/{events-v3-ticket-definition.meta.js → events-v1-ticket-definition.meta.js} +42 -42
- package/build/cjs/src/events-v1-ticket-definition.meta.js.map +1 -0
- package/build/cjs/src/events-v1-ticket-definition.public.d.ts +61 -0
- package/build/cjs/src/events-v1-ticket-definition.public.js +57 -0
- package/build/cjs/src/events-v1-ticket-definition.public.js.map +1 -0
- package/build/cjs/src/events-v1-ticket-definition.types.d.ts +725 -0
- package/build/cjs/src/events-v1-ticket-definition.types.js +63 -0
- package/build/cjs/src/events-v1-ticket-definition.types.js.map +1 -0
- package/build/cjs/src/events-v1-ticket-definition.universal.d.ts +960 -0
- package/build/cjs/src/events-v1-ticket-definition.universal.js +618 -0
- package/build/cjs/src/events-v1-ticket-definition.universal.js.map +1 -0
- package/build/cjs/src/events-v1-ticket.http.d.ts +44 -0
- package/build/cjs/src/events-v1-ticket.http.js +570 -0
- package/build/cjs/src/events-v1-ticket.http.js.map +1 -0
- package/build/cjs/src/events-v1-ticket.meta.d.ts +28 -0
- package/build/cjs/src/events-v1-ticket.meta.js +142 -0
- package/build/cjs/src/events-v1-ticket.meta.js.map +1 -0
- package/build/cjs/src/events-v1-ticket.public.d.ts +45 -0
- package/build/cjs/src/events-v1-ticket.public.js +48 -0
- package/build/cjs/src/events-v1-ticket.public.js.map +1 -0
- package/build/cjs/src/events-v1-ticket.types.d.ts +791 -0
- package/build/cjs/src/events-v1-ticket.types.js +76 -0
- package/build/cjs/src/events-v1-ticket.types.js.map +1 -0
- package/build/cjs/src/events-v1-ticket.universal.d.ts +892 -0
- package/build/cjs/src/events-v1-ticket.universal.js +621 -0
- package/build/cjs/src/events-v1-ticket.universal.js.map +1 -0
- package/build/cjs/src/events-v2-policy.http.d.ts +80 -0
- package/build/cjs/src/events-v2-policy.http.js +308 -0
- package/build/cjs/src/events-v2-policy.http.js.map +1 -0
- package/build/cjs/src/events-v2-policy.meta.d.ts +24 -0
- package/build/cjs/src/events-v2-policy.meta.js +142 -0
- package/build/cjs/src/events-v2-policy.meta.js.map +1 -0
- package/build/cjs/src/events-v2-policy.public.d.ts +25 -0
- package/build/cjs/src/events-v2-policy.public.js +48 -0
- package/build/cjs/src/events-v2-policy.public.js.map +1 -0
- package/build/cjs/src/events-v2-policy.types.d.ts +405 -0
- package/build/cjs/src/events-v2-policy.types.js +56 -0
- package/build/cjs/src/events-v2-policy.types.js.map +1 -0
- package/build/cjs/src/events-v2-policy.universal.d.ts +654 -0
- package/build/cjs/src/events-v2-policy.universal.js +539 -0
- package/build/cjs/src/events-v2-policy.universal.js.map +1 -0
- package/build/cjs/src/events-v3-event.http.d.ts +69 -0
- package/build/cjs/src/events-v3-event.http.js +661 -0
- package/build/cjs/src/events-v3-event.http.js.map +1 -0
- package/build/cjs/src/events-v3-event.meta.d.ts +39 -0
- package/build/cjs/src/events-v3-event.meta.js +275 -0
- package/build/cjs/src/events-v3-event.meta.js.map +1 -0
- package/build/cjs/src/events-v3-event.public.d.ts +566 -0
- package/build/cjs/src/events-v3-event.public.js +106 -0
- package/build/cjs/src/events-v3-event.public.js.map +1 -0
- package/build/cjs/src/events-v3-event.types.d.ts +3611 -0
- package/build/cjs/src/events-v3-event.types.js +261 -0
- package/build/cjs/src/events-v3-event.types.js.map +1 -0
- package/build/cjs/src/events-v3-event.universal.d.ts +3779 -0
- package/build/cjs/src/events-v3-event.universal.js +1165 -0
- package/build/cjs/src/events-v3-event.universal.js.map +1 -0
- package/build/es/index.d.ts +7 -1
- package/build/es/index.js +7 -1
- package/build/es/index.js.map +1 -1
- package/build/es/index.typings.d.ts +7 -1
- package/build/es/index.typings.js +7 -1
- package/build/es/index.typings.js.map +1 -1
- package/build/es/meta.d.ts +7 -1
- package/build/es/meta.js +7 -1
- package/build/es/meta.js.map +1 -1
- package/build/es/src/events-guests-v1-guest.http.d.ts +23 -0
- package/build/es/src/events-guests-v1-guest.http.js +112 -0
- package/build/es/src/events-guests-v1-guest.http.js.map +1 -0
- package/build/es/src/events-guests-v1-guest.meta.d.ts +13 -0
- package/build/es/src/events-guests-v1-guest.meta.js +20 -0
- package/build/es/src/events-guests-v1-guest.meta.js.map +1 -0
- package/build/es/src/events-guests-v1-guest.public.d.ts +7 -0
- package/build/es/src/events-guests-v1-guest.public.js +9 -0
- package/build/es/src/events-guests-v1-guest.public.js.map +1 -0
- package/build/es/src/events-guests-v1-guest.types.d.ts +800 -0
- package/build/es/src/events-guests-v1-guest.types.js +102 -0
- package/build/es/src/events-guests-v1-guest.types.js.map +1 -0
- package/build/es/src/events-guests-v1-guest.universal.d.ts +864 -0
- package/build/es/src/events-guests-v1-guest.universal.js +214 -0
- package/build/es/src/events-guests-v1-guest.universal.js.map +1 -0
- package/build/es/src/events-v1-order-checkout.http.d.ts +89 -0
- package/build/es/src/events-v1-order-checkout.http.js +1056 -0
- package/build/es/src/events-v1-order-checkout.http.js.map +1 -0
- package/build/es/src/events-v1-order-checkout.meta.d.ts +26 -0
- package/build/es/src/events-v1-order-checkout.meta.js +146 -0
- package/build/es/src/events-v1-order-checkout.meta.js.map +1 -0
- package/build/es/src/events-v1-order-checkout.public.d.ts +15 -0
- package/build/es/src/events-v1-order-checkout.public.js +44 -0
- package/build/es/src/events-v1-order-checkout.public.js.map +1 -0
- package/build/es/src/events-v1-order-checkout.types.d.ts +3626 -0
- package/build/es/src/events-v1-order-checkout.types.js +142 -0
- package/build/es/src/events-v1-order-checkout.types.js.map +1 -0
- package/build/es/src/events-v1-order-checkout.universal.d.ts +3645 -0
- package/build/es/src/events-v1-order-checkout.universal.js +790 -0
- package/build/es/src/events-v1-order-checkout.universal.js.map +1 -0
- package/build/es/src/events-v1-order-orders.http.d.ts +121 -0
- package/build/es/src/events-v1-order-orders.http.js +1088 -0
- package/build/es/src/events-v1-order-orders.http.js.map +1 -0
- package/build/es/src/events-v1-order-orders.meta.d.ts +28 -0
- package/build/es/src/events-v1-order-orders.meta.js +110 -0
- package/build/es/src/events-v1-order-orders.meta.js.map +1 -0
- package/build/es/src/events-v1-order-orders.public.d.ts +220 -0
- package/build/es/src/events-v1-order-orders.public.js +34 -0
- package/build/es/src/events-v1-order-orders.public.js.map +1 -0
- package/build/es/src/events-v1-order-orders.types.d.ts +3626 -0
- package/build/es/src/events-v1-order-orders.types.js +142 -0
- package/build/es/src/events-v1-order-orders.types.js.map +1 -0
- package/build/es/src/events-v1-order-orders.universal.d.ts +3615 -0
- package/build/es/src/events-v1-order-orders.universal.js +647 -0
- package/build/es/src/events-v1-order-orders.universal.js.map +1 -0
- package/build/es/src/events-v1-ticket-definition.http.d.ts +50 -0
- package/build/es/src/events-v1-ticket-definition.http.js +403 -0
- package/build/es/src/events-v1-ticket-definition.http.js.map +1 -0
- package/build/es/src/events-v1-ticket-definition.meta.d.ts +23 -0
- package/build/es/src/{events-v3-ticket-definition.meta.js → events-v1-ticket-definition.meta.js} +35 -35
- package/build/es/src/events-v1-ticket-definition.meta.js.map +1 -0
- package/build/es/src/events-v1-ticket-definition.public.d.ts +61 -0
- package/build/es/src/events-v1-ticket-definition.public.js +39 -0
- package/build/es/src/events-v1-ticket-definition.public.js.map +1 -0
- package/build/es/src/events-v1-ticket-definition.types.d.ts +725 -0
- package/build/es/src/events-v1-ticket-definition.types.js +60 -0
- package/build/es/src/events-v1-ticket-definition.types.js.map +1 -0
- package/build/es/src/events-v1-ticket-definition.universal.d.ts +960 -0
- package/build/es/src/events-v1-ticket-definition.universal.js +585 -0
- package/build/es/src/events-v1-ticket-definition.universal.js.map +1 -0
- package/build/es/src/events-v1-ticket.http.d.ts +44 -0
- package/build/es/src/events-v1-ticket.http.js +561 -0
- package/build/es/src/events-v1-ticket.http.js.map +1 -0
- package/build/es/src/events-v1-ticket.meta.d.ts +28 -0
- package/build/es/src/events-v1-ticket.meta.js +110 -0
- package/build/es/src/events-v1-ticket.meta.js.map +1 -0
- package/build/es/src/events-v1-ticket.public.d.ts +45 -0
- package/build/es/src/events-v1-ticket.public.js +34 -0
- package/build/es/src/events-v1-ticket.public.js.map +1 -0
- package/build/es/src/events-v1-ticket.types.d.ts +791 -0
- package/build/es/src/events-v1-ticket.types.js +73 -0
- package/build/es/src/events-v1-ticket.types.js.map +1 -0
- package/build/es/src/events-v1-ticket.universal.d.ts +892 -0
- package/build/es/src/events-v1-ticket.universal.js +589 -0
- package/build/es/src/events-v1-ticket.universal.js.map +1 -0
- package/build/es/src/events-v2-policy.http.d.ts +80 -0
- package/build/es/src/events-v2-policy.http.js +299 -0
- package/build/es/src/events-v2-policy.http.js.map +1 -0
- package/build/es/src/events-v2-policy.meta.d.ts +24 -0
- package/build/es/src/events-v2-policy.meta.js +110 -0
- package/build/es/src/events-v2-policy.meta.js.map +1 -0
- package/build/es/src/events-v2-policy.public.d.ts +25 -0
- package/build/es/src/events-v2-policy.public.js +34 -0
- package/build/es/src/events-v2-policy.public.js.map +1 -0
- package/build/es/src/events-v2-policy.types.d.ts +405 -0
- package/build/es/src/events-v2-policy.types.js +53 -0
- package/build/es/src/events-v2-policy.types.js.map +1 -0
- package/build/es/src/events-v2-policy.universal.d.ts +654 -0
- package/build/es/src/events-v2-policy.universal.js +507 -0
- package/build/es/src/events-v2-policy.universal.js.map +1 -0
- package/build/es/src/events-v3-event.http.d.ts +69 -0
- package/build/es/src/events-v3-event.http.js +645 -0
- package/build/es/src/events-v3-event.http.js.map +1 -0
- package/build/es/src/events-v3-event.meta.d.ts +39 -0
- package/build/es/src/events-v3-event.meta.js +236 -0
- package/build/es/src/events-v3-event.meta.js.map +1 -0
- package/build/es/src/events-v3-event.public.d.ts +566 -0
- package/build/es/src/events-v3-event.public.js +69 -0
- package/build/es/src/events-v3-event.public.js.map +1 -0
- package/build/es/src/events-v3-event.types.d.ts +3611 -0
- package/build/es/src/events-v3-event.types.js +258 -0
- package/build/es/src/events-v3-event.types.js.map +1 -0
- package/build/es/src/events-v3-event.universal.d.ts +3779 -0
- package/build/es/src/events-v3-event.universal.js +1126 -0
- package/build/es/src/events-v3-event.universal.js.map +1 -0
- package/package.json +2 -2
- package/build/cjs/src/events-v3-ticket-definition.http.d.ts +0 -33
- package/build/cjs/src/events-v3-ticket-definition.http.js +0 -271
- package/build/cjs/src/events-v3-ticket-definition.http.js.map +0 -1
- package/build/cjs/src/events-v3-ticket-definition.meta.d.ts +0 -25
- package/build/cjs/src/events-v3-ticket-definition.meta.js.map +0 -1
- package/build/cjs/src/events-v3-ticket-definition.public.d.ts +0 -98
- package/build/cjs/src/events-v3-ticket-definition.public.js +0 -63
- package/build/cjs/src/events-v3-ticket-definition.public.js.map +0 -1
- package/build/cjs/src/events-v3-ticket-definition.types.d.ts +0 -1265
- package/build/cjs/src/events-v3-ticket-definition.types.js +0 -195
- package/build/cjs/src/events-v3-ticket-definition.types.js.map +0 -1
- package/build/cjs/src/events-v3-ticket-definition.universal.d.ts +0 -1449
- package/build/cjs/src/events-v3-ticket-definition.universal.js +0 -698
- package/build/cjs/src/events-v3-ticket-definition.universal.js.map +0 -1
- package/build/es/src/events-v3-ticket-definition.http.d.ts +0 -33
- package/build/es/src/events-v3-ticket-definition.http.js +0 -261
- package/build/es/src/events-v3-ticket-definition.http.js.map +0 -1
- package/build/es/src/events-v3-ticket-definition.meta.d.ts +0 -25
- package/build/es/src/events-v3-ticket-definition.meta.js.map +0 -1
- package/build/es/src/events-v3-ticket-definition.public.d.ts +0 -98
- package/build/es/src/events-v3-ticket-definition.public.js +0 -39
- package/build/es/src/events-v3-ticket-definition.public.js.map +0 -1
- package/build/es/src/events-v3-ticket-definition.types.d.ts +0 -1265
- package/build/es/src/events-v3-ticket-definition.types.js +0 -192
- package/build/es/src/events-v3-ticket-definition.types.js.map +0 -1
- package/build/es/src/events-v3-ticket-definition.universal.d.ts +0 -1449
- package/build/es/src/events-v3-ticket-definition.universal.js +0 -665
- package/build/es/src/events-v3-ticket-definition.universal.js.map +0 -1
|
@@ -0,0 +1,1165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.findEvent = exports.getEventBySlug = exports.getEvent = exports.countEventsByStatus = exports.queryEvents = exports.bulkDeleteEventsByFilter = exports.deleteEvent = exports.bulkCancelEventsByFilter = exports.cancelEvent = exports.publishDraftEvent = exports.updateEvent = exports.cloneEvent = exports.createEvent = exports.EventStatus = exports.EventsRecurrenceStatusStatus = exports.SubdivisionType = exports.LocationLocationType = exports.Relation = exports.SortOrder = exports.RequestedFields = exports.Type = exports.ConferenceTypeType = exports.ValueType = exports.InputControlType = exports.InitialRegistrationTypeType = exports.GuestTypeType = exports.TaxType = exports.ResponseType = exports.RegistrationStatusStatus = exports.RegistrationTypeType = exports.Status = exports.RecurrenceStatusStatus = exports.SubdivisionSubdivisionType = exports.LocationType = exports.__debug = void 0;
|
|
36
|
+
const velo_1 = require("@wix/metro-runtime/velo");
|
|
37
|
+
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
38
|
+
const ambassadorWixEventsV3Event = __importStar(require("./events-v3-event.http"));
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
const motion_edm_autogen_query_wrapper_1 = require("@wix/motion-edm-autogen-query-wrapper");
|
|
41
|
+
let __verbose = false;
|
|
42
|
+
function __log(...args) {
|
|
43
|
+
__verbose && console.log(...args);
|
|
44
|
+
}
|
|
45
|
+
function __inspect(obj) {
|
|
46
|
+
return obj;
|
|
47
|
+
}
|
|
48
|
+
exports.__debug = {
|
|
49
|
+
verboseLogging: {
|
|
50
|
+
on: () => (__verbose = true),
|
|
51
|
+
off: () => (__verbose = false),
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
const _toVeloEntity = '$';
|
|
55
|
+
const _fromVeloEntity = '$';
|
|
56
|
+
var LocationType;
|
|
57
|
+
(function (LocationType) {
|
|
58
|
+
/** Default value. This value is unused. */
|
|
59
|
+
LocationType["UNKNOWN_LOCATION"] = "UNKNOWN_LOCATION";
|
|
60
|
+
LocationType["VENUE"] = "VENUE";
|
|
61
|
+
LocationType["ONLINE"] = "ONLINE";
|
|
62
|
+
})(LocationType || (exports.LocationType = LocationType = {}));
|
|
63
|
+
var SubdivisionSubdivisionType;
|
|
64
|
+
(function (SubdivisionSubdivisionType) {
|
|
65
|
+
SubdivisionSubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
|
|
66
|
+
/** State */
|
|
67
|
+
SubdivisionSubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
|
|
68
|
+
/** County */
|
|
69
|
+
SubdivisionSubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
|
|
70
|
+
/** City/town */
|
|
71
|
+
SubdivisionSubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
|
|
72
|
+
/** Neighborhood/quarter */
|
|
73
|
+
SubdivisionSubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
|
|
74
|
+
/** Street/block */
|
|
75
|
+
SubdivisionSubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
|
|
76
|
+
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
77
|
+
SubdivisionSubdivisionType["COUNTRY"] = "COUNTRY";
|
|
78
|
+
})(SubdivisionSubdivisionType || (exports.SubdivisionSubdivisionType = SubdivisionSubdivisionType = {}));
|
|
79
|
+
var RecurrenceStatusStatus;
|
|
80
|
+
(function (RecurrenceStatusStatus) {
|
|
81
|
+
/** Default value. This value is unused. */
|
|
82
|
+
RecurrenceStatusStatus["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
83
|
+
/** Event happens only once. */
|
|
84
|
+
RecurrenceStatusStatus["ONE_TIME"] = "ONE_TIME";
|
|
85
|
+
/** Event is repeating and has a list of scheduled repetitions. */
|
|
86
|
+
RecurrenceStatusStatus["RECURRING"] = "RECURRING";
|
|
87
|
+
/** An upcoming event from the list of repetitions. */
|
|
88
|
+
RecurrenceStatusStatus["RECURRING_UPCOMING"] = "RECURRING_UPCOMING";
|
|
89
|
+
/** Latest ended event from the list of repetitions. */
|
|
90
|
+
RecurrenceStatusStatus["RECURRING_RECENTLY_ENDED"] = "RECURRING_RECENTLY_ENDED";
|
|
91
|
+
/** Latest cancelled event from the list of repetitions. */
|
|
92
|
+
RecurrenceStatusStatus["RECURRING_RECENTLY_CANCELED"] = "RECURRING_RECENTLY_CANCELED";
|
|
93
|
+
})(RecurrenceStatusStatus || (exports.RecurrenceStatusStatus = RecurrenceStatusStatus = {}));
|
|
94
|
+
var Status;
|
|
95
|
+
(function (Status) {
|
|
96
|
+
/** Default value. This value is unused */
|
|
97
|
+
Status["UNKNOWN_EVENT_STATUS"] = "UNKNOWN_EVENT_STATUS";
|
|
98
|
+
/** Event is public and scheduled to start */
|
|
99
|
+
Status["UPCOMING"] = "UPCOMING";
|
|
100
|
+
/** Event has started */
|
|
101
|
+
Status["STARTED"] = "STARTED";
|
|
102
|
+
/** Event has ended */
|
|
103
|
+
Status["ENDED"] = "ENDED";
|
|
104
|
+
/** Event is canceled */
|
|
105
|
+
Status["CANCELED"] = "CANCELED";
|
|
106
|
+
/** Event is not public */
|
|
107
|
+
Status["DRAFT"] = "DRAFT";
|
|
108
|
+
})(Status || (exports.Status = Status = {}));
|
|
109
|
+
var RegistrationTypeType;
|
|
110
|
+
(function (RegistrationTypeType) {
|
|
111
|
+
/** Default value. This value is unused */
|
|
112
|
+
RegistrationTypeType["UNKNOWN_REGISTRATION_TYPE"] = "UNKNOWN_REGISTRATION_TYPE";
|
|
113
|
+
/** Registration via RSVP */
|
|
114
|
+
RegistrationTypeType["RSVP"] = "RSVP";
|
|
115
|
+
/** Registration via ticket purchase */
|
|
116
|
+
RegistrationTypeType["TICKETING"] = "TICKETING";
|
|
117
|
+
/** External registration */
|
|
118
|
+
RegistrationTypeType["EXTERNAL"] = "EXTERNAL";
|
|
119
|
+
/** Registration not available */
|
|
120
|
+
RegistrationTypeType["NONE"] = "NONE";
|
|
121
|
+
})(RegistrationTypeType || (exports.RegistrationTypeType = RegistrationTypeType = {}));
|
|
122
|
+
var RegistrationStatusStatus;
|
|
123
|
+
(function (RegistrationStatusStatus) {
|
|
124
|
+
/** Registration status is not applicable */
|
|
125
|
+
RegistrationStatusStatus["UNKNOWN_REGISTRATION_STATUS"] = "UNKNOWN_REGISTRATION_STATUS";
|
|
126
|
+
/** Registration to event is closed */
|
|
127
|
+
RegistrationStatusStatus["CLOSED_AUTOMATICALLY"] = "CLOSED_AUTOMATICALLY";
|
|
128
|
+
/** Registration to event is closed manually */
|
|
129
|
+
RegistrationStatusStatus["CLOSED_MANUALLY"] = "CLOSED_MANUALLY";
|
|
130
|
+
/** Registration is open via RSVP */
|
|
131
|
+
RegistrationStatusStatus["OPEN_RSVP"] = "OPEN_RSVP";
|
|
132
|
+
/** Registration to event waitlist is open via RSVP */
|
|
133
|
+
RegistrationStatusStatus["OPEN_RSVP_WAITLIST_ONLY"] = "OPEN_RSVP_WAITLIST_ONLY";
|
|
134
|
+
/** Registration is open via ticket purchase */
|
|
135
|
+
RegistrationStatusStatus["OPEN_TICKETS"] = "OPEN_TICKETS";
|
|
136
|
+
/** Registration is open via external URL */
|
|
137
|
+
RegistrationStatusStatus["OPEN_EXTERNAL"] = "OPEN_EXTERNAL";
|
|
138
|
+
/** Registration will be open via RSVP */
|
|
139
|
+
RegistrationStatusStatus["SCHEDULED_RSVP"] = "SCHEDULED_RSVP";
|
|
140
|
+
})(RegistrationStatusStatus || (exports.RegistrationStatusStatus = RegistrationStatusStatus = {}));
|
|
141
|
+
var ResponseType;
|
|
142
|
+
(function (ResponseType) {
|
|
143
|
+
/** Default value. This value is unused. */
|
|
144
|
+
ResponseType["UNKNOWN_RESPONSE_TYPE"] = "UNKNOWN_RESPONSE_TYPE";
|
|
145
|
+
/** Only a **Yes** answer is available for the registration. */
|
|
146
|
+
ResponseType["YES_ONLY"] = "YES_ONLY";
|
|
147
|
+
/** *Yes** and **No** answers are available for the registration. */
|
|
148
|
+
ResponseType["YES_AND_NO"] = "YES_AND_NO";
|
|
149
|
+
})(ResponseType || (exports.ResponseType = ResponseType = {}));
|
|
150
|
+
var TaxType;
|
|
151
|
+
(function (TaxType) {
|
|
152
|
+
/** Default value. This value is unused. */
|
|
153
|
+
TaxType["UNKNOWN_TAX_TYPE"] = "UNKNOWN_TAX_TYPE";
|
|
154
|
+
/** Tax is included in the ticket price */
|
|
155
|
+
TaxType["INCLUDED_IN_PRICE"] = "INCLUDED_IN_PRICE";
|
|
156
|
+
/** Tax is added to the final total at the checkout */
|
|
157
|
+
TaxType["ADDED_AT_CHECKOUT"] = "ADDED_AT_CHECKOUT";
|
|
158
|
+
})(TaxType || (exports.TaxType = TaxType = {}));
|
|
159
|
+
var GuestTypeType;
|
|
160
|
+
(function (GuestTypeType) {
|
|
161
|
+
/** Default value. This value is unused */
|
|
162
|
+
GuestTypeType["UNKNOWN_GUEST_TYPE"] = "UNKNOWN_GUEST_TYPE";
|
|
163
|
+
/** Site visitor or member */
|
|
164
|
+
GuestTypeType["VISITOR_OR_MEMBER"] = "VISITOR_OR_MEMBER";
|
|
165
|
+
/** Site member */
|
|
166
|
+
GuestTypeType["MEMBER"] = "MEMBER";
|
|
167
|
+
})(GuestTypeType || (exports.GuestTypeType = GuestTypeType = {}));
|
|
168
|
+
var InitialRegistrationTypeType;
|
|
169
|
+
(function (InitialRegistrationTypeType) {
|
|
170
|
+
/** Default value. This value is unused */
|
|
171
|
+
InitialRegistrationTypeType["UNKNOWN_INITIAL_REGISTRATION_TYPE"] = "UNKNOWN_INITIAL_REGISTRATION_TYPE";
|
|
172
|
+
/** Registration via RSVP */
|
|
173
|
+
InitialRegistrationTypeType["RSVP"] = "RSVP";
|
|
174
|
+
/** Registration via ticket purchase */
|
|
175
|
+
InitialRegistrationTypeType["TICKETING"] = "TICKETING";
|
|
176
|
+
})(InitialRegistrationTypeType || (exports.InitialRegistrationTypeType = InitialRegistrationTypeType = {}));
|
|
177
|
+
var InputControlType;
|
|
178
|
+
(function (InputControlType) {
|
|
179
|
+
/** Single text value field. */
|
|
180
|
+
InputControlType["INPUT"] = "INPUT";
|
|
181
|
+
/** Single text value field. */
|
|
182
|
+
InputControlType["TEXTAREA"] = "TEXTAREA";
|
|
183
|
+
/** Single-choice field of predefined values. */
|
|
184
|
+
InputControlType["DROPDOWN"] = "DROPDOWN";
|
|
185
|
+
/** Single-choice field of predefined values. */
|
|
186
|
+
InputControlType["RADIO"] = "RADIO";
|
|
187
|
+
/** Multiple-choice field of predefined values. */
|
|
188
|
+
InputControlType["CHECKBOX"] = "CHECKBOX";
|
|
189
|
+
/** First and last name fields. */
|
|
190
|
+
InputControlType["NAME"] = "NAME";
|
|
191
|
+
/** Additional guests and respective guest names fields. */
|
|
192
|
+
InputControlType["GUEST_CONTROL"] = "GUEST_CONTROL";
|
|
193
|
+
/** Single-line address field. */
|
|
194
|
+
InputControlType["ADDRESS_SHORT"] = "ADDRESS_SHORT";
|
|
195
|
+
/** Full address field. */
|
|
196
|
+
InputControlType["ADDRESS_FULL"] = "ADDRESS_FULL";
|
|
197
|
+
/** Year, month and day fields. */
|
|
198
|
+
InputControlType["DATE"] = "DATE";
|
|
199
|
+
})(InputControlType || (exports.InputControlType = InputControlType = {}));
|
|
200
|
+
var ValueType;
|
|
201
|
+
(function (ValueType) {
|
|
202
|
+
ValueType["TEXT"] = "TEXT";
|
|
203
|
+
ValueType["NUMBER"] = "NUMBER";
|
|
204
|
+
ValueType["TEXT_ARRAY"] = "TEXT_ARRAY";
|
|
205
|
+
ValueType["DATE_TIME"] = "DATE_TIME";
|
|
206
|
+
ValueType["ADDRESS"] = "ADDRESS";
|
|
207
|
+
})(ValueType || (exports.ValueType = ValueType = {}));
|
|
208
|
+
var ConferenceTypeType;
|
|
209
|
+
(function (ConferenceTypeType) {
|
|
210
|
+
/** Default value. This value is unused */
|
|
211
|
+
ConferenceTypeType["UNKNOWN_CONFERENCE_TYPE"] = "UNKNOWN_CONFERENCE_TYPE";
|
|
212
|
+
/** Guests can publish and subscribe to video and audio. */
|
|
213
|
+
ConferenceTypeType["MEETING"] = "MEETING";
|
|
214
|
+
/** Guests can only subscribe to video and audio. */
|
|
215
|
+
ConferenceTypeType["WEBINAR"] = "WEBINAR";
|
|
216
|
+
})(ConferenceTypeType || (exports.ConferenceTypeType = ConferenceTypeType = {}));
|
|
217
|
+
var Type;
|
|
218
|
+
(function (Type) {
|
|
219
|
+
/** Created manually by the user. */
|
|
220
|
+
Type["MANUAL"] = "MANUAL";
|
|
221
|
+
/** Created automatically when publishing recurring events. */
|
|
222
|
+
Type["RECURRING_EVENT"] = "RECURRING_EVENT";
|
|
223
|
+
/** Created automatically and used to store component events. */
|
|
224
|
+
Type["COMPONENT"] = "COMPONENT";
|
|
225
|
+
})(Type || (exports.Type = Type = {}));
|
|
226
|
+
var RequestedFields;
|
|
227
|
+
(function (RequestedFields) {
|
|
228
|
+
RequestedFields["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
229
|
+
/** Include `description`, `mainImage` and `calendarLinks` in the response. */
|
|
230
|
+
RequestedFields["DETAILS"] = "DETAILS";
|
|
231
|
+
/** Include `about` event rich text in the response. */
|
|
232
|
+
RequestedFields["TEXTS"] = "TEXTS";
|
|
233
|
+
/** Include `registration` in the response. */
|
|
234
|
+
RequestedFields["REGISTRATION"] = "REGISTRATION";
|
|
235
|
+
/** Include `eventPageUrl` in the response. */
|
|
236
|
+
RequestedFields["URLS"] = "URLS";
|
|
237
|
+
/** Include `form` in the response. */
|
|
238
|
+
RequestedFields["FORM"] = "FORM";
|
|
239
|
+
/** Include `dashboard` in the response. */
|
|
240
|
+
RequestedFields["DASHBOARD"] = "DASHBOARD";
|
|
241
|
+
/** Include `feed` in the response. */
|
|
242
|
+
RequestedFields["FEED"] = "FEED";
|
|
243
|
+
/** Include `onlineConferencing` in the response. */
|
|
244
|
+
RequestedFields["ONLINE_CONFERENCING_SESSION"] = "ONLINE_CONFERENCING_SESSION";
|
|
245
|
+
/** Include `seoSettings` in the response. */
|
|
246
|
+
RequestedFields["SEO_SETTINGS"] = "SEO_SETTINGS";
|
|
247
|
+
/** Include `agendaSettings` in the response. */
|
|
248
|
+
RequestedFields["AGENDA"] = "AGENDA";
|
|
249
|
+
/** Include `categories` in the response. */
|
|
250
|
+
RequestedFields["CATEGORIES"] = "CATEGORIES";
|
|
251
|
+
RequestedFields["CUSTOMIZABLE_TICKETS"] = "CUSTOMIZABLE_TICKETS";
|
|
252
|
+
})(RequestedFields || (exports.RequestedFields = RequestedFields = {}));
|
|
253
|
+
var SortOrder;
|
|
254
|
+
(function (SortOrder) {
|
|
255
|
+
SortOrder["ASC"] = "ASC";
|
|
256
|
+
SortOrder["DESC"] = "DESC";
|
|
257
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
258
|
+
var Relation;
|
|
259
|
+
(function (Relation) {
|
|
260
|
+
/**
|
|
261
|
+
* User is attending the event.
|
|
262
|
+
* User has RSVP with status YES or has ordered tickets.
|
|
263
|
+
*/
|
|
264
|
+
Relation["ATTENDING"] = "ATTENDING";
|
|
265
|
+
})(Relation || (exports.Relation = Relation = {}));
|
|
266
|
+
var LocationLocationType;
|
|
267
|
+
(function (LocationLocationType) {
|
|
268
|
+
LocationLocationType["VENUE"] = "VENUE";
|
|
269
|
+
LocationLocationType["ONLINE"] = "ONLINE";
|
|
270
|
+
})(LocationLocationType || (exports.LocationLocationType = LocationLocationType = {}));
|
|
271
|
+
var SubdivisionType;
|
|
272
|
+
(function (SubdivisionType) {
|
|
273
|
+
SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
|
|
274
|
+
/** State */
|
|
275
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
|
|
276
|
+
/** County */
|
|
277
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
|
|
278
|
+
/** City/town */
|
|
279
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
|
|
280
|
+
/** Neighborhood/quarter */
|
|
281
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
|
|
282
|
+
/** Street/block */
|
|
283
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
|
|
284
|
+
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
285
|
+
SubdivisionType["COUNTRY"] = "COUNTRY";
|
|
286
|
+
})(SubdivisionType || (exports.SubdivisionType = SubdivisionType = {}));
|
|
287
|
+
var EventsRecurrenceStatusStatus;
|
|
288
|
+
(function (EventsRecurrenceStatusStatus) {
|
|
289
|
+
/** Event occurs only once. */
|
|
290
|
+
EventsRecurrenceStatusStatus["ONE_TIME"] = "ONE_TIME";
|
|
291
|
+
/** Event is recurring. */
|
|
292
|
+
EventsRecurrenceStatusStatus["RECURRING"] = "RECURRING";
|
|
293
|
+
/** Marks the next upcoming occurrence of the recurring event. */
|
|
294
|
+
EventsRecurrenceStatusStatus["RECURRING_NEXT"] = "RECURRING_NEXT";
|
|
295
|
+
/** Marks the most recent ended occurrence of the recurring event. */
|
|
296
|
+
EventsRecurrenceStatusStatus["RECURRING_LAST_ENDED"] = "RECURRING_LAST_ENDED";
|
|
297
|
+
/** Marks the most recent canceled occurrence of the recurring event. */
|
|
298
|
+
EventsRecurrenceStatusStatus["RECURRING_LAST_CANCELED"] = "RECURRING_LAST_CANCELED";
|
|
299
|
+
})(EventsRecurrenceStatusStatus || (exports.EventsRecurrenceStatusStatus = EventsRecurrenceStatusStatus = {}));
|
|
300
|
+
var EventStatus;
|
|
301
|
+
(function (EventStatus) {
|
|
302
|
+
/** Event is public and scheduled to start */
|
|
303
|
+
EventStatus["SCHEDULED"] = "SCHEDULED";
|
|
304
|
+
/** Event has started */
|
|
305
|
+
EventStatus["STARTED"] = "STARTED";
|
|
306
|
+
/** Event has ended */
|
|
307
|
+
EventStatus["ENDED"] = "ENDED";
|
|
308
|
+
/** Event was canceled */
|
|
309
|
+
EventStatus["CANCELED"] = "CANCELED";
|
|
310
|
+
/** Event is not public and needs to be published */
|
|
311
|
+
EventStatus["DRAFT"] = "DRAFT";
|
|
312
|
+
})(EventStatus || (exports.EventStatus = EventStatus = {}));
|
|
313
|
+
const _agendaSettings = { pageUrl: 'wix.common.PageUrl' };
|
|
314
|
+
const _bulkCancelEventsByFilterRequest = {};
|
|
315
|
+
const _bulkCancelEventsByFilterResponse = {};
|
|
316
|
+
const _bulkDeleteEventsByFilterRequest = {};
|
|
317
|
+
const _bulkDeleteEventsByFilterResponse = {};
|
|
318
|
+
const _cancelEventRequest = {};
|
|
319
|
+
const _cancelEventResponse = { event: '_event' };
|
|
320
|
+
const _cloneEventRequest = { event: '_event' };
|
|
321
|
+
const _cloneEventResponse = { event: '_event' };
|
|
322
|
+
const _countEventsByStatusRequest = {};
|
|
323
|
+
const _countEventsByStatusResponse = {};
|
|
324
|
+
const _createEventRequest = { event: '_event' };
|
|
325
|
+
const _createEventResponse = { event: '_event' };
|
|
326
|
+
const _deleteEventRequest = {};
|
|
327
|
+
const _deleteEventResponse = {};
|
|
328
|
+
const _event = {
|
|
329
|
+
mainImage: 'wix.common.Image',
|
|
330
|
+
eventPageUrl: 'wix.common.PageUrl',
|
|
331
|
+
location: '_location',
|
|
332
|
+
agendaSettings: '_agendaSettings',
|
|
333
|
+
};
|
|
334
|
+
const _findEventRequest = {};
|
|
335
|
+
const _findEventResponse = { event: '_event' };
|
|
336
|
+
const _getEventBySlugRequest = {};
|
|
337
|
+
const _getEventBySlugResponse = { event: '_event' };
|
|
338
|
+
const _getEventRequest = {};
|
|
339
|
+
const _getEventResponse = { event: '_event' };
|
|
340
|
+
const _location = { address: 'wix.common.Address' };
|
|
341
|
+
const _publishDraftEventRequest = {};
|
|
342
|
+
const _publishDraftEventResponse = { event: '_event' };
|
|
343
|
+
const _queryEventsRequest = {};
|
|
344
|
+
const _queryEventsResponse = { events: '_event' };
|
|
345
|
+
const _updateEventRequest = { event: '_event' };
|
|
346
|
+
const _updateEventResponse = { event: '_event' };
|
|
347
|
+
/**
|
|
348
|
+
* Creates an event. <br> <br>
|
|
349
|
+
* The event includes a default registration form in the selected language, which consists of input fields for first name, last name, and email. See [Registration Form](https://dev.wix.com/api/rest/wix-events/wix-events/registration-form/about-the-registration-form-api) for more information. <br> <br>
|
|
350
|
+
* You can create the event as a draft by setting the `draft` value to `true`. Otherwise, the event is published right away. <br> <br>
|
|
351
|
+
* The event is automatically set up to send daily summary reports of new guests to your business email.
|
|
352
|
+
* @param event - Event data.
|
|
353
|
+
* @public
|
|
354
|
+
* @documentationMaturity preview
|
|
355
|
+
* @requiredField event
|
|
356
|
+
* @requiredField event.dateAndTimeSettings
|
|
357
|
+
* @requiredField event.location
|
|
358
|
+
* @requiredField event.title
|
|
359
|
+
* @permissionScope Manage Events - all permissions
|
|
360
|
+
* @permissionScope Manage Events
|
|
361
|
+
* @applicableIdentity APP
|
|
362
|
+
* @returns Created event.
|
|
363
|
+
*/
|
|
364
|
+
function createEvent(event, options) {
|
|
365
|
+
var _a, _b, _c;
|
|
366
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
367
|
+
const requestTransformation = {
|
|
368
|
+
event: '$[0]',
|
|
369
|
+
draft: '$[1].draft',
|
|
370
|
+
fields: '$[1].fields',
|
|
371
|
+
};
|
|
372
|
+
const responseTransformation = '$.event';
|
|
373
|
+
// @ts-ignore
|
|
374
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
375
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
376
|
+
rootSchema: _createEventRequest,
|
|
377
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
378
|
+
fqdnTransformation: {
|
|
379
|
+
paths: [...['event']],
|
|
380
|
+
transformation: _fromVeloEntity,
|
|
381
|
+
},
|
|
382
|
+
customTransformation: requestTransformation,
|
|
383
|
+
});
|
|
384
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
385
|
+
rootSchema: _createEventResponse,
|
|
386
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
387
|
+
fqdnTransformation: {
|
|
388
|
+
paths: [...['event']],
|
|
389
|
+
transformation: _toVeloEntity,
|
|
390
|
+
},
|
|
391
|
+
customTransformation: responseTransformation,
|
|
392
|
+
});
|
|
393
|
+
const payload = toAmbassadorRequest([event, options]);
|
|
394
|
+
const reqOpts = ambassadorWixEventsV3Event.createEvent(payload);
|
|
395
|
+
__log(`"CreateEvent" sending request with: ${__inspect(reqOpts)}`);
|
|
396
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
397
|
+
try {
|
|
398
|
+
const result = yield httpClient.request(reqOpts);
|
|
399
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
400
|
+
return fromJSON(result.data);
|
|
401
|
+
}
|
|
402
|
+
catch (err) {
|
|
403
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
404
|
+
spreadPathsToArguments: {},
|
|
405
|
+
explicitPathsToArguments: {
|
|
406
|
+
event: '$[0]',
|
|
407
|
+
draft: '$[1].draft',
|
|
408
|
+
fields: '$[1].fields',
|
|
409
|
+
},
|
|
410
|
+
singleArgumentUnchanged: false,
|
|
411
|
+
}, ['event', 'options']);
|
|
412
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
413
|
+
throw transformedError;
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
exports.createEvent = createEvent;
|
|
418
|
+
/**
|
|
419
|
+
* Clones an event, including the registration form, notifications, multilingual translations and ticket configuration from the original event. <br> <br>
|
|
420
|
+
* The new event's date is automatically set to 14 days from the original event date. <br> <br>
|
|
421
|
+
* If an event with the same title already exists, the new event's title gets a sequence number. For example, if you clone an event named "Leather Crafting 101", the new event's title is "Leather Crafting 101 (1)". <br> <br>
|
|
422
|
+
* You can change the required entity field values while cloning an event. See [Partial Updates](https://dev.wix.com/api/rest/wix-events/wix-events/partial-updates) for more information.
|
|
423
|
+
* @param eventId - Event ID.
|
|
424
|
+
* @public
|
|
425
|
+
* @documentationMaturity preview
|
|
426
|
+
* @requiredField eventId
|
|
427
|
+
* @permissionScope Manage Events - all permissions
|
|
428
|
+
* @permissionScope Manage Events
|
|
429
|
+
* @applicableIdentity APP
|
|
430
|
+
*/
|
|
431
|
+
function cloneEvent(eventId, options) {
|
|
432
|
+
var _a, _b, _c;
|
|
433
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
434
|
+
const requestTransformation = {
|
|
435
|
+
eventId: '$[0]',
|
|
436
|
+
event: '$[1].event',
|
|
437
|
+
draft: '$[1].draft',
|
|
438
|
+
fields: '$[1].fields',
|
|
439
|
+
};
|
|
440
|
+
const responseTransformation = '$';
|
|
441
|
+
// @ts-ignore
|
|
442
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
443
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
444
|
+
rootSchema: _cloneEventRequest,
|
|
445
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
446
|
+
fqdnTransformation: {
|
|
447
|
+
paths: [...['event']],
|
|
448
|
+
transformation: _fromVeloEntity,
|
|
449
|
+
},
|
|
450
|
+
customTransformation: requestTransformation,
|
|
451
|
+
});
|
|
452
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
453
|
+
rootSchema: _cloneEventResponse,
|
|
454
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
455
|
+
fqdnTransformation: {
|
|
456
|
+
paths: [...['event']],
|
|
457
|
+
transformation: _toVeloEntity,
|
|
458
|
+
},
|
|
459
|
+
customTransformation: responseTransformation,
|
|
460
|
+
});
|
|
461
|
+
const payload = toAmbassadorRequest([eventId, options]);
|
|
462
|
+
const reqOpts = ambassadorWixEventsV3Event.cloneEvent(payload);
|
|
463
|
+
__log(`"CloneEvent" sending request with: ${__inspect(reqOpts)}`);
|
|
464
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
465
|
+
try {
|
|
466
|
+
const result = yield httpClient.request(reqOpts);
|
|
467
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
468
|
+
return fromJSON(result.data);
|
|
469
|
+
}
|
|
470
|
+
catch (err) {
|
|
471
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
472
|
+
spreadPathsToArguments: {},
|
|
473
|
+
explicitPathsToArguments: {
|
|
474
|
+
eventId: '$[0]',
|
|
475
|
+
event: '$[1].event',
|
|
476
|
+
draft: '$[1].draft',
|
|
477
|
+
fields: '$[1].fields',
|
|
478
|
+
},
|
|
479
|
+
singleArgumentUnchanged: false,
|
|
480
|
+
}, ['eventId', 'options']);
|
|
481
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
482
|
+
throw transformedError;
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
exports.cloneEvent = cloneEvent;
|
|
487
|
+
/**
|
|
488
|
+
* Updates an event.
|
|
489
|
+
* @param _id - Event ID.
|
|
490
|
+
* @public
|
|
491
|
+
* @documentationMaturity preview
|
|
492
|
+
* @requiredField _id
|
|
493
|
+
* @permissionScope Manage Events - all permissions
|
|
494
|
+
* @permissionScope Manage Events
|
|
495
|
+
* @applicableIdentity APP
|
|
496
|
+
* @returns Updated event.
|
|
497
|
+
*/
|
|
498
|
+
function updateEvent(_id, options) {
|
|
499
|
+
var _a, _b, _c;
|
|
500
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
501
|
+
const requestTransformation = {
|
|
502
|
+
event: { '*': '$[1].event', id: '$[0]' },
|
|
503
|
+
fields: '$[1].fields',
|
|
504
|
+
};
|
|
505
|
+
const responseTransformation = '$.event';
|
|
506
|
+
// @ts-ignore
|
|
507
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
508
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
509
|
+
rootSchema: _updateEventRequest,
|
|
510
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
511
|
+
fqdnTransformation: {
|
|
512
|
+
paths: [...['event']],
|
|
513
|
+
transformation: _fromVeloEntity,
|
|
514
|
+
},
|
|
515
|
+
customTransformation: requestTransformation,
|
|
516
|
+
});
|
|
517
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
518
|
+
rootSchema: _updateEventResponse,
|
|
519
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
520
|
+
fqdnTransformation: {
|
|
521
|
+
paths: [...['event']],
|
|
522
|
+
transformation: _toVeloEntity,
|
|
523
|
+
},
|
|
524
|
+
customTransformation: responseTransformation,
|
|
525
|
+
});
|
|
526
|
+
const payload = toAmbassadorRequest([_id, options]);
|
|
527
|
+
const reqOpts = ambassadorWixEventsV3Event.updateEvent(payload);
|
|
528
|
+
__log(`"UpdateEvent" sending request with: ${__inspect(reqOpts)}`);
|
|
529
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
530
|
+
try {
|
|
531
|
+
const result = yield httpClient.request(reqOpts);
|
|
532
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
533
|
+
return fromJSON(result.data);
|
|
534
|
+
}
|
|
535
|
+
catch (err) {
|
|
536
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
537
|
+
spreadPathsToArguments: { event: '$[1].event' },
|
|
538
|
+
explicitPathsToArguments: { 'event.id': '$[0]', fields: '$[1].fields' },
|
|
539
|
+
singleArgumentUnchanged: false,
|
|
540
|
+
}, ['_id', 'options']);
|
|
541
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
542
|
+
throw transformedError;
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
exports.updateEvent = updateEvent;
|
|
547
|
+
/**
|
|
548
|
+
* Publishes a draft event to your live site. Once published, the event's status changes from `DRAFT` to `UPCOMING`. <br> <br>
|
|
549
|
+
* It's impossible to revert the `DRAFT` status after publishing. The only option is to clone the event, then delete the original one.
|
|
550
|
+
* @param eventId - Event ID.
|
|
551
|
+
* @public
|
|
552
|
+
* @documentationMaturity preview
|
|
553
|
+
* @requiredField eventId
|
|
554
|
+
* @permissionScope Manage Events - all permissions
|
|
555
|
+
* @permissionScope Manage Events
|
|
556
|
+
* @applicableIdentity APP
|
|
557
|
+
*/
|
|
558
|
+
function publishDraftEvent(eventId, options) {
|
|
559
|
+
var _a, _b, _c;
|
|
560
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
561
|
+
const requestTransformation = { eventId: '$[0]', fields: '$[1].fields' };
|
|
562
|
+
const responseTransformation = '$';
|
|
563
|
+
// @ts-ignore
|
|
564
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
565
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
566
|
+
rootSchema: _publishDraftEventRequest,
|
|
567
|
+
depSchemas: {},
|
|
568
|
+
fqdnTransformation: {
|
|
569
|
+
paths: [],
|
|
570
|
+
transformation: _fromVeloEntity,
|
|
571
|
+
},
|
|
572
|
+
customTransformation: requestTransformation,
|
|
573
|
+
});
|
|
574
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
575
|
+
rootSchema: _publishDraftEventResponse,
|
|
576
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
577
|
+
fqdnTransformation: {
|
|
578
|
+
paths: [...['event']],
|
|
579
|
+
transformation: _toVeloEntity,
|
|
580
|
+
},
|
|
581
|
+
customTransformation: responseTransformation,
|
|
582
|
+
});
|
|
583
|
+
const payload = toAmbassadorRequest([eventId, options]);
|
|
584
|
+
const reqOpts = ambassadorWixEventsV3Event.publishDraftEvent(payload);
|
|
585
|
+
__log(`"PublishDraftEvent" sending request with: ${__inspect(reqOpts)}`);
|
|
586
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
587
|
+
try {
|
|
588
|
+
const result = yield httpClient.request(reqOpts);
|
|
589
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
590
|
+
return fromJSON(result.data);
|
|
591
|
+
}
|
|
592
|
+
catch (err) {
|
|
593
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
594
|
+
spreadPathsToArguments: {},
|
|
595
|
+
explicitPathsToArguments: { eventId: '$[0]', fields: '$[1].fields' },
|
|
596
|
+
singleArgumentUnchanged: false,
|
|
597
|
+
}, ['eventId', 'options']);
|
|
598
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
599
|
+
throw transformedError;
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
exports.publishDraftEvent = publishDraftEvent;
|
|
604
|
+
/**
|
|
605
|
+
* Cancels an event. <br> <br>
|
|
606
|
+
* After cancellation, registration for an event is closed. To reuse the event, [copy]() and [publish]() it again. <br> <br>
|
|
607
|
+
* If event cancellation notifications are enabled, canceling an event automatically triggers the sending of cancellation emails and/or push notifications to registered guests.
|
|
608
|
+
* @param eventId - Event ID.
|
|
609
|
+
* @public
|
|
610
|
+
* @documentationMaturity preview
|
|
611
|
+
* @requiredField eventId
|
|
612
|
+
* @permissionScope Manage Events - all permissions
|
|
613
|
+
* @permissionScope Manage Events
|
|
614
|
+
* @applicableIdentity APP
|
|
615
|
+
*/
|
|
616
|
+
function cancelEvent(eventId, options) {
|
|
617
|
+
var _a, _b, _c;
|
|
618
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
619
|
+
const requestTransformation = { eventId: '$[0]', fields: '$[1].fields' };
|
|
620
|
+
const responseTransformation = '$';
|
|
621
|
+
// @ts-ignore
|
|
622
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
623
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
624
|
+
rootSchema: _cancelEventRequest,
|
|
625
|
+
depSchemas: {},
|
|
626
|
+
fqdnTransformation: {
|
|
627
|
+
paths: [],
|
|
628
|
+
transformation: _fromVeloEntity,
|
|
629
|
+
},
|
|
630
|
+
customTransformation: requestTransformation,
|
|
631
|
+
});
|
|
632
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
633
|
+
rootSchema: _cancelEventResponse,
|
|
634
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
635
|
+
fqdnTransformation: {
|
|
636
|
+
paths: [...['event']],
|
|
637
|
+
transformation: _toVeloEntity,
|
|
638
|
+
},
|
|
639
|
+
customTransformation: responseTransformation,
|
|
640
|
+
});
|
|
641
|
+
const payload = toAmbassadorRequest([eventId, options]);
|
|
642
|
+
const reqOpts = ambassadorWixEventsV3Event.cancelEvent(payload);
|
|
643
|
+
__log(`"CancelEvent" sending request with: ${__inspect(reqOpts)}`);
|
|
644
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
645
|
+
try {
|
|
646
|
+
const result = yield httpClient.request(reqOpts);
|
|
647
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
648
|
+
return fromJSON(result.data);
|
|
649
|
+
}
|
|
650
|
+
catch (err) {
|
|
651
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
652
|
+
spreadPathsToArguments: {},
|
|
653
|
+
explicitPathsToArguments: { eventId: '$[0]', fields: '$[1].fields' },
|
|
654
|
+
singleArgumentUnchanged: false,
|
|
655
|
+
}, ['eventId', 'options']);
|
|
656
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
657
|
+
throw transformedError;
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
exports.cancelEvent = cancelEvent;
|
|
662
|
+
/**
|
|
663
|
+
* Cancels multiple events that meet the given criteria. <br> <br>
|
|
664
|
+
* After cancellation, registration for an event is closed. To reuse the event, [clone]() and [publish]() it again. <br> <br>
|
|
665
|
+
* If event cancellation notifications are enabled, canceling an event automatically triggers the sending of cancellation emails and/or push notifications to registered guests.
|
|
666
|
+
* @public
|
|
667
|
+
* @documentationMaturity preview
|
|
668
|
+
* @requiredField options.filter.filter
|
|
669
|
+
* @permissionScope Manage Events - all permissions
|
|
670
|
+
* @permissionScope Manage Events
|
|
671
|
+
* @applicableIdentity APP
|
|
672
|
+
*/
|
|
673
|
+
function bulkCancelEventsByFilter(options) {
|
|
674
|
+
var _a, _b, _c;
|
|
675
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
676
|
+
const requestTransformation = { filter: '$[0].filter' };
|
|
677
|
+
const responseTransformation = '$';
|
|
678
|
+
// @ts-ignore
|
|
679
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
680
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
681
|
+
rootSchema: _bulkCancelEventsByFilterRequest,
|
|
682
|
+
depSchemas: {},
|
|
683
|
+
fqdnTransformation: {
|
|
684
|
+
paths: [],
|
|
685
|
+
transformation: _fromVeloEntity,
|
|
686
|
+
},
|
|
687
|
+
customTransformation: requestTransformation,
|
|
688
|
+
});
|
|
689
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
690
|
+
rootSchema: _bulkCancelEventsByFilterResponse,
|
|
691
|
+
depSchemas: {},
|
|
692
|
+
fqdnTransformation: {
|
|
693
|
+
paths: [],
|
|
694
|
+
transformation: _toVeloEntity,
|
|
695
|
+
},
|
|
696
|
+
customTransformation: responseTransformation,
|
|
697
|
+
});
|
|
698
|
+
const payload = toAmbassadorRequest([options]);
|
|
699
|
+
const reqOpts = ambassadorWixEventsV3Event.bulkCancelEventsByFilter(payload);
|
|
700
|
+
__log(`"BulkCancelEventsByFilter" sending request with: ${__inspect(reqOpts)}`);
|
|
701
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
702
|
+
try {
|
|
703
|
+
const result = yield httpClient.request(reqOpts);
|
|
704
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
705
|
+
}
|
|
706
|
+
catch (err) {
|
|
707
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
708
|
+
spreadPathsToArguments: {},
|
|
709
|
+
explicitPathsToArguments: { filter: '$[0].filter' },
|
|
710
|
+
singleArgumentUnchanged: false,
|
|
711
|
+
}, ['options']);
|
|
712
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
713
|
+
throw transformedError;
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
exports.bulkCancelEventsByFilter = bulkCancelEventsByFilter;
|
|
718
|
+
/**
|
|
719
|
+
* Permanently deletes an event. <br> <br>
|
|
720
|
+
* You can retrieve the deleted event through a GDPR access request.
|
|
721
|
+
* @param eventId - Event ID.
|
|
722
|
+
* @public
|
|
723
|
+
* @documentationMaturity preview
|
|
724
|
+
* @requiredField eventId
|
|
725
|
+
* @permissionScope Manage Events - all permissions
|
|
726
|
+
* @permissionScope Manage Events
|
|
727
|
+
* @applicableIdentity APP
|
|
728
|
+
*/
|
|
729
|
+
function deleteEvent(eventId) {
|
|
730
|
+
var _a, _b, _c;
|
|
731
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
732
|
+
const requestTransformation = { eventId: '$[0]' };
|
|
733
|
+
const responseTransformation = '$';
|
|
734
|
+
// @ts-ignore
|
|
735
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
736
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
737
|
+
rootSchema: _deleteEventRequest,
|
|
738
|
+
depSchemas: {},
|
|
739
|
+
fqdnTransformation: {
|
|
740
|
+
paths: [],
|
|
741
|
+
transformation: _fromVeloEntity,
|
|
742
|
+
},
|
|
743
|
+
customTransformation: requestTransformation,
|
|
744
|
+
});
|
|
745
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
746
|
+
rootSchema: _deleteEventResponse,
|
|
747
|
+
depSchemas: {},
|
|
748
|
+
fqdnTransformation: {
|
|
749
|
+
paths: [],
|
|
750
|
+
transformation: _toVeloEntity,
|
|
751
|
+
},
|
|
752
|
+
customTransformation: responseTransformation,
|
|
753
|
+
});
|
|
754
|
+
const payload = toAmbassadorRequest([eventId]);
|
|
755
|
+
const reqOpts = ambassadorWixEventsV3Event.deleteEvent(payload);
|
|
756
|
+
__log(`"DeleteEvent" sending request with: ${__inspect(reqOpts)}`);
|
|
757
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
758
|
+
try {
|
|
759
|
+
const result = yield httpClient.request(reqOpts);
|
|
760
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
761
|
+
return fromJSON(result.data);
|
|
762
|
+
}
|
|
763
|
+
catch (err) {
|
|
764
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
765
|
+
spreadPathsToArguments: {},
|
|
766
|
+
explicitPathsToArguments: { eventId: '$[0]' },
|
|
767
|
+
singleArgumentUnchanged: false,
|
|
768
|
+
}, ['eventId']);
|
|
769
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
770
|
+
throw transformedError;
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
exports.deleteEvent = deleteEvent;
|
|
775
|
+
/**
|
|
776
|
+
* Permanently deletes multiple events that meet the given criteria. <br> <br>
|
|
777
|
+
* You can retrieve the deleted events through a GDPR access request.
|
|
778
|
+
* @public
|
|
779
|
+
* @documentationMaturity preview
|
|
780
|
+
* @requiredField options.filter.filter
|
|
781
|
+
* @permissionScope Manage Events - all permissions
|
|
782
|
+
* @permissionScope Manage Events
|
|
783
|
+
* @applicableIdentity APP
|
|
784
|
+
*/
|
|
785
|
+
function bulkDeleteEventsByFilter(options) {
|
|
786
|
+
var _a, _b, _c;
|
|
787
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
788
|
+
const requestTransformation = { filter: '$[0].filter' };
|
|
789
|
+
const responseTransformation = '$';
|
|
790
|
+
// @ts-ignore
|
|
791
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
792
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
793
|
+
rootSchema: _bulkDeleteEventsByFilterRequest,
|
|
794
|
+
depSchemas: {},
|
|
795
|
+
fqdnTransformation: {
|
|
796
|
+
paths: [],
|
|
797
|
+
transformation: _fromVeloEntity,
|
|
798
|
+
},
|
|
799
|
+
customTransformation: requestTransformation,
|
|
800
|
+
});
|
|
801
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
802
|
+
rootSchema: _bulkDeleteEventsByFilterResponse,
|
|
803
|
+
depSchemas: {},
|
|
804
|
+
fqdnTransformation: {
|
|
805
|
+
paths: [],
|
|
806
|
+
transformation: _toVeloEntity,
|
|
807
|
+
},
|
|
808
|
+
customTransformation: responseTransformation,
|
|
809
|
+
});
|
|
810
|
+
const payload = toAmbassadorRequest([options]);
|
|
811
|
+
const reqOpts = ambassadorWixEventsV3Event.bulkDeleteEventsByFilter(payload);
|
|
812
|
+
__log(`"BulkDeleteEventsByFilter" sending request with: ${__inspect(reqOpts)}`);
|
|
813
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
814
|
+
try {
|
|
815
|
+
const result = yield httpClient.request(reqOpts);
|
|
816
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
817
|
+
}
|
|
818
|
+
catch (err) {
|
|
819
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
820
|
+
spreadPathsToArguments: {},
|
|
821
|
+
explicitPathsToArguments: { filter: '$[0].filter' },
|
|
822
|
+
singleArgumentUnchanged: false,
|
|
823
|
+
}, ['options']);
|
|
824
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
825
|
+
throw transformedError;
|
|
826
|
+
}
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
exports.bulkDeleteEventsByFilter = bulkDeleteEventsByFilter;
|
|
830
|
+
/**
|
|
831
|
+
* Retrieves a list of events, given the provided paging, filtering, and sorting.
|
|
832
|
+
* Query Events runs with these defaults, which you can override:
|
|
833
|
+
* - `createdDate` is sorted in `ASC` order
|
|
834
|
+
* - `paging.limit` is `100`
|
|
835
|
+
* - `paging.offset` is `0`
|
|
836
|
+
* For field support for filters and sorting, see [Events v3: Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-events/events-v3/filter-and-sort).
|
|
837
|
+
* To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
838
|
+
* @public
|
|
839
|
+
* @documentationMaturity preview
|
|
840
|
+
* @permissionScope Read Events - all read permissions
|
|
841
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
842
|
+
* @permissionScope Manage Events - all permissions
|
|
843
|
+
* @permissionScope Read Events
|
|
844
|
+
* @permissionScope Manage Guest List
|
|
845
|
+
* @permissionScope Manage Events
|
|
846
|
+
* @applicableIdentity APP
|
|
847
|
+
* @applicableIdentity MEMBER
|
|
848
|
+
* @applicableIdentity VISITOR
|
|
849
|
+
*/
|
|
850
|
+
function queryEvents(options) {
|
|
851
|
+
const requestTransformation = { '*': '$[1]', query: '$[0]' };
|
|
852
|
+
const responseTransformation = {
|
|
853
|
+
items: '$.events',
|
|
854
|
+
pagingMetadata: '$.pagingMetadata',
|
|
855
|
+
};
|
|
856
|
+
// @ts-ignore
|
|
857
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
858
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
859
|
+
rootSchema: _queryEventsRequest,
|
|
860
|
+
depSchemas: {},
|
|
861
|
+
fqdnTransformation: {
|
|
862
|
+
paths: [],
|
|
863
|
+
transformation: _fromVeloEntity,
|
|
864
|
+
},
|
|
865
|
+
customTransformation: requestTransformation,
|
|
866
|
+
});
|
|
867
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
868
|
+
rootSchema: _queryEventsResponse,
|
|
869
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
870
|
+
fqdnTransformation: {
|
|
871
|
+
paths: [...['Array#events']],
|
|
872
|
+
transformation: _toVeloEntity,
|
|
873
|
+
},
|
|
874
|
+
customTransformation: responseTransformation,
|
|
875
|
+
});
|
|
876
|
+
return (0, motion_edm_autogen_query_wrapper_1.wrapWithQueryBuilder)({
|
|
877
|
+
func: (payload) => __awaiter(this, void 0, void 0, function* () {
|
|
878
|
+
var _a, _b, _c;
|
|
879
|
+
const reqOpts = ambassadorWixEventsV3Event.queryEvents(Object.assign(Object.assign({}, payload), (options !== null && options !== void 0 ? options : {})));
|
|
880
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
881
|
+
try {
|
|
882
|
+
const result = yield httpClient.request(reqOpts);
|
|
883
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
884
|
+
return result;
|
|
885
|
+
}
|
|
886
|
+
catch (err) {
|
|
887
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
888
|
+
throw err;
|
|
889
|
+
}
|
|
890
|
+
}),
|
|
891
|
+
requestTransformer: (...args) => toAmbassadorRequest(args),
|
|
892
|
+
responseTransformer: ({ data }) => fromJSON(data),
|
|
893
|
+
errorTransformer: (err) => {
|
|
894
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation);
|
|
895
|
+
throw transformedError;
|
|
896
|
+
},
|
|
897
|
+
pagingMethod: 'OFFSET',
|
|
898
|
+
transformationPaths: (0, velo_1.resolveQueryFieldsTransformationPaths)(_toVeloEntity),
|
|
899
|
+
})({ cursorWithEmptyFilterAndSort: true });
|
|
900
|
+
}
|
|
901
|
+
exports.queryEvents = queryEvents;
|
|
902
|
+
/**
|
|
903
|
+
* Counts events by status.
|
|
904
|
+
* To learn about working with _query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
905
|
+
* @public
|
|
906
|
+
* @documentationMaturity preview
|
|
907
|
+
* @permissionScope Read Events - all read permissions
|
|
908
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
909
|
+
* @permissionScope Manage Events - all permissions
|
|
910
|
+
* @permissionScope Read Events
|
|
911
|
+
* @permissionScope Manage Guest List
|
|
912
|
+
* @permissionScope Manage Events
|
|
913
|
+
* @applicableIdentity APP
|
|
914
|
+
* @applicableIdentity MEMBER
|
|
915
|
+
* @applicableIdentity VISITOR
|
|
916
|
+
*/
|
|
917
|
+
function countEventsByStatus(options) {
|
|
918
|
+
var _a, _b, _c;
|
|
919
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
920
|
+
const requestTransformation = {
|
|
921
|
+
filter: '$[0].filter',
|
|
922
|
+
facet: '$[0].facet',
|
|
923
|
+
includeDrafts: '$[0].includeDrafts',
|
|
924
|
+
};
|
|
925
|
+
const responseTransformation = '$';
|
|
926
|
+
// @ts-ignore
|
|
927
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
928
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
929
|
+
rootSchema: _countEventsByStatusRequest,
|
|
930
|
+
depSchemas: {},
|
|
931
|
+
fqdnTransformation: {
|
|
932
|
+
paths: [],
|
|
933
|
+
transformation: _fromVeloEntity,
|
|
934
|
+
},
|
|
935
|
+
customTransformation: requestTransformation,
|
|
936
|
+
});
|
|
937
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
938
|
+
rootSchema: _countEventsByStatusResponse,
|
|
939
|
+
depSchemas: {},
|
|
940
|
+
fqdnTransformation: {
|
|
941
|
+
paths: [],
|
|
942
|
+
transformation: _toVeloEntity,
|
|
943
|
+
},
|
|
944
|
+
customTransformation: responseTransformation,
|
|
945
|
+
});
|
|
946
|
+
const payload = toAmbassadorRequest([options]);
|
|
947
|
+
const reqOpts = ambassadorWixEventsV3Event.countEventsByStatus(payload);
|
|
948
|
+
__log(`"CountEventsByStatus" sending request with: ${__inspect(reqOpts)}`);
|
|
949
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
950
|
+
try {
|
|
951
|
+
const result = yield httpClient.request(reqOpts);
|
|
952
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
953
|
+
return fromJSON(result.data);
|
|
954
|
+
}
|
|
955
|
+
catch (err) {
|
|
956
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
957
|
+
spreadPathsToArguments: {},
|
|
958
|
+
explicitPathsToArguments: {
|
|
959
|
+
filter: '$[0].filter',
|
|
960
|
+
facet: '$[0].facet',
|
|
961
|
+
includeDrafts: '$[0].includeDrafts',
|
|
962
|
+
},
|
|
963
|
+
singleArgumentUnchanged: false,
|
|
964
|
+
}, ['options']);
|
|
965
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
966
|
+
throw transformedError;
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
exports.countEventsByStatus = countEventsByStatus;
|
|
971
|
+
/**
|
|
972
|
+
* Retrieves an event by ID.
|
|
973
|
+
* @param eventId - Event ID.
|
|
974
|
+
* @public
|
|
975
|
+
* @documentationMaturity preview
|
|
976
|
+
* @requiredField eventId
|
|
977
|
+
* @permissionScope Read Events - all read permissions
|
|
978
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
979
|
+
* @permissionScope Manage Events - all permissions
|
|
980
|
+
* @permissionScope Read Events
|
|
981
|
+
* @permissionScope Manage Guest List
|
|
982
|
+
* @permissionScope Manage Events
|
|
983
|
+
* @applicableIdentity APP
|
|
984
|
+
* @applicableIdentity MEMBER
|
|
985
|
+
* @applicableIdentity VISITOR
|
|
986
|
+
* @returns Event.
|
|
987
|
+
*/
|
|
988
|
+
function getEvent(eventId, options) {
|
|
989
|
+
var _a, _b, _c;
|
|
990
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
991
|
+
const requestTransformation = { eventId: '$[0]', fields: '$[1].fields' };
|
|
992
|
+
const responseTransformation = '$.event';
|
|
993
|
+
// @ts-ignore
|
|
994
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
995
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
996
|
+
rootSchema: _getEventRequest,
|
|
997
|
+
depSchemas: {},
|
|
998
|
+
fqdnTransformation: {
|
|
999
|
+
paths: [],
|
|
1000
|
+
transformation: _fromVeloEntity,
|
|
1001
|
+
},
|
|
1002
|
+
customTransformation: requestTransformation,
|
|
1003
|
+
});
|
|
1004
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
1005
|
+
rootSchema: _getEventResponse,
|
|
1006
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
1007
|
+
fqdnTransformation: {
|
|
1008
|
+
paths: [...['event']],
|
|
1009
|
+
transformation: _toVeloEntity,
|
|
1010
|
+
},
|
|
1011
|
+
customTransformation: responseTransformation,
|
|
1012
|
+
});
|
|
1013
|
+
const payload = toAmbassadorRequest([eventId, options]);
|
|
1014
|
+
const reqOpts = ambassadorWixEventsV3Event.getEvent(payload);
|
|
1015
|
+
__log(`"GetEvent" sending request with: ${__inspect(reqOpts)}`);
|
|
1016
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1017
|
+
try {
|
|
1018
|
+
const result = yield httpClient.request(reqOpts);
|
|
1019
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1020
|
+
return fromJSON(result.data);
|
|
1021
|
+
}
|
|
1022
|
+
catch (err) {
|
|
1023
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1024
|
+
spreadPathsToArguments: {},
|
|
1025
|
+
explicitPathsToArguments: { eventId: '$[0]', fields: '$[1].fields' },
|
|
1026
|
+
singleArgumentUnchanged: false,
|
|
1027
|
+
}, ['eventId', 'options']);
|
|
1028
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1029
|
+
throw transformedError;
|
|
1030
|
+
}
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
exports.getEvent = getEvent;
|
|
1034
|
+
/**
|
|
1035
|
+
* Retrieves an event by the slug URL.
|
|
1036
|
+
* @param slug - URL slug.
|
|
1037
|
+
* @public
|
|
1038
|
+
* @documentationMaturity preview
|
|
1039
|
+
* @requiredField slug
|
|
1040
|
+
* @permissionScope Read Events - all read permissions
|
|
1041
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1042
|
+
* @permissionScope Manage Events - all permissions
|
|
1043
|
+
* @permissionScope Read Events
|
|
1044
|
+
* @permissionScope Manage Guest List
|
|
1045
|
+
* @permissionScope Manage Events
|
|
1046
|
+
* @applicableIdentity APP
|
|
1047
|
+
* @applicableIdentity MEMBER
|
|
1048
|
+
* @applicableIdentity VISITOR
|
|
1049
|
+
*/
|
|
1050
|
+
function getEventBySlug(slug, options) {
|
|
1051
|
+
var _a, _b, _c;
|
|
1052
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
1053
|
+
const requestTransformation = { slug: '$[0]', fields: '$[1].fields' };
|
|
1054
|
+
const responseTransformation = '$';
|
|
1055
|
+
// @ts-ignore
|
|
1056
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1057
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
1058
|
+
rootSchema: _getEventBySlugRequest,
|
|
1059
|
+
depSchemas: {},
|
|
1060
|
+
fqdnTransformation: {
|
|
1061
|
+
paths: [],
|
|
1062
|
+
transformation: _fromVeloEntity,
|
|
1063
|
+
},
|
|
1064
|
+
customTransformation: requestTransformation,
|
|
1065
|
+
});
|
|
1066
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
1067
|
+
rootSchema: _getEventBySlugResponse,
|
|
1068
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
1069
|
+
fqdnTransformation: {
|
|
1070
|
+
paths: [...['event']],
|
|
1071
|
+
transformation: _toVeloEntity,
|
|
1072
|
+
},
|
|
1073
|
+
customTransformation: responseTransformation,
|
|
1074
|
+
});
|
|
1075
|
+
const payload = toAmbassadorRequest([slug, options]);
|
|
1076
|
+
const reqOpts = ambassadorWixEventsV3Event.getEventBySlug(payload);
|
|
1077
|
+
__log(`"GetEventBySlug" sending request with: ${__inspect(reqOpts)}`);
|
|
1078
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1079
|
+
try {
|
|
1080
|
+
const result = yield httpClient.request(reqOpts);
|
|
1081
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1082
|
+
return fromJSON(result.data);
|
|
1083
|
+
}
|
|
1084
|
+
catch (err) {
|
|
1085
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1086
|
+
spreadPathsToArguments: {},
|
|
1087
|
+
explicitPathsToArguments: { slug: '$[0]', fields: '$[1].fields' },
|
|
1088
|
+
singleArgumentUnchanged: false,
|
|
1089
|
+
}, ['slug', 'options']);
|
|
1090
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1091
|
+
throw transformedError;
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
exports.getEventBySlug = getEventBySlug;
|
|
1096
|
+
/**
|
|
1097
|
+
* Finds an event by ID or URL slug. In contrast to Get Event endpoint which returns not found error,
|
|
1098
|
+
* Find Event returns empty response when an event is not found.
|
|
1099
|
+
* @public
|
|
1100
|
+
* @documentationMaturity preview
|
|
1101
|
+
* @permissionScope Read Events - all read permissions
|
|
1102
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1103
|
+
* @permissionScope Manage Events - all permissions
|
|
1104
|
+
* @permissionScope Read Events
|
|
1105
|
+
* @permissionScope Manage Guest List
|
|
1106
|
+
* @permissionScope Manage Events
|
|
1107
|
+
* @applicableIdentity APP
|
|
1108
|
+
* @applicableIdentity MEMBER
|
|
1109
|
+
* @applicableIdentity VISITOR
|
|
1110
|
+
*/
|
|
1111
|
+
function findEvent(options) {
|
|
1112
|
+
var _a, _b, _c;
|
|
1113
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
1114
|
+
const requestTransformation = {
|
|
1115
|
+
eventId: '$[0].eventId',
|
|
1116
|
+
slug: '$[0].slug',
|
|
1117
|
+
fields: '$[0].fields',
|
|
1118
|
+
};
|
|
1119
|
+
const responseTransformation = '$';
|
|
1120
|
+
// @ts-ignore
|
|
1121
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1122
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
1123
|
+
rootSchema: _findEventRequest,
|
|
1124
|
+
depSchemas: {},
|
|
1125
|
+
fqdnTransformation: {
|
|
1126
|
+
paths: [],
|
|
1127
|
+
transformation: _fromVeloEntity,
|
|
1128
|
+
},
|
|
1129
|
+
customTransformation: requestTransformation,
|
|
1130
|
+
});
|
|
1131
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
1132
|
+
rootSchema: _findEventResponse,
|
|
1133
|
+
depSchemas: { _agendaSettings, _event, _location },
|
|
1134
|
+
fqdnTransformation: {
|
|
1135
|
+
paths: [...['event']],
|
|
1136
|
+
transformation: _toVeloEntity,
|
|
1137
|
+
},
|
|
1138
|
+
customTransformation: responseTransformation,
|
|
1139
|
+
});
|
|
1140
|
+
const payload = toAmbassadorRequest([options]);
|
|
1141
|
+
const reqOpts = ambassadorWixEventsV3Event.findEvent(payload);
|
|
1142
|
+
__log(`"FindEvent" sending request with: ${__inspect(reqOpts)}`);
|
|
1143
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1144
|
+
try {
|
|
1145
|
+
const result = yield httpClient.request(reqOpts);
|
|
1146
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1147
|
+
return fromJSON(result.data);
|
|
1148
|
+
}
|
|
1149
|
+
catch (err) {
|
|
1150
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1151
|
+
spreadPathsToArguments: {},
|
|
1152
|
+
explicitPathsToArguments: {
|
|
1153
|
+
eventId: '$[0].eventId',
|
|
1154
|
+
slug: '$[0].slug',
|
|
1155
|
+
fields: '$[0].fields',
|
|
1156
|
+
},
|
|
1157
|
+
singleArgumentUnchanged: false,
|
|
1158
|
+
}, ['options']);
|
|
1159
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1160
|
+
throw transformedError;
|
|
1161
|
+
}
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1164
|
+
exports.findEvent = findEvent;
|
|
1165
|
+
//# sourceMappingURL=events-v3-event.universal.js.map
|