@wix/redirects 1.0.6 → 1.0.8
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/src/headless-v1-redirect-session.http.d.ts +2 -2
- package/build/cjs/src/headless-v1-redirect-session.http.js +2 -2
- package/build/cjs/src/headless-v1-redirect-session.universal.d.ts +16 -15
- package/build/cjs/src/headless-v1-redirect-session.universal.js +3 -2
- package/build/cjs/src/headless-v1-redirect-session.universal.js.map +1 -1
- package/build/es/src/headless-v1-redirect-session.http.d.ts +2 -2
- package/build/es/src/headless-v1-redirect-session.http.js +2 -2
- package/build/es/src/headless-v1-redirect-session.universal.d.ts +16 -15
- package/build/es/src/headless-v1-redirect-session.universal.js +3 -2
- package/build/es/src/headless-v1-redirect-session.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -4,12 +4,12 @@ import { CreateRedirectSessionRequest, CreateRedirectSessionResponse } from './h
|
|
|
4
4
|
* Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
|
|
5
5
|
*
|
|
6
6
|
*
|
|
7
|
-
* The
|
|
7
|
+
* The `createRedirectSession()` function enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes.
|
|
8
8
|
* For example, your site can temporarily redirect a visitor to Wix for authentication, or for a checkout process for a bookings, eCommerce, events, or paid plans transaction.
|
|
9
9
|
*
|
|
10
10
|
* To initiate a redirect session:
|
|
11
11
|
*
|
|
12
|
-
* 1. Call
|
|
12
|
+
* 1. Call `createRedirectSession()` 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 user back to your site as appropriate when the process is over.
|
|
13
13
|
* 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.
|
|
14
14
|
* 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
|
|
15
15
|
*/
|
|
@@ -26,12 +26,12 @@ function resolveWixHeadlessV1RedirectSessionServiceUrl(opts) {
|
|
|
26
26
|
* Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
|
|
27
27
|
*
|
|
28
28
|
*
|
|
29
|
-
* The
|
|
29
|
+
* The `createRedirectSession()` function enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes.
|
|
30
30
|
* For example, your site can temporarily redirect a visitor to Wix for authentication, or for a checkout process for a bookings, eCommerce, events, or paid plans transaction.
|
|
31
31
|
*
|
|
32
32
|
* To initiate a redirect session:
|
|
33
33
|
*
|
|
34
|
-
* 1. Call
|
|
34
|
+
* 1. Call `createRedirectSession()` 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 user back to your site as appropriate when the process is over.
|
|
35
35
|
* 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.
|
|
36
36
|
* 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
|
|
37
37
|
*/
|
|
@@ -32,7 +32,7 @@ export interface CreateRedirectSessionRequest extends CreateRedirectSessionReque
|
|
|
32
32
|
/**
|
|
33
33
|
* Details of pages to redirect the visitor back to on the Wix Headless client site.
|
|
34
34
|
*
|
|
35
|
-
* **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `auth.authRequest.redirectUri`.
|
|
35
|
+
* **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `options.auth.authRequest.redirectUri`.
|
|
36
36
|
*/
|
|
37
37
|
callbacks?: CallbackParams;
|
|
38
38
|
/** Optional preferences for customizing redirection to Wix pages. */
|
|
@@ -62,9 +62,9 @@ export interface RedirectSessionBookingsCheckoutParams {
|
|
|
62
62
|
* Default: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used.
|
|
63
63
|
*/
|
|
64
64
|
timezone?: string;
|
|
65
|
-
/**
|
|
65
|
+
/** __Required.__ ID of the service for which to select the slot. Use [`queryServices()`](https://dev.wix.com/api/sdk/bookings/services/queryservices) to obtain a service ID. */
|
|
66
66
|
serviceId?: string;
|
|
67
|
-
/**
|
|
67
|
+
/** __Required.__ The calendar slot to check out. */
|
|
68
68
|
slotAvailability?: SlotAvailability;
|
|
69
69
|
}
|
|
70
70
|
export interface SlotAvailability {
|
|
@@ -113,7 +113,7 @@ export interface Slot {
|
|
|
113
113
|
*
|
|
114
114
|
* If `timezone` is specified,
|
|
115
115
|
* dates are based on the local date/time. This means that the timezone offset
|
|
116
|
-
* in the `
|
|
116
|
+
* in the `startDate` is ignored.
|
|
117
117
|
*/
|
|
118
118
|
startDate?: string | null;
|
|
119
119
|
/**
|
|
@@ -122,13 +122,13 @@ export interface Slot {
|
|
|
122
122
|
*
|
|
123
123
|
* If `timezone` is specified,
|
|
124
124
|
* dates are based on the local date/time. This means that the timezone offset
|
|
125
|
-
* in the `
|
|
125
|
+
* in the `endDate` is ignored.
|
|
126
126
|
*/
|
|
127
127
|
endDate?: string | null;
|
|
128
128
|
/**
|
|
129
129
|
* The timezone for which slot availability is to be calculated.
|
|
130
130
|
*
|
|
131
|
-
* Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/
|
|
131
|
+
* Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/sdk/bookings/availabilitycalendar/queryavailability#bookings_availabilitycalendar_queryavailability_handling-daylight-savings-time-dst-for-local-time-zones)
|
|
132
132
|
* when calculating availability.
|
|
133
133
|
*/
|
|
134
134
|
timezone?: string | null;
|
|
@@ -193,17 +193,17 @@ export interface BookingPolicyViolations {
|
|
|
193
193
|
bookOnlineDisabled?: boolean | null;
|
|
194
194
|
}
|
|
195
195
|
export interface RedirectSessionEcomCheckoutParams {
|
|
196
|
-
/**
|
|
196
|
+
/** __Required.__ ID of the checkout to process. Use [`createCheckout()`](https://dev.wix.com/api/sdk/ecom/checkout/createcheckout) or [`createCheckoutFromCurrentCart()`](https://dev.wix.com/api/sdk/ecom/currentcart/createcheckoutfromcurrentcart) to create a checkout and obtain an ID. */
|
|
197
197
|
checkoutId?: string;
|
|
198
198
|
}
|
|
199
199
|
export interface RedirectSessionEventsCheckoutParams {
|
|
200
|
-
/**
|
|
200
|
+
/** __Required.__ ID of the temporary event reservation. Use [`createReservation()`](https://dev.wix.com/api/sdk/events/checkout/createreservation) to reserve a ticket temporarily and obtain a reservation ID. */
|
|
201
201
|
reservationId?: string;
|
|
202
|
-
/**
|
|
202
|
+
/** __Required.__ URL-friendly event slug, generated from the event title of the event. For example, `my-event-4`. Use [`listEvents()`](https://dev.wix.com/api/sdk/events/wixevents/listevents) to obtain an event slug. */
|
|
203
203
|
eventSlug?: string;
|
|
204
204
|
}
|
|
205
205
|
export interface RedirectSessionPaidPlansCheckoutParams {
|
|
206
|
-
/**
|
|
206
|
+
/** __Required.__ ID of the paid plan selected. Use [`queryPublicPlans()`](https://dev.wix.com/api/sdk/pricing-plans/plans/querypublicplans) to obtain a paid plan ID. */
|
|
207
207
|
planId?: string;
|
|
208
208
|
/**
|
|
209
209
|
* 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.
|
|
@@ -268,11 +268,11 @@ export interface AuthorizeRequest {
|
|
|
268
268
|
errorDescription?: string | null;
|
|
269
269
|
}
|
|
270
270
|
export interface RedirectSessionLogoutParams {
|
|
271
|
-
/**
|
|
271
|
+
/** __Required.__ ID of the OAuth app authorizing the client. */
|
|
272
272
|
clientId?: string;
|
|
273
273
|
}
|
|
274
274
|
export interface RedirectSessionAuthParams {
|
|
275
|
-
/**
|
|
275
|
+
/** __Required.__ The authorization request to send to the authorization server. */
|
|
276
276
|
authRequest?: AuthorizeRequest;
|
|
277
277
|
}
|
|
278
278
|
export interface RedirectSessionMembersAccountParams {
|
|
@@ -386,17 +386,18 @@ export interface SignInURLResponse {
|
|
|
386
386
|
* Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
|
|
387
387
|
*
|
|
388
388
|
*
|
|
389
|
-
* The
|
|
389
|
+
* The `createRedirectSession()` function enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes.
|
|
390
390
|
* For example, your site can temporarily redirect a visitor to Wix for authentication, or for a checkout process for a bookings, eCommerce, events, or paid plans transaction.
|
|
391
391
|
*
|
|
392
392
|
* To initiate a redirect session:
|
|
393
393
|
*
|
|
394
|
-
* 1. Call
|
|
394
|
+
* 1. Call `createRedirectSession()` 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 user back to your site as appropriate when the process is over.
|
|
395
395
|
* 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.
|
|
396
396
|
* 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
|
|
397
397
|
* @public
|
|
398
398
|
* @documentationMaturity preview
|
|
399
399
|
* @requiredField CreateRedirectSessionRequest
|
|
400
|
+
* @param options - Options for creating a redirect session.
|
|
400
401
|
*/
|
|
401
402
|
export declare function createRedirectSession(options?: CreateRedirectSessionOptions): Promise<CreateRedirectSessionResponse>;
|
|
402
403
|
export interface CreateRedirectSessionOptions extends CreateRedirectSessionRequestIntentOneOf {
|
|
@@ -417,7 +418,7 @@ export interface CreateRedirectSessionOptions extends CreateRedirectSessionReque
|
|
|
417
418
|
/**
|
|
418
419
|
* Details of pages to redirect the visitor back to on the Wix Headless client site.
|
|
419
420
|
*
|
|
420
|
-
* **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `auth.authRequest.redirectUri`.
|
|
421
|
+
* **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `options.auth.authRequest.redirectUri`.
|
|
421
422
|
*/
|
|
422
423
|
callbacks?: CallbackParams;
|
|
423
424
|
/** Optional preferences for customizing redirection to Wix pages. */
|
|
@@ -83,17 +83,18 @@ const _createRedirectSessionResponse = {};
|
|
|
83
83
|
* Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
|
|
84
84
|
*
|
|
85
85
|
*
|
|
86
|
-
* The
|
|
86
|
+
* The `createRedirectSession()` function enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes.
|
|
87
87
|
* For example, your site can temporarily redirect a visitor to Wix for authentication, or for a checkout process for a bookings, eCommerce, events, or paid plans transaction.
|
|
88
88
|
*
|
|
89
89
|
* To initiate a redirect session:
|
|
90
90
|
*
|
|
91
|
-
* 1. Call
|
|
91
|
+
* 1. Call `createRedirectSession()` 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 user back to your site as appropriate when the process is over.
|
|
92
92
|
* 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.
|
|
93
93
|
* 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
|
|
94
94
|
* @public
|
|
95
95
|
* @documentationMaturity preview
|
|
96
96
|
* @requiredField CreateRedirectSessionRequest
|
|
97
|
+
* @param options - Options for creating a redirect session.
|
|
97
98
|
*/
|
|
98
99
|
function createRedirectSession(options) {
|
|
99
100
|
var _a, _b, _c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headless-v1-redirect-session.universal.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,4GAA8F;AAE9F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AA+K5B,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AAyHD,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,qDAAqD;IACrD,sDAA6B,CAAA;IAC7B,0CAA0C;IAC1C,8CAAqB,CAAA;IACrB,wCAAwC;IACxC,0CAAiB,CAAA;IACjB,4CAA4C;IAC5C,wDAA+B,CAAA;IAC/B,qCAAqC;IACrC,0CAAiB,CAAA;AACnB,CAAC,EAXW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAWhC;AAwED,IAAY,YASX;AATD,WAAY,YAAY;IACtB,8BAA8B;IAC9B,mCAAmB,CAAA;IACnB,mDAAmD;IACnD,iCAAiB,CAAA;IACjB,mDAAmD;IACnD,qCAAqB,CAAA;IACrB,sDAAsD;IACtD,uCAAuB,CAAA;AACzB,CAAC,EATW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QASvB;AAiBD,MAAM,6BAA6B,GAAG,EAAE,CAAC;AACzC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAE1C
|
|
1
|
+
{"version":3,"file":"headless-v1-redirect-session.universal.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,4GAA8F;AAE9F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;A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YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AA/DD,sDA+DC"}
|
|
@@ -4,12 +4,12 @@ import { CreateRedirectSessionRequest, CreateRedirectSessionResponse } from './h
|
|
|
4
4
|
* Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
|
|
5
5
|
*
|
|
6
6
|
*
|
|
7
|
-
* The
|
|
7
|
+
* The `createRedirectSession()` function enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes.
|
|
8
8
|
* For example, your site can temporarily redirect a visitor to Wix for authentication, or for a checkout process for a bookings, eCommerce, events, or paid plans transaction.
|
|
9
9
|
*
|
|
10
10
|
* To initiate a redirect session:
|
|
11
11
|
*
|
|
12
|
-
* 1. Call
|
|
12
|
+
* 1. Call `createRedirectSession()` 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 user back to your site as appropriate when the process is over.
|
|
13
13
|
* 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.
|
|
14
14
|
* 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
|
|
15
15
|
*/
|
|
@@ -23,12 +23,12 @@ function resolveWixHeadlessV1RedirectSessionServiceUrl(opts) {
|
|
|
23
23
|
* Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
|
|
24
24
|
*
|
|
25
25
|
*
|
|
26
|
-
* The
|
|
26
|
+
* The `createRedirectSession()` function enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes.
|
|
27
27
|
* For example, your site can temporarily redirect a visitor to Wix for authentication, or for a checkout process for a bookings, eCommerce, events, or paid plans transaction.
|
|
28
28
|
*
|
|
29
29
|
* To initiate a redirect session:
|
|
30
30
|
*
|
|
31
|
-
* 1. Call
|
|
31
|
+
* 1. Call `createRedirectSession()` 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 user back to your site as appropriate when the process is over.
|
|
32
32
|
* 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.
|
|
33
33
|
* 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
|
|
34
34
|
*/
|
|
@@ -32,7 +32,7 @@ export interface CreateRedirectSessionRequest extends CreateRedirectSessionReque
|
|
|
32
32
|
/**
|
|
33
33
|
* Details of pages to redirect the visitor back to on the Wix Headless client site.
|
|
34
34
|
*
|
|
35
|
-
* **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `auth.authRequest.redirectUri`.
|
|
35
|
+
* **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `options.auth.authRequest.redirectUri`.
|
|
36
36
|
*/
|
|
37
37
|
callbacks?: CallbackParams;
|
|
38
38
|
/** Optional preferences for customizing redirection to Wix pages. */
|
|
@@ -62,9 +62,9 @@ export interface RedirectSessionBookingsCheckoutParams {
|
|
|
62
62
|
* Default: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used.
|
|
63
63
|
*/
|
|
64
64
|
timezone?: string;
|
|
65
|
-
/**
|
|
65
|
+
/** __Required.__ ID of the service for which to select the slot. Use [`queryServices()`](https://dev.wix.com/api/sdk/bookings/services/queryservices) to obtain a service ID. */
|
|
66
66
|
serviceId?: string;
|
|
67
|
-
/**
|
|
67
|
+
/** __Required.__ The calendar slot to check out. */
|
|
68
68
|
slotAvailability?: SlotAvailability;
|
|
69
69
|
}
|
|
70
70
|
export interface SlotAvailability {
|
|
@@ -113,7 +113,7 @@ export interface Slot {
|
|
|
113
113
|
*
|
|
114
114
|
* If `timezone` is specified,
|
|
115
115
|
* dates are based on the local date/time. This means that the timezone offset
|
|
116
|
-
* in the `
|
|
116
|
+
* in the `startDate` is ignored.
|
|
117
117
|
*/
|
|
118
118
|
startDate?: string | null;
|
|
119
119
|
/**
|
|
@@ -122,13 +122,13 @@ export interface Slot {
|
|
|
122
122
|
*
|
|
123
123
|
* If `timezone` is specified,
|
|
124
124
|
* dates are based on the local date/time. This means that the timezone offset
|
|
125
|
-
* in the `
|
|
125
|
+
* in the `endDate` is ignored.
|
|
126
126
|
*/
|
|
127
127
|
endDate?: string | null;
|
|
128
128
|
/**
|
|
129
129
|
* The timezone for which slot availability is to be calculated.
|
|
130
130
|
*
|
|
131
|
-
* Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/
|
|
131
|
+
* Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/sdk/bookings/availabilitycalendar/queryavailability#bookings_availabilitycalendar_queryavailability_handling-daylight-savings-time-dst-for-local-time-zones)
|
|
132
132
|
* when calculating availability.
|
|
133
133
|
*/
|
|
134
134
|
timezone?: string | null;
|
|
@@ -193,17 +193,17 @@ export interface BookingPolicyViolations {
|
|
|
193
193
|
bookOnlineDisabled?: boolean | null;
|
|
194
194
|
}
|
|
195
195
|
export interface RedirectSessionEcomCheckoutParams {
|
|
196
|
-
/**
|
|
196
|
+
/** __Required.__ ID of the checkout to process. Use [`createCheckout()`](https://dev.wix.com/api/sdk/ecom/checkout/createcheckout) or [`createCheckoutFromCurrentCart()`](https://dev.wix.com/api/sdk/ecom/currentcart/createcheckoutfromcurrentcart) to create a checkout and obtain an ID. */
|
|
197
197
|
checkoutId?: string;
|
|
198
198
|
}
|
|
199
199
|
export interface RedirectSessionEventsCheckoutParams {
|
|
200
|
-
/**
|
|
200
|
+
/** __Required.__ ID of the temporary event reservation. Use [`createReservation()`](https://dev.wix.com/api/sdk/events/checkout/createreservation) to reserve a ticket temporarily and obtain a reservation ID. */
|
|
201
201
|
reservationId?: string;
|
|
202
|
-
/**
|
|
202
|
+
/** __Required.__ URL-friendly event slug, generated from the event title of the event. For example, `my-event-4`. Use [`listEvents()`](https://dev.wix.com/api/sdk/events/wixevents/listevents) to obtain an event slug. */
|
|
203
203
|
eventSlug?: string;
|
|
204
204
|
}
|
|
205
205
|
export interface RedirectSessionPaidPlansCheckoutParams {
|
|
206
|
-
/**
|
|
206
|
+
/** __Required.__ ID of the paid plan selected. Use [`queryPublicPlans()`](https://dev.wix.com/api/sdk/pricing-plans/plans/querypublicplans) to obtain a paid plan ID. */
|
|
207
207
|
planId?: string;
|
|
208
208
|
/**
|
|
209
209
|
* 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.
|
|
@@ -268,11 +268,11 @@ export interface AuthorizeRequest {
|
|
|
268
268
|
errorDescription?: string | null;
|
|
269
269
|
}
|
|
270
270
|
export interface RedirectSessionLogoutParams {
|
|
271
|
-
/**
|
|
271
|
+
/** __Required.__ ID of the OAuth app authorizing the client. */
|
|
272
272
|
clientId?: string;
|
|
273
273
|
}
|
|
274
274
|
export interface RedirectSessionAuthParams {
|
|
275
|
-
/**
|
|
275
|
+
/** __Required.__ The authorization request to send to the authorization server. */
|
|
276
276
|
authRequest?: AuthorizeRequest;
|
|
277
277
|
}
|
|
278
278
|
export interface RedirectSessionMembersAccountParams {
|
|
@@ -386,17 +386,18 @@ export interface SignInURLResponse {
|
|
|
386
386
|
* Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
|
|
387
387
|
*
|
|
388
388
|
*
|
|
389
|
-
* The
|
|
389
|
+
* The `createRedirectSession()` function enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes.
|
|
390
390
|
* For example, your site can temporarily redirect a visitor to Wix for authentication, or for a checkout process for a bookings, eCommerce, events, or paid plans transaction.
|
|
391
391
|
*
|
|
392
392
|
* To initiate a redirect session:
|
|
393
393
|
*
|
|
394
|
-
* 1. Call
|
|
394
|
+
* 1. Call `createRedirectSession()` 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 user back to your site as appropriate when the process is over.
|
|
395
395
|
* 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.
|
|
396
396
|
* 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
|
|
397
397
|
* @public
|
|
398
398
|
* @documentationMaturity preview
|
|
399
399
|
* @requiredField CreateRedirectSessionRequest
|
|
400
|
+
* @param options - Options for creating a redirect session.
|
|
400
401
|
*/
|
|
401
402
|
export declare function createRedirectSession(options?: CreateRedirectSessionOptions): Promise<CreateRedirectSessionResponse>;
|
|
402
403
|
export interface CreateRedirectSessionOptions extends CreateRedirectSessionRequestIntentOneOf {
|
|
@@ -417,7 +418,7 @@ export interface CreateRedirectSessionOptions extends CreateRedirectSessionReque
|
|
|
417
418
|
/**
|
|
418
419
|
* Details of pages to redirect the visitor back to on the Wix Headless client site.
|
|
419
420
|
*
|
|
420
|
-
* **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `auth.authRequest.redirectUri`.
|
|
421
|
+
* **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `options.auth.authRequest.redirectUri`.
|
|
421
422
|
*/
|
|
422
423
|
callbacks?: CallbackParams;
|
|
423
424
|
/** Optional preferences for customizing redirection to Wix pages. */
|
|
@@ -61,17 +61,18 @@ const _createRedirectSessionResponse = {};
|
|
|
61
61
|
* Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
|
|
62
62
|
*
|
|
63
63
|
*
|
|
64
|
-
* The
|
|
64
|
+
* The `createRedirectSession()` function enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes.
|
|
65
65
|
* For example, your site can temporarily redirect a visitor to Wix for authentication, or for a checkout process for a bookings, eCommerce, events, or paid plans transaction.
|
|
66
66
|
*
|
|
67
67
|
* To initiate a redirect session:
|
|
68
68
|
*
|
|
69
|
-
* 1. Call
|
|
69
|
+
* 1. Call `createRedirectSession()` 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 user back to your site as appropriate when the process is over.
|
|
70
70
|
* 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.
|
|
71
71
|
* 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
|
|
72
72
|
* @public
|
|
73
73
|
* @documentationMaturity preview
|
|
74
74
|
* @requiredField CreateRedirectSessionRequest
|
|
75
|
+
* @param options - Options for creating a redirect session.
|
|
75
76
|
*/
|
|
76
77
|
export function createRedirectSession(options) {
|
|
77
78
|
var _a, _b, _c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headless-v1-redirect-session.universal.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,sCAAsC,MAAM,qCAAqC,CAAC;AAE9F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AA+K5B,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAyHD,MAAM,CAAN,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,qDAAqD;IACrD,sDAA6B,CAAA;IAC7B,0CAA0C;IAC1C,8CAAqB,CAAA;IACrB,wCAAwC;IACxC,0CAAiB,CAAA;IACjB,4CAA4C;IAC5C,wDAA+B,CAAA;IAC/B,qCAAqC;IACrC,0CAAiB,CAAA;AACnB,CAAC,EAXW,qBAAqB,KAArB,qBAAqB,QAWhC;AAwED,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,8BAA8B;IAC9B,mCAAmB,CAAA;IACnB,mDAAmD;IACnD,iCAAiB,CAAA;IACjB,mDAAmD;IACnD,qCAAqB,CAAA;IACrB,sDAAsD;IACtD,uCAAuB,CAAA;AACzB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AAiBD,MAAM,6BAA6B,GAAG,EAAE,CAAC;AACzC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAE1C
|
|
1
|
+
{"version":3,"file":"headless-v1-redirect-session.universal.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,sCAAsC,MAAM,qCAAqC,CAAC;AAE9F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,G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AAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,cAAc,CAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/redirects",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"groupId": "com.wixpress.public-sdk-autogen"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"falconPackageHash": "
|
|
36
|
+
"falconPackageHash": "15374e20aef4eb5a6897a97a3a97de337e7074d77fd660615d86bd0b"
|
|
37
37
|
}
|