@voyantjs/resources-react 0.1.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.
Files changed (74) hide show
  1. package/README.md +36 -0
  2. package/dist/client.d.ts +14 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/client.js +59 -0
  5. package/dist/constants.d.ts +44 -0
  6. package/dist/constants.d.ts.map +1 -0
  7. package/dist/constants.js +20 -0
  8. package/dist/hooks/index.d.ts +31 -0
  9. package/dist/hooks/index.d.ts.map +1 -0
  10. package/dist/hooks/index.js +15 -0
  11. package/dist/hooks/use-allocation.d.ts +16 -0
  12. package/dist/hooks/use-allocation.d.ts.map +1 -0
  13. package/dist/hooks/use-allocation.js +12 -0
  14. package/dist/hooks/use-allocations.d.ts +20 -0
  15. package/dist/hooks/use-allocations.d.ts.map +1 -0
  16. package/dist/hooks/use-allocations.js +12 -0
  17. package/dist/hooks/use-assignment.d.ts +17 -0
  18. package/dist/hooks/use-assignment.d.ts.map +1 -0
  19. package/dist/hooks/use-assignment.js +12 -0
  20. package/dist/hooks/use-assignments.d.ts +21 -0
  21. package/dist/hooks/use-assignments.d.ts.map +1 -0
  22. package/dist/hooks/use-assignments.js +12 -0
  23. package/dist/hooks/use-bookings.d.ts +14 -0
  24. package/dist/hooks/use-bookings.d.ts.map +1 -0
  25. package/dist/hooks/use-bookings.js +12 -0
  26. package/dist/hooks/use-closeouts.d.ts +19 -0
  27. package/dist/hooks/use-closeouts.d.ts.map +1 -0
  28. package/dist/hooks/use-closeouts.js +12 -0
  29. package/dist/hooks/use-pool.d.ts +15 -0
  30. package/dist/hooks/use-pool.d.ts.map +1 -0
  31. package/dist/hooks/use-pool.js +12 -0
  32. package/dist/hooks/use-pools.d.ts +19 -0
  33. package/dist/hooks/use-pools.d.ts.map +1 -0
  34. package/dist/hooks/use-pools.js +12 -0
  35. package/dist/hooks/use-products.d.ts +14 -0
  36. package/dist/hooks/use-products.d.ts.map +1 -0
  37. package/dist/hooks/use-products.js +12 -0
  38. package/dist/hooks/use-resource.d.ts +16 -0
  39. package/dist/hooks/use-resource.d.ts.map +1 -0
  40. package/dist/hooks/use-resource.js +12 -0
  41. package/dist/hooks/use-resources.d.ts +20 -0
  42. package/dist/hooks/use-resources.d.ts.map +1 -0
  43. package/dist/hooks/use-resources.js +12 -0
  44. package/dist/hooks/use-rules.d.ts +15 -0
  45. package/dist/hooks/use-rules.d.ts.map +1 -0
  46. package/dist/hooks/use-rules.js +12 -0
  47. package/dist/hooks/use-slots.d.ts +16 -0
  48. package/dist/hooks/use-slots.d.ts.map +1 -0
  49. package/dist/hooks/use-slots.js +12 -0
  50. package/dist/hooks/use-start-times.d.ts +16 -0
  51. package/dist/hooks/use-start-times.d.ts.map +1 -0
  52. package/dist/hooks/use-start-times.js +12 -0
  53. package/dist/hooks/use-suppliers.d.ts +14 -0
  54. package/dist/hooks/use-suppliers.d.ts.map +1 -0
  55. package/dist/hooks/use-suppliers.js +12 -0
  56. package/dist/index.d.ts +9 -0
  57. package/dist/index.d.ts.map +1 -0
  58. package/dist/index.js +8 -0
  59. package/dist/provider.d.ts +2 -0
  60. package/dist/provider.d.ts.map +1 -0
  61. package/dist/provider.js +1 -0
  62. package/dist/query-keys.d.ts +73 -0
  63. package/dist/query-keys.d.ts.map +1 -0
  64. package/dist/query-keys.js +29 -0
  65. package/dist/query-options.d.ts +801 -0
  66. package/dist/query-options.d.ts.map +1 -0
  67. package/dist/query-options.js +237 -0
  68. package/dist/schemas.d.ts +452 -0
  69. package/dist/schemas.d.ts.map +1 -0
  70. package/dist/schemas.js +126 -0
  71. package/dist/utils.d.ts +14 -0
  72. package/dist/utils.d.ts.map +1 -0
  73. package/dist/utils.js +33 -0
  74. package/package.json +79 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBpC;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7B,OAAO,GAAE,oBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBnC;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,qBAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBpC;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7B,OAAO,GAAE,oBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBnC;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,mBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBlC"}
@@ -0,0 +1,237 @@
1
+ "use client";
2
+ import { queryOptions } from "@tanstack/react-query";
3
+ import { fetchWithValidation } from "./client.js";
4
+ import { resourcesQueryKeys } from "./query-keys.js";
5
+ import { bookingListResponse, productListResponse, resourceAllocationListResponse, resourceAllocationSingleResponse, resourceCloseoutListResponse, resourceListResponse, resourcePoolListResponse, resourcePoolSingleResponse, resourceSingleResponse, resourceSlotAssignmentListResponse, resourceSlotAssignmentSingleResponse, ruleListResponse, slotListResponse, startTimeListResponse, supplierListResponse, } from "./schemas.js";
6
+ function appendPagination(params, filters) {
7
+ if (filters.limit !== undefined)
8
+ params.set("limit", String(filters.limit));
9
+ if (filters.offset !== undefined)
10
+ params.set("offset", String(filters.offset));
11
+ }
12
+ export function getSuppliersQueryOptions(client, options = {}) {
13
+ const { enabled: _enabled = true, ...filters } = options;
14
+ return queryOptions({
15
+ queryKey: resourcesQueryKeys.suppliersList(filters),
16
+ queryFn: () => {
17
+ const params = new URLSearchParams();
18
+ appendPagination(params, filters);
19
+ const qs = params.toString();
20
+ return fetchWithValidation(`/v1/suppliers${qs ? `?${qs}` : ""}`, supplierListResponse, client);
21
+ },
22
+ });
23
+ }
24
+ export function getProductsQueryOptions(client, options = {}) {
25
+ const { enabled: _enabled = true, ...filters } = options;
26
+ return queryOptions({
27
+ queryKey: resourcesQueryKeys.productsList(filters),
28
+ queryFn: () => {
29
+ const params = new URLSearchParams();
30
+ appendPagination(params, filters);
31
+ const qs = params.toString();
32
+ return fetchWithValidation(`/v1/products${qs ? `?${qs}` : ""}`, productListResponse, client);
33
+ },
34
+ });
35
+ }
36
+ export function getBookingsQueryOptions(client, options = {}) {
37
+ const { enabled: _enabled = true, ...filters } = options;
38
+ return queryOptions({
39
+ queryKey: resourcesQueryKeys.bookingsList(filters),
40
+ queryFn: () => {
41
+ const params = new URLSearchParams();
42
+ appendPagination(params, filters);
43
+ const qs = params.toString();
44
+ return fetchWithValidation(`/v1/bookings${qs ? `?${qs}` : ""}`, bookingListResponse, client);
45
+ },
46
+ });
47
+ }
48
+ export function getSlotsQueryOptions(client, options = {}) {
49
+ const { enabled: _enabled = true, ...filters } = options;
50
+ return queryOptions({
51
+ queryKey: resourcesQueryKeys.slotsList(filters),
52
+ queryFn: () => {
53
+ const params = new URLSearchParams();
54
+ if (filters.productId)
55
+ params.set("productId", filters.productId);
56
+ appendPagination(params, filters);
57
+ const qs = params.toString();
58
+ return fetchWithValidation(`/v1/availability/slots${qs ? `?${qs}` : ""}`, slotListResponse, client);
59
+ },
60
+ });
61
+ }
62
+ export function getRulesQueryOptions(client, options = {}) {
63
+ const { enabled: _enabled = true, ...filters } = options;
64
+ return queryOptions({
65
+ queryKey: resourcesQueryKeys.rulesList(filters),
66
+ queryFn: () => {
67
+ const params = new URLSearchParams();
68
+ if (filters.productId)
69
+ params.set("productId", filters.productId);
70
+ appendPagination(params, filters);
71
+ const qs = params.toString();
72
+ return fetchWithValidation(`/v1/availability/rules${qs ? `?${qs}` : ""}`, ruleListResponse, client);
73
+ },
74
+ });
75
+ }
76
+ export function getStartTimesQueryOptions(client, options = {}) {
77
+ const { enabled: _enabled = true, ...filters } = options;
78
+ return queryOptions({
79
+ queryKey: resourcesQueryKeys.startTimesList(filters),
80
+ queryFn: () => {
81
+ const params = new URLSearchParams();
82
+ if (filters.productId)
83
+ params.set("productId", filters.productId);
84
+ appendPagination(params, filters);
85
+ const qs = params.toString();
86
+ return fetchWithValidation(`/v1/availability/start-times${qs ? `?${qs}` : ""}`, startTimeListResponse, client);
87
+ },
88
+ });
89
+ }
90
+ export function getResourcesQueryOptions(client, options = {}) {
91
+ const { enabled: _enabled = true, ...filters } = options;
92
+ return queryOptions({
93
+ queryKey: resourcesQueryKeys.resourcesList(filters),
94
+ queryFn: () => {
95
+ const params = new URLSearchParams();
96
+ if (filters.supplierId)
97
+ params.set("supplierId", filters.supplierId);
98
+ if (filters.kind)
99
+ params.set("kind", filters.kind);
100
+ if (filters.active !== undefined)
101
+ params.set("active", String(filters.active));
102
+ if (filters.search)
103
+ params.set("search", filters.search);
104
+ appendPagination(params, filters);
105
+ const qs = params.toString();
106
+ return fetchWithValidation(`/v1/resources/resources${qs ? `?${qs}` : ""}`, resourceListResponse, client);
107
+ },
108
+ });
109
+ }
110
+ export function getResourceQueryOptions(client, id, options = {}) {
111
+ const { enabled: _enabled = true } = options;
112
+ return queryOptions({
113
+ queryKey: resourcesQueryKeys.resource(id ?? ""),
114
+ queryFn: async () => {
115
+ if (!id)
116
+ throw new Error("getResourceQueryOptions requires an id");
117
+ const { data } = await fetchWithValidation(`/v1/resources/resources/${id}`, resourceSingleResponse, client);
118
+ return data;
119
+ },
120
+ });
121
+ }
122
+ export function getPoolsQueryOptions(client, options = {}) {
123
+ const { enabled: _enabled = true, ...filters } = options;
124
+ return queryOptions({
125
+ queryKey: resourcesQueryKeys.poolsList(filters),
126
+ queryFn: () => {
127
+ const params = new URLSearchParams();
128
+ if (filters.productId)
129
+ params.set("productId", filters.productId);
130
+ if (filters.kind)
131
+ params.set("kind", filters.kind);
132
+ if (filters.active !== undefined)
133
+ params.set("active", String(filters.active));
134
+ if (filters.search)
135
+ params.set("search", filters.search);
136
+ appendPagination(params, filters);
137
+ const qs = params.toString();
138
+ return fetchWithValidation(`/v1/resources/pools${qs ? `?${qs}` : ""}`, resourcePoolListResponse, client);
139
+ },
140
+ });
141
+ }
142
+ export function getPoolQueryOptions(client, id, options = {}) {
143
+ const { enabled: _enabled = true } = options;
144
+ return queryOptions({
145
+ queryKey: resourcesQueryKeys.pool(id ?? ""),
146
+ queryFn: async () => {
147
+ if (!id)
148
+ throw new Error("getPoolQueryOptions requires an id");
149
+ const { data } = await fetchWithValidation(`/v1/resources/pools/${id}`, resourcePoolSingleResponse, client);
150
+ return data;
151
+ },
152
+ });
153
+ }
154
+ export function getAllocationsQueryOptions(client, options = {}) {
155
+ const { enabled: _enabled = true, ...filters } = options;
156
+ return queryOptions({
157
+ queryKey: resourcesQueryKeys.allocationsList(filters),
158
+ queryFn: () => {
159
+ const params = new URLSearchParams();
160
+ if (filters.poolId)
161
+ params.set("poolId", filters.poolId);
162
+ if (filters.productId)
163
+ params.set("productId", filters.productId);
164
+ if (filters.availabilityRuleId)
165
+ params.set("availabilityRuleId", filters.availabilityRuleId);
166
+ if (filters.startTimeId)
167
+ params.set("startTimeId", filters.startTimeId);
168
+ if (filters.allocationMode)
169
+ params.set("allocationMode", filters.allocationMode);
170
+ appendPagination(params, filters);
171
+ const qs = params.toString();
172
+ return fetchWithValidation(`/v1/resources/allocations${qs ? `?${qs}` : ""}`, resourceAllocationListResponse, client);
173
+ },
174
+ });
175
+ }
176
+ export function getAllocationQueryOptions(client, id, options = {}) {
177
+ const { enabled: _enabled = true } = options;
178
+ return queryOptions({
179
+ queryKey: resourcesQueryKeys.allocation(id ?? ""),
180
+ queryFn: async () => {
181
+ if (!id)
182
+ throw new Error("getAllocationQueryOptions requires an id");
183
+ const { data } = await fetchWithValidation(`/v1/resources/allocations/${id}`, resourceAllocationSingleResponse, client);
184
+ return data;
185
+ },
186
+ });
187
+ }
188
+ export function getAssignmentsQueryOptions(client, options = {}) {
189
+ const { enabled: _enabled = true, ...filters } = options;
190
+ return queryOptions({
191
+ queryKey: resourcesQueryKeys.assignmentsList(filters),
192
+ queryFn: () => {
193
+ const params = new URLSearchParams();
194
+ if (filters.slotId)
195
+ params.set("slotId", filters.slotId);
196
+ if (filters.poolId)
197
+ params.set("poolId", filters.poolId);
198
+ if (filters.resourceId)
199
+ params.set("resourceId", filters.resourceId);
200
+ if (filters.bookingId)
201
+ params.set("bookingId", filters.bookingId);
202
+ if (filters.status)
203
+ params.set("status", filters.status);
204
+ appendPagination(params, filters);
205
+ const qs = params.toString();
206
+ return fetchWithValidation(`/v1/resources/slot-assignments${qs ? `?${qs}` : ""}`, resourceSlotAssignmentListResponse, client);
207
+ },
208
+ });
209
+ }
210
+ export function getAssignmentQueryOptions(client, id, options = {}) {
211
+ const { enabled: _enabled = true } = options;
212
+ return queryOptions({
213
+ queryKey: resourcesQueryKeys.assignment(id ?? ""),
214
+ queryFn: async () => {
215
+ if (!id)
216
+ throw new Error("getAssignmentQueryOptions requires an id");
217
+ const { data } = await fetchWithValidation(`/v1/resources/slot-assignments/${id}`, resourceSlotAssignmentSingleResponse, client);
218
+ return data;
219
+ },
220
+ });
221
+ }
222
+ export function getCloseoutsQueryOptions(client, options = {}) {
223
+ const { enabled: _enabled = true, ...filters } = options;
224
+ return queryOptions({
225
+ queryKey: resourcesQueryKeys.closeoutsList(filters),
226
+ queryFn: () => {
227
+ const params = new URLSearchParams();
228
+ if (filters.resourceId)
229
+ params.set("resourceId", filters.resourceId);
230
+ if (filters.dateLocal)
231
+ params.set("dateLocal", filters.dateLocal);
232
+ appendPagination(params, filters);
233
+ const qs = params.toString();
234
+ return fetchWithValidation(`/v1/resources/closeouts${qs ? `?${qs}` : ""}`, resourceCloseoutListResponse, client);
235
+ },
236
+ });
237
+ }
@@ -0,0 +1,452 @@
1
+ import { z } from "zod";
2
+ export declare const paginatedEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
3
+ data: z.ZodArray<T>;
4
+ total: z.ZodNumber;
5
+ limit: z.ZodNumber;
6
+ offset: z.ZodNumber;
7
+ }, z.core.$strip>;
8
+ export declare const singleEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
9
+ data: T;
10
+ }, z.core.$strip>;
11
+ export declare const supplierOptionSchema: z.ZodObject<{
12
+ id: z.ZodString;
13
+ name: z.ZodString;
14
+ }, z.core.$strip>;
15
+ export type SupplierOption = z.infer<typeof supplierOptionSchema>;
16
+ export declare const productOptionSchema: z.ZodObject<{
17
+ id: z.ZodString;
18
+ name: z.ZodString;
19
+ }, z.core.$strip>;
20
+ export type ProductOption = z.infer<typeof productOptionSchema>;
21
+ export declare const bookingOptionSchema: z.ZodObject<{
22
+ id: z.ZodString;
23
+ bookingNumber: z.ZodString;
24
+ }, z.core.$strip>;
25
+ export type BookingOption = z.infer<typeof bookingOptionSchema>;
26
+ export declare const slotOptionSchema: z.ZodObject<{
27
+ id: z.ZodString;
28
+ productId: z.ZodString;
29
+ dateLocal: z.ZodString;
30
+ startsAt: z.ZodString;
31
+ }, z.core.$strip>;
32
+ export type SlotOption = z.infer<typeof slotOptionSchema>;
33
+ export declare const ruleOptionSchema: z.ZodObject<{
34
+ id: z.ZodString;
35
+ productId: z.ZodString;
36
+ recurrenceRule: z.ZodString;
37
+ }, z.core.$strip>;
38
+ export type RuleOption = z.infer<typeof ruleOptionSchema>;
39
+ export declare const startTimeOptionSchema: z.ZodObject<{
40
+ id: z.ZodString;
41
+ productId: z.ZodString;
42
+ label: z.ZodNullable<z.ZodString>;
43
+ startTimeLocal: z.ZodString;
44
+ }, z.core.$strip>;
45
+ export type StartTimeOption = z.infer<typeof startTimeOptionSchema>;
46
+ export declare const resourceKindSchema: z.ZodEnum<{
47
+ guide: "guide";
48
+ vehicle: "vehicle";
49
+ room: "room";
50
+ boat: "boat";
51
+ equipment: "equipment";
52
+ other: "other";
53
+ }>;
54
+ export declare const resourceStatusSchema: z.ZodEnum<{
55
+ reserved: "reserved";
56
+ assigned: "assigned";
57
+ released: "released";
58
+ cancelled: "cancelled";
59
+ completed: "completed";
60
+ }>;
61
+ export declare const allocationModeSchema: z.ZodEnum<{
62
+ shared: "shared";
63
+ exclusive: "exclusive";
64
+ }>;
65
+ export declare const resourceRecordSchema: z.ZodObject<{
66
+ id: z.ZodString;
67
+ supplierId: z.ZodNullable<z.ZodString>;
68
+ kind: z.ZodEnum<{
69
+ guide: "guide";
70
+ vehicle: "vehicle";
71
+ room: "room";
72
+ boat: "boat";
73
+ equipment: "equipment";
74
+ other: "other";
75
+ }>;
76
+ name: z.ZodString;
77
+ code: z.ZodNullable<z.ZodString>;
78
+ capacity: z.ZodNullable<z.ZodNumber>;
79
+ active: z.ZodBoolean;
80
+ notes: z.ZodNullable<z.ZodString>;
81
+ }, z.core.$strip>;
82
+ export type ResourceRow = z.infer<typeof resourceRecordSchema>;
83
+ export declare const resourceDetailSchema: z.ZodObject<{
84
+ id: z.ZodString;
85
+ supplierId: z.ZodNullable<z.ZodString>;
86
+ kind: z.ZodEnum<{
87
+ guide: "guide";
88
+ vehicle: "vehicle";
89
+ room: "room";
90
+ boat: "boat";
91
+ equipment: "equipment";
92
+ other: "other";
93
+ }>;
94
+ name: z.ZodString;
95
+ code: z.ZodNullable<z.ZodString>;
96
+ capacity: z.ZodNullable<z.ZodNumber>;
97
+ active: z.ZodBoolean;
98
+ notes: z.ZodNullable<z.ZodString>;
99
+ createdAt: z.ZodString;
100
+ updatedAt: z.ZodString;
101
+ }, z.core.$strip>;
102
+ export type ResourceDetail = z.infer<typeof resourceDetailSchema>;
103
+ export declare const resourcePoolRecordSchema: z.ZodObject<{
104
+ id: z.ZodString;
105
+ productId: z.ZodNullable<z.ZodString>;
106
+ kind: z.ZodEnum<{
107
+ guide: "guide";
108
+ vehicle: "vehicle";
109
+ room: "room";
110
+ boat: "boat";
111
+ equipment: "equipment";
112
+ other: "other";
113
+ }>;
114
+ name: z.ZodString;
115
+ sharedCapacity: z.ZodNullable<z.ZodNumber>;
116
+ active: z.ZodBoolean;
117
+ notes: z.ZodNullable<z.ZodString>;
118
+ }, z.core.$strip>;
119
+ export type ResourcePoolRow = z.infer<typeof resourcePoolRecordSchema>;
120
+ export declare const resourcePoolDetailSchema: z.ZodObject<{
121
+ id: z.ZodString;
122
+ productId: z.ZodNullable<z.ZodString>;
123
+ kind: z.ZodEnum<{
124
+ guide: "guide";
125
+ vehicle: "vehicle";
126
+ room: "room";
127
+ boat: "boat";
128
+ equipment: "equipment";
129
+ other: "other";
130
+ }>;
131
+ name: z.ZodString;
132
+ sharedCapacity: z.ZodNullable<z.ZodNumber>;
133
+ active: z.ZodBoolean;
134
+ notes: z.ZodNullable<z.ZodString>;
135
+ createdAt: z.ZodString;
136
+ updatedAt: z.ZodString;
137
+ }, z.core.$strip>;
138
+ export type ResourcePoolDetail = z.infer<typeof resourcePoolDetailSchema>;
139
+ export declare const resourceAllocationRecordSchema: z.ZodObject<{
140
+ id: z.ZodString;
141
+ poolId: z.ZodString;
142
+ productId: z.ZodString;
143
+ availabilityRuleId: z.ZodNullable<z.ZodString>;
144
+ startTimeId: z.ZodNullable<z.ZodString>;
145
+ quantityRequired: z.ZodNumber;
146
+ allocationMode: z.ZodEnum<{
147
+ shared: "shared";
148
+ exclusive: "exclusive";
149
+ }>;
150
+ priority: z.ZodNumber;
151
+ }, z.core.$strip>;
152
+ export type ResourceAllocationRow = z.infer<typeof resourceAllocationRecordSchema>;
153
+ export declare const resourceAllocationDetailSchema: z.ZodObject<{
154
+ id: z.ZodString;
155
+ poolId: z.ZodString;
156
+ productId: z.ZodString;
157
+ availabilityRuleId: z.ZodNullable<z.ZodString>;
158
+ startTimeId: z.ZodNullable<z.ZodString>;
159
+ quantityRequired: z.ZodNumber;
160
+ allocationMode: z.ZodEnum<{
161
+ shared: "shared";
162
+ exclusive: "exclusive";
163
+ }>;
164
+ priority: z.ZodNumber;
165
+ createdAt: z.ZodString;
166
+ updatedAt: z.ZodString;
167
+ }, z.core.$strip>;
168
+ export type ResourceAllocationDetail = z.infer<typeof resourceAllocationDetailSchema>;
169
+ export declare const resourceSlotAssignmentRecordSchema: z.ZodObject<{
170
+ id: z.ZodString;
171
+ slotId: z.ZodString;
172
+ poolId: z.ZodNullable<z.ZodString>;
173
+ resourceId: z.ZodNullable<z.ZodString>;
174
+ bookingId: z.ZodNullable<z.ZodString>;
175
+ status: z.ZodEnum<{
176
+ reserved: "reserved";
177
+ assigned: "assigned";
178
+ released: "released";
179
+ cancelled: "cancelled";
180
+ completed: "completed";
181
+ }>;
182
+ assignedBy: z.ZodNullable<z.ZodString>;
183
+ releasedAt: z.ZodNullable<z.ZodString>;
184
+ notes: z.ZodNullable<z.ZodString>;
185
+ }, z.core.$strip>;
186
+ export type ResourceSlotAssignmentRow = z.infer<typeof resourceSlotAssignmentRecordSchema>;
187
+ export declare const resourceSlotAssignmentDetailSchema: z.ZodObject<{
188
+ id: z.ZodString;
189
+ slotId: z.ZodString;
190
+ poolId: z.ZodNullable<z.ZodString>;
191
+ resourceId: z.ZodNullable<z.ZodString>;
192
+ bookingId: z.ZodNullable<z.ZodString>;
193
+ status: z.ZodEnum<{
194
+ reserved: "reserved";
195
+ assigned: "assigned";
196
+ released: "released";
197
+ cancelled: "cancelled";
198
+ completed: "completed";
199
+ }>;
200
+ assignedBy: z.ZodNullable<z.ZodString>;
201
+ releasedAt: z.ZodNullable<z.ZodString>;
202
+ notes: z.ZodNullable<z.ZodString>;
203
+ createdAt: z.ZodString;
204
+ updatedAt: z.ZodString;
205
+ }, z.core.$strip>;
206
+ export type ResourceSlotAssignmentDetail = z.infer<typeof resourceSlotAssignmentDetailSchema>;
207
+ export declare const resourceCloseoutRecordSchema: z.ZodObject<{
208
+ id: z.ZodString;
209
+ resourceId: z.ZodString;
210
+ dateLocal: z.ZodString;
211
+ startsAt: z.ZodNullable<z.ZodString>;
212
+ endsAt: z.ZodNullable<z.ZodString>;
213
+ reason: z.ZodNullable<z.ZodString>;
214
+ createdBy: z.ZodNullable<z.ZodString>;
215
+ }, z.core.$strip>;
216
+ export type ResourceCloseoutRow = z.infer<typeof resourceCloseoutRecordSchema>;
217
+ export declare const supplierListResponse: z.ZodObject<{
218
+ data: z.ZodArray<z.ZodObject<{
219
+ id: z.ZodString;
220
+ name: z.ZodString;
221
+ }, z.core.$strip>>;
222
+ total: z.ZodNumber;
223
+ limit: z.ZodNumber;
224
+ offset: z.ZodNumber;
225
+ }, z.core.$strip>;
226
+ export declare const productListResponse: z.ZodObject<{
227
+ data: z.ZodArray<z.ZodObject<{
228
+ id: z.ZodString;
229
+ name: z.ZodString;
230
+ }, z.core.$strip>>;
231
+ total: z.ZodNumber;
232
+ limit: z.ZodNumber;
233
+ offset: z.ZodNumber;
234
+ }, z.core.$strip>;
235
+ export declare const bookingListResponse: z.ZodObject<{
236
+ data: z.ZodArray<z.ZodObject<{
237
+ id: z.ZodString;
238
+ bookingNumber: z.ZodString;
239
+ }, z.core.$strip>>;
240
+ total: z.ZodNumber;
241
+ limit: z.ZodNumber;
242
+ offset: z.ZodNumber;
243
+ }, z.core.$strip>;
244
+ export declare const slotListResponse: z.ZodObject<{
245
+ data: z.ZodArray<z.ZodObject<{
246
+ id: z.ZodString;
247
+ productId: z.ZodString;
248
+ dateLocal: z.ZodString;
249
+ startsAt: z.ZodString;
250
+ }, z.core.$strip>>;
251
+ total: z.ZodNumber;
252
+ limit: z.ZodNumber;
253
+ offset: z.ZodNumber;
254
+ }, z.core.$strip>;
255
+ export declare const ruleListResponse: z.ZodObject<{
256
+ data: z.ZodArray<z.ZodObject<{
257
+ id: z.ZodString;
258
+ productId: z.ZodString;
259
+ recurrenceRule: z.ZodString;
260
+ }, z.core.$strip>>;
261
+ total: z.ZodNumber;
262
+ limit: z.ZodNumber;
263
+ offset: z.ZodNumber;
264
+ }, z.core.$strip>;
265
+ export declare const startTimeListResponse: z.ZodObject<{
266
+ data: z.ZodArray<z.ZodObject<{
267
+ id: z.ZodString;
268
+ productId: z.ZodString;
269
+ label: z.ZodNullable<z.ZodString>;
270
+ startTimeLocal: z.ZodString;
271
+ }, z.core.$strip>>;
272
+ total: z.ZodNumber;
273
+ limit: z.ZodNumber;
274
+ offset: z.ZodNumber;
275
+ }, z.core.$strip>;
276
+ export declare const resourceListResponse: z.ZodObject<{
277
+ data: z.ZodArray<z.ZodObject<{
278
+ id: z.ZodString;
279
+ supplierId: z.ZodNullable<z.ZodString>;
280
+ kind: z.ZodEnum<{
281
+ guide: "guide";
282
+ vehicle: "vehicle";
283
+ room: "room";
284
+ boat: "boat";
285
+ equipment: "equipment";
286
+ other: "other";
287
+ }>;
288
+ name: z.ZodString;
289
+ code: z.ZodNullable<z.ZodString>;
290
+ capacity: z.ZodNullable<z.ZodNumber>;
291
+ active: z.ZodBoolean;
292
+ notes: z.ZodNullable<z.ZodString>;
293
+ }, z.core.$strip>>;
294
+ total: z.ZodNumber;
295
+ limit: z.ZodNumber;
296
+ offset: z.ZodNumber;
297
+ }, z.core.$strip>;
298
+ export declare const resourcePoolListResponse: z.ZodObject<{
299
+ data: z.ZodArray<z.ZodObject<{
300
+ id: z.ZodString;
301
+ productId: z.ZodNullable<z.ZodString>;
302
+ kind: z.ZodEnum<{
303
+ guide: "guide";
304
+ vehicle: "vehicle";
305
+ room: "room";
306
+ boat: "boat";
307
+ equipment: "equipment";
308
+ other: "other";
309
+ }>;
310
+ name: z.ZodString;
311
+ sharedCapacity: z.ZodNullable<z.ZodNumber>;
312
+ active: z.ZodBoolean;
313
+ notes: z.ZodNullable<z.ZodString>;
314
+ }, z.core.$strip>>;
315
+ total: z.ZodNumber;
316
+ limit: z.ZodNumber;
317
+ offset: z.ZodNumber;
318
+ }, z.core.$strip>;
319
+ export declare const resourceAllocationListResponse: z.ZodObject<{
320
+ data: z.ZodArray<z.ZodObject<{
321
+ id: z.ZodString;
322
+ poolId: z.ZodString;
323
+ productId: z.ZodString;
324
+ availabilityRuleId: z.ZodNullable<z.ZodString>;
325
+ startTimeId: z.ZodNullable<z.ZodString>;
326
+ quantityRequired: z.ZodNumber;
327
+ allocationMode: z.ZodEnum<{
328
+ shared: "shared";
329
+ exclusive: "exclusive";
330
+ }>;
331
+ priority: z.ZodNumber;
332
+ }, z.core.$strip>>;
333
+ total: z.ZodNumber;
334
+ limit: z.ZodNumber;
335
+ offset: z.ZodNumber;
336
+ }, z.core.$strip>;
337
+ export declare const resourceSlotAssignmentListResponse: z.ZodObject<{
338
+ data: z.ZodArray<z.ZodObject<{
339
+ id: z.ZodString;
340
+ slotId: z.ZodString;
341
+ poolId: z.ZodNullable<z.ZodString>;
342
+ resourceId: z.ZodNullable<z.ZodString>;
343
+ bookingId: z.ZodNullable<z.ZodString>;
344
+ status: z.ZodEnum<{
345
+ reserved: "reserved";
346
+ assigned: "assigned";
347
+ released: "released";
348
+ cancelled: "cancelled";
349
+ completed: "completed";
350
+ }>;
351
+ assignedBy: z.ZodNullable<z.ZodString>;
352
+ releasedAt: z.ZodNullable<z.ZodString>;
353
+ notes: z.ZodNullable<z.ZodString>;
354
+ }, z.core.$strip>>;
355
+ total: z.ZodNumber;
356
+ limit: z.ZodNumber;
357
+ offset: z.ZodNumber;
358
+ }, z.core.$strip>;
359
+ export declare const resourceCloseoutListResponse: z.ZodObject<{
360
+ data: z.ZodArray<z.ZodObject<{
361
+ id: z.ZodString;
362
+ resourceId: z.ZodString;
363
+ dateLocal: z.ZodString;
364
+ startsAt: z.ZodNullable<z.ZodString>;
365
+ endsAt: z.ZodNullable<z.ZodString>;
366
+ reason: z.ZodNullable<z.ZodString>;
367
+ createdBy: z.ZodNullable<z.ZodString>;
368
+ }, z.core.$strip>>;
369
+ total: z.ZodNumber;
370
+ limit: z.ZodNumber;
371
+ offset: z.ZodNumber;
372
+ }, z.core.$strip>;
373
+ export declare const resourceSingleResponse: z.ZodObject<{
374
+ data: z.ZodObject<{
375
+ id: z.ZodString;
376
+ supplierId: z.ZodNullable<z.ZodString>;
377
+ kind: z.ZodEnum<{
378
+ guide: "guide";
379
+ vehicle: "vehicle";
380
+ room: "room";
381
+ boat: "boat";
382
+ equipment: "equipment";
383
+ other: "other";
384
+ }>;
385
+ name: z.ZodString;
386
+ code: z.ZodNullable<z.ZodString>;
387
+ capacity: z.ZodNullable<z.ZodNumber>;
388
+ active: z.ZodBoolean;
389
+ notes: z.ZodNullable<z.ZodString>;
390
+ createdAt: z.ZodString;
391
+ updatedAt: z.ZodString;
392
+ }, z.core.$strip>;
393
+ }, z.core.$strip>;
394
+ export declare const resourcePoolSingleResponse: z.ZodObject<{
395
+ data: z.ZodObject<{
396
+ id: z.ZodString;
397
+ productId: z.ZodNullable<z.ZodString>;
398
+ kind: z.ZodEnum<{
399
+ guide: "guide";
400
+ vehicle: "vehicle";
401
+ room: "room";
402
+ boat: "boat";
403
+ equipment: "equipment";
404
+ other: "other";
405
+ }>;
406
+ name: z.ZodString;
407
+ sharedCapacity: z.ZodNullable<z.ZodNumber>;
408
+ active: z.ZodBoolean;
409
+ notes: z.ZodNullable<z.ZodString>;
410
+ createdAt: z.ZodString;
411
+ updatedAt: z.ZodString;
412
+ }, z.core.$strip>;
413
+ }, z.core.$strip>;
414
+ export declare const resourceAllocationSingleResponse: z.ZodObject<{
415
+ data: z.ZodObject<{
416
+ id: z.ZodString;
417
+ poolId: z.ZodString;
418
+ productId: z.ZodString;
419
+ availabilityRuleId: z.ZodNullable<z.ZodString>;
420
+ startTimeId: z.ZodNullable<z.ZodString>;
421
+ quantityRequired: z.ZodNumber;
422
+ allocationMode: z.ZodEnum<{
423
+ shared: "shared";
424
+ exclusive: "exclusive";
425
+ }>;
426
+ priority: z.ZodNumber;
427
+ createdAt: z.ZodString;
428
+ updatedAt: z.ZodString;
429
+ }, z.core.$strip>;
430
+ }, z.core.$strip>;
431
+ export declare const resourceSlotAssignmentSingleResponse: z.ZodObject<{
432
+ data: z.ZodObject<{
433
+ id: z.ZodString;
434
+ slotId: z.ZodString;
435
+ poolId: z.ZodNullable<z.ZodString>;
436
+ resourceId: z.ZodNullable<z.ZodString>;
437
+ bookingId: z.ZodNullable<z.ZodString>;
438
+ status: z.ZodEnum<{
439
+ reserved: "reserved";
440
+ assigned: "assigned";
441
+ released: "released";
442
+ cancelled: "cancelled";
443
+ completed: "completed";
444
+ }>;
445
+ assignedBy: z.ZodNullable<z.ZodString>;
446
+ releasedAt: z.ZodNullable<z.ZodString>;
447
+ notes: z.ZodNullable<z.ZodString>;
448
+ createdAt: z.ZodString;
449
+ updatedAt: z.ZodString;
450
+ }, z.core.$strip>;
451
+ }, z.core.$strip>;
452
+ //# sourceMappingURL=schemas.d.ts.map