bookito-widget 1.4.0-beta.5 → 1.4.0
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/dist/bookito-widget.iife.js +33 -34
- package/dist/bookito-widget.js +4507 -4837
- package/dist/bookito-widget.loader.js +1 -1
- package/dist/bookito-widget.umd.js +1 -1
- package/dist/bookito-widget.window.js +1 -1
- package/dist/src/app/i18n/index.d.ts +0 -10
- package/dist/src/app/i18n/locales/de.d.ts +0 -1
- package/dist/src/app/i18n/locales/en.d.ts +0 -1
- package/dist/src/app/i18n/locales/fr.d.ts +0 -1
- package/dist/src/app/i18n/locales/it.d.ts +0 -1
- package/dist/src/app/i18n/locales/pl.d.ts +0 -1
- package/dist/src/features/booking-flow/components/BookingDetailsPhoneInput.vue.d.ts +0 -1
- package/dist/src/features/booking-flow/composables/useBookingFlowActions.types.d.ts +1 -7
- package/dist/src/features/booking-flow/lib/booking-details.helpers.d.ts +0 -1
- package/dist/src/features/booking-flow/lib/booking-flow.actions.d.ts +0 -2
- package/dist/src/features/booking-flow/lib/booking-flow.helpers.d.ts +1 -0
- package/dist/src/features/booking-flow/model/booking-form.types.d.ts +0 -2
- package/dist/src/features/bookito-settings/model/bookito-settings.types.d.ts +0 -5
- package/dist/src/features/guest-auth/api/guest-auth.client.d.ts +1 -3
- package/dist/src/features/guest-auth/api/guest-auth.dto.d.ts +0 -6
- package/dist/src/features/guest-auth/api/guest-auth.mutations.d.ts +1 -2
- package/package.json +1 -1
- package/dist/src/features/booking-flow/components/BookingDetailsContactFields.vue.d.ts +0 -19
- package/dist/src/features/booking-flow/composables/continue-booking-from-details.d.ts +0 -4
- package/dist/src/features/booking-flow/composables/useBookingDisplaySteps.d.ts +0 -6
- package/dist/src/features/booking-flow/lib/booking-contact-information.helpers.d.ts +0 -9
- package/dist/src/features/booking-flow/model/booking-contact-fields.types.d.ts +0 -6
- package/dist/src/features/bookito-settings/api/map-outgoing-notification-channels.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){
|
|
1
|
+
(function(){function e(){return``}var t={carlito_federation:{production:`https://federation-prod.carlito-app.com`,prerelease:`https://federation-staging.carlito-app.com`,development:`https://federation-staging.carlito-app.com`},gateway:{production:`https://epificcu94.execute-api.eu-central-1.amazonaws.com/production`,prerelease:`https://4kkst32tm6.execute-api.eu-central-1.amazonaws.com/staging`,development:`https://4kkst32tm6.execute-api.eu-central-1.amazonaws.com/staging`},main_content:{development:`https://strapi-dev.carlito-app.com`,prerelease:`https://strapi-dev.carlito-app.com`,production:`https://strapi-prod.carlito-app.com`}};function n(){return`production`}function r(e,r=n()){if(e===`main_content`){let e=a(void 0);if(e)return e}if(e===`carlito_federation`){let e=i(r);if(e)return e}return t[e][r]}function i(t){return t===`development`||t===`prerelease`?e()||a(void 0):``}function a(e){return e?.trim().replace(/\/+$/,``)??``}var o=2e3;function s(){let e=n(),t=e===`production`,i=t?`legacy`:`legacy-next`,a=t?`latest`:`next`;return{legacyUrl:`https://unpkg.com/bookito-widget@${i}/dist/bookito-widget.umd.js`,strapiUrl:r(`main_content`,e),timeoutMs:o,vueUrl:`https://unpkg.com/bookito-widget@${a}/dist/bookito-widget.iife.js`}}var c=[`useNewWebWidget`],l=/^\d+$/;async function u(e,t,n){if(!l.test(t))return{ok:!1,reason:`invalid_hotel_id`};let r=c.map((e,t)=>`fields[${t}]=${e}`).join(`&`),i=new AbortController,a=setTimeout(()=>i.abort(),n);try{let n=await fetch(`${e}/api/hotels/${t}?${r}`,{signal:i.signal});return n.ok?{ok:!0,hotel:d(await n.json())}:{ok:!1,reason:`http_${n.status}`}}catch{return{ok:!1,reason:i.signal.aborted?`timeout`:`request_failed`}}finally{clearTimeout(a)}}function d(e){return{useNewWebWidget:(e.data?.attributes??e.data??{}).useNewWebWidget===!0}}function f(){let e,t=new Promise(t=>{e=t}),n=t=>{let n=p(t);n&&e&&(e(n),e=void 0)},r=()=>{for(let e of document.querySelectorAll(`bookito-widget`))n(e.getAttribute(`auth-id`)||e.getAttribute(`authId`))};if(r(),e){let e=new MutationObserver(r);e.observe(document.documentElement,{childList:!0,subtree:!0}),t.then(()=>e.disconnect())}return{firstId:t,offer:n}}function p(e){return typeof e==`number`?String(e):typeof e==`string`?e.trim():``}var m=globalThis;async function h(e){if(m.bookitoWidget)return;let t=[],{firstId:n,offer:r}=f(),i,a=e=>{if(!i){t.push(e);return}g(i,e)},o={initialize(e){a([`initialize`,e]),r(e?.authId)},openBookitoModal(e){a([`openBookitoModal`,e]),r(e?.authId)},unmount(e){a([`unmount`,e])}};m.bookitoWidget=o;let s=await n,c=e.legacyUrl,l=await u(e.strapiUrl,s,e.timeoutMs);l.ok||console.warn(`bookito-widget: hotel flag unavailable (${l.reason}), loading the legacy widget`);let d=l.ok&&l.hotel.useNewWebWidget?e.vueUrl:c,p=()=>{let e=m.bookitoWidget;if(!(!e||e===o)){i=e;for(let n of t.splice(0))g(e,n)}};_(d,p,()=>{if(d===c){console.error(`bookito-widget: could not load ${d}`);return}console.warn(`bookito-widget: could not load ${d}, loading the legacy widget`),_(c,p,()=>{console.error(`bookito-widget: could not load ${c}`)})})}function g(e,[t,n]){let r=e[t];if(typeof r!=`function`){console.warn(`bookito-widget: the loaded widget has no ${t}, call skipped`);return}try{r.call(e,n)}catch(e){console.error(`bookito-widget: ${t} failed`,e)}}function _(e,t,n){let r=document.createElement(`script`);r.src=e,r.addEventListener(`load`,t),r.addEventListener(`error`,n),document.head.append(r)}h(s())})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){
|
|
1
|
+
(function(){function e(){return``}var t={carlito_federation:{production:`https://federation-prod.carlito-app.com`,prerelease:`https://federation-staging.carlito-app.com`,development:`https://federation-staging.carlito-app.com`},gateway:{production:`https://epificcu94.execute-api.eu-central-1.amazonaws.com/production`,prerelease:`https://4kkst32tm6.execute-api.eu-central-1.amazonaws.com/staging`,development:`https://4kkst32tm6.execute-api.eu-central-1.amazonaws.com/staging`},main_content:{development:`https://strapi-dev.carlito-app.com`,prerelease:`https://strapi-dev.carlito-app.com`,production:`https://strapi-prod.carlito-app.com`}};function n(){return`production`}function r(e,r=n()){if(e===`main_content`){let e=a(void 0);if(e)return e}if(e===`carlito_federation`){let e=i(r);if(e)return e}return t[e][r]}function i(t){return t===`development`||t===`prerelease`?e()||a(void 0):``}function a(e){return e?.trim().replace(/\/+$/,``)??``}var o=2e3;function s(){let e=n(),t=e===`production`,i=t?`legacy`:`legacy-next`,a=t?`latest`:`next`;return{legacyUrl:`https://unpkg.com/bookito-widget@${i}/dist/bookito-widget.umd.js`,strapiUrl:r(`main_content`,e),timeoutMs:o,vueUrl:`https://unpkg.com/bookito-widget@${a}/dist/bookito-widget.iife.js`}}var c=[`useNewWebWidget`],l=/^\d+$/;async function u(e,t,n){if(!l.test(t))return{ok:!1,reason:`invalid_hotel_id`};let r=c.map((e,t)=>`fields[${t}]=${e}`).join(`&`),i=new AbortController,a=setTimeout(()=>i.abort(),n);try{let n=await fetch(`${e}/api/hotels/${t}?${r}`,{signal:i.signal});return n.ok?{ok:!0,hotel:d(await n.json())}:{ok:!1,reason:`http_${n.status}`}}catch{return{ok:!1,reason:i.signal.aborted?`timeout`:`request_failed`}}finally{clearTimeout(a)}}function d(e){return{useNewWebWidget:(e.data?.attributes??e.data??{}).useNewWebWidget===!0}}function f(){let e,t=new Promise(t=>{e=t}),n=t=>{let n=p(t);n&&e&&(e(n),e=void 0)},r=()=>{for(let e of document.querySelectorAll(`bookito-widget`))n(e.getAttribute(`auth-id`)||e.getAttribute(`authId`))};if(r(),e){let e=new MutationObserver(r);e.observe(document.documentElement,{childList:!0,subtree:!0}),t.then(()=>e.disconnect())}return{firstId:t,offer:n}}function p(e){return typeof e==`number`?String(e):typeof e==`string`?e.trim():``}var m=globalThis;async function h(e){if(m.bookitoWidget)return;let t=[],{firstId:n,offer:r}=f(),i,a=e=>{if(!i){t.push(e);return}g(i,e)},o={initialize(e){a([`initialize`,e]),r(e?.authId)},openBookitoModal(e){a([`openBookitoModal`,e]),r(e?.authId)},unmount(e){a([`unmount`,e])}};m.bookitoWidget=o;let s=await n,c=e.legacyUrl,l=await u(e.strapiUrl,s,e.timeoutMs);l.ok||console.warn(`bookito-widget: hotel flag unavailable (${l.reason}), loading the legacy widget`);let d=l.ok&&l.hotel.useNewWebWidget?e.vueUrl:c,p=()=>{let e=m.bookitoWidget;if(!(!e||e===o)){i=e;for(let n of t.splice(0))g(e,n)}};_(d,p,()=>{if(d===c){console.error(`bookito-widget: could not load ${d}`);return}console.warn(`bookito-widget: could not load ${d}, loading the legacy widget`),_(c,p,()=>{console.error(`bookito-widget: could not load ${c}`)})})}function g(e,[t,n]){let r=e[t];if(typeof r!=`function`){console.warn(`bookito-widget: the loaded widget has no ${t}, call skipped`);return}try{r.call(e,n)}catch(e){console.error(`bookito-widget: ${t} failed`,e)}}function _(e,t,n){let r=document.createElement(`script`);r.src=e,r.addEventListener(`load`,t),r.addEventListener(`error`,n),document.head.append(r)}h(s())})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){
|
|
1
|
+
(function(){function e(){return``}var t={carlito_federation:{production:`https://federation-prod.carlito-app.com`,prerelease:`https://federation-staging.carlito-app.com`,development:`https://federation-staging.carlito-app.com`},gateway:{production:`https://epificcu94.execute-api.eu-central-1.amazonaws.com/production`,prerelease:`https://4kkst32tm6.execute-api.eu-central-1.amazonaws.com/staging`,development:`https://4kkst32tm6.execute-api.eu-central-1.amazonaws.com/staging`},main_content:{development:`https://strapi-dev.carlito-app.com`,prerelease:`https://strapi-dev.carlito-app.com`,production:`https://strapi-prod.carlito-app.com`}};function n(){return`production`}function r(e,r=n()){if(e===`main_content`){let e=a(void 0);if(e)return e}if(e===`carlito_federation`){let e=i(r);if(e)return e}return t[e][r]}function i(t){return t===`development`||t===`prerelease`?e()||a(void 0):``}function a(e){return e?.trim().replace(/\/+$/,``)??``}var o=2e3;function s(){let e=n(),t=e===`production`,i=t?`legacy`:`legacy-next`,a=t?`latest`:`next`;return{legacyUrl:`https://unpkg.com/bookito-widget@${i}/dist/bookito-widget.umd.js`,strapiUrl:r(`main_content`,e),timeoutMs:o,vueUrl:`https://unpkg.com/bookito-widget@${a}/dist/bookito-widget.iife.js`}}var c=[`useNewWebWidget`],l=/^\d+$/;async function u(e,t,n){if(!l.test(t))return{ok:!1,reason:`invalid_hotel_id`};let r=c.map((e,t)=>`fields[${t}]=${e}`).join(`&`),i=new AbortController,a=setTimeout(()=>i.abort(),n);try{let n=await fetch(`${e}/api/hotels/${t}?${r}`,{signal:i.signal});return n.ok?{ok:!0,hotel:d(await n.json())}:{ok:!1,reason:`http_${n.status}`}}catch{return{ok:!1,reason:i.signal.aborted?`timeout`:`request_failed`}}finally{clearTimeout(a)}}function d(e){return{useNewWebWidget:(e.data?.attributes??e.data??{}).useNewWebWidget===!0}}function f(){let e,t=new Promise(t=>{e=t}),n=t=>{let n=p(t);n&&e&&(e(n),e=void 0)},r=()=>{for(let e of document.querySelectorAll(`bookito-widget`))n(e.getAttribute(`auth-id`)||e.getAttribute(`authId`))};if(r(),e){let e=new MutationObserver(r);e.observe(document.documentElement,{childList:!0,subtree:!0}),t.then(()=>e.disconnect())}return{firstId:t,offer:n}}function p(e){return typeof e==`number`?String(e):typeof e==`string`?e.trim():``}var m=globalThis;async function h(e){if(m.bookitoWidget)return;let t=[],{firstId:n,offer:r}=f(),i,a=e=>{if(!i){t.push(e);return}g(i,e)},o={initialize(e){a([`initialize`,e]),r(e?.authId)},openBookitoModal(e){a([`openBookitoModal`,e]),r(e?.authId)},unmount(e){a([`unmount`,e])}};m.bookitoWidget=o;let s=await n,c=e.legacyUrl,l=await u(e.strapiUrl,s,e.timeoutMs);l.ok||console.warn(`bookito-widget: hotel flag unavailable (${l.reason}), loading the legacy widget`);let d=l.ok&&l.hotel.useNewWebWidget?e.vueUrl:c,p=()=>{let e=m.bookitoWidget;if(!(!e||e===o)){i=e;for(let n of t.splice(0))g(e,n)}};_(d,p,()=>{if(d===c){console.error(`bookito-widget: could not load ${d}`);return}console.warn(`bookito-widget: could not load ${d}, loading the legacy widget`),_(c,p,()=>{console.error(`bookito-widget: could not load ${c}`)})})}function g(e,[t,n]){let r=e[t];if(typeof r!=`function`){console.warn(`bookito-widget: the loaded widget has no ${t}, call skipped`);return}try{r.call(e,n)}catch(e){console.error(`bookito-widget: ${t} failed`,e)}}function _(e,t,n){let r=document.createElement(`script`);r.src=e,r.addEventListener(`load`,t),r.addEventListener(`error`,n),document.head.append(r)}h(s())})();
|
|
@@ -65,7 +65,6 @@ export declare const widgetLocaleMessages: {
|
|
|
65
65
|
free: string;
|
|
66
66
|
loginError: string;
|
|
67
67
|
bookingError: string;
|
|
68
|
-
contactUpdateError: string;
|
|
69
68
|
tooManyParticipants: string;
|
|
70
69
|
bookingSuccess: string;
|
|
71
70
|
bookingSuccessRequest: string;
|
|
@@ -164,7 +163,6 @@ export declare const widgetLocaleMessages: {
|
|
|
164
163
|
free: string;
|
|
165
164
|
loginError: string;
|
|
166
165
|
bookingError: string;
|
|
167
|
-
contactUpdateError: string;
|
|
168
166
|
tooManyParticipants: string;
|
|
169
167
|
bookingSuccess: string;
|
|
170
168
|
bookingSuccessRequest: string;
|
|
@@ -263,7 +261,6 @@ export declare const widgetLocaleMessages: {
|
|
|
263
261
|
free: string;
|
|
264
262
|
loginError: string;
|
|
265
263
|
bookingError: string;
|
|
266
|
-
contactUpdateError: string;
|
|
267
264
|
tooManyParticipants: string;
|
|
268
265
|
bookingSuccess: string;
|
|
269
266
|
bookingSuccessRequest: string;
|
|
@@ -362,7 +359,6 @@ export declare const widgetLocaleMessages: {
|
|
|
362
359
|
free: string;
|
|
363
360
|
loginError: string;
|
|
364
361
|
bookingError: string;
|
|
365
|
-
contactUpdateError: string;
|
|
366
362
|
tooManyParticipants: string;
|
|
367
363
|
bookingSuccess: string;
|
|
368
364
|
bookingSuccessRequest: string;
|
|
@@ -461,7 +457,6 @@ export declare const widgetLocaleMessages: {
|
|
|
461
457
|
free: string;
|
|
462
458
|
loginError: string;
|
|
463
459
|
bookingError: string;
|
|
464
|
-
contactUpdateError: string;
|
|
465
460
|
tooManyParticipants: string;
|
|
466
461
|
bookingSuccess: string;
|
|
467
462
|
bookingSuccessRequest: string;
|
|
@@ -564,7 +559,6 @@ export declare function createWidgetI18n(locale?: string): import('vue-i18n').I1
|
|
|
564
559
|
free: string;
|
|
565
560
|
loginError: string;
|
|
566
561
|
bookingError: string;
|
|
567
|
-
contactUpdateError: string;
|
|
568
562
|
tooManyParticipants: string;
|
|
569
563
|
bookingSuccess: string;
|
|
570
564
|
bookingSuccessRequest: string;
|
|
@@ -663,7 +657,6 @@ export declare function createWidgetI18n(locale?: string): import('vue-i18n').I1
|
|
|
663
657
|
free: string;
|
|
664
658
|
loginError: string;
|
|
665
659
|
bookingError: string;
|
|
666
|
-
contactUpdateError: string;
|
|
667
660
|
tooManyParticipants: string;
|
|
668
661
|
bookingSuccess: string;
|
|
669
662
|
bookingSuccessRequest: string;
|
|
@@ -762,7 +755,6 @@ export declare function createWidgetI18n(locale?: string): import('vue-i18n').I1
|
|
|
762
755
|
free: string;
|
|
763
756
|
loginError: string;
|
|
764
757
|
bookingError: string;
|
|
765
|
-
contactUpdateError: string;
|
|
766
758
|
tooManyParticipants: string;
|
|
767
759
|
bookingSuccess: string;
|
|
768
760
|
bookingSuccessRequest: string;
|
|
@@ -861,7 +853,6 @@ export declare function createWidgetI18n(locale?: string): import('vue-i18n').I1
|
|
|
861
853
|
free: string;
|
|
862
854
|
loginError: string;
|
|
863
855
|
bookingError: string;
|
|
864
|
-
contactUpdateError: string;
|
|
865
856
|
tooManyParticipants: string;
|
|
866
857
|
bookingSuccess: string;
|
|
867
858
|
bookingSuccessRequest: string;
|
|
@@ -960,7 +951,6 @@ export declare function createWidgetI18n(locale?: string): import('vue-i18n').I1
|
|
|
960
951
|
free: string;
|
|
961
952
|
loginError: string;
|
|
962
953
|
bookingError: string;
|
|
963
|
-
contactUpdateError: string;
|
|
964
954
|
tooManyParticipants: string;
|
|
965
955
|
bookingSuccess: string;
|
|
966
956
|
bookingSuccessRequest: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
dialCode: string;
|
|
3
3
|
phoneNumber: string;
|
|
4
|
-
required?: boolean;
|
|
5
4
|
};
|
|
6
5
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
6
|
"update:dialCode": (value: string) => any;
|
|
@@ -3,17 +3,13 @@ import { CreateBookitoBookingRequestType } from '../../../../features/booking-fl
|
|
|
3
3
|
import { BookingFormStateType, BookingStepType } from '../../../../features/booking-flow/model/booking-form.types';
|
|
4
4
|
import { ResolveBookingWaitlistResultType } from '../../../../features/booking-flow/lib/resolve-booking-waitlist';
|
|
5
5
|
import { BookitoEventType, BookitoTimeSlotType } from '../../../../features/event-feed/model/widget.types';
|
|
6
|
-
import {
|
|
7
|
-
import { GuestLoginRequestType, GuestLoginResponseType, GuestUpdateRequestType } from '../../../../features/guest-auth/api/guest-auth.dto';
|
|
6
|
+
import { GuestLoginRequestType, GuestLoginResponseType } from '../../../../features/guest-auth/api/guest-auth.dto';
|
|
8
7
|
export type CreateBookingMutationType = {
|
|
9
8
|
mutateAsync: (payload: CreateBookitoBookingRequestType) => Promise<unknown>;
|
|
10
9
|
};
|
|
11
10
|
export type GuestLoginMutationType = {
|
|
12
11
|
mutateAsync: (payload: GuestLoginRequestType) => Promise<GuestLoginResponseType>;
|
|
13
12
|
};
|
|
14
|
-
export type UpdateGuestMutationType = {
|
|
15
|
-
mutateAsync: (payload: GuestUpdateRequestType) => Promise<unknown>;
|
|
16
|
-
};
|
|
17
13
|
export type BookingFlowActionsOptionsType = {
|
|
18
14
|
authId: string;
|
|
19
15
|
bookingSource?: string;
|
|
@@ -33,6 +29,4 @@ export type BookingFlowActionsOptionsType = {
|
|
|
33
29
|
waitlist: ComputedRef<ResolveBookingWaitlistResultType>;
|
|
34
30
|
createBookingMutation: CreateBookingMutationType;
|
|
35
31
|
guestLoginMutation: GuestLoginMutationType;
|
|
36
|
-
outgoingNotificationChannels: ComputedRef<OutgoingNotificationChannelType[]>;
|
|
37
|
-
updateGuestMutation: UpdateGuestMutationType;
|
|
38
32
|
};
|
|
@@ -22,7 +22,6 @@ export declare function resolveRoomAndReferenceLabelKeys(hasPms: boolean): {
|
|
|
22
22
|
roomNumber: string;
|
|
23
23
|
};
|
|
24
24
|
export declare function isValidGuestEmail(value: string): boolean;
|
|
25
|
-
/** False while the contact prompt is open: the details step is not done until it is saved. */
|
|
26
25
|
export declare function canContinueFromDetails(hasPms: boolean, form: BookingFormStateType): boolean;
|
|
27
26
|
export declare function isDetailsStepValid(hasPms: boolean, form: BookingFormStateType): boolean;
|
|
28
27
|
export declare function shouldAuthenticateGuestOnDetailsSubmit(hasPms: boolean, form: BookingFormStateType): boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { CreateBookitoBookingRequestType } from '../../../../features/booking-flow/api/bookito-booking.dto';
|
|
3
|
-
import { BookingContactFieldsType } from '../../../../features/booking-flow/model/booking-contact-fields.types';
|
|
4
3
|
import { BookingFormStateType, BookingStepType } from '../../../../features/booking-flow/model/booking-form.types';
|
|
5
4
|
import { BookingGuestOptionType, GuestLoginRequestType, GuestLoginResponseType } from '../../../../features/guest-auth/api/guest-auth.dto';
|
|
6
5
|
type GuestLoginMutationType = {
|
|
@@ -18,7 +17,6 @@ export declare function authenticateAndContinueBooking(options: {
|
|
|
18
17
|
loginErrorMessage: string;
|
|
19
18
|
nextStep: BookingStepType;
|
|
20
19
|
onGuestsResolved?: (guests: BookingGuestOptionType[]) => void;
|
|
21
|
-
resolveContactFields?: (loginResult: GuestLoginResponseType) => BookingContactFieldsType | null;
|
|
22
20
|
resolveFixedTimeSlot?: () => string;
|
|
23
21
|
step: Ref<BookingStepType>;
|
|
24
22
|
submitError: Ref<string | null>;
|
|
@@ -5,6 +5,7 @@ export declare function updateDateOfBirth(form: BookingFormStateType, value: str
|
|
|
5
5
|
export declare function canContinueFromDate(form: BookingFormStateType): boolean;
|
|
6
6
|
export declare function canContinueFromTimeSection(form: BookingFormStateType, requiresTimeStep: boolean): boolean;
|
|
7
7
|
export declare function canContinueFromTime(form: BookingFormStateType): boolean;
|
|
8
|
+
export declare function canContinueFromDetailsStep(hasPms: boolean, form: BookingFormStateType): boolean;
|
|
8
9
|
export { isBookingStepComplete } from './booking-step-completion.helpers';
|
|
9
10
|
export declare function canGoToBookingStep(targetStep: BookingStepType, currentStep: BookingStepType, form: BookingFormStateType, requiresTimeStep?: boolean, hasPms?: boolean): boolean;
|
|
10
11
|
export declare function toggleIdInList(list: string[], id: string): string[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BookingGuestOptionType } from '../../../../features/guest-auth/api/guest-auth.dto';
|
|
2
|
-
import { BookingContactFieldsType } from './booking-contact-fields.types';
|
|
3
2
|
export { formatDateOfBirthInput, getDateOfBirthSeparator, isDateOfBirthComplete, joinDateOfBirthParts, splitDateOfBirthParts, toIsoDateOfBirth, } from './booking-form-date.helpers';
|
|
4
3
|
export type BookingStepType = 'date' | 'time' | 'details' | 'guests';
|
|
5
4
|
export type BookingFormStateType = {
|
|
@@ -8,7 +7,6 @@ export type BookingFormStateType = {
|
|
|
8
7
|
bookingReference: string;
|
|
9
8
|
comment: string;
|
|
10
9
|
communicationLanguage: string;
|
|
11
|
-
contactFields: BookingContactFieldsType | null;
|
|
12
10
|
dateOfBirth: string;
|
|
13
11
|
extraParticipantCount: number;
|
|
14
12
|
guestEmail: string;
|
|
@@ -4,17 +4,12 @@ export declare const DEFAULT_HOTEL_TIMEZONE = "Europe/Berlin";
|
|
|
4
4
|
export declare const DATE_VIEW_MIN_DAYS = 14;
|
|
5
5
|
/** Doc B1: List view baseline ≈ four weeks. */
|
|
6
6
|
export declare const LIST_VIEW_MIN_DAYS = 28;
|
|
7
|
-
export type OutgoingNotificationChannelType = {
|
|
8
|
-
required: boolean;
|
|
9
|
-
type: 'email' | 'sms';
|
|
10
|
-
};
|
|
11
7
|
export type BookitoSettingsType = {
|
|
12
8
|
currency: string;
|
|
13
9
|
daysBookableInAdvance: number;
|
|
14
10
|
daysViewableInAdvance: number | null;
|
|
15
11
|
timezone: string;
|
|
16
12
|
hasPms: boolean;
|
|
17
|
-
outgoingNotificationChannels: OutgoingNotificationChannelType[];
|
|
18
13
|
};
|
|
19
14
|
export declare function createDefaultBookitoSettings(): BookitoSettingsType;
|
|
20
15
|
/**
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GuestLoginRequestType, GuestLoginResponseType, GuestUpdateRequestType } from './guest-auth.dto';
|
|
1
|
+
import { GuestLoginRequestType, GuestLoginResponseType } from './guest-auth.dto';
|
|
3
2
|
export declare function loginGuest(payload: GuestLoginRequestType): Promise<GuestLoginResponseType>;
|
|
4
|
-
export declare function updateGuest(payload: GuestUpdateRequestType): Promise<FederationSuccessResponseType>;
|
|
@@ -6,9 +6,7 @@ export type GuestLoginRequestType = {
|
|
|
6
6
|
roomNumber?: string;
|
|
7
7
|
};
|
|
8
8
|
export type GuestLoginGuestDtoType = {
|
|
9
|
-
email?: string | null;
|
|
10
9
|
id?: string | null;
|
|
11
|
-
phoneNumber?: string | null;
|
|
12
10
|
firstName?: string | null;
|
|
13
11
|
lastName?: string | null;
|
|
14
12
|
name?: string | null;
|
|
@@ -30,10 +28,6 @@ export type GuestLoginResponseType = FederationSuccessResponseType & {
|
|
|
30
28
|
} | null;
|
|
31
29
|
guest?: GuestLoginGuestDtoType | null;
|
|
32
30
|
};
|
|
33
|
-
export type GuestUpdateRequestType = {
|
|
34
|
-
email?: string;
|
|
35
|
-
phoneNumber?: string;
|
|
36
|
-
};
|
|
37
31
|
export type BookingGuestOptionType = {
|
|
38
32
|
displayName: string;
|
|
39
33
|
id: string;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { GuestLoginRequestType
|
|
1
|
+
import { GuestLoginRequestType } from './guest-auth.dto';
|
|
2
2
|
export declare function useGuestLoginMutation(): import('@tanstack/vue-query').UseMutationReturnType<import('./guest-auth.dto').GuestLoginResponseType, Error, GuestLoginRequestType, unknown, Omit<import('@tanstack/query-core').MutationObserverIdleResult<import('./guest-auth.dto').GuestLoginResponseType, Error, GuestLoginRequestType, unknown>, "reset" | "mutate"> | Omit<import('@tanstack/query-core').MutationObserverLoadingResult<import('./guest-auth.dto').GuestLoginResponseType, Error, GuestLoginRequestType, unknown>, "reset" | "mutate"> | Omit<import('@tanstack/query-core').MutationObserverErrorResult<import('./guest-auth.dto').GuestLoginResponseType, Error, GuestLoginRequestType, unknown>, "reset" | "mutate"> | Omit<import('@tanstack/query-core').MutationObserverSuccessResult<import('./guest-auth.dto').GuestLoginResponseType, Error, GuestLoginRequestType, unknown>, "reset" | "mutate">>;
|
|
3
|
-
export declare function useUpdateGuestMutation(): import('@tanstack/vue-query').UseMutationReturnType<import('../../../shared/api/federation-client').FederationSuccessResponseType, Error, GuestUpdateRequestType, unknown, Omit<import('@tanstack/query-core').MutationObserverIdleResult<import('../../../shared/api/federation-client').FederationSuccessResponseType, Error, GuestUpdateRequestType, unknown>, "reset" | "mutate"> | Omit<import('@tanstack/query-core').MutationObserverLoadingResult<import('../../../shared/api/federation-client').FederationSuccessResponseType, Error, GuestUpdateRequestType, unknown>, "reset" | "mutate"> | Omit<import('@tanstack/query-core').MutationObserverErrorResult<import('../../../shared/api/federation-client').FederationSuccessResponseType, Error, GuestUpdateRequestType, unknown>, "reset" | "mutate"> | Omit<import('@tanstack/query-core').MutationObserverSuccessResult<import('../../../shared/api/federation-client').FederationSuccessResponseType, Error, GuestUpdateRequestType, unknown>, "reset" | "mutate">>;
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
dialCode: string;
|
|
3
|
-
email: string;
|
|
4
|
-
emailRequired?: boolean;
|
|
5
|
-
phoneNumber: string;
|
|
6
|
-
phoneRequired?: boolean;
|
|
7
|
-
showEmail?: boolean;
|
|
8
|
-
showPhone?: boolean;
|
|
9
|
-
};
|
|
10
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
-
"update:dialCode": (value: string) => any;
|
|
12
|
-
"update:phoneNumber": (value: string) => any;
|
|
13
|
-
"update:email": (value: string) => any;
|
|
14
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
-
"onUpdate:dialCode"?: ((value: string) => any) | undefined;
|
|
16
|
-
"onUpdate:phoneNumber"?: ((value: string) => any) | undefined;
|
|
17
|
-
"onUpdate:email"?: ((value: string) => any) | undefined;
|
|
18
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { BookingStepType } from '../../../../features/booking-flow/model/booking-form.types';
|
|
3
|
-
export declare function useBookingDisplaySteps(step: Ref<BookingStepType>): {
|
|
4
|
-
activeDisplayStep: import('vue').ComputedRef<import('../model/booking-display-step.types').BookingDisplayStepType>;
|
|
5
|
-
displaySteps: import('vue').ComputedRef<import('../model/booking-display-step.types').BookingDisplayStepEntryType[]>;
|
|
6
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BookingContactFieldsType } from '../../../../features/booking-flow/model/booking-contact-fields.types';
|
|
2
|
-
import { BookingFormStateType } from '../../../../features/booking-flow/model/booking-form.types';
|
|
3
|
-
import { OutgoingNotificationChannelType } from '../../../../features/bookito-settings/model/bookito-settings.types';
|
|
4
|
-
import { GuestLoginGuestDtoType, GuestUpdateRequestType } from '../../../../features/guest-auth/api/guest-auth.dto';
|
|
5
|
-
export declare function resolveBookingContactFields(channels: OutgoingNotificationChannelType[]): BookingContactFieldsType;
|
|
6
|
-
export declare function needsMoreContactInformation(fields: BookingContactFieldsType, guest: GuestLoginGuestDtoType | null | undefined): boolean;
|
|
7
|
-
export declare function canSubmitContactInformation(fields: BookingContactFieldsType, form: BookingFormStateType): boolean;
|
|
8
|
-
export declare function buildGuestContactUpdatePayload(fields: BookingContactFieldsType, form: BookingFormStateType): GuestUpdateRequestType;
|
|
9
|
-
export declare function canSubmitBookingDetails(hasPms: boolean, form: BookingFormStateType): boolean;
|