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