@voyantjs/bookings 0.6.9 → 0.8.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.
@@ -54,17 +54,36 @@ export const createBookingSchema = bookingCoreSchema
54
54
  export const bookingListQuerySchema = z.object({
55
55
  status: bookingStatusSchema.optional(),
56
56
  search: z.string().optional(),
57
+ productId: z.string().optional(),
58
+ optionId: z.string().optional(),
59
+ personId: z.string().optional(),
60
+ organizationId: z.string().optional(),
57
61
  limit: z.coerce.number().int().min(1).max(100).default(50),
58
62
  offset: z.coerce.number().int().min(0).default(0),
59
63
  });
64
+ export const bookingAggregatesQuerySchema = z.object({
65
+ from: z.string().datetime().optional(),
66
+ to: z.string().datetime().optional(),
67
+ });
60
68
  export const convertProductSchema = z.object({
61
69
  productId: z.string().min(1),
62
70
  optionId: z.string().optional().nullable(),
71
+ slotId: z.string().optional().nullable(),
63
72
  bookingNumber: z.string().min(1).max(50),
64
73
  personId: z.string().optional().nullable(),
65
74
  organizationId: z.string().optional().nullable(),
66
75
  internalNotes: z.string().optional().nullable(),
67
76
  });
77
+ /**
78
+ * Admin pricing-preview request. Mirrors the storefront pricing session
79
+ * resolver input so the operator dialog sees the same numbers the customer
80
+ * would see for the same product + option + catalog.
81
+ */
82
+ export const pricingPreviewSchema = z.object({
83
+ productId: z.string().min(1),
84
+ optionId: z.string().optional().nullable(),
85
+ catalogId: z.string().optional().nullable(),
86
+ });
68
87
  export const updateBookingStatusSchema = z.object({
69
88
  status: bookingStatusSchema,
70
89
  note: z.string().optional().nullable(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/bookings",
3
- "version": "0.6.9",
3
+ "version": "0.8.0",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -49,14 +49,14 @@
49
49
  "drizzle-orm": "^0.45.2",
50
50
  "hono": "^4.12.10",
51
51
  "zod": "^4.3.6",
52
- "@voyantjs/core": "0.6.9",
53
- "@voyantjs/db": "0.6.9",
54
- "@voyantjs/hono": "0.6.9",
55
- "@voyantjs/utils": "0.6.9"
52
+ "@voyantjs/core": "0.8.0",
53
+ "@voyantjs/db": "0.8.0",
54
+ "@voyantjs/hono": "0.8.0",
55
+ "@voyantjs/utils": "0.8.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "typescript": "^6.0.2",
59
- "@voyantjs/products": "0.6.9",
59
+ "@voyantjs/products": "0.8.0",
60
60
  "@voyantjs/voyant-typescript-config": "0.1.0"
61
61
  },
62
62
  "files": [