@zaptime/core
Advanced tools
+2
-1
@@ -253,2 +253,3 @@ import { Result } from 'ts-results-es'; | ||
| declare const fetchRemoteConfiguration: (token: string, apiBaseUrl?: string, reservationUuid?: string) => Promise<Result<Success, Errors>>; | ||
| declare const stopReservationRefresh: () => void; | ||
@@ -372,2 +373,2 @@ interface Status { | ||
| export { type CustomField, type CustomFieldCollected, type Day, type ReservationResponse, type TimeSlot, type ZaptimeConfig, book, cancel, confirm, fetchRemoteConfiguration, mergeRecursive as mergeObjects, reschedule, reserve, useBillingAddress, useBookingForm, _default as useCalendar, useConfig, useCurrentTimezone, useDateFormatters, useHourCycle, useLocations, useReservationReschedule, useSelectedTimeSlot, useStripeConfig }; | ||
| export { type CustomField, type CustomFieldCollected, type Day, type ReservationResponse, type TimeSlot, type ZaptimeConfig, book, cancel, confirm, fetchRemoteConfiguration, mergeRecursive as mergeObjects, reschedule, reserve, stopReservationRefresh, useBillingAddress, useBookingForm, _default as useCalendar, useConfig, useCurrentTimezone, useDateFormatters, useHourCycle, useLocations, useReservationReschedule, useSelectedTimeSlot, useStripeConfig }; |
+11
-9
@@ -548,3 +548,3 @@ // src/composables/useReservationStatus.ts | ||
| if (reservationStatus.value !== void 0) { | ||
| return await confirm({ | ||
| const res = await confirm({ | ||
| token: config2.value.token, | ||
@@ -558,4 +558,5 @@ status: reservationStatus.value, | ||
| }); | ||
| stopReservationRefresh(); | ||
| return res; | ||
| } | ||
| stopReservationInterval(); | ||
| throw new Error( | ||
@@ -569,3 +570,3 @@ "Confirming a time slot failed because time slot was not reserved!" | ||
| if (reservationStatus.value !== void 0) { | ||
| return await cancel( | ||
| const res = await cancel( | ||
| config2.value.token, | ||
@@ -575,2 +576,4 @@ reservationStatus.value, | ||
| ); | ||
| stopReservationRefresh(); | ||
| return res; | ||
| } | ||
@@ -658,11 +661,9 @@ return false; | ||
| reservationIntervalId = setInterval(() => { | ||
| try { | ||
| res = refreshReservation(options); | ||
| } catch (err) { | ||
| throw new Error("Repeated reservation failed"); | ||
| } | ||
| refreshReservation(options).catch(() => { | ||
| stopReservationRefresh(); | ||
| }); | ||
| }, 15 * 60 * 1e3); | ||
| return res; | ||
| }; | ||
| var stopReservationInterval = () => { | ||
| var stopReservationRefresh = () => { | ||
| if (reservationIntervalId) { | ||
@@ -1334,2 +1335,3 @@ clearInterval(reservationIntervalId); | ||
| reserve2 as reserve, | ||
| stopReservationRefresh, | ||
| useBillingAddress, | ||
@@ -1336,0 +1338,0 @@ useBookingForm, |
+5
-1
| { | ||
| "name": "@zaptime/core", | ||
| "description": "Core library for Zaptime", | ||
| "version": "2.9.0", | ||
| "version": "2.9.1", | ||
| "type": "module", | ||
@@ -26,2 +26,6 @@ "main": "dist/entry.js", | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/zaptime/zaptime-monorepo" | ||
| }, | ||
| "devDependencies": { | ||
@@ -28,0 +32,0 @@ "@babel/types": "^7.26.10", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
48195
0.47%1670
0.18%1
-50%