@wix/redirects 1.0.35 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/context.d.ts +1 -1
- package/build/cjs/context.js +1 -1
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -1
- package/build/cjs/meta.js +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +1 -1
- package/build/es/context.js +1 -1
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +1 -1
- package/build/es/index.js +1 -1
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +1 -1
- package/build/es/meta.js +1 -1
- package/build/es/meta.js.map +1 -1
- package/package.json +11 -9
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -28
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session.context.d.ts +0 -3
- package/build/cjs/src/headless-v1-redirect-session.context.js +0 -16
- package/build/cjs/src/headless-v1-redirect-session.context.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session.http.d.ts +0 -16
- package/build/cjs/src/headless-v1-redirect-session.http.js +0 -57
- package/build/cjs/src/headless-v1-redirect-session.http.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session.meta.d.ts +0 -13
- package/build/cjs/src/headless-v1-redirect-session.meta.js +0 -47
- package/build/cjs/src/headless-v1-redirect-session.meta.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session.public.d.ts +0 -8
- package/build/cjs/src/headless-v1-redirect-session.public.js +0 -17
- package/build/cjs/src/headless-v1-redirect-session.public.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session.types.d.ts +0 -561
- package/build/cjs/src/headless-v1-redirect-session.types.js +0 -43
- package/build/cjs/src/headless-v1-redirect-session.types.js.map +0 -1
- package/build/cjs/src/headless-v1-redirect-session.universal.d.ts +0 -603
- package/build/cjs/src/headless-v1-redirect-session.universal.js +0 -167
- package/build/cjs/src/headless-v1-redirect-session.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/headless-v1-redirect-session.context.d.ts +0 -3
- package/build/es/src/headless-v1-redirect-session.context.js +0 -12
- package/build/es/src/headless-v1-redirect-session.context.js.map +0 -1
- package/build/es/src/headless-v1-redirect-session.http.d.ts +0 -16
- package/build/es/src/headless-v1-redirect-session.http.js +0 -53
- package/build/es/src/headless-v1-redirect-session.http.js.map +0 -1
- package/build/es/src/headless-v1-redirect-session.meta.d.ts +0 -13
- package/build/es/src/headless-v1-redirect-session.meta.js +0 -20
- package/build/es/src/headless-v1-redirect-session.meta.js.map +0 -1
- package/build/es/src/headless-v1-redirect-session.public.d.ts +0 -8
- package/build/es/src/headless-v1-redirect-session.public.js +0 -9
- package/build/es/src/headless-v1-redirect-session.public.js.map +0 -1
- package/build/es/src/headless-v1-redirect-session.types.d.ts +0 -561
- package/build/es/src/headless-v1-redirect-session.types.js +0 -40
- package/build/es/src/headless-v1-redirect-session.types.js.map +0 -1
- package/build/es/src/headless-v1-redirect-session.universal.d.ts +0 -603
- package/build/es/src/headless-v1-redirect-session.universal.js +0 -140
- package/build/es/src/headless-v1-redirect-session.universal.js.map +0 -1
|
@@ -1,561 +0,0 @@
|
|
|
1
|
-
/** Information for redirecting a visitor from an external Wix Headless client site to a Wix page for Wix-managed functionality. */
|
|
2
|
-
export interface RedirectSession {
|
|
3
|
-
/** ID of the redirect session created. */
|
|
4
|
-
id?: string;
|
|
5
|
-
/**
|
|
6
|
-
* The full URL of the Wix page to redirect the visitor to. This URL includes query parameters informing Wix where to redirect the visitor back to on the Wix Headless client site.
|
|
7
|
-
* @readonly
|
|
8
|
-
*/
|
|
9
|
-
fullUrl?: string;
|
|
10
|
-
/** Details about the URL of the RedirectSession */
|
|
11
|
-
urlDetails?: URLDetails;
|
|
12
|
-
/**
|
|
13
|
-
* The session token to pass to the Wix page to maintain the visitor's identity.
|
|
14
|
-
* @readonly
|
|
15
|
-
*/
|
|
16
|
-
sessionToken?: string | null;
|
|
17
|
-
/**
|
|
18
|
-
* The short URL of the Wix page to redirect the visitor to. This URL includes query parameters informing Wix where to redirect the visitor back to on the Wix Headless client site.
|
|
19
|
-
* @readonly
|
|
20
|
-
*/
|
|
21
|
-
shortUrl?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface URLDetails {
|
|
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`
|
|
27
|
-
* @readonly
|
|
28
|
-
*/
|
|
29
|
-
endpoint?: string;
|
|
30
|
-
/** The query parameters of the url */
|
|
31
|
-
searchParams?: Record<string, string>;
|
|
32
|
-
}
|
|
33
|
-
export interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestIntentOneOf {
|
|
34
|
-
/** Information required for generating a custom URL for a Wix Bookings checkout. */
|
|
35
|
-
bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
|
|
36
|
-
/** Information required for generating a custom URL for a Wix eCommerce checkout. */
|
|
37
|
-
ecomCheckout?: RedirectSessionEcomCheckoutParams;
|
|
38
|
-
/** Information required for generating a custom URL for a Wix Events checkout. */
|
|
39
|
-
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
40
|
-
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
41
|
-
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
42
|
-
/** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
43
|
-
login?: RedirectSessionLoginParams;
|
|
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
|
-
logout?: RedirectSessionLogoutParams;
|
|
46
|
-
/** Information required for generating a custom URL for Wix authentication. */
|
|
47
|
-
auth?: RedirectSessionAuthParams;
|
|
48
|
-
/** Information required for generating a custom URL for a Wix stores product page. */
|
|
49
|
-
storesProduct?: RedirectSessionStoresProductParams;
|
|
50
|
-
/**
|
|
51
|
-
* Details of pages to redirect the visitor back to on the Wix Headless client site.
|
|
52
|
-
* When redirecting to any callback URL, Wix passes the boolean `wixMemberLoggedIn` query parameter.
|
|
53
|
-
* If `true`, a member logged in during the preceding Wix-managed process.
|
|
54
|
-
*
|
|
55
|
-
* **Note**: For an authentication redirect, don't pass a post-flow URL here. Instead, pass one in `auth.authRequest.redirectUri`.
|
|
56
|
-
*/
|
|
57
|
-
callbacks?: CallbackParams;
|
|
58
|
-
/** Optional preferences for customizing redirection to Wix pages. */
|
|
59
|
-
preferences?: RedirectSessionPreferences;
|
|
60
|
-
}
|
|
61
|
-
/** @oneof */
|
|
62
|
-
export interface CreateRedirectSessionRequestIntentOneOf {
|
|
63
|
-
/** Information required for generating a custom URL for a Wix Bookings checkout. */
|
|
64
|
-
bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
|
|
65
|
-
/** Information required for generating a custom URL for a Wix eCommerce checkout. */
|
|
66
|
-
ecomCheckout?: RedirectSessionEcomCheckoutParams;
|
|
67
|
-
/** Information required for generating a custom URL for a Wix Events checkout. */
|
|
68
|
-
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
69
|
-
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
70
|
-
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
71
|
-
/** Pass an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */
|
|
72
|
-
login?: RedirectSessionLoginParams;
|
|
73
|
-
/** 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. */
|
|
74
|
-
logout?: RedirectSessionLogoutParams;
|
|
75
|
-
/** Information required for generating a custom URL for Wix authentication. */
|
|
76
|
-
auth?: RedirectSessionAuthParams;
|
|
77
|
-
/** Information required for generating a custom URL for a Wix stores product page. */
|
|
78
|
-
storesProduct?: RedirectSessionStoresProductParams;
|
|
79
|
-
}
|
|
80
|
-
export interface RedirectSessionBookingsCheckoutParams {
|
|
81
|
-
/**
|
|
82
|
-
* 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`.
|
|
83
|
-
*
|
|
84
|
-
* Default: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used.
|
|
85
|
-
*/
|
|
86
|
-
timezone?: string;
|
|
87
|
-
/** *Required.** The calendar slot to check out. */
|
|
88
|
-
slotAvailability?: SlotAvailability;
|
|
89
|
-
}
|
|
90
|
-
export interface SlotAvailability {
|
|
91
|
-
/**
|
|
92
|
-
* The slot for the corresponding session, when the session is either a single session
|
|
93
|
-
* or a specific session generated from a recurring session.
|
|
94
|
-
*/
|
|
95
|
-
slot?: Slot;
|
|
96
|
-
/**
|
|
97
|
-
* Whether the slot is bookable. Bookability is determined by checking a
|
|
98
|
-
* session's open slots and booking policies. Locks are not taken into
|
|
99
|
-
* account.
|
|
100
|
-
*/
|
|
101
|
-
bookable?: boolean;
|
|
102
|
-
/**
|
|
103
|
-
* Total number of spots for this slot.
|
|
104
|
-
* For example, if a session has a total of 10 spots and 3 spots are booked,
|
|
105
|
-
* `spotsTotal` is 10 and `openSpots` is 7.
|
|
106
|
-
*/
|
|
107
|
-
totalSpots?: number | null;
|
|
108
|
-
/** Number of open spots for this slot. */
|
|
109
|
-
openSpots?: number | null;
|
|
110
|
-
/** An object describing the slot's waitlist and its occupancy. */
|
|
111
|
-
waitingList?: WaitingList;
|
|
112
|
-
/** Booking policy violations for the slot. */
|
|
113
|
-
bookingPolicyViolations?: BookingPolicyViolations;
|
|
114
|
-
/**
|
|
115
|
-
* Indicates whether the slot is locked because a waitlist exists.
|
|
116
|
-
* When a slot frees up, the slot is offered to the next customer on the waitlist. Read-only.
|
|
117
|
-
*/
|
|
118
|
-
locked?: boolean | null;
|
|
119
|
-
isFromV2?: boolean;
|
|
120
|
-
}
|
|
121
|
-
export interface Slot {
|
|
122
|
-
/**
|
|
123
|
-
* ID for the slot's corresponding session, when the session is either a single session
|
|
124
|
-
* or a specific session generated from a recurring session.
|
|
125
|
-
*/
|
|
126
|
-
sessionId?: string | null;
|
|
127
|
-
/** Service ID. */
|
|
128
|
-
serviceId?: string;
|
|
129
|
-
/** Schedule ID. */
|
|
130
|
-
scheduleId?: string;
|
|
131
|
-
/**
|
|
132
|
-
* The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
133
|
-
* format.
|
|
134
|
-
*
|
|
135
|
-
* If `timezone` is specified,
|
|
136
|
-
* dates are based on the local date/time. This means that the timezone offset
|
|
137
|
-
* in the `start_date` is ignored.
|
|
138
|
-
*/
|
|
139
|
-
startDate?: string | null;
|
|
140
|
-
/**
|
|
141
|
-
* The end time of this slot in
|
|
142
|
-
* [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
|
|
143
|
-
*
|
|
144
|
-
* If `timezone` is specified,
|
|
145
|
-
* dates are based on the local date/time. This means that the timezone offset
|
|
146
|
-
* in the `end_date` is ignored.
|
|
147
|
-
*/
|
|
148
|
-
endDate?: string | null;
|
|
149
|
-
/**
|
|
150
|
-
* The timezone for which slot availability is to be calculated.
|
|
151
|
-
*
|
|
152
|
-
* 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)
|
|
153
|
-
* when calculating availability.
|
|
154
|
-
*/
|
|
155
|
-
timezone?: string | null;
|
|
156
|
-
/**
|
|
157
|
-
* The resource required for this slot. Currently, the only supported resource
|
|
158
|
-
* is the relevant staff member for the slot.
|
|
159
|
-
*/
|
|
160
|
-
resource?: SlotResource;
|
|
161
|
-
/** Geographic location of the slot. */
|
|
162
|
-
location?: Location;
|
|
163
|
-
}
|
|
164
|
-
export interface SlotResource {
|
|
165
|
-
/**
|
|
166
|
-
* Resource ID.
|
|
167
|
-
* @readonly
|
|
168
|
-
*/
|
|
169
|
-
id?: string | null;
|
|
170
|
-
/** Resource name. Read only. */
|
|
171
|
-
name?: string | null;
|
|
172
|
-
}
|
|
173
|
-
export interface Location {
|
|
174
|
-
/**
|
|
175
|
-
* Business location ID. Available only for locations that are business locations,
|
|
176
|
-
* meaning the `location_type` is `"OWNER_BUSINESS"`.
|
|
177
|
-
*/
|
|
178
|
-
id?: string | null;
|
|
179
|
-
/** Location name. */
|
|
180
|
-
name?: string | null;
|
|
181
|
-
/** The full address of this location. */
|
|
182
|
-
formattedAddress?: string | null;
|
|
183
|
-
/**
|
|
184
|
-
* Location type.
|
|
185
|
-
*
|
|
186
|
-
* - `"OWNER_BUSINESS"`: The business address, as set in the site’s general settings.
|
|
187
|
-
* - `"OWNER_CUSTOM"`: The address as set when creating the service.
|
|
188
|
-
* - `"CUSTOM"`: The address as set for the individual session.
|
|
189
|
-
*/
|
|
190
|
-
locationType?: LocationType;
|
|
191
|
-
}
|
|
192
|
-
export declare enum LocationType {
|
|
193
|
-
UNDEFINED = "UNDEFINED",
|
|
194
|
-
OWNER_BUSINESS = "OWNER_BUSINESS",
|
|
195
|
-
OWNER_CUSTOM = "OWNER_CUSTOM",
|
|
196
|
-
CUSTOM = "CUSTOM"
|
|
197
|
-
}
|
|
198
|
-
export interface WaitingList {
|
|
199
|
-
/**
|
|
200
|
-
* Total number of spots and open spots for this waitlist.
|
|
201
|
-
* For example, a Yoga class with 10 waitlist spots and 3 registered
|
|
202
|
-
* on the waitlist has 10 `total_spots` and 7 `open_spots`.
|
|
203
|
-
*/
|
|
204
|
-
totalSpots?: number | null;
|
|
205
|
-
/** Number of open spots for this waitlist. */
|
|
206
|
-
openSpots?: number | null;
|
|
207
|
-
}
|
|
208
|
-
export interface BookingPolicyViolations {
|
|
209
|
-
/** Bookings policy violation. Too early to book this slot. */
|
|
210
|
-
tooEarlyToBook?: boolean | null;
|
|
211
|
-
/** Bookings policy violation. Too late to book this slot. */
|
|
212
|
-
tooLateToBook?: boolean | null;
|
|
213
|
-
/** Bookings policy violation. Online booking is disabled for this slot. */
|
|
214
|
-
bookOnlineDisabled?: boolean | null;
|
|
215
|
-
}
|
|
216
|
-
export interface NestedTimeSlot {
|
|
217
|
-
serviceId?: string;
|
|
218
|
-
start?: string;
|
|
219
|
-
end?: string;
|
|
220
|
-
resource?: SlotResource;
|
|
221
|
-
/** Schedule ID. */
|
|
222
|
-
scheduleId?: string;
|
|
223
|
-
}
|
|
224
|
-
export interface RedirectSessionEcomCheckoutParams {
|
|
225
|
-
/** *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. */
|
|
226
|
-
checkoutId?: string;
|
|
227
|
-
}
|
|
228
|
-
export interface RedirectSessionEventsCheckoutParams {
|
|
229
|
-
/** *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. */
|
|
230
|
-
reservationId?: string;
|
|
231
|
-
/** *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. */
|
|
232
|
-
eventSlug?: string;
|
|
233
|
-
}
|
|
234
|
-
export interface RedirectSessionPaidPlansCheckoutParams {
|
|
235
|
-
/** *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. */
|
|
236
|
-
planId?: string;
|
|
237
|
-
/**
|
|
238
|
-
* 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.
|
|
239
|
-
* In this case, a string is received by the external pricing plans page as a `checkoutData` query parameter. Pass this string back here when redirecting back to Wix for checkout.
|
|
240
|
-
*/
|
|
241
|
-
checkoutData?: string | null;
|
|
242
|
-
}
|
|
243
|
-
export interface RedirectSessionLoginParams {
|
|
244
|
-
}
|
|
245
|
-
export interface RedirectSessionLogoutParams {
|
|
246
|
-
/** *Required.** ID of the OAuth app authorizing the client. */
|
|
247
|
-
clientId?: string;
|
|
248
|
-
}
|
|
249
|
-
export interface RedirectSessionAuthParams {
|
|
250
|
-
/** *Required.** The authorization request to send to the authorization server. */
|
|
251
|
-
authRequest?: AuthorizeRequest;
|
|
252
|
-
prompt?: Prompt;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* AuthorizeRequest is sent by the client to the authorization server to initiate
|
|
256
|
-
* the authorization process.
|
|
257
|
-
*/
|
|
258
|
-
export interface AuthorizeRequest {
|
|
259
|
-
/** ID of the Wix OAuth app requesting authorization. */
|
|
260
|
-
clientId?: string;
|
|
261
|
-
/**
|
|
262
|
-
* Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
|
|
263
|
-
*
|
|
264
|
-
* Supported values:
|
|
265
|
-
* + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
|
|
266
|
-
*/
|
|
267
|
-
responseType?: string;
|
|
268
|
-
/** URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not. */
|
|
269
|
-
redirectUri?: string | null;
|
|
270
|
-
/**
|
|
271
|
-
* Desired scope of access. If this field is left empty, only an access token is granted.
|
|
272
|
-
* To received a refresh token, pass `offline_access` as the value of this field.
|
|
273
|
-
*/
|
|
274
|
-
scope?: string | null;
|
|
275
|
-
/**
|
|
276
|
-
* A value used to confirm the state of an application before and after it makes an authorization
|
|
277
|
-
* request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
|
|
278
|
-
* is redirected there.
|
|
279
|
-
* Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
|
|
280
|
-
*/
|
|
281
|
-
state?: string;
|
|
282
|
-
/**
|
|
283
|
-
* esired response format.
|
|
284
|
-
*
|
|
285
|
-
* Supported values:
|
|
286
|
-
* + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
|
|
287
|
-
* + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
|
|
288
|
-
* + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).
|
|
289
|
-
*
|
|
290
|
-
* Default value: `query`
|
|
291
|
-
*/
|
|
292
|
-
responseMode?: string | null;
|
|
293
|
-
/**
|
|
294
|
-
* Code challenge to use for PKCE verification.
|
|
295
|
-
* This field is only used if `responseType` is set to `code`.
|
|
296
|
-
*/
|
|
297
|
-
codeChallenge?: string | null;
|
|
298
|
-
/**
|
|
299
|
-
* Code challenge method to use for PKCE verification.
|
|
300
|
-
* This field is only used if `responseType` is set to `code`.
|
|
301
|
-
*
|
|
302
|
-
* Supported values:
|
|
303
|
-
* + `S256`: The code challenge is transformed using SHA-256 encyption.
|
|
304
|
-
* + `S512`: The code challenge is transformed using SHA-512 encyption.
|
|
305
|
-
*/
|
|
306
|
-
codeChallengeMethod?: string | null;
|
|
307
|
-
/** Session token of the site visitor to authorize. */
|
|
308
|
-
sessionToken?: string | null;
|
|
309
|
-
}
|
|
310
|
-
/** Currently only `none` and `login` are supported. */
|
|
311
|
-
export declare enum Prompt {
|
|
312
|
-
login = "login",
|
|
313
|
-
none = "none",
|
|
314
|
-
consent = "consent",
|
|
315
|
-
select_account = "select_account"
|
|
316
|
-
}
|
|
317
|
-
export interface RedirectSessionMembersAccountParams {
|
|
318
|
-
/**
|
|
319
|
-
* The member account page to redirect to.
|
|
320
|
-
*
|
|
321
|
-
* Default: `ACCOUNT_INFO`
|
|
322
|
-
*/
|
|
323
|
-
section?: MembersAccountSection;
|
|
324
|
-
}
|
|
325
|
-
export declare enum MembersAccountSection {
|
|
326
|
-
/** default - account info section in "my account" */
|
|
327
|
-
ACCOUNT_INFO = "ACCOUNT_INFO",
|
|
328
|
-
/** My Bookings section in "my account" */
|
|
329
|
-
BOOKINGS = "BOOKINGS",
|
|
330
|
-
/** My Orders section in "my account" */
|
|
331
|
-
ORDERS = "ORDERS",
|
|
332
|
-
/** Subscriptions section in "my account" */
|
|
333
|
-
SUBSCRIPTIONS = "SUBSCRIPTIONS",
|
|
334
|
-
/** Events section in "my account" */
|
|
335
|
-
EVENTS = "EVENTS"
|
|
336
|
-
}
|
|
337
|
-
export interface RedirectSessionStoresProductParams {
|
|
338
|
-
/** *Required.** Slug of the product to navigate to. */
|
|
339
|
-
productSlug?: string;
|
|
340
|
-
}
|
|
341
|
-
export interface CallbackParams {
|
|
342
|
-
/**
|
|
343
|
-
* The URL for a custom thank you page implemented on a site outside of Wix. The visitor is directed to this page after the Wix-managed process is completed.
|
|
344
|
-
* When redirecting to this URL, Wix passes different query parameters depending on the preceding transaction:
|
|
345
|
-
*
|
|
346
|
-
* After a pricing plans checkout:
|
|
347
|
-
* + `planOrderId`: ID of a pricing plan order.
|
|
348
|
-
*
|
|
349
|
-
* After an eCommerce checkout:
|
|
350
|
-
* + `orderId`: ID of an eCommerce order.
|
|
351
|
-
*
|
|
352
|
-
* After an Events checkout
|
|
353
|
-
* + `orderNumber`: Unique order number for the transaction.
|
|
354
|
-
* + `eventId`: ID of the event.
|
|
355
|
-
*
|
|
356
|
-
* If the process is abandoned or interrupted, the visitor is redirected to the URL specified in `postFlowUrl` instead.
|
|
357
|
-
*
|
|
358
|
-
* 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`.
|
|
359
|
-
*/
|
|
360
|
-
thankYouPageUrl?: string | null;
|
|
361
|
-
/**
|
|
362
|
-
* The URL Wix should redirect the visitor to when the Wix-managed process is completed, abandoned, or interrupted.
|
|
363
|
-
*
|
|
364
|
-
* **Note**: For an authentication redirect, don't pass a URL here. Instead, pass one in `auth.authRequest.redirectUri`.
|
|
365
|
-
*/
|
|
366
|
-
postFlowUrl?: string | null;
|
|
367
|
-
/**
|
|
368
|
-
* The URL for a custom login page implemented outside of Wix.
|
|
369
|
-
*
|
|
370
|
-
* Default: If you don't pass a URL, a Wix login page is used.
|
|
371
|
-
*/
|
|
372
|
-
loginUrl?: string | null;
|
|
373
|
-
/**
|
|
374
|
-
* The URL for a custom bookings services page implemented outside of Wix.
|
|
375
|
-
*
|
|
376
|
-
* Default: If you don't pass a URL, a Wix bookings services page is used.
|
|
377
|
-
*/
|
|
378
|
-
bookingsServiceListUrl?: string | null;
|
|
379
|
-
/**
|
|
380
|
-
* The URL for a custom eCommerce cart page implemented outside of Wix.
|
|
381
|
-
*
|
|
382
|
-
* Default: If you don't pass a URL, a Wix cart page is used.
|
|
383
|
-
*/
|
|
384
|
-
cartPageUrl?: string | null;
|
|
385
|
-
/**
|
|
386
|
-
* The URL for a custom pricing plans page implemented outside of Wix.
|
|
387
|
-
* When redirecting to this URL, Wix passes the following query parameters:
|
|
388
|
-
* + `planIds`: IDs of the pricing plans on the custom page.
|
|
389
|
-
* + `checkoutData`: Pass this string back in `paidPlansCheckout.checkoutData` when redirecting back to Wix for checkout.
|
|
390
|
-
*
|
|
391
|
-
* Default: If you don't pass a URL, a Wix pricing plans page is used.
|
|
392
|
-
*/
|
|
393
|
-
planListUrl?: string | null;
|
|
394
|
-
}
|
|
395
|
-
export interface RedirectSessionPreferences {
|
|
396
|
-
/**
|
|
397
|
-
* Whether to use a standard Wix template for Wix-managed pages the visitor is redirected to. Set to `false` only if your client site connects with a Wix site that has custom pages.
|
|
398
|
-
*
|
|
399
|
-
* Default: `true`
|
|
400
|
-
*/
|
|
401
|
-
useGenericWixPages?: boolean | null;
|
|
402
|
-
/**
|
|
403
|
-
* 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.
|
|
404
|
-
*
|
|
405
|
-
* Default: `true`
|
|
406
|
-
*/
|
|
407
|
-
maintainIdentity?: boolean | null;
|
|
408
|
-
/**
|
|
409
|
-
* A map of additional query parameters to pass to the created Wix URL.
|
|
410
|
-
* Global query parameters to be passed to Wix, for example campaign parameters (UTM params).
|
|
411
|
-
*/
|
|
412
|
-
additionalQueryParameters?: Record<string, string>;
|
|
413
|
-
}
|
|
414
|
-
export interface CustomMemberPaths {
|
|
415
|
-
/** 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. */
|
|
416
|
-
accountPagePath?: string | null;
|
|
417
|
-
/** 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. */
|
|
418
|
-
profilePagePath?: string | null;
|
|
419
|
-
}
|
|
420
|
-
export interface CreateRedirectSessionResponse {
|
|
421
|
-
/** Details for redirecting the visitor to a Wix page. */
|
|
422
|
-
redirectSession?: RedirectSession;
|
|
423
|
-
}
|
|
424
|
-
export interface CreateAnonymousRedirectSessionRequest extends CreateAnonymousRedirectSessionRequestIntentOneOf {
|
|
425
|
-
/** Information required for generating a custom URL for a Wix Bookings checkout. */
|
|
426
|
-
bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
|
|
427
|
-
/** Information required for generating a custom URL for a Wix eCommerce checkout. */
|
|
428
|
-
ecomCheckout?: RedirectSessionEcomCheckoutParams;
|
|
429
|
-
/** Information required for generating a custom URL for a Wix Events checkout. */
|
|
430
|
-
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
431
|
-
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
432
|
-
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
433
|
-
/** Information required for generating a custom URL for a Wix stores product page. */
|
|
434
|
-
storesProduct?: RedirectSessionStoresProductParams;
|
|
435
|
-
/** Optional preferences for customizing redirection to Wix pages. */
|
|
436
|
-
preferences?: RedirectSessionPreferences;
|
|
437
|
-
}
|
|
438
|
-
/** @oneof */
|
|
439
|
-
export interface CreateAnonymousRedirectSessionRequestIntentOneOf {
|
|
440
|
-
/** Information required for generating a custom URL for a Wix Bookings checkout. */
|
|
441
|
-
bookingsCheckout?: RedirectSessionBookingsCheckoutParams;
|
|
442
|
-
/** Information required for generating a custom URL for a Wix eCommerce checkout. */
|
|
443
|
-
ecomCheckout?: RedirectSessionEcomCheckoutParams;
|
|
444
|
-
/** Information required for generating a custom URL for a Wix Events checkout. */
|
|
445
|
-
eventsCheckout?: RedirectSessionEventsCheckoutParams;
|
|
446
|
-
/** Information required for generating a custom URL for a Wix Paid Plans checkout. */
|
|
447
|
-
paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams;
|
|
448
|
-
/** Information required for generating a custom URL for a Wix stores product page. */
|
|
449
|
-
storesProduct?: RedirectSessionStoresProductParams;
|
|
450
|
-
}
|
|
451
|
-
export interface CreateAnonymousRedirectSessionResponse {
|
|
452
|
-
/** Details for redirecting the visitor to a Wix page. */
|
|
453
|
-
redirectSession?: RedirectSession;
|
|
454
|
-
}
|
|
455
|
-
export interface ValidateCallbackURLRequest {
|
|
456
|
-
/** An external URL to validate */
|
|
457
|
-
callbackUrl?: string;
|
|
458
|
-
/** The type of the callback URL */
|
|
459
|
-
callbackType?: CallbackType;
|
|
460
|
-
/** The oauth app id used in order to pull the allowed domains from, has to correspond to the same metasite as the site in context */
|
|
461
|
-
clientId?: string;
|
|
462
|
-
}
|
|
463
|
-
export declare enum CallbackType {
|
|
464
|
-
/** Invalid value - default */
|
|
465
|
-
UNKNOWN = "UNKNOWN",
|
|
466
|
-
/** The callback URL is used for the logout flow */
|
|
467
|
-
LOGOUT = "LOGOUT",
|
|
468
|
-
/** The callback URL is used for a checkout flow */
|
|
469
|
-
CHECKOUT = "CHECKOUT",
|
|
470
|
-
/** The callback URL is used for the authorize flow */
|
|
471
|
-
AUTHORIZE = "AUTHORIZE"
|
|
472
|
-
}
|
|
473
|
-
export interface ValidateCallbackURLResponse {
|
|
474
|
-
/** is the provided url allowed for the given client id */
|
|
475
|
-
isValid?: boolean;
|
|
476
|
-
}
|
|
477
|
-
export interface SignInURLRequest {
|
|
478
|
-
/** The oauth app id used in order to pull the allowed domains from, has to correspond to the same metasite as the site in context */
|
|
479
|
-
clientId?: string;
|
|
480
|
-
}
|
|
481
|
-
export interface SignInURLResponse {
|
|
482
|
-
/** The Wix URL details to redirect into */
|
|
483
|
-
redirectSession?: RedirectSession;
|
|
484
|
-
}
|
|
485
|
-
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
486
|
-
createdEvent?: EntityCreatedEvent;
|
|
487
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
488
|
-
deletedEvent?: EntityDeletedEvent;
|
|
489
|
-
actionEvent?: ActionEvent;
|
|
490
|
-
/**
|
|
491
|
-
* Unique event ID.
|
|
492
|
-
* Allows clients to ignore duplicate webhooks.
|
|
493
|
-
*/
|
|
494
|
-
id?: string;
|
|
495
|
-
/**
|
|
496
|
-
* Assumes actions are also always typed to an entity_type
|
|
497
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
498
|
-
*/
|
|
499
|
-
entityFqdn?: string;
|
|
500
|
-
/**
|
|
501
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
502
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
503
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
504
|
-
*/
|
|
505
|
-
slug?: string;
|
|
506
|
-
/** ID of the entity associated with the event. */
|
|
507
|
-
entityId?: string;
|
|
508
|
-
/** Event timestamp. */
|
|
509
|
-
eventTime?: Date;
|
|
510
|
-
/**
|
|
511
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
512
|
-
* (for example, GDPR).
|
|
513
|
-
*/
|
|
514
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
515
|
-
/** If present, indicates the action that triggered the event. */
|
|
516
|
-
originatedFrom?: string | null;
|
|
517
|
-
/**
|
|
518
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
519
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
520
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
521
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
522
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
523
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
524
|
-
*/
|
|
525
|
-
entityEventSequence?: string | null;
|
|
526
|
-
}
|
|
527
|
-
/** @oneof */
|
|
528
|
-
export interface DomainEventBodyOneOf {
|
|
529
|
-
createdEvent?: EntityCreatedEvent;
|
|
530
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
531
|
-
deletedEvent?: EntityDeletedEvent;
|
|
532
|
-
actionEvent?: ActionEvent;
|
|
533
|
-
}
|
|
534
|
-
export interface EntityCreatedEvent {
|
|
535
|
-
entityAsJson?: string;
|
|
536
|
-
}
|
|
537
|
-
export interface EntityUpdatedEvent {
|
|
538
|
-
/**
|
|
539
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
540
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
541
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
542
|
-
*/
|
|
543
|
-
currentEntityAsJson?: string;
|
|
544
|
-
}
|
|
545
|
-
export interface EntityDeletedEvent {
|
|
546
|
-
/** Entity that was deleted */
|
|
547
|
-
deletedEntityAsJson?: string | null;
|
|
548
|
-
}
|
|
549
|
-
export interface ActionEvent {
|
|
550
|
-
bodyAsJson?: string;
|
|
551
|
-
}
|
|
552
|
-
export interface CreateRedirectSessionResponseNonNullableFields {
|
|
553
|
-
redirectSession?: {
|
|
554
|
-
id: string;
|
|
555
|
-
fullUrl: string;
|
|
556
|
-
urlDetails?: {
|
|
557
|
-
endpoint: string;
|
|
558
|
-
};
|
|
559
|
-
shortUrl: string;
|
|
560
|
-
};
|
|
561
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CallbackType = exports.MembersAccountSection = exports.Prompt = exports.LocationType = void 0;
|
|
4
|
-
var LocationType;
|
|
5
|
-
(function (LocationType) {
|
|
6
|
-
LocationType["UNDEFINED"] = "UNDEFINED";
|
|
7
|
-
LocationType["OWNER_BUSINESS"] = "OWNER_BUSINESS";
|
|
8
|
-
LocationType["OWNER_CUSTOM"] = "OWNER_CUSTOM";
|
|
9
|
-
LocationType["CUSTOM"] = "CUSTOM";
|
|
10
|
-
})(LocationType || (exports.LocationType = LocationType = {}));
|
|
11
|
-
/** Currently only `none` and `login` are supported. */
|
|
12
|
-
var Prompt;
|
|
13
|
-
(function (Prompt) {
|
|
14
|
-
Prompt["login"] = "login";
|
|
15
|
-
Prompt["none"] = "none";
|
|
16
|
-
Prompt["consent"] = "consent";
|
|
17
|
-
Prompt["select_account"] = "select_account";
|
|
18
|
-
})(Prompt || (exports.Prompt = Prompt = {}));
|
|
19
|
-
var MembersAccountSection;
|
|
20
|
-
(function (MembersAccountSection) {
|
|
21
|
-
/** default - account info section in "my account" */
|
|
22
|
-
MembersAccountSection["ACCOUNT_INFO"] = "ACCOUNT_INFO";
|
|
23
|
-
/** My Bookings section in "my account" */
|
|
24
|
-
MembersAccountSection["BOOKINGS"] = "BOOKINGS";
|
|
25
|
-
/** My Orders section in "my account" */
|
|
26
|
-
MembersAccountSection["ORDERS"] = "ORDERS";
|
|
27
|
-
/** Subscriptions section in "my account" */
|
|
28
|
-
MembersAccountSection["SUBSCRIPTIONS"] = "SUBSCRIPTIONS";
|
|
29
|
-
/** Events section in "my account" */
|
|
30
|
-
MembersAccountSection["EVENTS"] = "EVENTS";
|
|
31
|
-
})(MembersAccountSection || (exports.MembersAccountSection = MembersAccountSection = {}));
|
|
32
|
-
var CallbackType;
|
|
33
|
-
(function (CallbackType) {
|
|
34
|
-
/** Invalid value - default */
|
|
35
|
-
CallbackType["UNKNOWN"] = "UNKNOWN";
|
|
36
|
-
/** The callback URL is used for the logout flow */
|
|
37
|
-
CallbackType["LOGOUT"] = "LOGOUT";
|
|
38
|
-
/** The callback URL is used for a checkout flow */
|
|
39
|
-
CallbackType["CHECKOUT"] = "CHECKOUT";
|
|
40
|
-
/** The callback URL is used for the authorize flow */
|
|
41
|
-
CallbackType["AUTHORIZE"] = "AUTHORIZE";
|
|
42
|
-
})(CallbackType || (exports.CallbackType = CallbackType = {}));
|
|
43
|
-
//# sourceMappingURL=headless-v1-redirect-session.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headless-v1-redirect-session.types.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.types.ts"],"names":[],"mappings":";;;AAyMA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AA2HD,uDAAuD;AACvD,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,yBAAe,CAAA;IACf,uBAAa,CAAA;IACb,6BAAmB,CAAA;IACnB,2CAAiC,CAAA;AACnC,CAAC,EALW,MAAM,sBAAN,MAAM,QAKjB;AAWD,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,qCAArB,qBAAqB,QAWhC;AA0ID,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,4BAAZ,YAAY,QASvB"}
|