@bowlos/reservations 0.30.0 → 0.31.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/HEADLESS.md +59 -4
- package/README.md +11 -0
- package/dist/{catalog-C-YyKVk5.d.ts → catalog-Ck_HLOff.d.ts} +45 -1
- package/dist/{catalog-BdOZC2nx.d.cts → catalog-LU1sl0gc.d.cts} +45 -1
- package/dist/{chunk-WWKULPFX.js → chunk-EQH5HDYQ.js} +2 -2
- package/dist/{chunk-WWKULPFX.js.map → chunk-EQH5HDYQ.js.map} +1 -1
- package/dist/{chunk-44AWSRIG.js → chunk-S5GEG7SW.js} +6 -3
- package/dist/chunk-S5GEG7SW.js.map +1 -0
- package/dist/components.cjs +127 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +23 -4
- package/dist/components.d.ts +23 -4
- package/dist/components.js +126 -3
- package/dist/components.js.map +1 -1
- package/dist/index.cjs +30 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -2
- package/dist/index.d.ts +46 -2
- package/dist/index.js +29 -3
- package/dist/index.js.map +1 -1
- package/dist/{react-CYgFZdHO.d.cts → react-CX-zIAb5.d.cts} +1 -1
- package/dist/{react-BQaKMnCR.d.ts → react-RNgTkCVk.d.ts} +1 -1
- package/dist/react.cjs +4 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +9 -4
- package/dist/react.d.ts +9 -4
- package/dist/react.js +2 -2
- package/package.json +1 -1
- package/templates/center-site/package.json +1 -1
- package/dist/chunk-44AWSRIG.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -804,6 +804,32 @@ function listPublicMemberships(client, args) {
|
|
|
804
804
|
function listGameCards(client, args) {
|
|
805
805
|
return client.call("listPublicGameCards", args);
|
|
806
806
|
}
|
|
807
|
+
function listRetailPricing(client, args) {
|
|
808
|
+
return client.call("listRetailPricing", args);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
// src/packages.ts
|
|
812
|
+
function usesPerWeekdayStartTimes(pkg) {
|
|
813
|
+
return !!pkg.startTimesByWeekday && pkg.startTimesByWeekday.length > 0;
|
|
814
|
+
}
|
|
815
|
+
function weekdayForDateISO(dateISO) {
|
|
816
|
+
const [y, m, d] = dateISO.split("-").map(Number);
|
|
817
|
+
return new Date(Date.UTC(y, m - 1, d)).getUTCDay();
|
|
818
|
+
}
|
|
819
|
+
function resolvePackageStartTimesForWeekday(pkg, dayOfWeek) {
|
|
820
|
+
if (pkg.startTimesByWeekday && pkg.startTimesByWeekday.length > 0) {
|
|
821
|
+
const entry = pkg.startTimesByWeekday.find((e) => e.dayOfWeek === dayOfWeek);
|
|
822
|
+
if (!entry || entry.startTimes.length === 0) return [];
|
|
823
|
+
return [...entry.startTimes].sort((a, b) => a - b);
|
|
824
|
+
}
|
|
825
|
+
if (pkg.applicabilityDays && pkg.applicabilityDays.length > 0 && !pkg.applicabilityDays.includes(dayOfWeek)) {
|
|
826
|
+
return [];
|
|
827
|
+
}
|
|
828
|
+
if (pkg.allowedStartTimes && pkg.allowedStartTimes.length > 0) {
|
|
829
|
+
return [...pkg.allowedStartTimes].sort((a, b) => a - b);
|
|
830
|
+
}
|
|
831
|
+
return null;
|
|
832
|
+
}
|
|
807
833
|
|
|
808
834
|
exports.BOWLOS_ERROR_CODES = BOWLOS_ERROR_CODES;
|
|
809
835
|
exports.BowlosApiError = BowlosApiError;
|
|
@@ -857,6 +883,7 @@ exports.listGameCards = listGameCards;
|
|
|
857
883
|
exports.listPackages = listPackages;
|
|
858
884
|
exports.listProducts = listProducts;
|
|
859
885
|
exports.listPublicMemberships = listPublicMemberships;
|
|
886
|
+
exports.listRetailPricing = listRetailPricing;
|
|
860
887
|
exports.listStartTimes = listStartTimes;
|
|
861
888
|
exports.localStorageTokenStore = localStorageTokenStore;
|
|
862
889
|
exports.previewEventOrderCancellation = previewEventOrderCancellation;
|
|
@@ -868,6 +895,9 @@ exports.previewMembershipSubscription = previewMembershipSubscription;
|
|
|
868
895
|
exports.previewPackage = previewPackage;
|
|
869
896
|
exports.previewPackageOrderCancellation = previewPackageOrderCancellation;
|
|
870
897
|
exports.previewReservationCancellation = previewReservationCancellation;
|
|
898
|
+
exports.resolvePackageStartTimesForWeekday = resolvePackageStartTimesForWeekday;
|
|
871
899
|
exports.runDoctor = runDoctor;
|
|
900
|
+
exports.usesPerWeekdayStartTimes = usesPerWeekdayStartTimes;
|
|
901
|
+
exports.weekdayForDateISO = weekdayForDateISO;
|
|
872
902
|
//# sourceMappingURL=index.cjs.map
|
|
873
903
|
//# sourceMappingURL=index.cjs.map
|