@voyantjs/bookings-react 0.16.0 → 0.17.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.
@@ -1,21 +1,7 @@
1
- export interface CreateBookingItemInput {
2
- title: string;
3
- itemType?: string;
4
- status?: string;
5
- quantity?: number;
6
- sellCurrency: string;
7
- unitSellAmountCents?: number | null;
8
- totalSellAmountCents?: number | null;
9
- costCurrency?: string | null;
10
- unitCostAmountCents?: number | null;
11
- totalCostAmountCents?: number | null;
12
- serviceDate?: string | null;
13
- startsAt?: string | null;
14
- endsAt?: string | null;
15
- description?: string | null;
16
- notes?: string | null;
17
- }
18
- export type UpdateBookingItemInput = Partial<CreateBookingItemInput>;
1
+ import type { insertBookingItemSchema, updateBookingItemSchema } from "@voyantjs/bookings/validation";
2
+ import type { z } from "zod";
3
+ export type CreateBookingItemInput = z.input<typeof insertBookingItemSchema>;
4
+ export type UpdateBookingItemInput = z.input<typeof updateBookingItemSchema>;
19
5
  export declare function useBookingItemMutation(bookingId: string): {
20
6
  create: import("@tanstack/react-query").UseMutationResult<{
21
7
  id: string;
@@ -41,7 +27,30 @@ export declare function useBookingItemMutation(bookingId: string): {
41
27
  pricingCategoryId: string | null;
42
28
  createdAt: string;
43
29
  updatedAt: string;
44
- }, Error, CreateBookingItemInput, unknown>;
30
+ }, Error, {
31
+ title: string;
32
+ sellCurrency: string;
33
+ description?: string | null | undefined;
34
+ itemType?: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport" | undefined;
35
+ status?: "draft" | "on_hold" | "confirmed" | "expired" | "cancelled" | "fulfilled" | undefined;
36
+ serviceDate?: string | null | undefined;
37
+ startsAt?: string | null | undefined;
38
+ endsAt?: string | null | undefined;
39
+ quantity?: number | undefined;
40
+ unitSellAmountCents?: number | null | undefined;
41
+ totalSellAmountCents?: number | null | undefined;
42
+ costCurrency?: string | null | undefined;
43
+ unitCostAmountCents?: number | null | undefined;
44
+ totalCostAmountCents?: number | null | undefined;
45
+ notes?: string | null | undefined;
46
+ productId?: string | null | undefined;
47
+ optionId?: string | null | undefined;
48
+ optionUnitId?: string | null | undefined;
49
+ pricingCategoryId?: string | null | undefined;
50
+ sourceSnapshotId?: string | null | undefined;
51
+ sourceOfferId?: string | null | undefined;
52
+ metadata?: Record<string, unknown> | null | undefined;
53
+ }, unknown>;
45
54
  update: import("@tanstack/react-query").UseMutationResult<{
46
55
  id: string;
47
56
  bookingId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"use-booking-item-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-item-mutation.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAA;AAEpE,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAuBZ,MAAM;eAAS,sBAAsB;;;;;EAgChF"}
1
+ {"version":3,"file":"use-booking-item-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-item-mutation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAW5B,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAC5E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE5E,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAuBZ,MAAM;eAAS,sBAAsB;;;;;EAgChF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/bookings-react",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,7 +36,7 @@
36
36
  "react": "^19.0.0",
37
37
  "react-dom": "^19.0.0",
38
38
  "zod": "^4.0.0",
39
- "@voyantjs/bookings": "0.16.0"
39
+ "@voyantjs/bookings": "0.17.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@tanstack/react-query": "^5.96.2",
@@ -47,12 +47,12 @@
47
47
  "typescript": "^6.0.2",
48
48
  "vitest": "^4.1.2",
49
49
  "zod": "^4.3.6",
50
- "@voyantjs/bookings": "0.16.0",
51
- "@voyantjs/react": "0.16.0",
50
+ "@voyantjs/bookings": "0.17.0",
51
+ "@voyantjs/react": "0.17.0",
52
52
  "@voyantjs/voyant-typescript-config": "0.1.0"
53
53
  },
54
54
  "dependencies": {
55
- "@voyantjs/react": "0.16.0"
55
+ "@voyantjs/react": "0.17.0"
56
56
  },
57
57
  "files": [
58
58
  "dist"