@wix/redirects 1.0.0 → 1.0.2

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.
Files changed (25) hide show
  1. package/build/cjs/src/headless-v1-redirect-session.http.d.ts +12 -1
  2. package/build/cjs/src/headless-v1-redirect-session.http.js +12 -1
  3. package/build/cjs/src/headless-v1-redirect-session.http.js.map +1 -1
  4. package/build/cjs/src/headless-v1-redirect-session.public.d.ts +2 -2
  5. package/build/cjs/src/headless-v1-redirect-session.public.js +2 -1
  6. package/build/cjs/src/headless-v1-redirect-session.public.js.map +1 -1
  7. package/build/cjs/src/headless-v1-redirect-session.types.d.ts +96 -38
  8. package/build/cjs/src/headless-v1-redirect-session.types.js +14 -1
  9. package/build/cjs/src/headless-v1-redirect-session.types.js.map +1 -1
  10. package/build/cjs/src/headless-v1-redirect-session.universal.d.ts +115 -48
  11. package/build/cjs/src/headless-v1-redirect-session.universal.js +24 -2
  12. package/build/cjs/src/headless-v1-redirect-session.universal.js.map +1 -1
  13. package/build/es/src/headless-v1-redirect-session.http.d.ts +12 -1
  14. package/build/es/src/headless-v1-redirect-session.http.js +12 -1
  15. package/build/es/src/headless-v1-redirect-session.http.js.map +1 -1
  16. package/build/es/src/headless-v1-redirect-session.public.d.ts +2 -2
  17. package/build/es/src/headless-v1-redirect-session.public.js +1 -1
  18. package/build/es/src/headless-v1-redirect-session.public.js.map +1 -1
  19. package/build/es/src/headless-v1-redirect-session.types.d.ts +96 -38
  20. package/build/es/src/headless-v1-redirect-session.types.js +13 -0
  21. package/build/es/src/headless-v1-redirect-session.types.js.map +1 -1
  22. package/build/es/src/headless-v1-redirect-session.universal.d.ts +115 -48
  23. package/build/es/src/headless-v1-redirect-session.universal.js +23 -1
  24. package/build/es/src/headless-v1-redirect-session.universal.js.map +1 -1
  25. package/package.json +2 -2
@@ -28,7 +28,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
28
28
  });
29
29
  };
30
30
  Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.createRedirectSession = exports.CallbackType = exports.LocationType = exports.__debug = void 0;
31
+ exports.createRedirectSession = exports.CallbackType = exports.MembersAccountSection = exports.LocationType = exports.__debug = void 0;
32
32
  const velo_1 = require("@wix/metro-runtime/velo");
33
33
  const ambassadorWixHeadlessV1RedirectSession = __importStar(require("./headless-v1-redirect-session.http"));
34
34
  let __verbose = false;
@@ -53,6 +53,19 @@ var LocationType;
53
53
  LocationType["OWNER_CUSTOM"] = "OWNER_CUSTOM";
54
54
  LocationType["CUSTOM"] = "CUSTOM";
55
55
  })(LocationType = exports.LocationType || (exports.LocationType = {}));
56
+ var MembersAccountSection;
57
+ (function (MembersAccountSection) {
58
+ /** default - account info section in "my account" */
59
+ MembersAccountSection["ACCOUNT_INFO"] = "ACCOUNT_INFO";
60
+ /** My Bookings section in "my account" */
61
+ MembersAccountSection["BOOKINGS"] = "BOOKINGS";
62
+ /** My Orders section in "my account" */
63
+ MembersAccountSection["ORDERS"] = "ORDERS";
64
+ /** Subscriptions section in "my account" */
65
+ MembersAccountSection["SUBSCRIPTIONS"] = "SUBSCRIPTIONS";
66
+ /** Events section in "my account" */
67
+ MembersAccountSection["EVENTS"] = "EVENTS";
68
+ })(MembersAccountSection = exports.MembersAccountSection || (exports.MembersAccountSection = {}));
56
69
  var CallbackType;
57
70
  (function (CallbackType) {
58
71
  /** Invalid value - default */
@@ -67,7 +80,16 @@ var CallbackType;
67
80
  const _createRedirectSessionRequest = {};
68
81
  const _createRedirectSessionResponse = {};
69
82
  /**
70
- * Creates a new WixUrl
83
+ * Creates a URL for redirecting a visitor or member from an external Wix Headless client site to a Wix page for Wix-managed functionality.
84
+ *
85
+ *
86
+ * The Create Redirect Session endpoint enables your external Wix Headless client site, built on any platform, to let Wix take care of frontend functionality for specific processes,
87
+ * including authentication, as well as checkouts for bookings, eCommerce, events, and paid plans.
88
+ *
89
+ * For each purpose, call Create Redirect Session with the relevant information to enable Wix to take care of one specific process, and provide a callback URL, so Wix can redirect
90
+ * the user back to the appropriate page on your site.
91
+ *
92
+ * Redirect your visitor or member to the URL provided in the response, which includes query parameters informing Wix where to redirect the visitor or member back to on the Wix Headless client site
71
93
  * @public
72
94
  * @documentationMaturity preview
73
95
  * @requiredField CreateRedirectSessionRequest
@@ -1 +1 @@
1
- {"version":3,"file":"headless-v1-redirect-session.universal.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,4GAA8F;AAE9F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAuK5B,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AA+ID,IAAY,YASX;AATD,WAAY,YAAY;IACtB,8BAA8B;IAC9B,mCAAmB,CAAA;IACnB,mDAAmD;IACnD,iCAAiB,CAAA;IACjB,mDAAmD;IACnD,qCAAqB,CAAA;IACrB,sDAAsD;IACtD,uCAAuB,CAAA;AACzB,CAAC,EATW,YAAY,GAAZ,oB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S,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAE7E,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,+CAAvB,WAAW,CAAgB,CAAC;QAC5B,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AA/DD,sDA+DC"}
1
+ {"version":3,"file":"headless-v1-redirect-session.universal.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,4GAA8F;AAE9F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GA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AAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AA/DD,sDA+DC"}
@@ -1,4 +1,15 @@
1
1
  import { RequestOptionsFactory } from '@wix/sdk-types';
2
2
  import { CreateRedirectSessionRequest, CreateRedirectSessionResponse } from './headless-v1-redirect-session.types';
3
- /** Creates a new WixUrl */
3
+ /**
4
+ * Creates a URL for redirecting a visitor or member from an external Wix Headless client site to a Wix page for Wix-managed functionality.
5
+ *
6
+ *
7
+ * The Create Redirect Session endpoint enables your external Wix Headless client site, built on any platform, to let Wix take care of frontend functionality for specific processes,
8
+ * including authentication, as well as checkouts for bookings, eCommerce, events, and paid plans.
9
+ *
10
+ * For each purpose, call Create Redirect Session with the relevant information to enable Wix to take care of one specific process, and provide a callback URL, so Wix can redirect
11
+ * the user back to the appropriate page on your site.
12
+ *
13
+ * Redirect your visitor or member to the URL provided in the response, which includes query parameters informing Wix where to redirect the visitor or member back to on the Wix Headless client site
14
+ */
4
15
  export declare function createRedirectSession(payload: CreateRedirectSessionRequest): RequestOptionsFactory<CreateRedirectSessionResponse>;
@@ -19,7 +19,18 @@ function resolveWixHeadlessV1RedirectSessionServiceUrl(opts) {
19
19
  };
20
20
  return resolveUrl(Object.assign(opts, { domainToMappings }));
21
21
  }
22
- /** Creates a new WixUrl */
22
+ /**
23
+ * Creates a URL for redirecting a visitor or member from an external Wix Headless client site to a Wix page for Wix-managed functionality.
24
+ *
25
+ *
26
+ * The Create Redirect Session endpoint enables your external Wix Headless client site, built on any platform, to let Wix take care of frontend functionality for specific processes,
27
+ * including authentication, as well as checkouts for bookings, eCommerce, events, and paid plans.
28
+ *
29
+ * For each purpose, call Create Redirect Session with the relevant information to enable Wix to take care of one specific process, and provide a callback URL, so Wix can redirect
30
+ * the user back to the appropriate page on your site.
31
+ *
32
+ * Redirect your visitor or member to the URL provided in the response, which includes query parameters informing Wix where to redirect the visitor or member back to on the Wix Headless client site
33
+ */
23
34
  export function createRedirectSession(payload) {
24
35
  const { toJSON: toReq, fromJSON: fromReq } = serializer(_createRedirectSessionRequest, {});
25
36
  const { fromJSON: fromRes } = serializer(_createRedirectSessionResponse, {});
@@ -1 +1 @@
1
- {"version":3,"file":"headless-v1-redirect-session.http.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQhD,MAAM,6BAA6B,GAAG,EAAE,CAAC;AACzC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAE1C,SAAS,6CAA6C,CACpD,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,qBAAqB;gBAC9B,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,qBAAqB;gBAC9B,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,2BAA2B;AAC3B,MAAM,UAAU,qBAAqB,CACnC,OAAqC;IAErC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CACrD,6BAA6B,EAC7B,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAC;IAE7E,SAAS,uBAAuB,CAAC,EAAE,IAAI,EAAO;QAC5C,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,kCAAkC;YAC9C,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,8DAA8D;YACzE,GAAG,EAAE,6CAA6C,CAAC;gBACjD,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,uBAAuB,CAAC,OAAO,GAAG,OAAO,CAAC;IAE1C,OAAO,uBAAuB,CAAC;AACjC,CAAC"}
1
+ {"version":3,"file":"headless-v1-redirect-session.http.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQhD,MAAM,6BAA6B,GAAG,EAAE,CAAC;AACzC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAE1C,SAAS,6CAA6C,CACpD,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,qBAAqB;gBAC9B,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,qBAAqB;gBAC9B,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAqC;IAErC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CACrD,6BAA6B,EAC7B,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAC;IAE7E,SAAS,uBAAuB,CAAC,EAAE,IAAI,EAAO;QAC5C,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,kCAAkC;YAC9C,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,8DAA8D;YACzE,GAAG,EAAE,6CAA6C,CAAC;gBACjD,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,uBAAuB,CAAC,OAAO,GAAG,OAAO,CAAC;IAE1C,OAAO,uBAAuB,CAAC;AACjC,CAAC"}
@@ -4,5 +4,5 @@ export declare const __metadata: {
4
4
  PACKAGE_NAME: string;
5
5
  };
6
6
  export declare function createRedirectSession(httpClient: HttpClient): (options?: CreateRedirectSessionOptions | undefined) => Promise<import("./headless-v1-redirect-session.universal").CreateRedirectSessionResponse>;
7
- export { LocationType, CallbackType, } from './headless-v1-redirect-session.universal';
8
- export { RedirectSession, CreateRedirectSessionRequest, CreateRedirectSessionRequestIntentOneOf, RedirectSessionBookingsCheckoutParams, SlotAvailability, Slot, SlotResource, Location, WaitingList, BookingPolicyViolations, RedirectSessionEcomCheckoutParams, RedirectSessionEventsCheckoutParams, RedirectSessionPaidPlansCheckoutParams, RedirectSessionLoginParams, RedirectSessionAuthorizeParams, AuthorizeRequest, RedirectSessionLogoutParams, RedirectSessionAuthParams, CallbackParams, RedirectSessionPreferences, CreateRedirectSessionResponse, ValidateCallbackURLRequest, ValidateCallbackURLResponse, SignInURLRequest, SignInURLResponse, CreateRedirectSessionOptions, } from './headless-v1-redirect-session.universal';
7
+ export { LocationType, MembersAccountSection, CallbackType, } from './headless-v1-redirect-session.universal';
8
+ export { RedirectSession, CreateRedirectSessionRequest, CreateRedirectSessionRequestIntentOneOf, RedirectSessionBookingsCheckoutParams, SlotAvailability, Slot, SlotResource, Location, WaitingList, BookingPolicyViolations, RedirectSessionEcomCheckoutParams, RedirectSessionEventsCheckoutParams, RedirectSessionPaidPlansCheckoutParams, RedirectSessionLoginParams, RedirectSessionAuthorizeParams, AuthorizeRequest, RedirectSessionLogoutParams, RedirectSessionAuthParams, RedirectSessionMembersAccountParams, CallbackParams, RedirectSessionPreferences, CustomMemberPaths, CreateRedirectSessionResponse, ValidateCallbackURLRequest, ValidateCallbackURLResponse, SignInURLRequest, SignInURLResponse, CreateRedirectSessionOptions, } from './headless-v1-redirect-session.universal';
@@ -5,5 +5,5 @@ export function createRedirectSession(httpClient) {
5
5
  // @ts-ignore
6
6
  { httpClient });
7
7
  }
8
- export { LocationType, CallbackType, } from './headless-v1-redirect-session.universal';
8
+ export { LocationType, MembersAccountSection, CallbackType, } from './headless-v1-redirect-session.universal';
9
9
  //# sourceMappingURL=headless-v1-redirect-session.public.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"headless-v1-redirect-session.public.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,IAAI,8BAA8B,GAExD,MAAM,0CAA0C,CAAC;AAElD,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAE7D,MAAM,UAAU,qBAAqB,CAAC,UAAsB;IAC1D,OAAO,CAAC,OAAsC,EAAE,EAAE,CAChD,8BAA8B,CAC5B,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EACL,YAAY,EACZ,YAAY,GACb,MAAM,0CAA0C,CAAC"}
1
+ {"version":3,"file":"headless-v1-redirect-session.public.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,IAAI,8BAA8B,GAExD,MAAM,0CAA0C,CAAC;AAElD,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAE7D,MAAM,UAAU,qBAAqB,CAAC,UAAsB;IAC1D,OAAO,CAAC,OAAsC,EAAE,EAAE,CAChD,8BAA8B,CAC5B,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,YAAY,GACb,MAAM,0CAA0C,CAAC"}
@@ -1,56 +1,56 @@
1
- /** WixUrl is the main entity of WixUrlService that can be used for lorem ipsum dolor */
1
+ /** Information for redirecting a visitor or member from an external Wix Headless client site to a Wix page for Wix-managed functionality. */
2
2
  export interface RedirectSession {
3
- /** A guid representing the redirect session (for future use) */
3
+ /** ID of the redirect session created. */
4
4
  id?: string;
5
5
  /**
6
- * The Wix URL to redirect into
6
+ * The full URL of the Wix page to redirect the visitor or member to. This URL includes query parameters informing Wix where to redirect the visitor or member back to on the Wix Headless client site.
7
7
  * @readonly
8
8
  */
9
9
  fullUrl?: string;
10
10
  }
11
11
  export interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestIntentOneOf {
12
- /** The parameters used in order to generate the URL into the Bookings checkout flow */
12
+ /** Information required for generating a custom URL for a Wix Bookings checkout. */
13
13
  bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
14
- /** The parameters used in order to generate the URL into the Ecom checkout flow */
14
+ /** Information required for generating a custom URL for a Wix eCommerce checkout. */
15
15
  ecomCheckout?: RedirectSessionEcomCheckoutParams;
16
- /** The parameters used in order to generate the URL into the events checkout flow */
16
+ /** Information required for generating a custom URL for a Wix Events checkout. */
17
17
  eventsCheckout?: RedirectSessionEventsCheckoutParams;
18
- /** The parameters used in order to generate the URL into the paid plans checkout flow */
18
+ /** Information required for generating a custom URL for a Wix Paid Plans checkout. */
19
19
  paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
20
- /** The parameters used in order to generate the URL into the Wix login page */
20
+ /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
21
21
  login?: RedirectSessionLoginParams;
22
- /** The parameters used in order to generate the URL to logout from Wix (invalidate token and clear cookies on wix domain) */
22
+ /** 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. */
23
23
  logout?: RedirectSessionLogoutParams;
24
- /** The parameters used in order to generate the URL into the authorize page */
24
+ /** Information required for generating a custom URL for Wix authentication. */
25
25
  auth?: RedirectSessionAuthParams;
26
- /** The callbacks (URL) allowing the definition of the pages which should be redirected back to the original site during the flow initiated in Wix */
26
+ /** Details of pages to redirect the visitor or member back to on the Wix Headless client site. **Note:** When redirecting for authentication, do not pass a callback URL here. */
27
27
  callbacks?: CallbackParams;
28
- /** Redirect sessions options */
28
+ /** Optional preferences for customizing redirection to Wix pages. */
29
29
  preferences?: RedirectSessionPreferences;
30
30
  }
31
31
  /** @oneof */
32
32
  export interface CreateRedirectSessionRequestIntentOneOf {
33
- /** The parameters used in order to generate the URL into the Bookings checkout flow */
33
+ /** Information required for generating a custom URL for a Wix Bookings checkout. */
34
34
  bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
35
- /** The parameters used in order to generate the URL into the Ecom checkout flow */
35
+ /** Information required for generating a custom URL for a Wix eCommerce checkout. */
36
36
  ecomCheckout?: RedirectSessionEcomCheckoutParams;
37
- /** The parameters used in order to generate the URL into the events checkout flow */
37
+ /** Information required for generating a custom URL for a Wix Events checkout. */
38
38
  eventsCheckout?: RedirectSessionEventsCheckoutParams;
39
- /** The parameters used in order to generate the URL into the paid plans checkout flow */
39
+ /** Information required for generating a custom URL for a Wix Paid Plans checkout. */
40
40
  paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
41
- /** The parameters used in order to generate the URL into the Wix login page */
41
+ /** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
42
42
  login?: RedirectSessionLoginParams;
43
- /** The parameters used in order to generate the URL to logout from Wix (invalidate token and clear cookies on wix domain) */
43
+ /** 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. */
44
44
  logout?: RedirectSessionLogoutParams;
45
- /** The parameters used in order to generate the URL into the authorize page */
45
+ /** Information required for generating a custom URL for Wix authentication. */
46
46
  auth?: RedirectSessionAuthParams;
47
47
  }
48
48
  export interface RedirectSessionBookingsCheckoutParams {
49
- /** The timezone used for presentation and formatting when presenting the selected slot in a human readable format */
49
+ /** The timezone to use when presenting the selected slot to users. In [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) format. For example, `America/Santiago`. */
50
50
  timezone?: string;
51
- /** (Required) The ID of the service used in order to select the slot */
51
+ /** *Required.** ID of the service for which to select the slot. Use [Query Services](https://dev.wix.com/api/rest/wix-bookings/services-v2/query-services) to obtain a service ID. */
52
52
  serviceId?: string;
53
- /** (Required) The selected calendar slots to checkout */
53
+ /** *Required.** The calendar slot to check out. */
54
54
  slotAvailability?: SlotAvailability;
55
55
  }
56
56
  export interface SlotAvailability {
@@ -179,19 +179,22 @@ export interface BookingPolicyViolations {
179
179
  bookOnlineDisabled?: boolean | null;
180
180
  }
181
181
  export interface RedirectSessionEcomCheckoutParams {
182
- /** (Required) The ID of the checkout entity used in order to start the checkout with */
182
+ /** *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. */
183
183
  checkoutId?: string;
184
184
  }
185
185
  export interface RedirectSessionEventsCheckoutParams {
186
- /** (Required) The ID of the selected event */
186
+ /** *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. */
187
187
  reservationId?: string;
188
- /** (Required) The slug of the selected event (url friendly name) */
188
+ /** *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. */
189
189
  eventSlug?: string;
190
190
  }
191
191
  export interface RedirectSessionPaidPlansCheckoutParams {
192
- /** (Required) The ID of the selected paid plan */
192
+ /** *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. */
193
193
  planId?: string;
194
- /** The encoded string representing the navigation defined for the end of the flow, probably received by wix site when navigating to headless */
194
+ /**
195
+ * For use when pricing plan selection is part of a checkout flow and the paid plan selection page is implemented on the external Wix Headless client site.
196
+ * In this case, a string is passed to the external pricing plans page as `checkoutData` query parameter. Pass this string here when redirecting back to Wix.
197
+ */
195
198
  checkoutData?: string | null;
196
199
  }
197
200
  export interface RedirectSessionLoginParams {
@@ -251,33 +254,88 @@ export interface AuthorizeRequest {
251
254
  errorDescription?: string | null;
252
255
  }
253
256
  export interface RedirectSessionLogoutParams {
254
- /** (Required) The oauth app id used */
257
+ /** *Required.** ID of the OAuth app authorizing the client. */
255
258
  clientId?: string;
256
259
  }
257
260
  export interface RedirectSessionAuthParams {
258
- /** (Required) The authorization request to be sent to the authorization server */
261
+ /** *Required.** The authorization request to send to the authorization server. */
259
262
  authRequest?: AuthorizeRequest;
260
263
  }
264
+ export interface RedirectSessionMembersAccountParams {
265
+ /**
266
+ * The member account page to redirect to.
267
+ *
268
+ * Default: `ACCOUNT_INFO`
269
+ */
270
+ section?: MembersAccountSection;
271
+ }
272
+ export declare enum MembersAccountSection {
273
+ /** default - account info section in "my account" */
274
+ ACCOUNT_INFO = "ACCOUNT_INFO",
275
+ /** My Bookings section in "my account" */
276
+ BOOKINGS = "BOOKINGS",
277
+ /** My Orders section in "my account" */
278
+ ORDERS = "ORDERS",
279
+ /** Subscriptions section in "my account" */
280
+ SUBSCRIPTIONS = "SUBSCRIPTIONS",
281
+ /** Events section in "my account" */
282
+ EVENTS = "EVENTS"
283
+ }
261
284
  export interface CallbackParams {
262
- /** An external thank you page URL, used when the thank you page is implemented outside of Wix */
285
+ /**
286
+ * The URL for a custom thank you page implemented on a site outside of Wix. The visitor or member is directed to this page at the end of the Wix-managed process.
287
+ * If the process is abandoned or interrupted, the visitor or member is redirected to the URL specified in `postFlowUrl`.
288
+ *
289
+ * Default: If you don't pass a URL, the visitor or member is redirected to a Wix thank you page, and from there to the URL specified in `postFlowUrl`.
290
+ */
263
291
  thankYouPageUrl?: string | null;
264
- /** The external home page URL, used in order to indicate where to redirect to at the end of the flow (after thank you page/error) */
292
+ /**
293
+ * The URL Wix should redirect the visitor or member to when the Wix-managed process is completed, abandoned, or interrupted.
294
+ *
295
+ * **Note**: For an authentication redirect, you don't need to pass a URL here. Instead, pass one in `auth.authRequest.redirectUri`.
296
+ */
265
297
  postFlowUrl?: string | null;
266
- /** An external pricing plans page URL, used in case the checkout allows payment with a paid plans */
267
- plansListUrl?: string | null;
268
- /** An external login page in case login form is implemented outside Wix */
298
+ /**
299
+ * The URL for a custom login page implemented outside of Wix.
300
+ *
301
+ * Default: If you don't pass a URL, a Wix login page is used.
302
+ */
269
303
  loginUrl?: string | null;
270
- /** An external service list page URL (Bookings Services), used when the services page is implemented outside of Wix */
304
+ /**
305
+ * The URL for a custom bookings services page implemented outside of Wix.
306
+ *
307
+ * Default: If you don't pass a URL, a Wix bookings services page is used.
308
+ */
271
309
  bookingsServiceListUrl?: string | null;
272
- /** An external cart page URL, used when the cart page is implemented outside of Wix */
310
+ /**
311
+ * The URL for a custom eCommerce cart page implemented outside of Wix.
312
+ *
313
+ * Default: If you don't pass a URL, a Wix cart page is used.
314
+ */
273
315
  cartPageUrl?: string | null;
316
+ /**
317
+ * The URL for a custom pricing plans page implemented outside of Wix.
318
+ *
319
+ * Default: If you don't pass a URL, a Wix pricing plans page is used.
320
+ */
321
+ planListUrl?: string | null;
274
322
  }
275
323
  export interface RedirectSessionPreferences {
276
- /** (Default: true) - Define whether the base wix site should be used or the template site for all checkouts */
324
+ /**
325
+ * Whether to use a standard Wix template for Wix pages to which the visitor is redirected. Set to `false` only for a client of a Wix site with custom pages.
326
+ *
327
+ * Default: `true`
328
+ */
277
329
  useGenericWixPages?: boolean | null;
278
330
  }
331
+ export interface CustomMemberPaths {
332
+ /** Path of the account page in the site's members area. Required if `useGenericWixPages` is `false` and the account page path has been changed in the Wix editor. */
333
+ accountPagePath?: string | null;
334
+ /** Path of the member profile page in the site's members area. Required if `useGenericWixPages` is `false` and the member profile page path has been changed in the Wix editor. */
335
+ profilePagePath?: string | null;
336
+ }
279
337
  export interface CreateRedirectSessionResponse {
280
- /** The Wix URL details to redirect into */
338
+ /** Details for redirecting the visitor or member to a Wix page. */
281
339
  redirectSession?: RedirectSession;
282
340
  }
283
341
  export interface ValidateCallbackURLRequest {
@@ -5,6 +5,19 @@ export var LocationType;
5
5
  LocationType["OWNER_CUSTOM"] = "OWNER_CUSTOM";
6
6
  LocationType["CUSTOM"] = "CUSTOM";
7
7
  })(LocationType || (LocationType = {}));
8
+ export var MembersAccountSection;
9
+ (function (MembersAccountSection) {
10
+ /** default - account info section in "my account" */
11
+ MembersAccountSection["ACCOUNT_INFO"] = "ACCOUNT_INFO";
12
+ /** My Bookings section in "my account" */
13
+ MembersAccountSection["BOOKINGS"] = "BOOKINGS";
14
+ /** My Orders section in "my account" */
15
+ MembersAccountSection["ORDERS"] = "ORDERS";
16
+ /** Subscriptions section in "my account" */
17
+ MembersAccountSection["SUBSCRIPTIONS"] = "SUBSCRIPTIONS";
18
+ /** Events section in "my account" */
19
+ MembersAccountSection["EVENTS"] = "EVENTS";
20
+ })(MembersAccountSection || (MembersAccountSection = {}));
8
21
  export var CallbackType;
9
22
  (function (CallbackType) {
10
23
  /** Invalid value - default */
@@ -1 +1 @@
1
- {"version":3,"file":"headless-v1-redirect-session.types.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.types.ts"],"names":[],"mappings":"AAqKA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AA+ID,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,8BAA8B;IAC9B,mCAAmB,CAAA;IACnB,mDAAmD;IACnD,iCAAiB,CAAA;IACjB,mDAAmD;IACnD,qCAAqB,CAAA;IACrB,sDAAsD;IACtD,uCAAuB,CAAA;AACzB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB"}
1
+ {"version":3,"file":"headless-v1-redirect-session.types.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.types.ts"],"names":[],"mappings":"AAqKA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAyHD,MAAM,CAAN,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,qDAAqD;IACrD,sDAA6B,CAAA;IAC7B,0CAA0C;IAC1C,8CAAqB,CAAA;IACrB,wCAAwC;IACxC,0CAAiB,CAAA;IACjB,4CAA4C;IAC5C,wDAA+B,CAAA;IAC/B,qCAAqC;IACrC,0CAAiB,CAAA;AACnB,CAAC,EAXW,qBAAqB,KAArB,qBAAqB,QAWhC;AAwED,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,8BAA8B;IAC9B,mCAAmB,CAAA;IACnB,mDAAmD;IACnD,iCAAiB,CAAA;IACjB,mDAAmD;IACnD,qCAAqB,CAAA;IACrB,sDAAsD;IACtD,uCAAuB,CAAA;AACzB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB"}