@wix/auto_sdk_redirects_redirects 1.0.40 → 1.0.41

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.
@@ -0,0 +1,185 @@
1
+ import * as z from 'zod';
2
+
3
+ declare const CreateRedirectSessionRequest: z.ZodObject<{
4
+ options: z.ZodIntersection<z.ZodObject<{
5
+ callbacks: z.ZodOptional<z.ZodObject<{
6
+ thankYouPageUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
7
+ postFlowUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
8
+ loginUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
9
+ bookingsServiceListUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
10
+ cartPageUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
11
+ planListUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
12
+ }, z.core.$strip>>;
13
+ preferences: z.ZodOptional<z.ZodObject<{
14
+ useGenericWixPages: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
15
+ maintainIdentity: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
16
+ additionalQueryParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
17
+ checkIfPublish: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
18
+ }, z.core.$strip>>;
19
+ origin: z.ZodNullable<z.ZodOptional<z.ZodString>>;
20
+ }, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
21
+ ecomCheckout: z.ZodOptional<z.ZodNever>;
22
+ eventsCheckout: z.ZodOptional<z.ZodNever>;
23
+ paidPlansCheckout: z.ZodOptional<z.ZodNever>;
24
+ logout: z.ZodOptional<z.ZodNever>;
25
+ auth: z.ZodOptional<z.ZodNever>;
26
+ storesProduct: z.ZodOptional<z.ZodNever>;
27
+ bookingsBook: z.ZodOptional<z.ZodNever>;
28
+ bookingsCheckout: z.ZodObject<{
29
+ timezone: z.ZodOptional<z.ZodString>;
30
+ slotAvailability: z.ZodOptional<z.ZodObject<{
31
+ slot: z.ZodOptional<z.ZodObject<{
32
+ sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
33
+ serviceId: z.ZodOptional<z.ZodString>;
34
+ scheduleId: z.ZodOptional<z.ZodString>;
35
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
36
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
37
+ timezone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
38
+ resource: z.ZodOptional<z.ZodObject<{
39
+ _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
40
+ name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
41
+ }, z.core.$strip>>;
42
+ location: z.ZodOptional<z.ZodObject<{
43
+ _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
44
+ name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
45
+ formattedAddress: z.ZodNullable<z.ZodOptional<z.ZodString>>;
46
+ formattedAddressTranslated: z.ZodNullable<z.ZodOptional<z.ZodString>>;
47
+ locationType: z.ZodOptional<z.ZodEnum<{
48
+ UNDEFINED: "UNDEFINED";
49
+ OWNER_BUSINESS: "OWNER_BUSINESS";
50
+ OWNER_CUSTOM: "OWNER_CUSTOM";
51
+ CUSTOM: "CUSTOM";
52
+ }>>;
53
+ }, z.core.$strip>>;
54
+ eventId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
55
+ }, z.core.$strip>>;
56
+ bookable: z.ZodOptional<z.ZodBoolean>;
57
+ totalSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
58
+ openSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
59
+ waitingList: z.ZodOptional<z.ZodObject<{
60
+ totalSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
61
+ openSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
62
+ }, z.core.$strip>>;
63
+ bookingPolicyViolations: z.ZodOptional<z.ZodObject<{
64
+ tooEarlyToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
65
+ tooLateToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
66
+ bookOnlineDisabled: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
67
+ validSubmissionRequired: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
68
+ }, z.core.$strip>>;
69
+ locked: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
70
+ isFromV2: z.ZodOptional<z.ZodBoolean>;
71
+ }, z.core.$strip>>;
72
+ }, z.core.$strip>;
73
+ }, z.core.$strip>, z.ZodObject<{
74
+ bookingsCheckout: z.ZodOptional<z.ZodNever>;
75
+ eventsCheckout: z.ZodOptional<z.ZodNever>;
76
+ paidPlansCheckout: z.ZodOptional<z.ZodNever>;
77
+ logout: z.ZodOptional<z.ZodNever>;
78
+ auth: z.ZodOptional<z.ZodNever>;
79
+ storesProduct: z.ZodOptional<z.ZodNever>;
80
+ bookingsBook: z.ZodOptional<z.ZodNever>;
81
+ ecomCheckout: z.ZodObject<{
82
+ checkoutId: z.ZodOptional<z.ZodString>;
83
+ }, z.core.$strip>;
84
+ }, z.core.$strip>, z.ZodObject<{
85
+ bookingsCheckout: z.ZodOptional<z.ZodNever>;
86
+ ecomCheckout: z.ZodOptional<z.ZodNever>;
87
+ paidPlansCheckout: z.ZodOptional<z.ZodNever>;
88
+ logout: z.ZodOptional<z.ZodNever>;
89
+ auth: z.ZodOptional<z.ZodNever>;
90
+ storesProduct: z.ZodOptional<z.ZodNever>;
91
+ bookingsBook: z.ZodOptional<z.ZodNever>;
92
+ eventsCheckout: z.ZodObject<{
93
+ reservationId: z.ZodOptional<z.ZodString>;
94
+ eventSlug: z.ZodOptional<z.ZodString>;
95
+ }, z.core.$strip>;
96
+ }, z.core.$strip>, z.ZodObject<{
97
+ bookingsCheckout: z.ZodOptional<z.ZodNever>;
98
+ ecomCheckout: z.ZodOptional<z.ZodNever>;
99
+ eventsCheckout: z.ZodOptional<z.ZodNever>;
100
+ logout: z.ZodOptional<z.ZodNever>;
101
+ auth: z.ZodOptional<z.ZodNever>;
102
+ storesProduct: z.ZodOptional<z.ZodNever>;
103
+ bookingsBook: z.ZodOptional<z.ZodNever>;
104
+ paidPlansCheckout: z.ZodObject<{
105
+ planId: z.ZodOptional<z.ZodString>;
106
+ checkoutData: z.ZodNullable<z.ZodOptional<z.ZodString>>;
107
+ }, z.core.$strip>;
108
+ }, z.core.$strip>, z.ZodObject<{
109
+ bookingsCheckout: z.ZodOptional<z.ZodNever>;
110
+ ecomCheckout: z.ZodOptional<z.ZodNever>;
111
+ eventsCheckout: z.ZodOptional<z.ZodNever>;
112
+ paidPlansCheckout: z.ZodOptional<z.ZodNever>;
113
+ auth: z.ZodOptional<z.ZodNever>;
114
+ storesProduct: z.ZodOptional<z.ZodNever>;
115
+ bookingsBook: z.ZodOptional<z.ZodNever>;
116
+ logout: z.ZodObject<{
117
+ clientId: z.ZodOptional<z.ZodString>;
118
+ }, z.core.$strip>;
119
+ }, z.core.$strip>, z.ZodObject<{
120
+ bookingsCheckout: z.ZodOptional<z.ZodNever>;
121
+ ecomCheckout: z.ZodOptional<z.ZodNever>;
122
+ eventsCheckout: z.ZodOptional<z.ZodNever>;
123
+ paidPlansCheckout: z.ZodOptional<z.ZodNever>;
124
+ logout: z.ZodOptional<z.ZodNever>;
125
+ storesProduct: z.ZodOptional<z.ZodNever>;
126
+ bookingsBook: z.ZodOptional<z.ZodNever>;
127
+ auth: z.ZodObject<{
128
+ authRequest: z.ZodOptional<z.ZodObject<{
129
+ clientId: z.ZodOptional<z.ZodString>;
130
+ responseType: z.ZodOptional<z.ZodString>;
131
+ redirectUri: z.ZodNullable<z.ZodOptional<z.ZodString>>;
132
+ scope: z.ZodNullable<z.ZodOptional<z.ZodString>>;
133
+ state: z.ZodOptional<z.ZodString>;
134
+ responseMode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
135
+ codeChallenge: z.ZodNullable<z.ZodOptional<z.ZodString>>;
136
+ codeChallengeMethod: z.ZodNullable<z.ZodOptional<z.ZodString>>;
137
+ sessionToken: z.ZodNullable<z.ZodOptional<z.ZodString>>;
138
+ signInUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
139
+ userConsented: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
140
+ optionalLogin: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
141
+ metaSiteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
142
+ }, z.core.$strip>>;
143
+ prompt: z.ZodOptional<z.ZodEnum<{
144
+ login: "login";
145
+ none: "none";
146
+ }>>;
147
+ }, z.core.$strip>;
148
+ }, z.core.$strip>, z.ZodObject<{
149
+ bookingsCheckout: z.ZodOptional<z.ZodNever>;
150
+ ecomCheckout: z.ZodOptional<z.ZodNever>;
151
+ eventsCheckout: z.ZodOptional<z.ZodNever>;
152
+ paidPlansCheckout: z.ZodOptional<z.ZodNever>;
153
+ logout: z.ZodOptional<z.ZodNever>;
154
+ auth: z.ZodOptional<z.ZodNever>;
155
+ bookingsBook: z.ZodOptional<z.ZodNever>;
156
+ storesProduct: z.ZodObject<{
157
+ productSlug: z.ZodOptional<z.ZodString>;
158
+ }, z.core.$strip>;
159
+ }, z.core.$strip>, z.ZodObject<{
160
+ bookingsCheckout: z.ZodOptional<z.ZodNever>;
161
+ ecomCheckout: z.ZodOptional<z.ZodNever>;
162
+ eventsCheckout: z.ZodOptional<z.ZodNever>;
163
+ paidPlansCheckout: z.ZodOptional<z.ZodNever>;
164
+ logout: z.ZodOptional<z.ZodNever>;
165
+ auth: z.ZodOptional<z.ZodNever>;
166
+ storesProduct: z.ZodOptional<z.ZodNever>;
167
+ bookingsBook: z.ZodObject<{
168
+ resourceId: z.ZodOptional<z.ZodString>;
169
+ }, z.core.$strip>;
170
+ }, z.core.$strip>]>>;
171
+ }, z.core.$strip>;
172
+ declare const CreateRedirectSessionResponse: z.ZodObject<{
173
+ redirectSession: z.ZodOptional<z.ZodObject<{
174
+ _id: z.ZodOptional<z.ZodString>;
175
+ fullUrl: z.ZodOptional<z.ZodString>;
176
+ urlDetails: z.ZodOptional<z.ZodObject<{
177
+ endpoint: z.ZodOptional<z.ZodString>;
178
+ searchParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
179
+ }, z.core.$strip>>;
180
+ sessionToken: z.ZodNullable<z.ZodOptional<z.ZodString>>;
181
+ shortUrl: z.ZodOptional<z.ZodString>;
182
+ }, z.core.$strip>>;
183
+ }, z.core.$strip>;
184
+
185
+ export { CreateRedirectSessionRequest, CreateRedirectSessionResponse };
@@ -0,0 +1,391 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // schemas.ts
31
+ var schemas_exports = {};
32
+ __export(schemas_exports, {
33
+ CreateRedirectSessionRequest: () => CreateRedirectSessionRequest,
34
+ CreateRedirectSessionResponse: () => CreateRedirectSessionResponse
35
+ });
36
+ module.exports = __toCommonJS(schemas_exports);
37
+
38
+ // src/headless-v1-redirect-session-redirects.schemas.ts
39
+ var z = __toESM(require("zod"));
40
+ var CreateRedirectSessionRequest = z.object({
41
+ options: z.intersection(
42
+ z.object({
43
+ callbacks: z.object({
44
+ thankYouPageUrl: z.string().describe(
45
+ "The URL for a custom thank you page implemented on a site outside of Wix. The visitor is directed to this page after the Wix-managed process is completed.\nWhen redirecting to this URL, Wix passes different query parameters depending on the preceding transaction:\n\nAfter a pricing plans checkout:\n+ `planOrderId`: ID of a pricing plan order.\n\nAfter an eCommerce checkout:\n+ `orderId`: ID of an eCommerce order.\n\nAfter an Events checkout:\n+ `orderNumber`: Unique order number for the transaction.\n+ `eventId`: ID of the event.\n\nIf the process is abandoned or interrupted, the visitor is redirected to the URL specified in `postFlowUrl` instead.\n\nDefault: If you don't specify a URL, the visitor is redirected to a Wix thank you page, and from there to the URL specified in `postFlowUrl`."
46
+ ).max(2048).optional().nullable(),
47
+ postFlowUrl: z.string().describe(
48
+ "The URL Wix should redirect the visitor to when the Wix-managed process is completed, abandoned, or interrupted.\n\n**Note**: For an authentication redirect, don't specify a URL here. Instead, specify one in `auth.authRequest.redirectUri`."
49
+ ).max(2048).optional().nullable(),
50
+ loginUrl: z.string().describe(
51
+ "The URL for a custom login page implemented outside of Wix.\n\nDefault: If you don't specify a URL, a Wix login page is used."
52
+ ).max(2048).optional().nullable(),
53
+ bookingsServiceListUrl: z.string().describe(
54
+ "The URL for a custom bookings services page implemented outside of Wix.\n\nDefault: If you don't specify a URL, a Wix bookings services page is used."
55
+ ).max(2048).optional().nullable(),
56
+ cartPageUrl: z.string().describe(
57
+ "The URL for a custom eCommerce cart page implemented outside of Wix.\n\nDefault: If you don't specify a URL, a Wix cart page is used."
58
+ ).max(2048).optional().nullable(),
59
+ planListUrl: z.string().describe(
60
+ "The URL for a custom pricing plans page implemented outside of Wix.\nWhen redirecting to this URL, Wix specifies the following query parameters:\n+ `planIds`: IDs of the pricing plans on the custom page.\n+ `checkoutData`: Pass this string back in `paidPlansCheckout.checkoutData` when redirecting back to Wix for checkout.\n\nDefault: If you don't specify a URL, a Wix pricing plans page is used."
61
+ ).max(2048).optional().nullable()
62
+ }).describe(
63
+ "Details of pages to redirect the visitor back to on the Wix Headless client site.\nWhen redirecting to any callback URL, Wix specifies the boolean `wixMemberLoggedIn` parameter.\nIf `true`, a member logged in during the preceding Wix-managed process.\n\n**Note**: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in `auth.authRequest.redirectUri`."
64
+ ).optional(),
65
+ preferences: z.object({
66
+ useGenericWixPages: z.boolean().describe(
67
+ "Whether to use a standard Wix template for Wix-managed pages the visitor is redirected to. Set to `false` only if your client site connects with a Wix site that has custom pages.\n\nDefault: `true`"
68
+ ).optional().nullable(),
69
+ maintainIdentity: z.boolean().describe(
70
+ "Whether to maintain the identity used in the redirect to Wix (not relevant for `logout` and `auth` intents), or to use a new visitor identity.\n\nDefault: `true`"
71
+ ).optional().nullable(),
72
+ additionalQueryParameters: z.record(z.string(), z.string()).describe(
73
+ "Map of global query parameters to append to the Wix URL.\n\nCommon parameters include:\n- [UTM parameters](https://en.wikipedia.org/wiki/UTM_parameters): Use to track the source of site traffic.\n\n- `lang`: Use to control the displayed language of the Wix-managed page. For supported values, see [ISO 639 language codes](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes)."
74
+ ).optional(),
75
+ checkIfPublish: z.boolean().describe(
76
+ "Check if Wix page for the requested intent is published and return it if possible. Otherwise, return a standard Wix template for it.\nDefault: `false`"
77
+ ).optional().nullable()
78
+ }).describe(
79
+ "Optional preferences for customizing redirection to Wix pages."
80
+ ).optional(),
81
+ origin: z.string().describe("The origin of the request").max(2048).optional().nullable()
82
+ }),
83
+ z.xor([
84
+ z.object({
85
+ ecomCheckout: z.never().optional(),
86
+ eventsCheckout: z.never().optional(),
87
+ paidPlansCheckout: z.never().optional(),
88
+ logout: z.never().optional(),
89
+ auth: z.never().optional(),
90
+ storesProduct: z.never().optional(),
91
+ bookingsBook: z.never().optional(),
92
+ bookingsCheckout: z.object({
93
+ timezone: z.string().describe(
94
+ "The timezone to use when presenting the selected slot to users, in [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) format. For example, `America/Santiago`.\n\nDefault: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used."
95
+ ).max(40).optional(),
96
+ slotAvailability: z.object({
97
+ slot: z.object({
98
+ sessionId: z.string().describe(
99
+ "ID for the slot's corresponding session, when the session is either a single session\nor a specific session generated from a recurring session.\n\nDeprecated. Please use `eventId` instead."
100
+ ).optional().nullable(),
101
+ serviceId: z.string().describe("Service ID.").optional(),
102
+ scheduleId: z.string().describe("Schedule ID.").optional(),
103
+ startDate: z.string().describe(
104
+ "The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\nformat.\n\nIf `timezone` is specified,\ndates are based on the local date/time. This means that the timezone offset\nin the `start_date` is ignored."
105
+ ).optional().nullable(),
106
+ endDate: z.string().describe(
107
+ "The end time of this slot in\n[RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.\n\nIf `timezone` is specified,\ndates are based on the local date/time. This means that the timezone offset\nin the `end_date` is ignored."
108
+ ).optional().nullable(),
109
+ timezone: z.string().describe(
110
+ "The timezone for which slot availability is to be calculated.\n\nLearn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_handling-daylight-savings-time-dst-for-local-time-zones)\nwhen calculating availability."
111
+ ).optional().nullable(),
112
+ resource: z.object({
113
+ _id: z.string().describe("Resource ID.").regex(
114
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
115
+ "Must be a valid GUID"
116
+ ).optional().nullable(),
117
+ name: z.string().describe("Resource name. Read only.").max(1200).optional().nullable()
118
+ }).describe(
119
+ "The resource required for this slot. Currently, the only supported resource\nis the relevant staff member for the slot."
120
+ ).optional(),
121
+ location: z.object({
122
+ _id: z.string().describe(
123
+ 'Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `"OWNER_BUSINESS"`.'
124
+ ).regex(
125
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
126
+ "Must be a valid GUID"
127
+ ).optional().nullable(),
128
+ name: z.string().describe("Location name.").optional().nullable(),
129
+ formattedAddress: z.string().describe("The full address of this location.").optional().nullable(),
130
+ formattedAddressTranslated: z.string().describe(
131
+ "The full translated address of this location."
132
+ ).max(512).optional().nullable(),
133
+ locationType: z.enum([
134
+ "UNDEFINED",
135
+ "OWNER_BUSINESS",
136
+ "OWNER_CUSTOM",
137
+ "CUSTOM"
138
+ ]).optional()
139
+ }).describe("Geographic location of the slot.").optional(),
140
+ eventId: z.string().describe(
141
+ "ID for the slot's corresponding event, when the event is either a single event\nor a specific event generated from a recurring event."
142
+ ).min(36).max(250).optional().nullable()
143
+ }).describe(
144
+ "The slot for the corresponding session, when the session is either a single session\nor a specific session generated from a recurring session."
145
+ ).optional(),
146
+ bookable: z.boolean().describe(
147
+ "Whether the slot is bookable. Bookability is determined by checking a\nsession's open slots and booking policies. Locks are not taken into\naccount."
148
+ ).optional(),
149
+ totalSpots: z.number().int().describe(
150
+ "Total number of spots for this slot.\nFor example, if a session has a total of 10 spots and 3 spots are booked,\n`spotsTotal` is 10 and `openSpots` is 7."
151
+ ).optional().nullable(),
152
+ openSpots: z.number().int().describe("Number of open spots for this slot.").optional().nullable(),
153
+ waitingList: z.object({
154
+ totalSpots: z.number().int().describe(
155
+ "Total number of spots and open spots for this waitlist.\nFor example, a Yoga class with 10 waitlist spots and 3 registered\non the waitlist has 10 `total_spots` and 7 `open_spots`."
156
+ ).optional().nullable(),
157
+ openSpots: z.number().int().describe("Number of open spots for this waitlist.").optional().nullable()
158
+ }).describe(
159
+ "An object describing the slot's waitlist and its occupancy."
160
+ ).optional(),
161
+ bookingPolicyViolations: z.object({
162
+ tooEarlyToBook: z.boolean().describe(
163
+ "Bookings policy violation. Too early to book this slot."
164
+ ).optional().nullable(),
165
+ tooLateToBook: z.boolean().describe(
166
+ "Bookings policy violation. Too late to book this slot."
167
+ ).optional().nullable(),
168
+ bookOnlineDisabled: z.boolean().describe(
169
+ "Bookings policy violation. Online booking is disabled for this slot."
170
+ ).optional().nullable(),
171
+ validSubmissionRequired: z.boolean().describe(
172
+ "Bookings policy violation. Intake Form submission is required for this slot."
173
+ ).optional().nullable()
174
+ }).describe("Booking policy violations for the slot.").optional(),
175
+ locked: z.boolean().describe(
176
+ "Indicates whether the slot is locked because a waitlist exists.\nWhen a slot frees up, the slot is offered to the next customer on the waitlist. Read-only."
177
+ ).optional().nullable(),
178
+ isFromV2: z.boolean().describe("Deprecated. not in use since 2025-06-15.").optional()
179
+ }).describe(
180
+ "<b>Required</b>. The selected calendar slots to begin a booking checkout."
181
+ ).optional()
182
+ }).describe(
183
+ "Information required for generating a custom URL for a Wix Bookings checkout."
184
+ )
185
+ }),
186
+ z.object({
187
+ bookingsCheckout: z.never().optional(),
188
+ eventsCheckout: z.never().optional(),
189
+ paidPlansCheckout: z.never().optional(),
190
+ logout: z.never().optional(),
191
+ auth: z.never().optional(),
192
+ storesProduct: z.never().optional(),
193
+ bookingsBook: z.never().optional(),
194
+ ecomCheckout: z.object({
195
+ checkoutId: z.string().describe(
196
+ "<b>Required</b>. ID of the checkout to process.\nTo retrieve this ID, create a checkout and the relevant ID is returned in the response.\n\nCreate a checkout using one of the following:\n- SDK: [Create Checkout](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/create-checkout) or [Create Checkout From Current Cart](https://dev.wix.com/docs/sdk/backend-modules/ecom/current-cart/create-checkout-from-current-cart).\n- REST: [Create Checkout From Cart](https://dev.wix.com/docs/rest/business-solutions/e-commerce/cart/create-checkout-from-cart)."
197
+ ).regex(
198
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
199
+ "Must be a valid GUID"
200
+ ).optional()
201
+ }).describe(
202
+ "Information required for generating a custom URL for a Wix eCommerce checkout."
203
+ )
204
+ }),
205
+ z.object({
206
+ bookingsCheckout: z.never().optional(),
207
+ ecomCheckout: z.never().optional(),
208
+ paidPlansCheckout: z.never().optional(),
209
+ logout: z.never().optional(),
210
+ auth: z.never().optional(),
211
+ storesProduct: z.never().optional(),
212
+ bookingsBook: z.never().optional(),
213
+ eventsCheckout: z.object({
214
+ reservationId: z.string().describe(
215
+ "<b>Required</b>. ID of the temporary event reservation. Call Create Reservation ([SDK](https://dev.wix.com/docs/sdk/backend-modules/events/orders/create-reservation) | [REST](https://dev.wix.com/docs/rest/business-solutions/events/orders/create-reservation)) to reserve a ticket temporarily and obtain a reservation ID."
216
+ ).regex(
217
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
218
+ "Must be a valid GUID"
219
+ ).optional(),
220
+ eventSlug: z.string().describe(
221
+ "<b>Required</b>. URL-friendly event slug, generated from the event title of the event. For example, `my-event-4`. To obtain an event slug, call Get Event ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/get-event) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/get-event))."
222
+ ).max(150).optional()
223
+ }).describe(
224
+ "Information required for generating a custom URL for a Wix Events checkout."
225
+ )
226
+ }),
227
+ z.object({
228
+ bookingsCheckout: z.never().optional(),
229
+ ecomCheckout: z.never().optional(),
230
+ eventsCheckout: z.never().optional(),
231
+ logout: z.never().optional(),
232
+ auth: z.never().optional(),
233
+ storesProduct: z.never().optional(),
234
+ bookingsBook: z.never().optional(),
235
+ paidPlansCheckout: z.object({
236
+ planId: z.string().describe(
237
+ "<b>Required</b>. ID of the paid plan selected. To get a plan ID, call Query Public Plans ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/query-public-plans) | [REST](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans/query-public-plans))."
238
+ ).regex(
239
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
240
+ "Must be a valid GUID"
241
+ ).optional(),
242
+ checkoutData: z.string().describe(
243
+ "For use when pricing plan selection is part of a checkout flow, only if the paid plan selection page is implemented on an external Wix Headless client site.\nIn this case, a string is received by the external pricing plans page as a `checkoutData` query parameter. Pass this string back here when redirecting back to Wix for checkout."
244
+ ).max(2048).optional().nullable()
245
+ }).describe(
246
+ "Information required for generating a custom URL for a Wix Paid Plans checkout."
247
+ )
248
+ }),
249
+ z.object({
250
+ bookingsCheckout: z.never().optional(),
251
+ ecomCheckout: z.never().optional(),
252
+ eventsCheckout: z.never().optional(),
253
+ paidPlansCheckout: z.never().optional(),
254
+ auth: z.never().optional(),
255
+ storesProduct: z.never().optional(),
256
+ bookingsBook: z.never().optional(),
257
+ logout: z.object({
258
+ clientId: z.string().describe(
259
+ "<b>Required</b>. ID of the OAuth app authorizing the client. To get this ID, go to your [Headless settings](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2F{{oauth-apps-settings/manage}}) and copy the Client ID of your OAuth app."
260
+ ).regex(
261
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
262
+ "Must be a valid GUID"
263
+ ).optional()
264
+ }).describe(
265
+ "Information required for generating a custom URL to log out from a Wix account. This process invalidates the visitor or member token and clears cookies associated with the Wix domain from their browser."
266
+ )
267
+ }),
268
+ z.object({
269
+ bookingsCheckout: z.never().optional(),
270
+ ecomCheckout: z.never().optional(),
271
+ eventsCheckout: z.never().optional(),
272
+ paidPlansCheckout: z.never().optional(),
273
+ logout: z.never().optional(),
274
+ storesProduct: z.never().optional(),
275
+ bookingsBook: z.never().optional(),
276
+ auth: z.object({
277
+ authRequest: z.object({
278
+ clientId: z.string().describe(
279
+ "ID of the Wix OAuth app requesting authorization."
280
+ ).regex(
281
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
282
+ "Must be a valid GUID"
283
+ ).optional(),
284
+ responseType: z.string().describe(
285
+ "Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).\n\nSupported values:\n+ `code`: The endpoint returns an authorization code that can be used to obtain an access token."
286
+ ).min(1).optional(),
287
+ redirectUri: z.string().describe(
288
+ "URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not."
289
+ ).min(1).optional().nullable(),
290
+ scope: z.string().describe(
291
+ "Desired scope of access. If this field is left empty, only an access token is granted.\nTo received a refresh token, pass `offline_access` as the value of this field."
292
+ ).optional().nullable(),
293
+ state: z.string().describe(
294
+ "A value used to confirm the state of an application before and after it makes an authorization\nrequest. If a value for this field is set in the request, it's added to the `redirectUri` when the browser\nis redirected there.\nLearn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters)."
295
+ ).min(1).optional(),
296
+ responseMode: z.string().describe(
297
+ "esired response format.\n\nSupported values:\n+ `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.\n+ `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.\n+ `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).\n\nDefault value: `query`"
298
+ ).optional().nullable(),
299
+ codeChallenge: z.string().describe(
300
+ "Code challenge to use for PKCE verification.\nThis field is only used if `responseType` is set to `code`."
301
+ ).optional().nullable(),
302
+ codeChallengeMethod: z.string().describe(
303
+ "Code challenge method to use for PKCE verification.\nThis field is only used if `responseType` is set to `code`.\n\nSupported values:\n+ `S256`: The code challenge is transformed using SHA-256 encyption.\n+ `S512`: The code challenge is transformed using SHA-512 encyption."
304
+ ).optional().nullable(),
305
+ sessionToken: z.string().describe("Session token of the site visitor to authorize.").optional().nullable(),
306
+ signInUrl: z.string().describe("URL to redirect user to sign in").url().optional().nullable(),
307
+ userConsented: z.boolean().describe(
308
+ "Indicates whether the user has consented to the requested scopes"
309
+ ).optional().nullable(),
310
+ optionalLogin: z.boolean().describe(
311
+ "Indicates whether login is optional. If true, will not redirect to the sign_in_url if user is not logged in."
312
+ ).optional().nullable(),
313
+ metaSiteId: z.string().describe("The site id the authorization is requested for.").regex(
314
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
315
+ "Must be a valid GUID"
316
+ ).optional().nullable()
317
+ }).describe(
318
+ "<b>Required</b>. Details of the authorization request."
319
+ ).optional(),
320
+ prompt: z.enum(["login", "none"]).optional()
321
+ }).describe(
322
+ "Information required for generating a custom URL for Wix authentication."
323
+ )
324
+ }),
325
+ z.object({
326
+ bookingsCheckout: z.never().optional(),
327
+ ecomCheckout: z.never().optional(),
328
+ eventsCheckout: z.never().optional(),
329
+ paidPlansCheckout: z.never().optional(),
330
+ logout: z.never().optional(),
331
+ auth: z.never().optional(),
332
+ bookingsBook: z.never().optional(),
333
+ storesProduct: z.object({
334
+ productSlug: z.string().describe(
335
+ "<b>Required</b>. Unique slug of the product to redirect to. To obtain a product slug, call Query Products [SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/products-v3/get-product-by-slug) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog-v3/products-v3/query-products))."
336
+ ).max(150).optional()
337
+ }).describe(
338
+ "Information required for generating a custom URL for a Wix stores product page."
339
+ )
340
+ }),
341
+ z.object({
342
+ bookingsCheckout: z.never().optional(),
343
+ ecomCheckout: z.never().optional(),
344
+ eventsCheckout: z.never().optional(),
345
+ paidPlansCheckout: z.never().optional(),
346
+ logout: z.never().optional(),
347
+ auth: z.never().optional(),
348
+ storesProduct: z.never().optional(),
349
+ bookingsBook: z.object({
350
+ resourceId: z.string().describe(
351
+ "For use when filtering the bookings page by a specific resource."
352
+ ).regex(
353
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
354
+ "Must be a valid GUID"
355
+ ).optional()
356
+ }).describe(
357
+ "Information required for generating a custom URL for Wix bookings book page."
358
+ )
359
+ })
360
+ ])
361
+ ).describe("Options for creating a redirect session.")
362
+ });
363
+ var CreateRedirectSessionResponse = z.object({
364
+ redirectSession: z.object({
365
+ _id: z.string().describe("ID of the redirect session created.").regex(
366
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
367
+ "Must be a valid GUID"
368
+ ).optional(),
369
+ fullUrl: z.string().describe(
370
+ "The full URL of the Wix page to redirect the visitor to. This URL includes query parameters informing Wix where to redirect the visitor back to on the Wix Headless client site."
371
+ ).max(2048).optional(),
372
+ urlDetails: z.object({
373
+ endpoint: z.string().describe(
374
+ "Endpoint of the url. This includes the base URL and the path to the endpoint, without query parameters.\nFor example: `https://mysite.com/_api/oauth2/authorize`."
375
+ ).max(2048).optional(),
376
+ searchParams: z.record(z.string(), z.string()).describe("URL query parameters.").optional()
377
+ }).describe("Details about the URL of the redirect session.").optional(),
378
+ sessionToken: z.string().describe(
379
+ "The session token to pass to the Wix page to maintain the visitor's identity."
380
+ ).max(2048).optional().nullable(),
381
+ shortUrl: z.string().describe(
382
+ "The short URL of the Wix page to redirect the visitor to. This URL includes query parameters informing Wix where to redirect the visitor back to on the Wix Headless client site."
383
+ ).max(2048).optional()
384
+ }).describe("Details for redirecting the visitor to a Wix page.").optional()
385
+ });
386
+ // Annotate the CommonJS export names for ESM import in node:
387
+ 0 && (module.exports = {
388
+ CreateRedirectSessionRequest,
389
+ CreateRedirectSessionResponse
390
+ });
391
+ //# sourceMappingURL=schemas.js.map