@wix/redirects 1.0.69 → 1.0.70
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/redirects",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.70",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"type-bundles"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@wix/redirects_redirects": "1.0.
|
|
24
|
+
"@wix/redirects_redirects": "1.0.39"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"glob": "^10.4.1",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"fqdn": ""
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
"falconPackageHash": "
|
|
49
|
+
"falconPackageHash": "2a404887fac18b65166eedcf4483bb5df8fbe666aadfe483744407f2"
|
|
50
50
|
}
|
|
@@ -485,7 +485,7 @@ interface RedirectSession {
|
|
|
485
485
|
* @readonly
|
|
486
486
|
*/
|
|
487
487
|
fullUrl?: string;
|
|
488
|
-
/** Details about the URL of the
|
|
488
|
+
/** Details about the URL of the redirect session. */
|
|
489
489
|
urlDetails?: URLDetails;
|
|
490
490
|
/**
|
|
491
491
|
* The session token to pass to the Wix page to maintain the visitor's identity.
|
|
@@ -500,12 +500,12 @@ interface RedirectSession {
|
|
|
500
500
|
}
|
|
501
501
|
interface URLDetails {
|
|
502
502
|
/**
|
|
503
|
-
*
|
|
504
|
-
* For example: `https://mysite.com/_api/oauth2/authorize
|
|
503
|
+
* Endpoint of the url. This includes the base URL and the path to the endpoint, without query parameters.
|
|
504
|
+
* For example: `https://mysite.com/_api/oauth2/authorize`.
|
|
505
505
|
* @readonly
|
|
506
506
|
*/
|
|
507
507
|
endpoint?: string;
|
|
508
|
-
/**
|
|
508
|
+
/** URL query parameters. */
|
|
509
509
|
searchParams?: Record<string, string>;
|
|
510
510
|
}
|
|
511
511
|
interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestIntentOneOf {
|
|
@@ -517,7 +517,7 @@ interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestInten
|
|
|
517
517
|
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
518
518
|
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
519
519
|
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
520
|
-
/**
|
|
520
|
+
/** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
521
521
|
login?: RedirectSessionLoginParams;
|
|
522
522
|
/** 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. */
|
|
523
523
|
logout?: RedirectSessionLogoutParams;
|
|
@@ -529,8 +529,10 @@ interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestInten
|
|
|
529
529
|
bookingsBook?: RedirectSessionBookingsBookParams;
|
|
530
530
|
/**
|
|
531
531
|
* Details of pages to redirect the visitor back to on the Wix Headless client site.
|
|
532
|
+
* When redirecting to any callback URL, Wix specifies the boolean `wixMemberLoggedIn` parameter.
|
|
533
|
+
* If `true`, a member logged in during the preceding Wix-managed process.
|
|
532
534
|
*
|
|
533
|
-
* **Note**: For an authentication redirect, don't
|
|
535
|
+
* **Note**: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in `auth.authRequest.redirectUri`.
|
|
534
536
|
*/
|
|
535
537
|
callbacks?: CallbackParams;
|
|
536
538
|
/** Optional preferences for customizing redirection to Wix pages. */
|
|
@@ -546,7 +548,7 @@ interface CreateRedirectSessionRequestIntentOneOf {
|
|
|
546
548
|
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
547
549
|
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
548
550
|
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
549
|
-
/**
|
|
551
|
+
/** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
550
552
|
login?: RedirectSessionLoginParams;
|
|
551
553
|
/** 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. */
|
|
552
554
|
logout?: RedirectSessionLogoutParams;
|
|
@@ -564,7 +566,6 @@ interface RedirectSessionBookingsCheckoutParams {
|
|
|
564
566
|
* Default: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used.
|
|
565
567
|
*/
|
|
566
568
|
timezone?: string;
|
|
567
|
-
/** __Required.__ The calendar slot to check out. */
|
|
568
569
|
slotAvailability?: SlotAvailability;
|
|
569
570
|
}
|
|
570
571
|
interface SlotAvailability {
|
|
@@ -614,7 +615,7 @@ interface Slot {
|
|
|
614
615
|
*
|
|
615
616
|
* If `timezone` is specified,
|
|
616
617
|
* dates are based on the local date/time. This means that the timezone offset
|
|
617
|
-
* in the `
|
|
618
|
+
* in the `start_date` is ignored.
|
|
618
619
|
*/
|
|
619
620
|
startDate?: string | null;
|
|
620
621
|
/**
|
|
@@ -623,13 +624,13 @@ interface Slot {
|
|
|
623
624
|
*
|
|
624
625
|
* If `timezone` is specified,
|
|
625
626
|
* dates are based on the local date/time. This means that the timezone offset
|
|
626
|
-
* in the `
|
|
627
|
+
* in the `end_date` is ignored.
|
|
627
628
|
*/
|
|
628
629
|
endDate?: string | null;
|
|
629
630
|
/**
|
|
630
631
|
* The timezone for which slot availability is to be calculated.
|
|
631
632
|
*
|
|
632
|
-
* Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/
|
|
633
|
+
* Learn 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)
|
|
633
634
|
* when calculating availability.
|
|
634
635
|
*/
|
|
635
636
|
timezone?: string | null;
|
|
@@ -704,17 +705,17 @@ interface NestedTimeSlot {
|
|
|
704
705
|
scheduleId?: string;
|
|
705
706
|
}
|
|
706
707
|
interface RedirectSessionEcomCheckoutParams {
|
|
707
|
-
/**
|
|
708
|
+
/**
|
|
709
|
+
* - 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).
|
|
710
|
+
* - REST: Use [Create Checkout From Cart](https://dev.wix.com/docs/rest/business-solutions/e-commerce/cart/create-checkout-from-cart).
|
|
711
|
+
*/
|
|
708
712
|
checkoutId?: string;
|
|
709
713
|
}
|
|
710
714
|
interface RedirectSessionEventsCheckoutParams {
|
|
711
|
-
/** __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. */
|
|
712
715
|
reservationId?: string;
|
|
713
|
-
/** __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. */
|
|
714
716
|
eventSlug?: string;
|
|
715
717
|
}
|
|
716
718
|
interface RedirectSessionPaidPlansCheckoutParams {
|
|
717
|
-
/** __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. */
|
|
718
719
|
planId?: string;
|
|
719
720
|
/**
|
|
720
721
|
* 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.
|
|
@@ -725,12 +726,11 @@ interface RedirectSessionPaidPlansCheckoutParams {
|
|
|
725
726
|
interface RedirectSessionLoginParams {
|
|
726
727
|
}
|
|
727
728
|
interface RedirectSessionLogoutParams {
|
|
728
|
-
/** __Required.__ ID of the OAuth app authorizing the client. */
|
|
729
729
|
clientId?: string;
|
|
730
730
|
}
|
|
731
731
|
interface RedirectSessionAuthParams {
|
|
732
|
-
/** __Required.__ The authorization request to send to the authorization server. */
|
|
733
732
|
authRequest?: AuthorizeRequest;
|
|
733
|
+
/** prompt type */
|
|
734
734
|
prompt?: Prompt;
|
|
735
735
|
}
|
|
736
736
|
/**
|
|
@@ -817,7 +817,6 @@ declare enum MembersAccountSection {
|
|
|
817
817
|
EVENTS = "EVENTS"
|
|
818
818
|
}
|
|
819
819
|
interface RedirectSessionStoresProductParams {
|
|
820
|
-
/** *Required.** Slug of the product to navigate to. */
|
|
821
820
|
productSlug?: string;
|
|
822
821
|
}
|
|
823
822
|
interface RedirectSessionBookingsBookParams {
|
|
@@ -835,45 +834,45 @@ interface CallbackParams {
|
|
|
835
834
|
* After an eCommerce checkout:
|
|
836
835
|
* + `orderId`: ID of an eCommerce order.
|
|
837
836
|
*
|
|
838
|
-
* After an Events checkout
|
|
837
|
+
* After an Events checkout:
|
|
839
838
|
* + `orderNumber`: Unique order number for the transaction.
|
|
840
839
|
* + `eventId`: ID of the event.
|
|
841
840
|
*
|
|
842
841
|
* If the process is abandoned or interrupted, the visitor is redirected to the URL specified in `postFlowUrl` instead.
|
|
843
842
|
*
|
|
844
|
-
* Default: If you don't
|
|
843
|
+
* Default: 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`.
|
|
845
844
|
*/
|
|
846
845
|
thankYouPageUrl?: string | null;
|
|
847
846
|
/**
|
|
848
847
|
* The URL Wix should redirect the visitor to when the Wix-managed process is completed, abandoned, or interrupted.
|
|
849
848
|
*
|
|
850
|
-
* **Note**: For an authentication redirect, don't
|
|
849
|
+
* **Note**: For an authentication redirect, don't specify a URL here. Instead, specify one in `options.auth.authRequest.redirectUri`.
|
|
851
850
|
*/
|
|
852
851
|
postFlowUrl?: string | null;
|
|
853
852
|
/**
|
|
854
853
|
* The URL for a custom login page implemented outside of Wix.
|
|
855
854
|
*
|
|
856
|
-
* Default: If you don't
|
|
855
|
+
* Default: If you don't specify a URL, a Wix login page is used.
|
|
857
856
|
*/
|
|
858
857
|
loginUrl?: string | null;
|
|
859
858
|
/**
|
|
860
859
|
* The URL for a custom bookings services page implemented outside of Wix.
|
|
861
860
|
*
|
|
862
|
-
* Default: If you don't
|
|
861
|
+
* Default: If you don't specify a URL, a Wix bookings services page is used.
|
|
863
862
|
*/
|
|
864
863
|
bookingsServiceListUrl?: string | null;
|
|
865
864
|
/**
|
|
866
865
|
* The URL for a custom eCommerce cart page implemented outside of Wix.
|
|
867
866
|
*
|
|
868
|
-
* Default: If you don't
|
|
867
|
+
* Default: If you don't specify a URL, a Wix cart page is used.
|
|
869
868
|
*/
|
|
870
869
|
cartPageUrl?: string | null;
|
|
871
870
|
/**
|
|
872
|
-
* The URL for a custom pricing plans page implemented outside of Wix. When redirecting to this URL, Wix
|
|
871
|
+
* The URL for a custom pricing plans page implemented outside of Wix. When redirecting to this URL, Wix specifies the following query parameters:
|
|
873
872
|
* + `planIds`: IDs of the pricing plans on the custom page.
|
|
874
|
-
* + `checkoutData`:
|
|
873
|
+
* + `checkoutData`: Specify this string back in `options.paidPlansCheckout.checkoutData` when redirecting back to Wix for checkout.
|
|
875
874
|
*
|
|
876
|
-
* Default: If you don't
|
|
875
|
+
* Default: If you don't specify a URL, a Wix pricing plans page is used.
|
|
877
876
|
*/
|
|
878
877
|
planListUrl?: string | null;
|
|
879
878
|
}
|
|
@@ -885,14 +884,14 @@ interface RedirectSessionPreferences {
|
|
|
885
884
|
*/
|
|
886
885
|
useGenericWixPages?: boolean | null;
|
|
887
886
|
/**
|
|
888
|
-
* Whether to maintain the identity used in the redirect to
|
|
887
|
+
* 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.
|
|
889
888
|
*
|
|
890
889
|
* Default: `true`
|
|
891
890
|
*/
|
|
892
891
|
maintainIdentity?: boolean | null;
|
|
893
892
|
/**
|
|
894
|
-
*
|
|
895
|
-
*
|
|
893
|
+
* Map of additional global query parameters to add to the created Wix URL.
|
|
894
|
+
* For example, [UTM parameters](https://en.wikipedia.org/wiki/UTM_parameters).
|
|
896
895
|
*/
|
|
897
896
|
additionalQueryParameters?: Record<string, string>;
|
|
898
897
|
}
|
|
@@ -1190,7 +1189,7 @@ interface CreateRedirectSessionOptions extends CreateRedirectSessionRequestInten
|
|
|
1190
1189
|
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
1191
1190
|
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
1192
1191
|
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
1193
|
-
/**
|
|
1192
|
+
/** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
1194
1193
|
login?: RedirectSessionLoginParams;
|
|
1195
1194
|
/** 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. */
|
|
1196
1195
|
logout?: RedirectSessionLogoutParams;
|
|
@@ -1201,9 +1200,9 @@ interface CreateRedirectSessionOptions extends CreateRedirectSessionRequestInten
|
|
|
1201
1200
|
/** Information required for generating a custom URL for Wix bookings book page. */
|
|
1202
1201
|
bookingsBook?: RedirectSessionBookingsBookParams;
|
|
1203
1202
|
/**
|
|
1204
|
-
* Details of pages to redirect
|
|
1203
|
+
* Details of pages to redirect back to on the Wix Headless client site.
|
|
1205
1204
|
*
|
|
1206
|
-
* **Note**: For an authentication redirect, don't
|
|
1205
|
+
* **Note**: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in `options.auth.authRequest.redirectUri`.
|
|
1207
1206
|
*/
|
|
1208
1207
|
callbacks?: CallbackParams;
|
|
1209
1208
|
/** Optional preferences for customizing redirection to Wix pages. */
|
|
@@ -1215,13 +1214,12 @@ interface CreateRedirectSessionSignature {
|
|
|
1215
1214
|
/**
|
|
1216
1215
|
* Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
|
|
1217
1216
|
*
|
|
1218
|
-
*
|
|
1219
|
-
*
|
|
1220
|
-
* 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.
|
|
1217
|
+
* 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.
|
|
1218
|
+
* 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.
|
|
1221
1219
|
*
|
|
1222
1220
|
* To initiate a redirect session:
|
|
1223
1221
|
*
|
|
1224
|
-
* 1. Call
|
|
1222
|
+
* 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.
|
|
1225
1223
|
* 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.
|
|
1226
1224
|
* 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
|
|
1227
1225
|
* @param - Options for creating a redirect session.
|
|
@@ -1235,7 +1233,9 @@ declare function createEventModule<T extends EventDefinition<any, string>>(event
|
|
|
1235
1233
|
declare const createRedirectSession: MaybeContext<BuildRESTFunction<typeof createRedirectSession$1> & typeof createRedirectSession$1>;
|
|
1236
1234
|
|
|
1237
1235
|
type _publicOnRedirectSessionCreatedType = typeof onRedirectSessionCreated$1;
|
|
1238
|
-
/**
|
|
1236
|
+
/**
|
|
1237
|
+
* Triggerd when a redirect session is created
|
|
1238
|
+
*/
|
|
1239
1239
|
declare const onRedirectSessionCreated: ReturnType<typeof createEventModule<_publicOnRedirectSessionCreatedType>>;
|
|
1240
1240
|
|
|
1241
1241
|
type context_ActionEvent = ActionEvent;
|
|
@@ -485,7 +485,7 @@ interface RedirectSession {
|
|
|
485
485
|
* @readonly
|
|
486
486
|
*/
|
|
487
487
|
fullUrl?: string;
|
|
488
|
-
/** Details about the URL of the
|
|
488
|
+
/** Details about the URL of the redirect session. */
|
|
489
489
|
urlDetails?: URLDetails;
|
|
490
490
|
/**
|
|
491
491
|
* The session token to pass to the Wix page to maintain the visitor's identity.
|
|
@@ -500,12 +500,12 @@ interface RedirectSession {
|
|
|
500
500
|
}
|
|
501
501
|
interface URLDetails {
|
|
502
502
|
/**
|
|
503
|
-
*
|
|
504
|
-
* For example: `https://mysite.com/_api/oauth2/authorize
|
|
503
|
+
* Endpoint of the url. This includes the base URL and the path to the endpoint, without query parameters.
|
|
504
|
+
* For example: `https://mysite.com/_api/oauth2/authorize`.
|
|
505
505
|
* @readonly
|
|
506
506
|
*/
|
|
507
507
|
endpoint?: string;
|
|
508
|
-
/**
|
|
508
|
+
/** URL query parameters. */
|
|
509
509
|
searchParams?: Record<string, string>;
|
|
510
510
|
}
|
|
511
511
|
interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestIntentOneOf {
|
|
@@ -517,7 +517,7 @@ interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestInten
|
|
|
517
517
|
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
518
518
|
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
519
519
|
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
520
|
-
/**
|
|
520
|
+
/** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
521
521
|
login?: RedirectSessionLoginParams;
|
|
522
522
|
/** 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. */
|
|
523
523
|
logout?: RedirectSessionLogoutParams;
|
|
@@ -529,8 +529,10 @@ interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestInten
|
|
|
529
529
|
bookingsBook?: RedirectSessionBookingsBookParams;
|
|
530
530
|
/**
|
|
531
531
|
* Details of pages to redirect the visitor back to on the Wix Headless client site.
|
|
532
|
+
* When redirecting to any callback URL, Wix specifies the boolean `wixMemberLoggedIn` parameter.
|
|
533
|
+
* If `true`, a member logged in during the preceding Wix-managed process.
|
|
532
534
|
*
|
|
533
|
-
* **Note**: For an authentication redirect, don't
|
|
535
|
+
* **Note**: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in `auth.authRequest.redirectUri`.
|
|
534
536
|
*/
|
|
535
537
|
callbacks?: CallbackParams;
|
|
536
538
|
/** Optional preferences for customizing redirection to Wix pages. */
|
|
@@ -546,7 +548,7 @@ interface CreateRedirectSessionRequestIntentOneOf {
|
|
|
546
548
|
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
547
549
|
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
548
550
|
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
549
|
-
/**
|
|
551
|
+
/** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
550
552
|
login?: RedirectSessionLoginParams;
|
|
551
553
|
/** 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. */
|
|
552
554
|
logout?: RedirectSessionLogoutParams;
|
|
@@ -564,7 +566,6 @@ interface RedirectSessionBookingsCheckoutParams {
|
|
|
564
566
|
* Default: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used.
|
|
565
567
|
*/
|
|
566
568
|
timezone?: string;
|
|
567
|
-
/** __Required.__ The calendar slot to check out. */
|
|
568
569
|
slotAvailability?: SlotAvailability;
|
|
569
570
|
}
|
|
570
571
|
interface SlotAvailability {
|
|
@@ -614,7 +615,7 @@ interface Slot {
|
|
|
614
615
|
*
|
|
615
616
|
* If `timezone` is specified,
|
|
616
617
|
* dates are based on the local date/time. This means that the timezone offset
|
|
617
|
-
* in the `
|
|
618
|
+
* in the `start_date` is ignored.
|
|
618
619
|
*/
|
|
619
620
|
startDate?: string | null;
|
|
620
621
|
/**
|
|
@@ -623,13 +624,13 @@ interface Slot {
|
|
|
623
624
|
*
|
|
624
625
|
* If `timezone` is specified,
|
|
625
626
|
* dates are based on the local date/time. This means that the timezone offset
|
|
626
|
-
* in the `
|
|
627
|
+
* in the `end_date` is ignored.
|
|
627
628
|
*/
|
|
628
629
|
endDate?: string | null;
|
|
629
630
|
/**
|
|
630
631
|
* The timezone for which slot availability is to be calculated.
|
|
631
632
|
*
|
|
632
|
-
* Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/
|
|
633
|
+
* Learn 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)
|
|
633
634
|
* when calculating availability.
|
|
634
635
|
*/
|
|
635
636
|
timezone?: string | null;
|
|
@@ -704,17 +705,17 @@ interface NestedTimeSlot {
|
|
|
704
705
|
scheduleId?: string;
|
|
705
706
|
}
|
|
706
707
|
interface RedirectSessionEcomCheckoutParams {
|
|
707
|
-
/**
|
|
708
|
+
/**
|
|
709
|
+
* - 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).
|
|
710
|
+
* - REST: Use [Create Checkout From Cart](https://dev.wix.com/docs/rest/business-solutions/e-commerce/cart/create-checkout-from-cart).
|
|
711
|
+
*/
|
|
708
712
|
checkoutId?: string;
|
|
709
713
|
}
|
|
710
714
|
interface RedirectSessionEventsCheckoutParams {
|
|
711
|
-
/** __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. */
|
|
712
715
|
reservationId?: string;
|
|
713
|
-
/** __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. */
|
|
714
716
|
eventSlug?: string;
|
|
715
717
|
}
|
|
716
718
|
interface RedirectSessionPaidPlansCheckoutParams {
|
|
717
|
-
/** __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. */
|
|
718
719
|
planId?: string;
|
|
719
720
|
/**
|
|
720
721
|
* 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.
|
|
@@ -725,12 +726,11 @@ interface RedirectSessionPaidPlansCheckoutParams {
|
|
|
725
726
|
interface RedirectSessionLoginParams {
|
|
726
727
|
}
|
|
727
728
|
interface RedirectSessionLogoutParams {
|
|
728
|
-
/** __Required.__ ID of the OAuth app authorizing the client. */
|
|
729
729
|
clientId?: string;
|
|
730
730
|
}
|
|
731
731
|
interface RedirectSessionAuthParams {
|
|
732
|
-
/** __Required.__ The authorization request to send to the authorization server. */
|
|
733
732
|
authRequest?: AuthorizeRequest;
|
|
733
|
+
/** prompt type */
|
|
734
734
|
prompt?: Prompt;
|
|
735
735
|
}
|
|
736
736
|
/**
|
|
@@ -817,7 +817,6 @@ declare enum MembersAccountSection {
|
|
|
817
817
|
EVENTS = "EVENTS"
|
|
818
818
|
}
|
|
819
819
|
interface RedirectSessionStoresProductParams {
|
|
820
|
-
/** *Required.** Slug of the product to navigate to. */
|
|
821
820
|
productSlug?: string;
|
|
822
821
|
}
|
|
823
822
|
interface RedirectSessionBookingsBookParams {
|
|
@@ -835,45 +834,45 @@ interface CallbackParams {
|
|
|
835
834
|
* After an eCommerce checkout:
|
|
836
835
|
* + `orderId`: ID of an eCommerce order.
|
|
837
836
|
*
|
|
838
|
-
* After an Events checkout
|
|
837
|
+
* After an Events checkout:
|
|
839
838
|
* + `orderNumber`: Unique order number for the transaction.
|
|
840
839
|
* + `eventId`: ID of the event.
|
|
841
840
|
*
|
|
842
841
|
* If the process is abandoned or interrupted, the visitor is redirected to the URL specified in `postFlowUrl` instead.
|
|
843
842
|
*
|
|
844
|
-
* Default: If you don't
|
|
843
|
+
* Default: 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`.
|
|
845
844
|
*/
|
|
846
845
|
thankYouPageUrl?: string | null;
|
|
847
846
|
/**
|
|
848
847
|
* The URL Wix should redirect the visitor to when the Wix-managed process is completed, abandoned, or interrupted.
|
|
849
848
|
*
|
|
850
|
-
* **Note**: For an authentication redirect, don't
|
|
849
|
+
* **Note**: For an authentication redirect, don't specify a URL here. Instead, specify one in `options.auth.authRequest.redirectUri`.
|
|
851
850
|
*/
|
|
852
851
|
postFlowUrl?: string | null;
|
|
853
852
|
/**
|
|
854
853
|
* The URL for a custom login page implemented outside of Wix.
|
|
855
854
|
*
|
|
856
|
-
* Default: If you don't
|
|
855
|
+
* Default: If you don't specify a URL, a Wix login page is used.
|
|
857
856
|
*/
|
|
858
857
|
loginUrl?: string | null;
|
|
859
858
|
/**
|
|
860
859
|
* The URL for a custom bookings services page implemented outside of Wix.
|
|
861
860
|
*
|
|
862
|
-
* Default: If you don't
|
|
861
|
+
* Default: If you don't specify a URL, a Wix bookings services page is used.
|
|
863
862
|
*/
|
|
864
863
|
bookingsServiceListUrl?: string | null;
|
|
865
864
|
/**
|
|
866
865
|
* The URL for a custom eCommerce cart page implemented outside of Wix.
|
|
867
866
|
*
|
|
868
|
-
* Default: If you don't
|
|
867
|
+
* Default: If you don't specify a URL, a Wix cart page is used.
|
|
869
868
|
*/
|
|
870
869
|
cartPageUrl?: string | null;
|
|
871
870
|
/**
|
|
872
|
-
* The URL for a custom pricing plans page implemented outside of Wix. When redirecting to this URL, Wix
|
|
871
|
+
* The URL for a custom pricing plans page implemented outside of Wix. When redirecting to this URL, Wix specifies the following query parameters:
|
|
873
872
|
* + `planIds`: IDs of the pricing plans on the custom page.
|
|
874
|
-
* + `checkoutData`:
|
|
873
|
+
* + `checkoutData`: Specify this string back in `options.paidPlansCheckout.checkoutData` when redirecting back to Wix for checkout.
|
|
875
874
|
*
|
|
876
|
-
* Default: If you don't
|
|
875
|
+
* Default: If you don't specify a URL, a Wix pricing plans page is used.
|
|
877
876
|
*/
|
|
878
877
|
planListUrl?: string | null;
|
|
879
878
|
}
|
|
@@ -885,14 +884,14 @@ interface RedirectSessionPreferences {
|
|
|
885
884
|
*/
|
|
886
885
|
useGenericWixPages?: boolean | null;
|
|
887
886
|
/**
|
|
888
|
-
* Whether to maintain the identity used in the redirect to
|
|
887
|
+
* 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.
|
|
889
888
|
*
|
|
890
889
|
* Default: `true`
|
|
891
890
|
*/
|
|
892
891
|
maintainIdentity?: boolean | null;
|
|
893
892
|
/**
|
|
894
|
-
*
|
|
895
|
-
*
|
|
893
|
+
* Map of additional global query parameters to add to the created Wix URL.
|
|
894
|
+
* For example, [UTM parameters](https://en.wikipedia.org/wiki/UTM_parameters).
|
|
896
895
|
*/
|
|
897
896
|
additionalQueryParameters?: Record<string, string>;
|
|
898
897
|
}
|
|
@@ -1190,7 +1189,7 @@ interface CreateRedirectSessionOptions extends CreateRedirectSessionRequestInten
|
|
|
1190
1189
|
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
1191
1190
|
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
1192
1191
|
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
1193
|
-
/**
|
|
1192
|
+
/** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
1194
1193
|
login?: RedirectSessionLoginParams;
|
|
1195
1194
|
/** 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. */
|
|
1196
1195
|
logout?: RedirectSessionLogoutParams;
|
|
@@ -1201,9 +1200,9 @@ interface CreateRedirectSessionOptions extends CreateRedirectSessionRequestInten
|
|
|
1201
1200
|
/** Information required for generating a custom URL for Wix bookings book page. */
|
|
1202
1201
|
bookingsBook?: RedirectSessionBookingsBookParams;
|
|
1203
1202
|
/**
|
|
1204
|
-
* Details of pages to redirect
|
|
1203
|
+
* Details of pages to redirect back to on the Wix Headless client site.
|
|
1205
1204
|
*
|
|
1206
|
-
* **Note**: For an authentication redirect, don't
|
|
1205
|
+
* **Note**: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in `options.auth.authRequest.redirectUri`.
|
|
1207
1206
|
*/
|
|
1208
1207
|
callbacks?: CallbackParams;
|
|
1209
1208
|
/** Optional preferences for customizing redirection to Wix pages. */
|
|
@@ -1215,13 +1214,12 @@ interface CreateRedirectSessionSignature {
|
|
|
1215
1214
|
/**
|
|
1216
1215
|
* Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
|
|
1217
1216
|
*
|
|
1218
|
-
*
|
|
1219
|
-
*
|
|
1220
|
-
* 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.
|
|
1217
|
+
* 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.
|
|
1218
|
+
* 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.
|
|
1221
1219
|
*
|
|
1222
1220
|
* To initiate a redirect session:
|
|
1223
1221
|
*
|
|
1224
|
-
* 1. Call
|
|
1222
|
+
* 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.
|
|
1225
1223
|
* 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.
|
|
1226
1224
|
* 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
|
|
1227
1225
|
* @param - Options for creating a redirect session.
|
|
@@ -1235,7 +1233,9 @@ declare function createEventModule<T extends EventDefinition<any, string>>(event
|
|
|
1235
1233
|
declare const createRedirectSession: MaybeContext<BuildRESTFunction<typeof createRedirectSession$1> & typeof createRedirectSession$1>;
|
|
1236
1234
|
|
|
1237
1235
|
type _publicOnRedirectSessionCreatedType = typeof onRedirectSessionCreated$1;
|
|
1238
|
-
/**
|
|
1236
|
+
/**
|
|
1237
|
+
* Triggerd when a redirect session is created
|
|
1238
|
+
*/
|
|
1239
1239
|
declare const onRedirectSessionCreated: ReturnType<typeof createEventModule<_publicOnRedirectSessionCreatedType>>;
|
|
1240
1240
|
|
|
1241
1241
|
type index_d_ActionEvent = ActionEvent;
|
|
@@ -7,7 +7,7 @@ interface RedirectSession$1 {
|
|
|
7
7
|
* @readonly
|
|
8
8
|
*/
|
|
9
9
|
fullUrl?: string;
|
|
10
|
-
/** Details about the URL of the
|
|
10
|
+
/** Details about the URL of the redirect session. */
|
|
11
11
|
urlDetails?: URLDetails$1;
|
|
12
12
|
/**
|
|
13
13
|
* The session token to pass to the Wix page to maintain the visitor's identity.
|
|
@@ -22,12 +22,12 @@ interface RedirectSession$1 {
|
|
|
22
22
|
}
|
|
23
23
|
interface URLDetails$1 {
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* For example: `https://mysite.com/_api/oauth2/authorize
|
|
25
|
+
* Endpoint of the url. This includes the base URL and the path to the endpoint, without query parameters.
|
|
26
|
+
* For example: `https://mysite.com/_api/oauth2/authorize`.
|
|
27
27
|
* @readonly
|
|
28
28
|
*/
|
|
29
29
|
endpoint?: string;
|
|
30
|
-
/**
|
|
30
|
+
/** URL query parameters. */
|
|
31
31
|
searchParams?: Record<string, string>;
|
|
32
32
|
}
|
|
33
33
|
interface CreateRedirectSessionRequest$1 extends CreateRedirectSessionRequestIntentOneOf$1 {
|
|
@@ -39,7 +39,7 @@ interface CreateRedirectSessionRequest$1 extends CreateRedirectSessionRequestInt
|
|
|
39
39
|
eventsCheckout?: RedirectSessionEventsCheckoutParams$1;
|
|
40
40
|
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
41
41
|
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams$1;
|
|
42
|
-
/**
|
|
42
|
+
/** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
43
43
|
login?: RedirectSessionLoginParams$1;
|
|
44
44
|
/** 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. */
|
|
45
45
|
logout?: RedirectSessionLogoutParams$1;
|
|
@@ -51,10 +51,10 @@ interface CreateRedirectSessionRequest$1 extends CreateRedirectSessionRequestInt
|
|
|
51
51
|
bookingsBook?: RedirectSessionBookingsBookParams$1;
|
|
52
52
|
/**
|
|
53
53
|
* Details of pages to redirect the visitor back to on the Wix Headless client site.
|
|
54
|
-
* When redirecting to any callback URL, Wix
|
|
54
|
+
* When redirecting to any callback URL, Wix specifies the boolean `wixMemberLoggedIn` parameter.
|
|
55
55
|
* If `true`, a member logged in during the preceding Wix-managed process.
|
|
56
56
|
*
|
|
57
|
-
* **Note**: For an authentication redirect, don't
|
|
57
|
+
* **Note**: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in `auth.authRequest.redirectUri`.
|
|
58
58
|
*/
|
|
59
59
|
callbacks?: CallbackParams$1;
|
|
60
60
|
/** Optional preferences for customizing redirection to Wix pages. */
|
|
@@ -70,7 +70,7 @@ interface CreateRedirectSessionRequestIntentOneOf$1 {
|
|
|
70
70
|
eventsCheckout?: RedirectSessionEventsCheckoutParams$1;
|
|
71
71
|
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
72
72
|
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams$1;
|
|
73
|
-
/**
|
|
73
|
+
/** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
74
74
|
login?: RedirectSessionLoginParams$1;
|
|
75
75
|
/** 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. */
|
|
76
76
|
logout?: RedirectSessionLogoutParams$1;
|
|
@@ -88,7 +88,6 @@ interface RedirectSessionBookingsCheckoutParams$1 {
|
|
|
88
88
|
* Default: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used.
|
|
89
89
|
*/
|
|
90
90
|
timezone?: string;
|
|
91
|
-
/** *Required.** The calendar slot to check out. */
|
|
92
91
|
slotAvailability?: SlotAvailability$1;
|
|
93
92
|
}
|
|
94
93
|
interface SlotAvailability$1 {
|
|
@@ -220,17 +219,17 @@ interface BookingPolicyViolations$1 {
|
|
|
220
219
|
bookOnlineDisabled?: boolean | null;
|
|
221
220
|
}
|
|
222
221
|
interface RedirectSessionEcomCheckoutParams$1 {
|
|
223
|
-
/**
|
|
222
|
+
/**
|
|
223
|
+
* - 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).
|
|
224
|
+
* - REST: Use [Create Checkout From Cart](https://dev.wix.com/docs/rest/business-solutions/e-commerce/cart/create-checkout-from-cart).
|
|
225
|
+
*/
|
|
224
226
|
checkoutId?: string;
|
|
225
227
|
}
|
|
226
228
|
interface RedirectSessionEventsCheckoutParams$1 {
|
|
227
|
-
/** *Required.** ID of the temporary event reservation. Use [Create Reservation](https://dev.wix.com/api/rest/wix-events/wix-events/checkout/create-reservation) to reserve a ticket temporarily and obtain a reservation ID. */
|
|
228
229
|
reservationId?: string;
|
|
229
|
-
/** *Required.** URL-friendly event slug, generated from the event title of the event. For example, `my-event-4`. Use [Query Events](https://dev.wix.com/api/rest/wix-events/wix-events/event/query-events) to obtain an event slug. */
|
|
230
230
|
eventSlug?: string;
|
|
231
231
|
}
|
|
232
232
|
interface RedirectSessionPaidPlansCheckoutParams$1 {
|
|
233
|
-
/** *Required.** ID of the paid plan selected. Use [Query Public Plans](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/query-public-plans) to obtain a paid plan ID. */
|
|
234
233
|
planId?: string;
|
|
235
234
|
/**
|
|
236
235
|
* 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.
|
|
@@ -241,12 +240,11 @@ interface RedirectSessionPaidPlansCheckoutParams$1 {
|
|
|
241
240
|
interface RedirectSessionLoginParams$1 {
|
|
242
241
|
}
|
|
243
242
|
interface RedirectSessionLogoutParams$1 {
|
|
244
|
-
/** *Required.** ID of the OAuth app authorizing the client. */
|
|
245
243
|
clientId?: string;
|
|
246
244
|
}
|
|
247
245
|
interface RedirectSessionAuthParams$1 {
|
|
248
|
-
/** *Required.** The authorization request to send to the authorization server. */
|
|
249
246
|
authRequest?: AuthorizeRequest$1;
|
|
247
|
+
/** prompt type */
|
|
250
248
|
prompt?: Prompt$1;
|
|
251
249
|
}
|
|
252
250
|
/**
|
|
@@ -313,7 +311,6 @@ declare enum Prompt$1 {
|
|
|
313
311
|
select_account = "select_account"
|
|
314
312
|
}
|
|
315
313
|
interface RedirectSessionStoresProductParams$1 {
|
|
316
|
-
/** *Required.** Slug of the product to navigate to. */
|
|
317
314
|
productSlug?: string;
|
|
318
315
|
}
|
|
319
316
|
interface RedirectSessionBookingsBookParams$1 {
|
|
@@ -331,46 +328,46 @@ interface CallbackParams$1 {
|
|
|
331
328
|
* After an eCommerce checkout:
|
|
332
329
|
* + `orderId`: ID of an eCommerce order.
|
|
333
330
|
*
|
|
334
|
-
* After an Events checkout
|
|
331
|
+
* After an Events checkout:
|
|
335
332
|
* + `orderNumber`: Unique order number for the transaction.
|
|
336
333
|
* + `eventId`: ID of the event.
|
|
337
334
|
*
|
|
338
335
|
* If the process is abandoned or interrupted, the visitor is redirected to the URL specified in `postFlowUrl` instead.
|
|
339
336
|
*
|
|
340
|
-
* Default: If you don't
|
|
337
|
+
* Default: 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`.
|
|
341
338
|
*/
|
|
342
339
|
thankYouPageUrl?: string | null;
|
|
343
340
|
/**
|
|
344
341
|
* The URL Wix should redirect the visitor to when the Wix-managed process is completed, abandoned, or interrupted.
|
|
345
342
|
*
|
|
346
|
-
* **Note**: For an authentication redirect, don't
|
|
343
|
+
* **Note**: For an authentication redirect, don't specify a URL here. Instead, specify one in `auth.authRequest.redirectUri`.
|
|
347
344
|
*/
|
|
348
345
|
postFlowUrl?: string | null;
|
|
349
346
|
/**
|
|
350
347
|
* The URL for a custom login page implemented outside of Wix.
|
|
351
348
|
*
|
|
352
|
-
* Default: If you don't
|
|
349
|
+
* Default: If you don't specify a URL, a Wix login page is used.
|
|
353
350
|
*/
|
|
354
351
|
loginUrl?: string | null;
|
|
355
352
|
/**
|
|
356
353
|
* The URL for a custom bookings services page implemented outside of Wix.
|
|
357
354
|
*
|
|
358
|
-
* Default: If you don't
|
|
355
|
+
* Default: If you don't specify a URL, a Wix bookings services page is used.
|
|
359
356
|
*/
|
|
360
357
|
bookingsServiceListUrl?: string | null;
|
|
361
358
|
/**
|
|
362
359
|
* The URL for a custom eCommerce cart page implemented outside of Wix.
|
|
363
360
|
*
|
|
364
|
-
* Default: If you don't
|
|
361
|
+
* Default: If you don't specify a URL, a Wix cart page is used.
|
|
365
362
|
*/
|
|
366
363
|
cartPageUrl?: string | null;
|
|
367
364
|
/**
|
|
368
365
|
* The URL for a custom pricing plans page implemented outside of Wix.
|
|
369
|
-
* When redirecting to this URL, Wix
|
|
366
|
+
* When redirecting to this URL, Wix specifies the following query parameters:
|
|
370
367
|
* + `planIds`: IDs of the pricing plans on the custom page.
|
|
371
368
|
* + `checkoutData`: Pass this string back in `paidPlansCheckout.checkoutData` when redirecting back to Wix for checkout.
|
|
372
369
|
*
|
|
373
|
-
* Default: If you don't
|
|
370
|
+
* Default: If you don't specify a URL, a Wix pricing plans page is used.
|
|
374
371
|
*/
|
|
375
372
|
planListUrl?: string | null;
|
|
376
373
|
}
|
|
@@ -382,14 +379,14 @@ interface RedirectSessionPreferences$1 {
|
|
|
382
379
|
*/
|
|
383
380
|
useGenericWixPages?: boolean | null;
|
|
384
381
|
/**
|
|
385
|
-
* Whether to maintain the identity used in the redirect to
|
|
382
|
+
* 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.
|
|
386
383
|
*
|
|
387
384
|
* Default: `true`
|
|
388
385
|
*/
|
|
389
386
|
maintainIdentity?: boolean | null;
|
|
390
387
|
/**
|
|
391
|
-
*
|
|
392
|
-
*
|
|
388
|
+
* Map of additional global query parameters to add to the created Wix URL.
|
|
389
|
+
* For example, [UTM parameters](https://en.wikipedia.org/wiki/UTM_parameters).
|
|
393
390
|
*/
|
|
394
391
|
additionalQueryParameters?: Record<string, string>;
|
|
395
392
|
}
|
|
@@ -419,7 +416,7 @@ interface RedirectSession {
|
|
|
419
416
|
* @readonly
|
|
420
417
|
*/
|
|
421
418
|
fullUrl?: string;
|
|
422
|
-
/** Details about the URL of the
|
|
419
|
+
/** Details about the URL of the redirect session. */
|
|
423
420
|
urlDetails?: URLDetails;
|
|
424
421
|
/**
|
|
425
422
|
* The session token to pass to the Wix page to maintain the visitor's identity.
|
|
@@ -434,12 +431,12 @@ interface RedirectSession {
|
|
|
434
431
|
}
|
|
435
432
|
interface URLDetails {
|
|
436
433
|
/**
|
|
437
|
-
*
|
|
438
|
-
* For example: `https://mysite.com/_api/oauth2/authorize
|
|
434
|
+
* Endpoint of the url. This includes the base URL and the path to the endpoint, without query parameters.
|
|
435
|
+
* For example: `https://mysite.com/_api/oauth2/authorize`.
|
|
439
436
|
* @readonly
|
|
440
437
|
*/
|
|
441
438
|
endpoint?: string;
|
|
442
|
-
/**
|
|
439
|
+
/** URL query parameters. */
|
|
443
440
|
searchParams?: Record<string, string>;
|
|
444
441
|
}
|
|
445
442
|
interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestIntentOneOf {
|
|
@@ -451,7 +448,7 @@ interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestInten
|
|
|
451
448
|
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
452
449
|
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
453
450
|
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
454
|
-
/**
|
|
451
|
+
/** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
455
452
|
login?: RedirectSessionLoginParams;
|
|
456
453
|
/** 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. */
|
|
457
454
|
logout?: RedirectSessionLogoutParams;
|
|
@@ -463,8 +460,10 @@ interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestInten
|
|
|
463
460
|
bookingsBook?: RedirectSessionBookingsBookParams;
|
|
464
461
|
/**
|
|
465
462
|
* Details of pages to redirect the visitor back to on the Wix Headless client site.
|
|
463
|
+
* When redirecting to any callback URL, Wix specifies the boolean `wixMemberLoggedIn` parameter.
|
|
464
|
+
* If `true`, a member logged in during the preceding Wix-managed process.
|
|
466
465
|
*
|
|
467
|
-
* **Note**: For an authentication redirect, don't
|
|
466
|
+
* **Note**: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in `auth.authRequest.redirectUri`.
|
|
468
467
|
*/
|
|
469
468
|
callbacks?: CallbackParams;
|
|
470
469
|
/** Optional preferences for customizing redirection to Wix pages. */
|
|
@@ -480,7 +479,7 @@ interface CreateRedirectSessionRequestIntentOneOf {
|
|
|
480
479
|
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
481
480
|
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
482
481
|
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
483
|
-
/**
|
|
482
|
+
/** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
484
483
|
login?: RedirectSessionLoginParams;
|
|
485
484
|
/** 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. */
|
|
486
485
|
logout?: RedirectSessionLogoutParams;
|
|
@@ -498,7 +497,6 @@ interface RedirectSessionBookingsCheckoutParams {
|
|
|
498
497
|
* Default: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used.
|
|
499
498
|
*/
|
|
500
499
|
timezone?: string;
|
|
501
|
-
/** __Required.__ The calendar slot to check out. */
|
|
502
500
|
slotAvailability?: SlotAvailability;
|
|
503
501
|
}
|
|
504
502
|
interface SlotAvailability {
|
|
@@ -548,7 +546,7 @@ interface Slot {
|
|
|
548
546
|
*
|
|
549
547
|
* If `timezone` is specified,
|
|
550
548
|
* dates are based on the local date/time. This means that the timezone offset
|
|
551
|
-
* in the `
|
|
549
|
+
* in the `start_date` is ignored.
|
|
552
550
|
*/
|
|
553
551
|
startDate?: string | null;
|
|
554
552
|
/**
|
|
@@ -557,13 +555,13 @@ interface Slot {
|
|
|
557
555
|
*
|
|
558
556
|
* If `timezone` is specified,
|
|
559
557
|
* dates are based on the local date/time. This means that the timezone offset
|
|
560
|
-
* in the `
|
|
558
|
+
* in the `end_date` is ignored.
|
|
561
559
|
*/
|
|
562
560
|
endDate?: string | null;
|
|
563
561
|
/**
|
|
564
562
|
* The timezone for which slot availability is to be calculated.
|
|
565
563
|
*
|
|
566
|
-
* Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/
|
|
564
|
+
* Learn 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)
|
|
567
565
|
* when calculating availability.
|
|
568
566
|
*/
|
|
569
567
|
timezone?: string | null;
|
|
@@ -630,17 +628,17 @@ interface BookingPolicyViolations {
|
|
|
630
628
|
bookOnlineDisabled?: boolean | null;
|
|
631
629
|
}
|
|
632
630
|
interface RedirectSessionEcomCheckoutParams {
|
|
633
|
-
/**
|
|
631
|
+
/**
|
|
632
|
+
* - 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).
|
|
633
|
+
* - REST: Use [Create Checkout From Cart](https://dev.wix.com/docs/rest/business-solutions/e-commerce/cart/create-checkout-from-cart).
|
|
634
|
+
*/
|
|
634
635
|
checkoutId?: string;
|
|
635
636
|
}
|
|
636
637
|
interface RedirectSessionEventsCheckoutParams {
|
|
637
|
-
/** __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. */
|
|
638
638
|
reservationId?: string;
|
|
639
|
-
/** __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. */
|
|
640
639
|
eventSlug?: string;
|
|
641
640
|
}
|
|
642
641
|
interface RedirectSessionPaidPlansCheckoutParams {
|
|
643
|
-
/** __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. */
|
|
644
642
|
planId?: string;
|
|
645
643
|
/**
|
|
646
644
|
* 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.
|
|
@@ -651,12 +649,11 @@ interface RedirectSessionPaidPlansCheckoutParams {
|
|
|
651
649
|
interface RedirectSessionLoginParams {
|
|
652
650
|
}
|
|
653
651
|
interface RedirectSessionLogoutParams {
|
|
654
|
-
/** __Required.__ ID of the OAuth app authorizing the client. */
|
|
655
652
|
clientId?: string;
|
|
656
653
|
}
|
|
657
654
|
interface RedirectSessionAuthParams {
|
|
658
|
-
/** __Required.__ The authorization request to send to the authorization server. */
|
|
659
655
|
authRequest?: AuthorizeRequest;
|
|
656
|
+
/** prompt type */
|
|
660
657
|
prompt?: Prompt;
|
|
661
658
|
}
|
|
662
659
|
/**
|
|
@@ -723,7 +720,6 @@ declare enum Prompt {
|
|
|
723
720
|
select_account = "select_account"
|
|
724
721
|
}
|
|
725
722
|
interface RedirectSessionStoresProductParams {
|
|
726
|
-
/** *Required.** Slug of the product to navigate to. */
|
|
727
723
|
productSlug?: string;
|
|
728
724
|
}
|
|
729
725
|
interface RedirectSessionBookingsBookParams {
|
|
@@ -741,45 +737,45 @@ interface CallbackParams {
|
|
|
741
737
|
* After an eCommerce checkout:
|
|
742
738
|
* + `orderId`: ID of an eCommerce order.
|
|
743
739
|
*
|
|
744
|
-
* After an Events checkout
|
|
740
|
+
* After an Events checkout:
|
|
745
741
|
* + `orderNumber`: Unique order number for the transaction.
|
|
746
742
|
* + `eventId`: ID of the event.
|
|
747
743
|
*
|
|
748
744
|
* If the process is abandoned or interrupted, the visitor is redirected to the URL specified in `postFlowUrl` instead.
|
|
749
745
|
*
|
|
750
|
-
* Default: If you don't
|
|
746
|
+
* Default: 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`.
|
|
751
747
|
*/
|
|
752
748
|
thankYouPageUrl?: string | null;
|
|
753
749
|
/**
|
|
754
750
|
* The URL Wix should redirect the visitor to when the Wix-managed process is completed, abandoned, or interrupted.
|
|
755
751
|
*
|
|
756
|
-
* **Note**: For an authentication redirect, don't
|
|
752
|
+
* **Note**: For an authentication redirect, don't specify a URL here. Instead, specify one in `options.auth.authRequest.redirectUri`.
|
|
757
753
|
*/
|
|
758
754
|
postFlowUrl?: string | null;
|
|
759
755
|
/**
|
|
760
756
|
* The URL for a custom login page implemented outside of Wix.
|
|
761
757
|
*
|
|
762
|
-
* Default: If you don't
|
|
758
|
+
* Default: If you don't specify a URL, a Wix login page is used.
|
|
763
759
|
*/
|
|
764
760
|
loginUrl?: string | null;
|
|
765
761
|
/**
|
|
766
762
|
* The URL for a custom bookings services page implemented outside of Wix.
|
|
767
763
|
*
|
|
768
|
-
* Default: If you don't
|
|
764
|
+
* Default: If you don't specify a URL, a Wix bookings services page is used.
|
|
769
765
|
*/
|
|
770
766
|
bookingsServiceListUrl?: string | null;
|
|
771
767
|
/**
|
|
772
768
|
* The URL for a custom eCommerce cart page implemented outside of Wix.
|
|
773
769
|
*
|
|
774
|
-
* Default: If you don't
|
|
770
|
+
* Default: If you don't specify a URL, a Wix cart page is used.
|
|
775
771
|
*/
|
|
776
772
|
cartPageUrl?: string | null;
|
|
777
773
|
/**
|
|
778
|
-
* The URL for a custom pricing plans page implemented outside of Wix. When redirecting to this URL, Wix
|
|
774
|
+
* The URL for a custom pricing plans page implemented outside of Wix. When redirecting to this URL, Wix specifies the following query parameters:
|
|
779
775
|
* + `planIds`: IDs of the pricing plans on the custom page.
|
|
780
|
-
* + `checkoutData`:
|
|
776
|
+
* + `checkoutData`: Specify this string back in `options.paidPlansCheckout.checkoutData` when redirecting back to Wix for checkout.
|
|
781
777
|
*
|
|
782
|
-
* Default: If you don't
|
|
778
|
+
* Default: If you don't specify a URL, a Wix pricing plans page is used.
|
|
783
779
|
*/
|
|
784
780
|
planListUrl?: string | null;
|
|
785
781
|
}
|
|
@@ -791,14 +787,14 @@ interface RedirectSessionPreferences {
|
|
|
791
787
|
*/
|
|
792
788
|
useGenericWixPages?: boolean | null;
|
|
793
789
|
/**
|
|
794
|
-
* Whether to maintain the identity used in the redirect to
|
|
790
|
+
* 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.
|
|
795
791
|
*
|
|
796
792
|
* Default: `true`
|
|
797
793
|
*/
|
|
798
794
|
maintainIdentity?: boolean | null;
|
|
799
795
|
/**
|
|
800
|
-
*
|
|
801
|
-
*
|
|
796
|
+
* Map of additional global query parameters to add to the created Wix URL.
|
|
797
|
+
* For example, [UTM parameters](https://en.wikipedia.org/wiki/UTM_parameters).
|
|
802
798
|
*/
|
|
803
799
|
additionalQueryParameters?: Record<string, string>;
|
|
804
800
|
}
|