@wix/auto_sdk_redirects_redirects 1.0.5 → 1.0.7
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/{internal/cjs/src/headless-v1-redirect-session-redirects.universal.d.ts → headless-v1-redirect-session-redirects.universal-C1lXOxUS.d.mts} +82 -136
- package/build/{cjs/src/headless-v1-redirect-session-redirects.universal.d.ts → headless-v1-redirect-session-redirects.universal-C1lXOxUS.d.ts} +82 -136
- package/build/index.d.mts +30 -0
- package/build/index.d.ts +30 -0
- package/build/index.js +223 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +191 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/headless-v1-redirect-session-redirects.universal.d.ts → headless-v1-redirect-session-redirects.universal-C1lXOxUS.d.mts} +82 -136
- package/build/{es/src/headless-v1-redirect-session-redirects.universal.d.ts → internal/headless-v1-redirect-session-redirects.universal-C1lXOxUS.d.ts} +82 -136
- package/build/internal/index.d.mts +30 -0
- package/build/internal/index.d.ts +30 -0
- package/build/internal/index.js +223 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +191 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/{cjs/src/headless-v1-redirect-session-redirects.types.d.ts → internal/meta.d.mts} +47 -326
- package/build/{es/src/headless-v1-redirect-session-redirects.types.d.ts → internal/meta.d.ts} +47 -326
- package/build/internal/meta.js +93 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +66 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{internal/cjs/src/headless-v1-redirect-session-redirects.types.d.ts → meta.d.mts} +47 -326
- package/build/{internal/es/src/headless-v1-redirect-session-redirects.types.d.ts → meta.d.ts} +47 -326
- package/build/meta.js +93 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +66 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session-redirects.context.d.ts +0 -11
- package/build/cjs/src/headless-v1-redirect-session-redirects.context.js +0 -21
- package/build/cjs/src/headless-v1-redirect-session-redirects.context.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session-redirects.http.d.ts +0 -14
- package/build/cjs/src/headless-v1-redirect-session-redirects.http.js +0 -58
- package/build/cjs/src/headless-v1-redirect-session-redirects.http.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session-redirects.meta.d.ts +0 -13
- package/build/cjs/src/headless-v1-redirect-session-redirects.meta.js +0 -47
- package/build/cjs/src/headless-v1-redirect-session-redirects.meta.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session-redirects.public.d.ts +0 -24
- package/build/cjs/src/headless-v1-redirect-session-redirects.public.js +0 -30
- package/build/cjs/src/headless-v1-redirect-session-redirects.public.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session-redirects.types.js +0 -75
- package/build/cjs/src/headless-v1-redirect-session-redirects.types.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session-redirects.universal.js +0 -182
- package/build/cjs/src/headless-v1-redirect-session-redirects.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/headless-v1-redirect-session-redirects.context.d.ts +0 -11
- package/build/es/src/headless-v1-redirect-session-redirects.context.js +0 -11
- package/build/es/src/headless-v1-redirect-session-redirects.context.js.map +0 -1
- package/build/es/src/headless-v1-redirect-session-redirects.http.d.ts +0 -14
- package/build/es/src/headless-v1-redirect-session-redirects.http.js +0 -54
- package/build/es/src/headless-v1-redirect-session-redirects.http.js.map +0 -1
- package/build/es/src/headless-v1-redirect-session-redirects.meta.d.ts +0 -13
- package/build/es/src/headless-v1-redirect-session-redirects.meta.js +0 -20
- package/build/es/src/headless-v1-redirect-session-redirects.meta.js.map +0 -1
- package/build/es/src/headless-v1-redirect-session-redirects.public.d.ts +0 -24
- package/build/es/src/headless-v1-redirect-session-redirects.public.js +0 -19
- package/build/es/src/headless-v1-redirect-session-redirects.public.js.map +0 -1
- package/build/es/src/headless-v1-redirect-session-redirects.types.js +0 -72
- package/build/es/src/headless-v1-redirect-session-redirects.types.js.map +0 -1
- package/build/es/src/headless-v1-redirect-session-redirects.universal.js +0 -155
- package/build/es/src/headless-v1-redirect-session-redirects.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.context.d.ts +0 -11
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.context.js +0 -21
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.context.js.map +0 -1
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.http.d.ts +0 -14
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.http.js +0 -58
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.http.js.map +0 -1
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.meta.d.ts +0 -13
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.meta.js +0 -47
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.meta.js.map +0 -1
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.public.d.ts +0 -24
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.public.js +0 -30
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.public.js.map +0 -1
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.types.js +0 -75
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.types.js.map +0 -1
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.universal.js +0 -182
- package/build/internal/cjs/src/headless-v1-redirect-session-redirects.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/headless-v1-redirect-session-redirects.context.d.ts +0 -11
- package/build/internal/es/src/headless-v1-redirect-session-redirects.context.js +0 -11
- package/build/internal/es/src/headless-v1-redirect-session-redirects.context.js.map +0 -1
- package/build/internal/es/src/headless-v1-redirect-session-redirects.http.d.ts +0 -14
- package/build/internal/es/src/headless-v1-redirect-session-redirects.http.js +0 -54
- package/build/internal/es/src/headless-v1-redirect-session-redirects.http.js.map +0 -1
- package/build/internal/es/src/headless-v1-redirect-session-redirects.meta.d.ts +0 -13
- package/build/internal/es/src/headless-v1-redirect-session-redirects.meta.js +0 -20
- package/build/internal/es/src/headless-v1-redirect-session-redirects.meta.js.map +0 -1
- package/build/internal/es/src/headless-v1-redirect-session-redirects.public.d.ts +0 -24
- package/build/internal/es/src/headless-v1-redirect-session-redirects.public.js +0 -19
- package/build/internal/es/src/headless-v1-redirect-session-redirects.public.js.map +0 -1
- package/build/internal/es/src/headless-v1-redirect-session-redirects.types.js +0 -72
- package/build/internal/es/src/headless-v1-redirect-session-redirects.types.js.map +0 -1
- package/build/internal/es/src/headless-v1-redirect-session-redirects.universal.js +0 -155
- package/build/internal/es/src/headless-v1-redirect-session-redirects.universal.js.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
1
|
/** Information for redirecting a visitor from an external Wix Headless client site to a Wix page for Wix-managed functionality. */
|
|
3
|
-
|
|
2
|
+
interface RedirectSession {
|
|
4
3
|
/**
|
|
5
4
|
* ID of the redirect session created.
|
|
6
5
|
* @format GUID
|
|
@@ -27,7 +26,7 @@ export interface RedirectSession {
|
|
|
27
26
|
*/
|
|
28
27
|
shortUrl?: string;
|
|
29
28
|
}
|
|
30
|
-
|
|
29
|
+
interface URLDetails {
|
|
31
30
|
/**
|
|
32
31
|
* Endpoint of the url. This includes the base URL and the path to the endpoint, without query parameters.
|
|
33
32
|
* For example: `https://mysite.com/_api/oauth2/authorize`.
|
|
@@ -38,7 +37,7 @@ export interface URLDetails {
|
|
|
38
37
|
/** URL query parameters. */
|
|
39
38
|
searchParams?: Record<string, string>;
|
|
40
39
|
}
|
|
41
|
-
|
|
40
|
+
interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestIntentOneOf {
|
|
42
41
|
/** Information required for generating a custom URL for a Wix Bookings checkout. */
|
|
43
42
|
bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
|
|
44
43
|
/** Information required for generating a custom URL for a Wix eCommerce checkout. */
|
|
@@ -69,7 +68,7 @@ export interface CreateRedirectSessionRequest extends CreateRedirectSessionReque
|
|
|
69
68
|
preferences?: RedirectSessionPreferences;
|
|
70
69
|
}
|
|
71
70
|
/** @oneof */
|
|
72
|
-
|
|
71
|
+
interface CreateRedirectSessionRequestIntentOneOf {
|
|
73
72
|
/** Information required for generating a custom URL for a Wix Bookings checkout. */
|
|
74
73
|
bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
|
|
75
74
|
/** Information required for generating a custom URL for a Wix eCommerce checkout. */
|
|
@@ -89,7 +88,7 @@ export interface CreateRedirectSessionRequestIntentOneOf {
|
|
|
89
88
|
/** Information required for generating a custom URL for Wix bookings book page. */
|
|
90
89
|
bookingsBook?: RedirectSessionBookingsBookParams;
|
|
91
90
|
}
|
|
92
|
-
|
|
91
|
+
interface RedirectSessionBookingsCheckoutParams {
|
|
93
92
|
/**
|
|
94
93
|
* 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`.
|
|
95
94
|
*
|
|
@@ -99,7 +98,7 @@ export interface RedirectSessionBookingsCheckoutParams {
|
|
|
99
98
|
timezone?: string;
|
|
100
99
|
slotAvailability?: SlotAvailability;
|
|
101
100
|
}
|
|
102
|
-
|
|
101
|
+
interface SlotAvailability {
|
|
103
102
|
/**
|
|
104
103
|
* The slot for the corresponding session, when the session is either a single session
|
|
105
104
|
* or a specific session generated from a recurring session.
|
|
@@ -130,7 +129,7 @@ export interface SlotAvailability {
|
|
|
130
129
|
locked?: boolean | null;
|
|
131
130
|
isFromV2?: boolean;
|
|
132
131
|
}
|
|
133
|
-
|
|
132
|
+
interface Slot {
|
|
134
133
|
/**
|
|
135
134
|
* ID for the slot's corresponding session, when the session is either a single session
|
|
136
135
|
* or a specific session generated from a recurring session.
|
|
@@ -188,7 +187,7 @@ export interface Slot {
|
|
|
188
187
|
*/
|
|
189
188
|
eventId?: string | null;
|
|
190
189
|
}
|
|
191
|
-
|
|
190
|
+
interface SlotResource {
|
|
192
191
|
/**
|
|
193
192
|
* Resource ID.
|
|
194
193
|
* @format GUID
|
|
@@ -201,7 +200,7 @@ export interface SlotResource {
|
|
|
201
200
|
*/
|
|
202
201
|
name?: string | null;
|
|
203
202
|
}
|
|
204
|
-
|
|
203
|
+
interface Location {
|
|
205
204
|
/**
|
|
206
205
|
* Business location ID. Available only for locations that are business locations,
|
|
207
206
|
* meaning the `location_type` is `"OWNER_BUSINESS"`.
|
|
@@ -224,15 +223,17 @@ export interface Location {
|
|
|
224
223
|
* - `"OWNER_CUSTOM"`: The address as set when creating the service.
|
|
225
224
|
* - `"CUSTOM"`: The address as set for the individual session.
|
|
226
225
|
*/
|
|
227
|
-
locationType?:
|
|
226
|
+
locationType?: LocationTypeWithLiterals;
|
|
228
227
|
}
|
|
229
|
-
|
|
228
|
+
declare enum LocationType {
|
|
230
229
|
UNDEFINED = "UNDEFINED",
|
|
231
230
|
OWNER_BUSINESS = "OWNER_BUSINESS",
|
|
232
231
|
OWNER_CUSTOM = "OWNER_CUSTOM",
|
|
233
232
|
CUSTOM = "CUSTOM"
|
|
234
233
|
}
|
|
235
|
-
|
|
234
|
+
/** @enumType */
|
|
235
|
+
type LocationTypeWithLiterals = LocationType | 'UNDEFINED' | 'OWNER_BUSINESS' | 'OWNER_CUSTOM' | 'CUSTOM';
|
|
236
|
+
interface WaitingList {
|
|
236
237
|
/**
|
|
237
238
|
* Total number of spots and open spots for this waitlist.
|
|
238
239
|
* For example, a Yoga class with 10 waitlist spots and 3 registered
|
|
@@ -242,7 +243,7 @@ export interface WaitingList {
|
|
|
242
243
|
/** Number of open spots for this waitlist. */
|
|
243
244
|
openSpots?: number | null;
|
|
244
245
|
}
|
|
245
|
-
|
|
246
|
+
interface BookingPolicyViolations {
|
|
246
247
|
/** Bookings policy violation. Too early to book this slot. */
|
|
247
248
|
tooEarlyToBook?: boolean | null;
|
|
248
249
|
/** Bookings policy violation. Too late to book this slot. */
|
|
@@ -250,7 +251,7 @@ export interface BookingPolicyViolations {
|
|
|
250
251
|
/** Bookings policy violation. Online booking is disabled for this slot. */
|
|
251
252
|
bookOnlineDisabled?: boolean | null;
|
|
252
253
|
}
|
|
253
|
-
|
|
254
|
+
interface NestedTimeSlot {
|
|
254
255
|
/** @format GUID */
|
|
255
256
|
serviceId?: string;
|
|
256
257
|
/** @maxLength 30 */
|
|
@@ -261,7 +262,7 @@ export interface NestedTimeSlot {
|
|
|
261
262
|
/** Schedule ID. */
|
|
262
263
|
scheduleId?: string;
|
|
263
264
|
}
|
|
264
|
-
|
|
265
|
+
interface RedirectSessionEcomCheckoutParams {
|
|
265
266
|
/**
|
|
266
267
|
* - SDK: Use [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).
|
|
267
268
|
* - REST: Use [Create Checkout From Cart](https://dev.wix.com/docs/rest/business-solutions/e-commerce/cart/create-checkout-from-cart).
|
|
@@ -269,13 +270,13 @@ export interface RedirectSessionEcomCheckoutParams {
|
|
|
269
270
|
*/
|
|
270
271
|
checkoutId?: string;
|
|
271
272
|
}
|
|
272
|
-
|
|
273
|
+
interface RedirectSessionEventsCheckoutParams {
|
|
273
274
|
/** @format GUID */
|
|
274
275
|
reservationId?: string;
|
|
275
276
|
/** @maxLength 150 */
|
|
276
277
|
eventSlug?: string;
|
|
277
278
|
}
|
|
278
|
-
|
|
279
|
+
interface RedirectSessionPaidPlansCheckoutParams {
|
|
279
280
|
/** @format GUID */
|
|
280
281
|
planId?: string;
|
|
281
282
|
/**
|
|
@@ -285,22 +286,22 @@ export interface RedirectSessionPaidPlansCheckoutParams {
|
|
|
285
286
|
*/
|
|
286
287
|
checkoutData?: string | null;
|
|
287
288
|
}
|
|
288
|
-
|
|
289
|
+
interface RedirectSessionLoginParams {
|
|
289
290
|
}
|
|
290
|
-
|
|
291
|
+
interface RedirectSessionLogoutParams {
|
|
291
292
|
/** @format GUID */
|
|
292
293
|
clientId?: string;
|
|
293
294
|
}
|
|
294
|
-
|
|
295
|
+
interface RedirectSessionAuthParams {
|
|
295
296
|
authRequest?: AuthorizeRequest;
|
|
296
297
|
/** The type of prompt to use during the authorization process. */
|
|
297
|
-
prompt?:
|
|
298
|
+
prompt?: PromptWithLiterals;
|
|
298
299
|
}
|
|
299
300
|
/**
|
|
300
301
|
* AuthorizeRequest is sent by the client to the authorization server to initiate
|
|
301
302
|
* the authorization process.
|
|
302
303
|
*/
|
|
303
|
-
|
|
304
|
+
interface AuthorizeRequest {
|
|
304
305
|
/**
|
|
305
306
|
* ID of the Wix OAuth app requesting authorization.
|
|
306
307
|
* @format GUID
|
|
@@ -366,7 +367,7 @@ export interface AuthorizeRequest {
|
|
|
366
367
|
signInUrl?: string | null;
|
|
367
368
|
}
|
|
368
369
|
/** Specifies the behavior of the authorization flow regarding site member authentication and consent. */
|
|
369
|
-
|
|
370
|
+
declare enum Prompt {
|
|
370
371
|
/** Display the login page to the member, prompting them to enter their credentials. */
|
|
371
372
|
login = "login",
|
|
372
373
|
/**
|
|
@@ -376,15 +377,17 @@ export declare enum Prompt {
|
|
|
376
377
|
*/
|
|
377
378
|
none = "none"
|
|
378
379
|
}
|
|
379
|
-
|
|
380
|
+
/** @enumType */
|
|
381
|
+
type PromptWithLiterals = Prompt | 'login' | 'none';
|
|
382
|
+
interface RedirectSessionMembersAccountParams {
|
|
380
383
|
/**
|
|
381
384
|
* The member account page to redirect to.
|
|
382
385
|
*
|
|
383
386
|
* Default: `ACCOUNT_INFO`
|
|
384
387
|
*/
|
|
385
|
-
section?:
|
|
388
|
+
section?: MembersAccountSectionWithLiterals;
|
|
386
389
|
}
|
|
387
|
-
|
|
390
|
+
declare enum MembersAccountSection {
|
|
388
391
|
/** Account info section in "my account". */
|
|
389
392
|
ACCOUNT_INFO = "ACCOUNT_INFO",
|
|
390
393
|
/** My Bookings section in "my account". */
|
|
@@ -396,18 +399,20 @@ export declare enum MembersAccountSection {
|
|
|
396
399
|
/** Events section in "my account". */
|
|
397
400
|
EVENTS = "EVENTS"
|
|
398
401
|
}
|
|
399
|
-
|
|
402
|
+
/** @enumType */
|
|
403
|
+
type MembersAccountSectionWithLiterals = MembersAccountSection | 'ACCOUNT_INFO' | 'BOOKINGS' | 'ORDERS' | 'SUBSCRIPTIONS' | 'EVENTS';
|
|
404
|
+
interface RedirectSessionStoresProductParams {
|
|
400
405
|
/** @maxLength 150 */
|
|
401
406
|
productSlug?: string;
|
|
402
407
|
}
|
|
403
|
-
|
|
408
|
+
interface RedirectSessionBookingsBookParams {
|
|
404
409
|
/**
|
|
405
410
|
* For use when filtering the bookings page by a specific resource.
|
|
406
411
|
* @format GUID
|
|
407
412
|
*/
|
|
408
413
|
resourceId?: string;
|
|
409
414
|
}
|
|
410
|
-
|
|
415
|
+
interface CallbackParams {
|
|
411
416
|
/**
|
|
412
417
|
* 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.
|
|
413
418
|
* When redirecting to this URL, Wix passes different query parameters depending on the preceding transaction:
|
|
@@ -466,7 +471,7 @@ export interface CallbackParams {
|
|
|
466
471
|
*/
|
|
467
472
|
planListUrl?: string | null;
|
|
468
473
|
}
|
|
469
|
-
|
|
474
|
+
interface RedirectSessionPreferences {
|
|
470
475
|
/**
|
|
471
476
|
* 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.
|
|
472
477
|
*
|
|
@@ -479,13 +484,9 @@ export interface RedirectSessionPreferences {
|
|
|
479
484
|
* Default: `true`
|
|
480
485
|
*/
|
|
481
486
|
maintainIdentity?: boolean | null;
|
|
482
|
-
/**
|
|
483
|
-
* Map of additional global query parameters to add to the created Wix URL.
|
|
484
|
-
* For example, [UTM parameters](https://en.wikipedia.org/wiki/UTM_parameters).
|
|
485
|
-
*/
|
|
486
487
|
additionalQueryParameters?: Record<string, string>;
|
|
487
488
|
}
|
|
488
|
-
|
|
489
|
+
interface CustomMemberPaths {
|
|
489
490
|
/**
|
|
490
491
|
* Path of the account page in the site's members area. Required if `useGenericWixPages` is `false` and the account page path has been changed in the Wix editor.
|
|
491
492
|
* @format URL_SLUG
|
|
@@ -497,11 +498,11 @@ export interface CustomMemberPaths {
|
|
|
497
498
|
*/
|
|
498
499
|
profilePagePath?: string | null;
|
|
499
500
|
}
|
|
500
|
-
|
|
501
|
+
interface CreateRedirectSessionResponse {
|
|
501
502
|
/** Details for redirecting the visitor to a Wix page. */
|
|
502
503
|
redirectSession?: RedirectSession;
|
|
503
504
|
}
|
|
504
|
-
|
|
505
|
+
interface CreateAnonymousRedirectSessionRequest extends CreateAnonymousRedirectSessionRequestIntentOneOf {
|
|
505
506
|
/** Information required for generating a custom URL for a Wix Bookings checkout. */
|
|
506
507
|
bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
|
|
507
508
|
/** Information required for generating a custom URL for a Wix eCommerce checkout. */
|
|
@@ -518,7 +519,7 @@ export interface CreateAnonymousRedirectSessionRequest extends CreateAnonymousRe
|
|
|
518
519
|
preferences?: RedirectSessionPreferences;
|
|
519
520
|
}
|
|
520
521
|
/** @oneof */
|
|
521
|
-
|
|
522
|
+
interface CreateAnonymousRedirectSessionRequestIntentOneOf {
|
|
522
523
|
/** Information required for generating a custom URL for a Wix Bookings checkout. */
|
|
523
524
|
bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
|
|
524
525
|
/** Information required for generating a custom URL for a Wix eCommerce checkout. */
|
|
@@ -532,20 +533,20 @@ export interface CreateAnonymousRedirectSessionRequestIntentOneOf {
|
|
|
532
533
|
/** Information required for generating a custom URL for Wix bookings book page. */
|
|
533
534
|
bookingsBook?: RedirectSessionBookingsBookParams;
|
|
534
535
|
}
|
|
535
|
-
|
|
536
|
+
interface CreateAnonymousRedirectSessionResponse {
|
|
536
537
|
/** Details for redirecting the visitor to a Wix page. */
|
|
537
538
|
redirectSession?: RedirectSession;
|
|
538
539
|
}
|
|
539
|
-
|
|
540
|
+
interface AttachPagesRequest {
|
|
540
541
|
/**
|
|
541
542
|
* App ID that we want to inherit pages for.
|
|
542
543
|
* @format GUID
|
|
543
544
|
*/
|
|
544
545
|
appDefId?: string;
|
|
545
546
|
}
|
|
546
|
-
|
|
547
|
+
interface AttachPagesResponse {
|
|
547
548
|
/** The status of the operation. */
|
|
548
|
-
status?:
|
|
549
|
+
status?: AttachPagesResponseStatusWithLiterals;
|
|
549
550
|
/**
|
|
550
551
|
* A descriptive message about the operation
|
|
551
552
|
* @maxLength 2048
|
|
@@ -556,7 +557,7 @@ export interface AttachPagesResponse {
|
|
|
556
557
|
/** True if the site was already published */
|
|
557
558
|
sitePublished?: boolean;
|
|
558
559
|
}
|
|
559
|
-
|
|
560
|
+
declare enum AttachPagesResponseStatus {
|
|
560
561
|
/** Invalid value. */
|
|
561
562
|
UNKNOWN = "UNKNOWN",
|
|
562
563
|
/** Pages were successfully attached. */
|
|
@@ -566,21 +567,23 @@ export declare enum AttachPagesResponseStatus {
|
|
|
566
567
|
/** An error occurred, such as when the site or app is not found. */
|
|
567
568
|
ERROR = "ERROR"
|
|
568
569
|
}
|
|
569
|
-
|
|
570
|
+
/** @enumType */
|
|
571
|
+
type AttachPagesResponseStatusWithLiterals = AttachPagesResponseStatus | 'UNKNOWN' | 'SUCCESS' | 'NO_ACTION' | 'ERROR';
|
|
572
|
+
interface ValidateCallbackURLRequest {
|
|
570
573
|
/**
|
|
571
574
|
* An external URL to validate
|
|
572
575
|
* @maxLength 2048
|
|
573
576
|
*/
|
|
574
577
|
callbackUrl?: string;
|
|
575
578
|
/** Type of the callback URL. */
|
|
576
|
-
callbackType?:
|
|
579
|
+
callbackType?: CallbackTypeWithLiterals;
|
|
577
580
|
/**
|
|
578
581
|
* The oauth app id used in order to pull the allowed domains from, has to correspond to the same metasite as the site in context
|
|
579
582
|
* @format GUID
|
|
580
583
|
*/
|
|
581
584
|
clientId?: string;
|
|
582
585
|
}
|
|
583
|
-
|
|
586
|
+
declare enum CallbackType {
|
|
584
587
|
/** Invalid value. */
|
|
585
588
|
UNKNOWN = "UNKNOWN",
|
|
586
589
|
/** Callback URL is used for the logout flow. */
|
|
@@ -590,28 +593,30 @@ export declare enum CallbackType {
|
|
|
590
593
|
/** Callback URL is used for the authorize flow. */
|
|
591
594
|
AUTHORIZE = "AUTHORIZE"
|
|
592
595
|
}
|
|
593
|
-
|
|
596
|
+
/** @enumType */
|
|
597
|
+
type CallbackTypeWithLiterals = CallbackType | 'UNKNOWN' | 'LOGOUT' | 'CHECKOUT' | 'AUTHORIZE';
|
|
598
|
+
interface ValidateCallbackURLResponse {
|
|
594
599
|
/** Indicates if the provided URL is allowed for the given client id */
|
|
595
600
|
isValid?: boolean;
|
|
596
601
|
}
|
|
597
|
-
|
|
602
|
+
interface SignInURLRequest {
|
|
598
603
|
/**
|
|
599
604
|
* The oauth app id used in order to pull the allowed domains from, has to correspond to the same metasite as the site in context
|
|
600
605
|
* @format GUID
|
|
601
606
|
*/
|
|
602
607
|
clientId?: string;
|
|
603
608
|
}
|
|
604
|
-
|
|
609
|
+
interface SignInURLResponse {
|
|
605
610
|
/** The Wix URL details to redirect into */
|
|
606
611
|
redirectSession?: RedirectSession;
|
|
607
612
|
}
|
|
608
|
-
|
|
613
|
+
interface AttachAllTemplatesRequest {
|
|
609
614
|
}
|
|
610
|
-
|
|
615
|
+
interface AttachAllTemplatesResponse {
|
|
611
616
|
/** The status of the operation. */
|
|
612
|
-
status?:
|
|
617
|
+
status?: StatusWithLiterals;
|
|
613
618
|
}
|
|
614
|
-
|
|
619
|
+
declare enum Status {
|
|
615
620
|
/** Invalid value. */
|
|
616
621
|
UNKNOWN = "UNKNOWN",
|
|
617
622
|
/** Templates were successfully attached. */
|
|
@@ -619,7 +624,9 @@ export declare enum Status {
|
|
|
619
624
|
/** An error occurred. */
|
|
620
625
|
ERROR = "ERROR"
|
|
621
626
|
}
|
|
622
|
-
|
|
627
|
+
/** @enumType */
|
|
628
|
+
type StatusWithLiterals = Status | 'UNKNOWN' | 'SUCCESS' | 'ERROR';
|
|
629
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
623
630
|
createdEvent?: EntityCreatedEvent;
|
|
624
631
|
updatedEvent?: EntityUpdatedEvent;
|
|
625
632
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -654,19 +661,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
654
661
|
entityEventSequence?: string | null;
|
|
655
662
|
}
|
|
656
663
|
/** @oneof */
|
|
657
|
-
|
|
664
|
+
interface DomainEventBodyOneOf {
|
|
658
665
|
createdEvent?: EntityCreatedEvent;
|
|
659
666
|
updatedEvent?: EntityUpdatedEvent;
|
|
660
667
|
deletedEvent?: EntityDeletedEvent;
|
|
661
668
|
actionEvent?: ActionEvent;
|
|
662
669
|
}
|
|
663
|
-
|
|
670
|
+
interface EntityCreatedEvent {
|
|
664
671
|
entity?: string;
|
|
665
672
|
}
|
|
666
|
-
|
|
673
|
+
interface RestoreInfo {
|
|
667
674
|
deletedDate?: Date | null;
|
|
668
675
|
}
|
|
669
|
-
|
|
676
|
+
interface EntityUpdatedEvent {
|
|
670
677
|
/**
|
|
671
678
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
672
679
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -674,14 +681,14 @@ export interface EntityUpdatedEvent {
|
|
|
674
681
|
*/
|
|
675
682
|
currentEntity?: string;
|
|
676
683
|
}
|
|
677
|
-
|
|
684
|
+
interface EntityDeletedEvent {
|
|
678
685
|
/** Entity that was deleted. */
|
|
679
686
|
deletedEntity?: string | null;
|
|
680
687
|
}
|
|
681
|
-
|
|
688
|
+
interface ActionEvent {
|
|
682
689
|
body?: string;
|
|
683
690
|
}
|
|
684
|
-
|
|
691
|
+
interface MessageEnvelope {
|
|
685
692
|
/**
|
|
686
693
|
* App instance ID.
|
|
687
694
|
* @format GUID
|
|
@@ -697,7 +704,7 @@ export interface MessageEnvelope {
|
|
|
697
704
|
/** Stringify payload. */
|
|
698
705
|
data?: string;
|
|
699
706
|
}
|
|
700
|
-
|
|
707
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
701
708
|
/**
|
|
702
709
|
* ID of a site visitor that has not logged in to the site.
|
|
703
710
|
* @format GUID
|
|
@@ -719,10 +726,10 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
719
726
|
*/
|
|
720
727
|
appId?: string;
|
|
721
728
|
/** @readonly */
|
|
722
|
-
identityType?:
|
|
729
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
723
730
|
}
|
|
724
731
|
/** @oneof */
|
|
725
|
-
|
|
732
|
+
interface IdentificationDataIdOneOf {
|
|
726
733
|
/**
|
|
727
734
|
* ID of a site visitor that has not logged in to the site.
|
|
728
735
|
* @format GUID
|
|
@@ -744,14 +751,16 @@ export interface IdentificationDataIdOneOf {
|
|
|
744
751
|
*/
|
|
745
752
|
appId?: string;
|
|
746
753
|
}
|
|
747
|
-
|
|
754
|
+
declare enum WebhookIdentityType {
|
|
748
755
|
UNKNOWN = "UNKNOWN",
|
|
749
756
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
750
757
|
MEMBER = "MEMBER",
|
|
751
758
|
WIX_USER = "WIX_USER",
|
|
752
759
|
APP = "APP"
|
|
753
760
|
}
|
|
754
|
-
|
|
761
|
+
/** @enumType */
|
|
762
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
763
|
+
interface BaseEventMetadata {
|
|
755
764
|
/**
|
|
756
765
|
* App instance ID.
|
|
757
766
|
* @format GUID
|
|
@@ -765,7 +774,7 @@ export interface BaseEventMetadata {
|
|
|
765
774
|
/** The identification type and identity data. */
|
|
766
775
|
identity?: IdentificationData;
|
|
767
776
|
}
|
|
768
|
-
|
|
777
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
769
778
|
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
770
779
|
_id?: string;
|
|
771
780
|
/**
|
|
@@ -795,75 +804,11 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
795
804
|
*/
|
|
796
805
|
entityEventSequence?: string | null;
|
|
797
806
|
}
|
|
798
|
-
|
|
807
|
+
interface RedirectSessionCreatedEnvelope {
|
|
799
808
|
entity: RedirectSession;
|
|
800
809
|
metadata: EventMetadata;
|
|
801
810
|
}
|
|
802
|
-
|
|
803
|
-
* Triggered when a redirect session is created.
|
|
804
|
-
* @permissionScope Manage Stores
|
|
805
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
806
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
807
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
808
|
-
* @permissionScope Manage Events
|
|
809
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
810
|
-
* @permissionScope Manage Challenges
|
|
811
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
812
|
-
* @permissionScope Manage Portfolio
|
|
813
|
-
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
814
|
-
* @permissionScope Access Verticals by Automations
|
|
815
|
-
* @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
|
|
816
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
817
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
818
|
-
* @permissionScope Set Up Automations
|
|
819
|
-
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
820
|
-
* @permissionId WIX_HEADLESS.WIX_URL_CREATE
|
|
821
|
-
* @webhook
|
|
822
|
-
* @eventType wix.headless.v1.redirect_session_created
|
|
823
|
-
* @serviceIdentifier wix.headless.v1.RedirectSessionService
|
|
824
|
-
* @slug created
|
|
825
|
-
*/
|
|
826
|
-
export declare function onRedirectSessionCreated(handler: (event: RedirectSessionCreatedEnvelope) => void | Promise<void>): void;
|
|
827
|
-
type RedirectSessionNonNullablePaths = `_id` | `fullUrl` | `urlDetails.endpoint` | `shortUrl`;
|
|
828
|
-
/**
|
|
829
|
-
* Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
|
|
830
|
-
*
|
|
831
|
-
* The Create Redirect Session method enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes.
|
|
832
|
-
* For example, your site can temporarily redirect a visitor to Wix for authentication, or for a checkout process for bookings, eCommerce, events, or paid plans transactions.
|
|
833
|
-
*
|
|
834
|
-
* To initiate a redirect session:
|
|
835
|
-
*
|
|
836
|
-
* 1. Call Create Redirect Session with the details required for Wix to take care of one specific process (for example, authentication or a bookings checkout). Provide one or more callback URLs, so Wix can redirect the visitor back to your site as appropriate when the process is over.
|
|
837
|
-
* 1. Redirect your visitor to the URL provided in the response. This URL includes query parameters informing Wix where to redirect the visitor back to on your external site.
|
|
838
|
-
* 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
|
|
839
|
-
* @public
|
|
840
|
-
* @requiredField options.intent
|
|
841
|
-
* @param options - Options for creating a redirect session.
|
|
842
|
-
* @permissionId WIX_HEADLESS.WIX_URL_CREATE
|
|
843
|
-
* @permissionScope Manage Stores
|
|
844
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
845
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
846
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
847
|
-
* @permissionScope Manage Events
|
|
848
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
849
|
-
* @permissionScope Manage Challenges
|
|
850
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
851
|
-
* @permissionScope Manage Portfolio
|
|
852
|
-
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
853
|
-
* @permissionScope Access Verticals by Automations
|
|
854
|
-
* @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
|
|
855
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
856
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
857
|
-
* @permissionScope Set Up Automations
|
|
858
|
-
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
859
|
-
* @applicableIdentity APP
|
|
860
|
-
* @applicableIdentity VISITOR
|
|
861
|
-
* @fqn wix.headless.v1.RedirectSessionService.CreateRedirectSession
|
|
862
|
-
*/
|
|
863
|
-
export declare function createRedirectSession(options?: CreateRedirectSessionOptions): Promise<NonNullablePaths<CreateRedirectSessionResponse, {
|
|
864
|
-
[P in RedirectSessionNonNullablePaths]: `redirectSession.${P}`;
|
|
865
|
-
}[RedirectSessionNonNullablePaths]>>;
|
|
866
|
-
export interface CreateRedirectSessionOptions extends CreateRedirectSessionOptionsIntentOneOf {
|
|
811
|
+
interface CreateRedirectSessionOptions extends CreateRedirectSessionOptionsIntentOneOf {
|
|
867
812
|
/** Information required for generating a custom URL for a Wix Bookings checkout. */
|
|
868
813
|
bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
|
|
869
814
|
/** Information required for generating a custom URL for a Wix eCommerce checkout. */
|
|
@@ -892,7 +837,7 @@ export interface CreateRedirectSessionOptions extends CreateRedirectSessionOptio
|
|
|
892
837
|
preferences?: RedirectSessionPreferences;
|
|
893
838
|
}
|
|
894
839
|
/** @oneof */
|
|
895
|
-
|
|
840
|
+
interface CreateRedirectSessionOptionsIntentOneOf {
|
|
896
841
|
/** Information required for generating a custom URL for a Wix Bookings checkout. */
|
|
897
842
|
bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
|
|
898
843
|
/** Information required for generating a custom URL for a Wix eCommerce checkout. */
|
|
@@ -912,4 +857,5 @@ export interface CreateRedirectSessionOptionsIntentOneOf {
|
|
|
912
857
|
/** Information required for generating a custom URL for Wix bookings book page. */
|
|
913
858
|
bookingsBook?: RedirectSessionBookingsBookParams;
|
|
914
859
|
}
|
|
915
|
-
|
|
860
|
+
|
|
861
|
+
export { type MessageEnvelope as $, AttachPagesResponseStatus as A, type BookingPolicyViolations as B, type CreateRedirectSessionOptions as C, type CreateAnonymousRedirectSessionResponse as D, type AttachPagesRequest as E, type AttachPagesResponse as F, type ValidateCallbackURLResponse as G, type SignInURLRequest as H, type SignInURLResponse as I, type AttachAllTemplatesRequest as J, type AttachAllTemplatesResponse as K, LocationType as L, MembersAccountSection as M, type NestedTimeSlot as N, type DomainEvent as O, Prompt as P, type DomainEventBodyOneOf as Q, type RedirectSessionCreatedEnvelope as R, Status as S, type EntityCreatedEvent as T, type URLDetails as U, type ValidateCallbackURLRequest as V, WebhookIdentityType as W, type RestoreInfo as X, type EntityUpdatedEvent as Y, type EntityDeletedEvent as Z, type ActionEvent as _, type CreateRedirectSessionResponse as a, type IdentificationData as a0, type IdentificationDataIdOneOf as a1, type BaseEventMetadata as a2, type EventMetadata as a3, type CreateRedirectSessionOptionsIntentOneOf as a4, CallbackType as b, type RedirectSession as c, type CreateRedirectSessionRequest as d, type CreateRedirectSessionRequestIntentOneOf as e, type RedirectSessionBookingsCheckoutParams as f, type SlotAvailability as g, type Slot as h, type SlotResource as i, type Location as j, type WaitingList as k, type RedirectSessionEcomCheckoutParams as l, type RedirectSessionEventsCheckoutParams as m, type RedirectSessionPaidPlansCheckoutParams as n, type RedirectSessionLoginParams as o, type RedirectSessionLogoutParams as p, type RedirectSessionAuthParams as q, type AuthorizeRequest as r, type RedirectSessionMembersAccountParams as s, type RedirectSessionStoresProductParams as t, type RedirectSessionBookingsBookParams as u, type CallbackParams as v, type RedirectSessionPreferences as w, type CustomMemberPaths as x, type CreateAnonymousRedirectSessionRequest as y, type CreateAnonymousRedirectSessionRequestIntentOneOf as z };
|