order3000 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.
package/dist/client.d.cts CHANGED
@@ -727,7 +727,7 @@ interface components {
727
727
  id?: string;
728
728
  startTime?: string;
729
729
  endTime?: string | null;
730
- dayOfWeek: components["schemas"]["DayOfWeek"];
730
+ dayOfWeek?: components["schemas"]["DayOfWeek"];
731
731
  isSchedulable?: boolean | null;
732
732
  }[];
733
733
  scheduleOverrides: {
@@ -737,10 +737,11 @@ interface components {
737
737
  [key: string]: string;
738
738
  } | null;
739
739
  timeSlots: {
740
- id: string;
741
- startTime: string;
742
- endTime: string | null;
743
- isSchedulable: boolean | null;
740
+ id?: string;
741
+ startTime?: string;
742
+ endTime?: string | null;
743
+ dayOfWeek?: components["schemas"]["DayOfWeek"];
744
+ isSchedulable?: boolean | null;
744
745
  }[];
745
746
  }[];
746
747
  promotions: {
@@ -2013,8 +2014,12 @@ type MakeReservationResponse = schemas['MakeReservationResponse'];
2013
2014
  */
2014
2015
  type DayOfWeek = NonNullable<NonNullable<schemas['FetchEventsResponse'][number]['schedule']>['scheduleTimeSlots'][number]['dayOfWeek']>;
2015
2016
  /**
2016
- * A single regular (by-day-of-week) time slot for an event. Generated-bound
2017
- * to the events list response's `timeSlots[]` element.
2017
+ * A single event time slot — the one slot shape, used by both the weekly
2018
+ * recurring `timeSlots[]` and the per-date `scheduleOverrides[].timeSlots[]`.
2019
+ * `dayOfWeek` is present only on weekly slots (optional); every field is
2020
+ * optional because the underlying join row may be absent, so consumers
2021
+ * resolving "the slots bookable on date X" must guard. Generated-bound to
2022
+ * the events list response's `timeSlots[]` element.
2018
2023
  */
2019
2024
  type TimeSlot = schemas['FetchEventsResponse'][number]['timeSlots'][number];
2020
2025
  /**
package/dist/client.d.mts CHANGED
@@ -727,7 +727,7 @@ interface components {
727
727
  id?: string;
728
728
  startTime?: string;
729
729
  endTime?: string | null;
730
- dayOfWeek: components["schemas"]["DayOfWeek"];
730
+ dayOfWeek?: components["schemas"]["DayOfWeek"];
731
731
  isSchedulable?: boolean | null;
732
732
  }[];
733
733
  scheduleOverrides: {
@@ -737,10 +737,11 @@ interface components {
737
737
  [key: string]: string;
738
738
  } | null;
739
739
  timeSlots: {
740
- id: string;
741
- startTime: string;
742
- endTime: string | null;
743
- isSchedulable: boolean | null;
740
+ id?: string;
741
+ startTime?: string;
742
+ endTime?: string | null;
743
+ dayOfWeek?: components["schemas"]["DayOfWeek"];
744
+ isSchedulable?: boolean | null;
744
745
  }[];
745
746
  }[];
746
747
  promotions: {
@@ -2013,8 +2014,12 @@ type MakeReservationResponse = schemas['MakeReservationResponse'];
2013
2014
  */
2014
2015
  type DayOfWeek = NonNullable<NonNullable<schemas['FetchEventsResponse'][number]['schedule']>['scheduleTimeSlots'][number]['dayOfWeek']>;
2015
2016
  /**
2016
- * A single regular (by-day-of-week) time slot for an event. Generated-bound
2017
- * to the events list response's `timeSlots[]` element.
2017
+ * A single event time slot — the one slot shape, used by both the weekly
2018
+ * recurring `timeSlots[]` and the per-date `scheduleOverrides[].timeSlots[]`.
2019
+ * `dayOfWeek` is present only on weekly slots (optional); every field is
2020
+ * optional because the underlying join row may be absent, so consumers
2021
+ * resolving "the slots bookable on date X" must guard. Generated-bound to
2022
+ * the events list response's `timeSlots[]` element.
2018
2023
  */
2019
2024
  type TimeSlot = schemas['FetchEventsResponse'][number]['timeSlots'][number];
2020
2025
  /**
package/dist/client.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { p as paymentMethodSchema, f as fulfillmentTypeSchema, t as teamOrderStatusSchema, a as participantStatusSchema } from './deliveryAddressSchema-8YX7yh5X.mjs';
2
- export { d as O3KDeliveryAddressSchema } from './deliveryAddressSchema-8YX7yh5X.mjs';
1
+ import { a as paymentMethodSchema, f as fulfillmentTypeSchema, t as teamOrderStatusSchema, p as participantStatusSchema } from './deliveryAddressSchema-DZlkW-QX.mjs';
2
+ export { d as O3KDeliveryAddressSchema } from './deliveryAddressSchema-DZlkW-QX.mjs';
3
3
  import { createClient } from '@supabase/supabase-js';
4
4
  import 'zod/v4';
5
5
 
@@ -31,4 +31,4 @@ const deliveryAddressSchema = z.object({
31
31
  country: z.string()
32
32
  });
33
33
 
34
- export { participantStatusSchema as a, deliveryAddressSchema as d, fulfillmentTypeSchema as f, paymentMethodSchema as p, teamOrderStatusSchema as t };
34
+ export { paymentMethodSchema as a, deliveryAddressSchema as d, fulfillmentTypeSchema as f, participantStatusSchema as p, teamOrderStatusSchema as t };
package/dist/schemas.cjs CHANGED
@@ -565,7 +565,7 @@ const createDeltaPaymentIntentResponseSchema = v4.z.object({
565
565
  clientSecret: v4.z.nullable(v4.z.string()),
566
566
  paymentIntentId: v4.z.string(),
567
567
  orderId: v4.z.string(),
568
- amount: v4.z.int().max(9007199254740991),
568
+ amount: v4.z.int().max(9007199254740991).gt(0),
569
569
  status: v4.z.enum([
570
570
  "requires_payment_method",
571
571
  "requires_confirmation",
@@ -1311,7 +1311,7 @@ const fetchEventsResponseSchema = v4.z.array(
1311
1311
  startTime: v4.z.optional(v4.z.string()),
1312
1312
  endTime: v4.z.string().nullish(),
1313
1313
  get dayOfWeek() {
1314
- return dayOfWeekSchema;
1314
+ return dayOfWeekSchema.optional();
1315
1315
  },
1316
1316
  isSchedulable: v4.z.boolean().nullish()
1317
1317
  })
@@ -1323,10 +1323,13 @@ const fetchEventsResponseSchema = v4.z.array(
1323
1323
  reason: v4.z.nullable(v4.z.object({}).catchall(v4.z.string())),
1324
1324
  timeSlots: v4.z.array(
1325
1325
  v4.z.object({
1326
- id: v4.z.string(),
1327
- startTime: v4.z.string(),
1328
- endTime: v4.z.nullable(v4.z.string()),
1329
- isSchedulable: v4.z.nullable(v4.z.boolean())
1326
+ id: v4.z.optional(v4.z.string()),
1327
+ startTime: v4.z.optional(v4.z.string()),
1328
+ endTime: v4.z.string().nullish(),
1329
+ get dayOfWeek() {
1330
+ return dayOfWeekSchema.optional();
1331
+ },
1332
+ isSchedulable: v4.z.boolean().nullish()
1330
1333
  })
1331
1334
  )
1332
1335
  })
@@ -1753,7 +1756,7 @@ const fetchTeamOrderResponseSchema = v4.z.object({
1753
1756
  customerId: v4.z.string(),
1754
1757
  basketId: v4.z.nullable(v4.z.string()),
1755
1758
  orderId: v4.z.nullable(v4.z.string()),
1756
- participantNumber: v4.z.nullable(v4.z.int().max(9007199254740991)),
1759
+ participantNumber: v4.z.nullable(v4.z.int().max(9007199254740991).gt(0)),
1757
1760
  displayName: v4.z.nullable(v4.z.string()),
1758
1761
  get status() {
1759
1762
  return deliveryAddressSchema.participantStatusSchema;
@@ -1907,7 +1910,7 @@ const getSubscriptionResponseSchema = v4.z.object({
1907
1910
  shortName: v4.z.nullable(v4.z.object({}).catchall(v4.z.string())),
1908
1911
  description: v4.z.nullable(v4.z.object({}).catchall(v4.z.string())),
1909
1912
  scheduleId: v4.z.nullable(v4.z.string()),
1910
- allowance: v4.z.int().max(9007199254740991),
1913
+ allowance: v4.z.int().max(9007199254740991).gt(0),
1911
1914
  get billingPeriod() {
1912
1915
  return subscriptionPeriodSchema;
1913
1916
  },
@@ -1915,7 +1918,7 @@ const getSubscriptionResponseSchema = v4.z.object({
1915
1918
  return subscriptionPeriodSchema;
1916
1919
  },
1917
1920
  redeemableTagSets: v4.z.array(v4.z.array(v4.z.string())),
1918
- expiryInDays: v4.z.nullable(v4.z.int().max(9007199254740991)),
1921
+ expiryInDays: v4.z.nullable(v4.z.int().max(9007199254740991).gt(0)),
1919
1922
  price: v4.z.int().min(0).max(9007199254740991),
1920
1923
  get currency() {
1921
1924
  return currencySchema;
@@ -2493,7 +2496,7 @@ const submitAreaBookingPayloadSchema = v4.z.object({
2493
2496
  requestedDate: v4.z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
2494
2497
  requestedStartTime: v4.z.optional(v4.z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
2495
2498
  requestedEndTime: v4.z.optional(v4.z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
2496
- partySize: v4.z.int().max(9007199254740991),
2499
+ partySize: v4.z.int().max(9007199254740991).gt(0),
2497
2500
  customerFirstName: v4.z.string().min(1),
2498
2501
  customerLastName: v4.z.string().min(1),
2499
2502
  customerEmail: v4.z.email(),
@@ -1310,7 +1310,7 @@ declare const schemas: {
1310
1310
  id: zod.ZodOptional<zod.ZodString>;
1311
1311
  startTime: zod.ZodOptional<zod.ZodString>;
1312
1312
  endTime: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1313
- dayOfWeek: zod.ZodEnum<{
1313
+ dayOfWeek: zod.ZodOptional<zod.ZodEnum<{
1314
1314
  monday: "monday";
1315
1315
  tuesday: "tuesday";
1316
1316
  wednesday: "wednesday";
@@ -1318,7 +1318,7 @@ declare const schemas: {
1318
1318
  friday: "friday";
1319
1319
  saturday: "saturday";
1320
1320
  sunday: "sunday";
1321
- }>;
1321
+ }>>;
1322
1322
  isSchedulable: zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>;
1323
1323
  }, zod_v4_core.$strip>>;
1324
1324
  scheduleOverrides: zod.ZodArray<zod.ZodObject<{
@@ -1326,10 +1326,19 @@ declare const schemas: {
1326
1326
  date: zod.ZodString;
1327
1327
  reason: zod.ZodNullable<zod.ZodObject<{}, zod_v4_core.$catchall<zod.ZodString>>>;
1328
1328
  timeSlots: zod.ZodArray<zod.ZodObject<{
1329
- id: zod.ZodString;
1330
- startTime: zod.ZodString;
1331
- endTime: zod.ZodNullable<zod.ZodString>;
1332
- isSchedulable: zod.ZodNullable<zod.ZodBoolean>;
1329
+ id: zod.ZodOptional<zod.ZodString>;
1330
+ startTime: zod.ZodOptional<zod.ZodString>;
1331
+ endTime: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1332
+ dayOfWeek: zod.ZodOptional<zod.ZodEnum<{
1333
+ monday: "monday";
1334
+ tuesday: "tuesday";
1335
+ wednesday: "wednesday";
1336
+ thursday: "thursday";
1337
+ friday: "friday";
1338
+ saturday: "saturday";
1339
+ sunday: "sunday";
1340
+ }>>;
1341
+ isSchedulable: zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>;
1333
1342
  }, zod_v4_core.$strip>>;
1334
1343
  }, zod_v4_core.$strip>>;
1335
1344
  promotions: zod.ZodArray<zod.ZodObject<{
@@ -1310,7 +1310,7 @@ declare const schemas: {
1310
1310
  id: zod.ZodOptional<zod.ZodString>;
1311
1311
  startTime: zod.ZodOptional<zod.ZodString>;
1312
1312
  endTime: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1313
- dayOfWeek: zod.ZodEnum<{
1313
+ dayOfWeek: zod.ZodOptional<zod.ZodEnum<{
1314
1314
  monday: "monday";
1315
1315
  tuesday: "tuesday";
1316
1316
  wednesday: "wednesday";
@@ -1318,7 +1318,7 @@ declare const schemas: {
1318
1318
  friday: "friday";
1319
1319
  saturday: "saturday";
1320
1320
  sunday: "sunday";
1321
- }>;
1321
+ }>>;
1322
1322
  isSchedulable: zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>;
1323
1323
  }, zod_v4_core.$strip>>;
1324
1324
  scheduleOverrides: zod.ZodArray<zod.ZodObject<{
@@ -1326,10 +1326,19 @@ declare const schemas: {
1326
1326
  date: zod.ZodString;
1327
1327
  reason: zod.ZodNullable<zod.ZodObject<{}, zod_v4_core.$catchall<zod.ZodString>>>;
1328
1328
  timeSlots: zod.ZodArray<zod.ZodObject<{
1329
- id: zod.ZodString;
1330
- startTime: zod.ZodString;
1331
- endTime: zod.ZodNullable<zod.ZodString>;
1332
- isSchedulable: zod.ZodNullable<zod.ZodBoolean>;
1329
+ id: zod.ZodOptional<zod.ZodString>;
1330
+ startTime: zod.ZodOptional<zod.ZodString>;
1331
+ endTime: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1332
+ dayOfWeek: zod.ZodOptional<zod.ZodEnum<{
1333
+ monday: "monday";
1334
+ tuesday: "tuesday";
1335
+ wednesday: "wednesday";
1336
+ thursday: "thursday";
1337
+ friday: "friday";
1338
+ saturday: "saturday";
1339
+ sunday: "sunday";
1340
+ }>>;
1341
+ isSchedulable: zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>;
1333
1342
  }, zod_v4_core.$strip>>;
1334
1343
  }, zod_v4_core.$strip>>;
1335
1344
  promotions: zod.ZodArray<zod.ZodObject<{
package/dist/schemas.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod/v4';
2
- import { t as teamOrderStatusSchema, f as fulfillmentTypeSchema, p as paymentMethodSchema, d as deliveryAddressSchema, a as participantStatusSchema } from './deliveryAddressSchema-8YX7yh5X.mjs';
2
+ import { t as teamOrderStatusSchema, f as fulfillmentTypeSchema, a as paymentMethodSchema, d as deliveryAddressSchema, p as participantStatusSchema } from './deliveryAddressSchema-DZlkW-QX.mjs';
3
3
 
4
4
  const abandonBasketRequestSchema = z.object({
5
5
  sessionId: z.string().min(1)
@@ -563,7 +563,7 @@ const createDeltaPaymentIntentResponseSchema = z.object({
563
563
  clientSecret: z.nullable(z.string()),
564
564
  paymentIntentId: z.string(),
565
565
  orderId: z.string(),
566
- amount: z.int().max(9007199254740991),
566
+ amount: z.int().max(9007199254740991).gt(0),
567
567
  status: z.enum([
568
568
  "requires_payment_method",
569
569
  "requires_confirmation",
@@ -1309,7 +1309,7 @@ const fetchEventsResponseSchema = z.array(
1309
1309
  startTime: z.optional(z.string()),
1310
1310
  endTime: z.string().nullish(),
1311
1311
  get dayOfWeek() {
1312
- return dayOfWeekSchema;
1312
+ return dayOfWeekSchema.optional();
1313
1313
  },
1314
1314
  isSchedulable: z.boolean().nullish()
1315
1315
  })
@@ -1321,10 +1321,13 @@ const fetchEventsResponseSchema = z.array(
1321
1321
  reason: z.nullable(z.object({}).catchall(z.string())),
1322
1322
  timeSlots: z.array(
1323
1323
  z.object({
1324
- id: z.string(),
1325
- startTime: z.string(),
1326
- endTime: z.nullable(z.string()),
1327
- isSchedulable: z.nullable(z.boolean())
1324
+ id: z.optional(z.string()),
1325
+ startTime: z.optional(z.string()),
1326
+ endTime: z.string().nullish(),
1327
+ get dayOfWeek() {
1328
+ return dayOfWeekSchema.optional();
1329
+ },
1330
+ isSchedulable: z.boolean().nullish()
1328
1331
  })
1329
1332
  )
1330
1333
  })
@@ -1751,7 +1754,7 @@ const fetchTeamOrderResponseSchema = z.object({
1751
1754
  customerId: z.string(),
1752
1755
  basketId: z.nullable(z.string()),
1753
1756
  orderId: z.nullable(z.string()),
1754
- participantNumber: z.nullable(z.int().max(9007199254740991)),
1757
+ participantNumber: z.nullable(z.int().max(9007199254740991).gt(0)),
1755
1758
  displayName: z.nullable(z.string()),
1756
1759
  get status() {
1757
1760
  return participantStatusSchema;
@@ -1905,7 +1908,7 @@ const getSubscriptionResponseSchema = z.object({
1905
1908
  shortName: z.nullable(z.object({}).catchall(z.string())),
1906
1909
  description: z.nullable(z.object({}).catchall(z.string())),
1907
1910
  scheduleId: z.nullable(z.string()),
1908
- allowance: z.int().max(9007199254740991),
1911
+ allowance: z.int().max(9007199254740991).gt(0),
1909
1912
  get billingPeriod() {
1910
1913
  return subscriptionPeriodSchema;
1911
1914
  },
@@ -1913,7 +1916,7 @@ const getSubscriptionResponseSchema = z.object({
1913
1916
  return subscriptionPeriodSchema;
1914
1917
  },
1915
1918
  redeemableTagSets: z.array(z.array(z.string())),
1916
- expiryInDays: z.nullable(z.int().max(9007199254740991)),
1919
+ expiryInDays: z.nullable(z.int().max(9007199254740991).gt(0)),
1917
1920
  price: z.int().min(0).max(9007199254740991),
1918
1921
  get currency() {
1919
1922
  return currencySchema;
@@ -2491,7 +2494,7 @@ const submitAreaBookingPayloadSchema = z.object({
2491
2494
  requestedDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
2492
2495
  requestedStartTime: z.optional(z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
2493
2496
  requestedEndTime: z.optional(z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
2494
- partySize: z.int().max(9007199254740991),
2497
+ partySize: z.int().max(9007199254740991).gt(0),
2495
2498
  customerFirstName: z.string().min(1),
2496
2499
  customerLastName: z.string().min(1),
2497
2500
  customerEmail: z.email(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "order3000",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "order3000 node.js sdk",
5
5
  "main": "./dist/client.cjs",
6
6
  "module": "./dist/client.mjs",
@@ -49,9 +49,9 @@
49
49
  "prettier": "^3.7.4",
50
50
  "tsx": "^4.19.2",
51
51
  "typescript": "^5.9.3",
52
- "@kolaveri/eslint-config": "1.8.3",
53
- "@kolaveri/prettier-config": "1.0.6",
54
- "@kolaveri/tsconfig": "1.0.1"
52
+ "@kolaveri/eslint-config": "1.8.9",
53
+ "@kolaveri/tsconfig": "1.0.1",
54
+ "@kolaveri/prettier-config": "1.0.6"
55
55
  },
56
56
  "files": [
57
57
  "dist"