import type { PostgresJsDatabase } from "drizzle-orm/postgres-js"; import type { z } from "zod"; import type { insertResourceCloseoutSchema, insertResourcePoolMemberSchema, insertResourcePoolSchema, insertResourceRequirementSchema, insertResourceSchema, insertResourceSlotAssignmentSchema, resourceCloseoutListQuerySchema, resourceListQuerySchema, resourcePoolListQuerySchema, resourcePoolMemberListQuerySchema, resourceRequirementListQuerySchema, resourceSlotAssignmentListQuerySchema, updateResourceCloseoutSchema, updateResourcePoolSchema, updateResourceRequirementSchema, updateResourceSchema, updateResourceSlotAssignmentSchema } from "./validation.js"; type ResourceListQuery = z.infer; type ResourcePoolListQuery = z.infer; type ResourcePoolMemberListQuery = z.infer; type ResourceRequirementListQuery = z.infer; type ResourceSlotAssignmentListQuery = z.infer; type ResourceCloseoutListQuery = z.infer; type CreateResourceInput = z.infer; type UpdateResourceInput = z.infer; type CreateResourcePoolInput = z.infer; type UpdateResourcePoolInput = z.infer; type CreateResourcePoolMemberInput = z.infer; type CreateResourceRequirementInput = z.infer; type UpdateResourceRequirementInput = z.infer; type CreateResourceSlotAssignmentInput = z.infer; type UpdateResourceSlotAssignmentInput = z.infer; type CreateResourceCloseoutInput = z.infer; type UpdateResourceCloseoutInput = z.infer; export declare class ResourcesServiceError extends Error { readonly status: 400 | 404 | 409; constructor(message: string, status: 400 | 404 | 409); } export declare const resourcesService: { listResources(db: PostgresJsDatabase, query: ResourceListQuery): Promise>; getResourceById(db: PostgresJsDatabase, id: string): Promise<{ id: string; supplierId: string | null; facilityId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; code: string | null; capacity: number | null; active: boolean; notes: string | null; createdAt: Date; updatedAt: Date; } | null>; createResource(db: PostgresJsDatabase, data: CreateResourceInput): Promise<{ id: string; facilityId: string | null; notes: string | null; createdAt: Date; updatedAt: Date; name: string; code: string | null; active: boolean; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; capacity: number | null; supplierId: string | null; } | undefined>; updateResource(db: PostgresJsDatabase, id: string, data: UpdateResourceInput): Promise<{ id: string; supplierId: string | null; facilityId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; code: string | null; capacity: number | null; active: boolean; notes: string | null; createdAt: Date; updatedAt: Date; } | null>; deleteResource(db: PostgresJsDatabase, id: string): Promise<{ id: string; } | null>; listPools(db: PostgresJsDatabase, query: ResourcePoolListQuery): Promise>; getPoolById(db: PostgresJsDatabase, id: string): Promise<{ id: string; productId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; sharedCapacity: number | null; active: boolean; notes: string | null; createdAt: Date; updatedAt: Date; } | null>; createPool(db: PostgresJsDatabase, data: CreateResourcePoolInput): Promise<{ id: string; productId: string | null; notes: string | null; createdAt: Date; updatedAt: Date; name: string; active: boolean; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; sharedCapacity: number | null; } | undefined>; updatePool(db: PostgresJsDatabase, id: string, data: UpdateResourcePoolInput): Promise<{ id: string; productId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; sharedCapacity: number | null; active: boolean; notes: string | null; createdAt: Date; updatedAt: Date; } | null>; deletePool(db: PostgresJsDatabase, id: string): Promise<{ id: string; } | null>; listPoolMembers(db: PostgresJsDatabase, query: ResourcePoolMemberListQuery): Promise>; createPoolMember(db: PostgresJsDatabase, data: CreateResourcePoolMemberInput): Promise<{ id: string; createdAt: Date; resourceId: string; poolId: string; } | undefined>; deletePoolMember(db: PostgresJsDatabase, id: string): Promise<{ id: string; } | null>; listRequirements(db: PostgresJsDatabase, query: ResourceRequirementListQuery): Promise>; getRequirementById(db: PostgresJsDatabase, id: string): Promise<{ id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: Date; updatedAt: Date; } | null>; createRequirement(db: PostgresJsDatabase, data: CreateResourceRequirementInput): Promise<{ id: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; createdAt: Date; updatedAt: Date; poolId: string; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; } | undefined>; updateRequirement(db: PostgresJsDatabase, id: string, data: UpdateResourceRequirementInput): Promise<{ id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: Date; updatedAt: Date; } | null>; deleteRequirement(db: PostgresJsDatabase, id: string): Promise<{ id: string; } | null>; listAllocations(db: PostgresJsDatabase, query: ResourceRequirementListQuery): Promise>; getAllocationById(db: PostgresJsDatabase, id: string): Promise<{ id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: Date; updatedAt: Date; } | null>; createAllocation(db: PostgresJsDatabase, data: CreateResourceRequirementInput): Promise<{ id: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; createdAt: Date; updatedAt: Date; poolId: string; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; } | undefined>; updateAllocation(db: PostgresJsDatabase, id: string, data: UpdateResourceRequirementInput): Promise<{ id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: Date; updatedAt: Date; } | null>; deleteAllocation(db: PostgresJsDatabase, id: string): Promise<{ id: string; } | null>; listSlotAssignments(db: PostgresJsDatabase, query: ResourceSlotAssignmentListQuery): Promise>; getSlotAssignmentById(db: PostgresJsDatabase, id: string): Promise<{ id: string; slotId: string; poolId: string | null; resourceId: string | null; bookingId: string | null; status: "cancelled" | "completed" | "assigned" | "reserved" | "released"; assignedAt: Date; assignedBy: string | null; releasedAt: Date | null; notes: string | null; } | null>; createSlotAssignment(db: PostgresJsDatabase, data: CreateResourceSlotAssignmentInput): Promise<{ id: string; status: "cancelled" | "completed" | "assigned" | "reserved" | "released"; notes: string | null; slotId: string; resourceId: string | null; bookingId: string | null; releasedAt: Date | null; assignedAt: Date; poolId: string | null; assignedBy: string | null; } | undefined>; updateSlotAssignment(db: PostgresJsDatabase, id: string, data: UpdateResourceSlotAssignmentInput): Promise<{ id: string; slotId: string; poolId: string | null; resourceId: string | null; bookingId: string | null; status: "cancelled" | "completed" | "assigned" | "reserved" | "released"; assignedAt: Date; assignedBy: string | null; releasedAt: Date | null; notes: string | null; } | null>; deleteSlotAssignment(db: PostgresJsDatabase, id: string): Promise<{ id: string; } | null>; listCloseouts(db: PostgresJsDatabase, query: ResourceCloseoutListQuery): Promise>; getCloseoutById(db: PostgresJsDatabase, id: string): Promise<{ id: string; resourceId: string; dateLocal: string; startsAt: Date | null; endsAt: Date | null; reason: string | null; createdBy: string | null; createdAt: Date; } | null>; createCloseout(db: PostgresJsDatabase, data: CreateResourceCloseoutInput): Promise<{ id: string; dateLocal: string; startsAt: Date | null; endsAt: Date | null; createdAt: Date; reason: string | null; createdBy: string | null; resourceId: string; } | undefined>; updateCloseout(db: PostgresJsDatabase, id: string, data: UpdateResourceCloseoutInput): Promise<{ id: string; resourceId: string; dateLocal: string; startsAt: Date | null; endsAt: Date | null; reason: string | null; createdBy: string | null; createdAt: Date; } | null>; deleteCloseout(db: PostgresJsDatabase, id: string): Promise<{ id: string; } | null>; }; export {};