UNPKG

@brandcast_app/zoomshift-api-client

Version:

Unofficial TypeScript/JavaScript client for ZoomShift employee scheduling API (reverse-engineered)

77 lines (76 loc) 2 kB
/** * Type definitions for ZoomShift API Client */ /** * Client configuration options */ export interface ZoomShiftClientOptions { /** Enable debug logging */ debug?: boolean; /** Request timeout in milliseconds (default: 30000) */ timeout?: number; /** Custom user agent string */ userAgent?: string; } /** * Authentication response from ZoomShift */ export interface ZoomShiftAuthResponse { /** Whether authentication was successful */ authenticated: boolean; /** The schedule ID that was authenticated */ scheduleId: string; /** The username/email used for authentication */ userName: string; } /** * Employee shift information */ export interface ZoomShiftShift { /** Unique shift ID */ id: string; /** Employee's full name */ employeeName: string; /** Employee's unique ID */ employeeId: string; /** Job role/position for this shift */ role: string; /** Shift start time (ISO 8601 format) */ startTime: string; /** Shift end time (ISO 8601 format) */ endTime: string; /** Shift duration in hours */ duration: number; /** Break duration in hours (optional) */ breakDuration?: number; /** Work location (optional) */ location?: string; /** Additional notes (optional) */ notes?: string; /** Shift status */ status: 'scheduled' | 'in_progress' | 'completed' | 'cancelled'; } /** * Request parameters for fetching shifts */ export interface GetShiftsRequest { /** Start date in YYYY-MM-DD format */ startDate: string; /** End date in YYYY-MM-DD format */ endDate: string; /** Optional: Filter by specific employee ID */ employeeId?: string; /** Optional: Filter by location */ location?: string; } /** * Error response from ZoomShift API */ export interface ZoomShiftError { /** Error code */ code: string; /** Error message */ message: string; /** Additional error details */ details?: unknown; }