@wix/redirects 1.0.68 → 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.68",
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.37"
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": "158f462ddc5880ebb6ba0d6ec2652bf0a21b460de5382d1d8b07dcd0"
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 RedirectSession */
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
- * The endpoint of the url (includes the base url and the path to the endpoint, without the query parameters)
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
- /** The query parameters of the url */
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
- /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
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,10 +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 passes the boolean `wixMemberLoggedIn` query parameter.
532
+ * When redirecting to any callback URL, Wix specifies the boolean `wixMemberLoggedIn` parameter.
533
533
  * If `true`, a member logged in during the preceding Wix-managed process.
534
534
  *
535
- * **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `auth.authRequest.redirectUri`.
535
+ * **Note**: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in `auth.authRequest.redirectUri`.
536
536
  */
537
537
  callbacks?: CallbackParams;
538
538
  /** Optional preferences for customizing redirection to Wix pages. */
@@ -548,7 +548,7 @@ interface CreateRedirectSessionRequestIntentOneOf {
548
548
  eventsCheckout?: RedirectSessionEventsCheckoutParams;
549
549
  /** Information required for generating a custom URL for a Wix Paid Plans checkout. */
550
550
  paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
551
- /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
551
+ /** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
552
552
  login?: RedirectSessionLoginParams;
553
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. */
554
554
  logout?: RedirectSessionLogoutParams;
@@ -566,7 +566,6 @@ interface RedirectSessionBookingsCheckoutParams {
566
566
  * Default: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used.
567
567
  */
568
568
  timezone?: string;
569
- /** *Required.** The calendar slot to check out. */
570
569
  slotAvailability?: SlotAvailability;
571
570
  }
572
571
  interface SlotAvailability {
@@ -706,17 +705,17 @@ interface NestedTimeSlot {
706
705
  scheduleId?: string;
707
706
  }
708
707
  interface RedirectSessionEcomCheckoutParams {
709
- /** *Required.** ID of the checkout to process. Use [Create Checkout From Cart](https://dev.wix.com/api/rest/wix-ecommerce/cart/create-checkout-from-cart) to create a checkout and obtain an ID. */
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
+ */
710
712
  checkoutId?: string;
711
713
  }
712
714
  interface RedirectSessionEventsCheckoutParams {
713
- /** *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. */
714
715
  reservationId?: string;
715
- /** *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. */
716
716
  eventSlug?: string;
717
717
  }
718
718
  interface RedirectSessionPaidPlansCheckoutParams {
719
- /** *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. */
720
719
  planId?: string;
721
720
  /**
722
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.
@@ -727,12 +726,11 @@ interface RedirectSessionPaidPlansCheckoutParams {
727
726
  interface RedirectSessionLoginParams {
728
727
  }
729
728
  interface RedirectSessionLogoutParams {
730
- /** *Required.** ID of the OAuth app authorizing the client. */
731
729
  clientId?: string;
732
730
  }
733
731
  interface RedirectSessionAuthParams {
734
- /** *Required.** The authorization request to send to the authorization server. */
735
732
  authRequest?: AuthorizeRequest;
733
+ /** prompt type */
736
734
  prompt?: Prompt;
737
735
  }
738
736
  /**
@@ -819,7 +817,6 @@ declare enum MembersAccountSection {
819
817
  EVENTS = "EVENTS"
820
818
  }
821
819
  interface RedirectSessionStoresProductParams {
822
- /** *Required.** Slug of the product to navigate to. */
823
820
  productSlug?: string;
824
821
  }
825
822
  interface RedirectSessionBookingsBookParams {
@@ -837,13 +834,13 @@ interface CallbackParams {
837
834
  * After an eCommerce checkout:
838
835
  * + `orderId`: ID of an eCommerce order.
839
836
  *
840
- * After an Events checkout
837
+ * After an Events checkout:
841
838
  * + `orderNumber`: Unique order number for the transaction.
842
839
  * + `eventId`: ID of the event.
843
840
  *
844
841
  * If the process is abandoned or interrupted, the visitor is redirected to the URL specified in `postFlowUrl` instead.
845
842
  *
846
- * Default: If you don't pass a URL, the visitor is redirected to a Wix thank you page, and from there to the URL specified in `postFlowUrl`.
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`.
847
844
  */
848
845
  thankYouPageUrl?: string | null;
849
846
  /**
@@ -855,19 +852,19 @@ interface CallbackParams {
855
852
  /**
856
853
  * The URL for a custom login page implemented outside of Wix.
857
854
  *
858
- * Default: If you don't pass a URL, a Wix login page is used.
855
+ * Default: If you don't specify a URL, a Wix login page is used.
859
856
  */
860
857
  loginUrl?: string | null;
861
858
  /**
862
859
  * The URL for a custom bookings services page implemented outside of Wix.
863
860
  *
864
- * Default: If you don't pass a URL, a Wix bookings services page is used.
861
+ * Default: If you don't specify a URL, a Wix bookings services page is used.
865
862
  */
866
863
  bookingsServiceListUrl?: string | null;
867
864
  /**
868
865
  * The URL for a custom eCommerce cart page implemented outside of Wix.
869
866
  *
870
- * Default: If you don't pass a URL, a Wix cart page is used.
867
+ * Default: If you don't specify a URL, a Wix cart page is used.
871
868
  */
872
869
  cartPageUrl?: string | null;
873
870
  /**
@@ -887,14 +884,14 @@ interface RedirectSessionPreferences {
887
884
  */
888
885
  useGenericWixPages?: boolean | null;
889
886
  /**
890
- * 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.
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.
891
888
  *
892
889
  * Default: `true`
893
890
  */
894
891
  maintainIdentity?: boolean | null;
895
892
  /**
896
- * A map of additional query parameters to pass to the created Wix URL.
897
- * Global query parameters to be passed to Wix, for example campaign parameters (UTM params).
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).
898
895
  */
899
896
  additionalQueryParameters?: Record<string, string>;
900
897
  }
@@ -1192,7 +1189,7 @@ interface CreateRedirectSessionOptions extends CreateRedirectSessionRequestInten
1192
1189
  eventsCheckout?: RedirectSessionEventsCheckoutParams;
1193
1190
  /** Information required for generating a custom URL for a Wix Paid Plans checkout. */
1194
1191
  paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
1195
- /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
1192
+ /** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
1196
1193
  login?: RedirectSessionLoginParams;
1197
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. */
1198
1195
  logout?: RedirectSessionLogoutParams;
@@ -1217,13 +1214,12 @@ interface CreateRedirectSessionSignature {
1217
1214
  /**
1218
1215
  * Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
1219
1216
  *
1220
- *
1221
- * The Create Redirect Session endpoint enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes.
1222
- * 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.
1223
1219
  *
1224
1220
  * To initiate a redirect session:
1225
1221
  *
1226
- * 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 user back to your site as appropriate when the process is over.
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.
1227
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.
1228
1224
  * 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
1229
1225
  * @param - Options for creating a redirect session.
@@ -1237,7 +1233,9 @@ declare function createEventModule<T extends EventDefinition<any, string>>(event
1237
1233
  declare const createRedirectSession: MaybeContext<BuildRESTFunction<typeof createRedirectSession$1> & typeof createRedirectSession$1>;
1238
1234
 
1239
1235
  type _publicOnRedirectSessionCreatedType = typeof onRedirectSessionCreated$1;
1240
- /** */
1236
+ /**
1237
+ * Triggerd when a redirect session is created
1238
+ */
1241
1239
  declare const onRedirectSessionCreated: ReturnType<typeof createEventModule<_publicOnRedirectSessionCreatedType>>;
1242
1240
 
1243
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 RedirectSession */
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
- * The endpoint of the url (includes the base url and the path to the endpoint, without the query parameters)
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
- /** The query parameters of the url */
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
- /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
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,10 +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 passes the boolean `wixMemberLoggedIn` query parameter.
532
+ * When redirecting to any callback URL, Wix specifies the boolean `wixMemberLoggedIn` parameter.
533
533
  * If `true`, a member logged in during the preceding Wix-managed process.
534
534
  *
535
- * **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `auth.authRequest.redirectUri`.
535
+ * **Note**: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in `auth.authRequest.redirectUri`.
536
536
  */
537
537
  callbacks?: CallbackParams;
538
538
  /** Optional preferences for customizing redirection to Wix pages. */
@@ -548,7 +548,7 @@ interface CreateRedirectSessionRequestIntentOneOf {
548
548
  eventsCheckout?: RedirectSessionEventsCheckoutParams;
549
549
  /** Information required for generating a custom URL for a Wix Paid Plans checkout. */
550
550
  paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
551
- /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
551
+ /** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
552
552
  login?: RedirectSessionLoginParams;
553
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. */
554
554
  logout?: RedirectSessionLogoutParams;
@@ -566,7 +566,6 @@ interface RedirectSessionBookingsCheckoutParams {
566
566
  * Default: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used.
567
567
  */
568
568
  timezone?: string;
569
- /** *Required.** The calendar slot to check out. */
570
569
  slotAvailability?: SlotAvailability;
571
570
  }
572
571
  interface SlotAvailability {
@@ -706,17 +705,17 @@ interface NestedTimeSlot {
706
705
  scheduleId?: string;
707
706
  }
708
707
  interface RedirectSessionEcomCheckoutParams {
709
- /** *Required.** ID of the checkout to process. Use [Create Checkout From Cart](https://dev.wix.com/api/rest/wix-ecommerce/cart/create-checkout-from-cart) to create a checkout and obtain an ID. */
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
+ */
710
712
  checkoutId?: string;
711
713
  }
712
714
  interface RedirectSessionEventsCheckoutParams {
713
- /** *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. */
714
715
  reservationId?: string;
715
- /** *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. */
716
716
  eventSlug?: string;
717
717
  }
718
718
  interface RedirectSessionPaidPlansCheckoutParams {
719
- /** *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. */
720
719
  planId?: string;
721
720
  /**
722
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.
@@ -727,12 +726,11 @@ interface RedirectSessionPaidPlansCheckoutParams {
727
726
  interface RedirectSessionLoginParams {
728
727
  }
729
728
  interface RedirectSessionLogoutParams {
730
- /** *Required.** ID of the OAuth app authorizing the client. */
731
729
  clientId?: string;
732
730
  }
733
731
  interface RedirectSessionAuthParams {
734
- /** *Required.** The authorization request to send to the authorization server. */
735
732
  authRequest?: AuthorizeRequest;
733
+ /** prompt type */
736
734
  prompt?: Prompt;
737
735
  }
738
736
  /**
@@ -819,7 +817,6 @@ declare enum MembersAccountSection {
819
817
  EVENTS = "EVENTS"
820
818
  }
821
819
  interface RedirectSessionStoresProductParams {
822
- /** *Required.** Slug of the product to navigate to. */
823
820
  productSlug?: string;
824
821
  }
825
822
  interface RedirectSessionBookingsBookParams {
@@ -837,13 +834,13 @@ interface CallbackParams {
837
834
  * After an eCommerce checkout:
838
835
  * + `orderId`: ID of an eCommerce order.
839
836
  *
840
- * After an Events checkout
837
+ * After an Events checkout:
841
838
  * + `orderNumber`: Unique order number for the transaction.
842
839
  * + `eventId`: ID of the event.
843
840
  *
844
841
  * If the process is abandoned or interrupted, the visitor is redirected to the URL specified in `postFlowUrl` instead.
845
842
  *
846
- * Default: If you don't pass a URL, the visitor is redirected to a Wix thank you page, and from there to the URL specified in `postFlowUrl`.
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`.
847
844
  */
848
845
  thankYouPageUrl?: string | null;
849
846
  /**
@@ -855,19 +852,19 @@ interface CallbackParams {
855
852
  /**
856
853
  * The URL for a custom login page implemented outside of Wix.
857
854
  *
858
- * Default: If you don't pass a URL, a Wix login page is used.
855
+ * Default: If you don't specify a URL, a Wix login page is used.
859
856
  */
860
857
  loginUrl?: string | null;
861
858
  /**
862
859
  * The URL for a custom bookings services page implemented outside of Wix.
863
860
  *
864
- * Default: If you don't pass a URL, a Wix bookings services page is used.
861
+ * Default: If you don't specify a URL, a Wix bookings services page is used.
865
862
  */
866
863
  bookingsServiceListUrl?: string | null;
867
864
  /**
868
865
  * The URL for a custom eCommerce cart page implemented outside of Wix.
869
866
  *
870
- * Default: If you don't pass a URL, a Wix cart page is used.
867
+ * Default: If you don't specify a URL, a Wix cart page is used.
871
868
  */
872
869
  cartPageUrl?: string | null;
873
870
  /**
@@ -887,14 +884,14 @@ interface RedirectSessionPreferences {
887
884
  */
888
885
  useGenericWixPages?: boolean | null;
889
886
  /**
890
- * 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.
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.
891
888
  *
892
889
  * Default: `true`
893
890
  */
894
891
  maintainIdentity?: boolean | null;
895
892
  /**
896
- * A map of additional query parameters to pass to the created Wix URL.
897
- * Global query parameters to be passed to Wix, for example campaign parameters (UTM params).
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).
898
895
  */
899
896
  additionalQueryParameters?: Record<string, string>;
900
897
  }
@@ -1192,7 +1189,7 @@ interface CreateRedirectSessionOptions extends CreateRedirectSessionRequestInten
1192
1189
  eventsCheckout?: RedirectSessionEventsCheckoutParams;
1193
1190
  /** Information required for generating a custom URL for a Wix Paid Plans checkout. */
1194
1191
  paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
1195
- /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
1192
+ /** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
1196
1193
  login?: RedirectSessionLoginParams;
1197
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. */
1198
1195
  logout?: RedirectSessionLogoutParams;
@@ -1217,13 +1214,12 @@ interface CreateRedirectSessionSignature {
1217
1214
  /**
1218
1215
  * Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
1219
1216
  *
1220
- *
1221
- * The Create Redirect Session endpoint enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes.
1222
- * 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.
1223
1219
  *
1224
1220
  * To initiate a redirect session:
1225
1221
  *
1226
- * 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 user back to your site as appropriate when the process is over.
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.
1227
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.
1228
1224
  * 1. Make sure the pages at the callback URLs you provided take care of the next stages in your visitor flow.
1229
1225
  * @param - Options for creating a redirect session.
@@ -1237,7 +1233,9 @@ declare function createEventModule<T extends EventDefinition<any, string>>(event
1237
1233
  declare const createRedirectSession: MaybeContext<BuildRESTFunction<typeof createRedirectSession$1> & typeof createRedirectSession$1>;
1238
1234
 
1239
1235
  type _publicOnRedirectSessionCreatedType = typeof onRedirectSessionCreated$1;
1240
- /** */
1236
+ /**
1237
+ * Triggerd when a redirect session is created
1238
+ */
1241
1239
  declare const onRedirectSessionCreated: ReturnType<typeof createEventModule<_publicOnRedirectSessionCreatedType>>;
1242
1240
 
1243
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 RedirectSession */
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
- * The endpoint of the url (includes the base url and the path to the endpoint, without the query parameters)
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
- /** The query parameters of the url */
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
- /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
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 passes the boolean `wixMemberLoggedIn` query parameter.
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 pass a post-flow URL here. Instead, pass one in `auth.authRequest.redirectUri`.
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
- /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
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
- /** *Required.** ID of the checkout to process. Use [Create Checkout From Cart](https://dev.wix.com/api/rest/wix-ecommerce/cart/create-checkout-from-cart) to create a checkout and obtain an ID. */
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 pass a URL, the visitor is redirected to a Wix thank you page, and from there to the URL specified in `postFlowUrl`.
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 pass a URL here. Instead, pass one in `auth.authRequest.redirectUri`.
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 pass a URL, a Wix login page is used.
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 pass a URL, a Wix bookings services page is used.
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 pass a URL, a Wix cart page is used.
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 passes the following query parameters:
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 pass a URL, a Wix pricing plans page is used.
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 wix (not relevant for "logout" and "auth" intents), or to use a new visitor identity.
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
- * A map of additional query parameters to pass to the created Wix URL.
392
- * Global query parameters to be passed to Wix, for example campaign parameters (UTM params).
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 RedirectSession */
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
- * The endpoint of the url (includes the base url and the path to the endpoint, without the query parameters)
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
- /** The query parameters of the url */
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
- /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
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,10 +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.
466
- * When redirecting to any callback URL, Wix passes the boolean `wixMemberLoggedIn` query parameter.
463
+ * When redirecting to any callback URL, Wix specifies the boolean `wixMemberLoggedIn` parameter.
467
464
  * If `true`, a member logged in during the preceding Wix-managed process.
468
465
  *
469
- * **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `auth.authRequest.redirectUri`.
466
+ * **Note**: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in `auth.authRequest.redirectUri`.
470
467
  */
471
468
  callbacks?: CallbackParams;
472
469
  /** Optional preferences for customizing redirection to Wix pages. */
@@ -482,7 +479,7 @@ interface CreateRedirectSessionRequestIntentOneOf {
482
479
  eventsCheckout?: RedirectSessionEventsCheckoutParams;
483
480
  /** Information required for generating a custom URL for a Wix Paid Plans checkout. */
484
481
  paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
485
- /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
482
+ /** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
486
483
  login?: RedirectSessionLoginParams;
487
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. */
488
485
  logout?: RedirectSessionLogoutParams;
@@ -500,7 +497,6 @@ interface RedirectSessionBookingsCheckoutParams {
500
497
  * Default: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used.
501
498
  */
502
499
  timezone?: string;
503
- /** *Required.** The calendar slot to check out. */
504
500
  slotAvailability?: SlotAvailability;
505
501
  }
506
502
  interface SlotAvailability {
@@ -632,17 +628,17 @@ interface BookingPolicyViolations {
632
628
  bookOnlineDisabled?: boolean | null;
633
629
  }
634
630
  interface RedirectSessionEcomCheckoutParams {
635
- /** *Required.** ID of the checkout to process. Use [Create Checkout From Cart](https://dev.wix.com/api/rest/wix-ecommerce/cart/create-checkout-from-cart) to create a checkout and obtain an ID. */
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
+ */
636
635
  checkoutId?: string;
637
636
  }
638
637
  interface RedirectSessionEventsCheckoutParams {
639
- /** *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. */
640
638
  reservationId?: string;
641
- /** *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. */
642
639
  eventSlug?: string;
643
640
  }
644
641
  interface RedirectSessionPaidPlansCheckoutParams {
645
- /** *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. */
646
642
  planId?: string;
647
643
  /**
648
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.
@@ -653,12 +649,11 @@ interface RedirectSessionPaidPlansCheckoutParams {
653
649
  interface RedirectSessionLoginParams {
654
650
  }
655
651
  interface RedirectSessionLogoutParams {
656
- /** *Required.** ID of the OAuth app authorizing the client. */
657
652
  clientId?: string;
658
653
  }
659
654
  interface RedirectSessionAuthParams {
660
- /** *Required.** The authorization request to send to the authorization server. */
661
655
  authRequest?: AuthorizeRequest;
656
+ /** prompt type */
662
657
  prompt?: Prompt;
663
658
  }
664
659
  /**
@@ -725,7 +720,6 @@ declare enum Prompt {
725
720
  select_account = "select_account"
726
721
  }
727
722
  interface RedirectSessionStoresProductParams {
728
- /** *Required.** Slug of the product to navigate to. */
729
723
  productSlug?: string;
730
724
  }
731
725
  interface RedirectSessionBookingsBookParams {
@@ -743,13 +737,13 @@ interface CallbackParams {
743
737
  * After an eCommerce checkout:
744
738
  * + `orderId`: ID of an eCommerce order.
745
739
  *
746
- * After an Events checkout
740
+ * After an Events checkout:
747
741
  * + `orderNumber`: Unique order number for the transaction.
748
742
  * + `eventId`: ID of the event.
749
743
  *
750
744
  * If the process is abandoned or interrupted, the visitor is redirected to the URL specified in `postFlowUrl` instead.
751
745
  *
752
- * Default: If you don't pass a URL, the visitor is redirected to a Wix thank you page, and from there to the URL specified in `postFlowUrl`.
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`.
753
747
  */
754
748
  thankYouPageUrl?: string | null;
755
749
  /**
@@ -761,19 +755,19 @@ interface CallbackParams {
761
755
  /**
762
756
  * The URL for a custom login page implemented outside of Wix.
763
757
  *
764
- * Default: If you don't pass a URL, a Wix login page is used.
758
+ * Default: If you don't specify a URL, a Wix login page is used.
765
759
  */
766
760
  loginUrl?: string | null;
767
761
  /**
768
762
  * The URL for a custom bookings services page implemented outside of Wix.
769
763
  *
770
- * Default: If you don't pass a URL, a Wix bookings services page is used.
764
+ * Default: If you don't specify a URL, a Wix bookings services page is used.
771
765
  */
772
766
  bookingsServiceListUrl?: string | null;
773
767
  /**
774
768
  * The URL for a custom eCommerce cart page implemented outside of Wix.
775
769
  *
776
- * Default: If you don't pass a URL, a Wix cart page is used.
770
+ * Default: If you don't specify a URL, a Wix cart page is used.
777
771
  */
778
772
  cartPageUrl?: string | null;
779
773
  /**
@@ -793,14 +787,14 @@ interface RedirectSessionPreferences {
793
787
  */
794
788
  useGenericWixPages?: boolean | null;
795
789
  /**
796
- * 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.
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.
797
791
  *
798
792
  * Default: `true`
799
793
  */
800
794
  maintainIdentity?: boolean | null;
801
795
  /**
802
- * A map of additional query parameters to pass to the created Wix URL.
803
- * Global query parameters to be passed to Wix, for example campaign parameters (UTM params).
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).
804
798
  */
805
799
  additionalQueryParameters?: Record<string, string>;
806
800
  }