/** * Hostex Staffs API types */ /** * A staff member */ export interface Staff { /** Unique identifier for the staff */ id: number; /** Name of the staff */ name: string; /** Mobile number */ mobile?: string; /** Email address */ email?: string; /** Note attached to the staff */ note?: string; /** Whether the staff is active */ is_active: boolean; } /** * Staffs query parameters */ export interface StaffsQueryParams { /** The starting point from which to begin returning results */ offset?: number; /** The maximum number of results to return, max 100 */ limit?: number; /** The id of the staff */ id?: number; /** Filter by active state: 1 active only, 0 inactive only */ is_active?: 0 | 1; } /** * Staffs response data */ export interface StaffsData { staffs: Staff[]; /** Total number of staffs */ total: number; } /** * Create staff parameters */ export interface CreateStaffParams { /** Display name (max 128 characters) */ name: string; /** Mobile number; international operators use `+ ` */ mobile: string; /** Email address */ email?: string; /** Free-form note (max 500 characters) */ note?: string; /** Properties this staff can access; omit to grant all */ property_ids?: number[]; } /** * Create staff response data */ export interface CreateStaffData { /** Unique identifier of the newly created staff */ staff_id: number; } /** * Update staff parameters */ export interface UpdateStaffParams { /** The id of the staff to update */ id: number; name?: string; mobile?: string; email?: string; note?: string; /** Enable (true) or disable (false) the staff */ is_active?: boolean; /** Replaces the staff's property assignment list; empty array removes all */ property_ids?: number[]; }