/**
 * Resource 模块主键类型
 */
export type ResourceId = number | string;
/**
 * Sales / ScheduleEventResource：预约条目内关联资源（仅 ID 与占用，详情由设备端基准数据解析）
 * @see 统一 Sales 数据协议 3.4.1 resources
 */
export interface ScheduleEventResource {
    /** 表单 ID。来源：ScheduleEventResource.form_id */
    form_id: number;
    /** 关联类型（如 form）。来源：ScheduleEventResource.relation_type */
    relation_type: string;
    /** 关联资源 ID（设备端用此 ID 从本地基准数据取资源详情）。来源：ScheduleEventResource.relation_id */
    relation_id: number;
    /** 占用容量。来源：ScheduleEventResource.capacity */
    capacity: number;
    /** 特殊状态。来源：ScheduleEventResource.like_status */
    like_status?: string;
    /** 资源元数据。来源：ScheduleEventResource.metadata */
    metadata?: Record<string, unknown> | null;
    /** 子资源（组合资源场景），结构同父级 */
    children?: ScheduleEventResource[];
}
/**
 * 资源预订数据结构
 */
export interface ResourceBooking {
    id: ResourceId;
    resource_id?: ResourceId;
    resourceId?: ResourceId;
    user_id?: string | number;
    userId?: string | number;
    start_time?: string | number;
    end_time?: string | number;
    startTime?: string | number;
    endTime?: string | number;
    status?: string;
    notes?: string;
    metadata?: Record<string, any> | null;
    [key: string]: any;
}
/**
 * 资源数据结构（兼容历史数据）
 */
export interface ResourceData {
    id: ResourceId;
    form_record_id?: ResourceId;
    main_field?: string;
    form_id?: number | string;
    capacity?: number;
    like_status?: 'common' | 'like';
    type?: string;
    resourceType?: string;
    resource_form_id?: number | string | '';
    schedule?: any[] | '';
    times?: any;
    metadata?: Record<string, any> | null;
    children?: ResourceData[];
    bookings?: ResourceBooking[];
    [key: string]: any;
}
/**
 * 查询选项
 */
export interface QueryOptions {
    includeBookings?: boolean;
    [key: string]: any;
}
/**
 * Resource 模块状态
 */
export interface ResourceState {
    /** 资源列表 */
    list: ResourceData[];
    /** 资源 Map 缓存（以 id 为 key，加速查询） */
    map: Map<ResourceId, ResourceData>;
    /** 预订列表 */
    bookings: ResourceBooking[];
}
/**
 * 与 ResourceDataSource 对齐的分页查询参数
 */
export interface ResourcePageQuery {
    'ids[]'?: ResourceId[] | ResourceId;
    ids?: ResourceId[];
    num?: number | string;
    skip?: number | string;
}
/**
 * 与 ResourceDataSource 对齐的分页返回结构
 */
export interface ResourcePageResult {
    list: ResourceData[];
    count: number;
    skip: number;
    size: number;
}
/**
 * ResourceSyncMessage - pubsub 同步消息结构
 */
export interface ResourceSyncMessage {
    module?: string;
    action?: string;
    operation?: string;
    id?: ResourceId;
    ids?: ResourceId[];
    body?: Partial<ResourceData>;
    change_types?: string[];
    relation_resource_ids?: ResourceId[];
    _channelKey?: string;
}
/**
 * Resource 模块钩子
 */
export declare enum ResourceHooks {
    onResourcesLoaded = "resource:onResourcesLoaded",
    onResourcesChanged = "resource:onResourcesChanged",
    onResourcesSyncCompleted = "resource:onResourcesSyncCompleted",
    onBookingsChanged = "resource:onBookingsChanged"
}
