Skip to main content

Types Reference

This page provides complete TypeScript type definitions for all interfaces and types used in the Cronhost SDK.

Configuration Types

CronhostConfig

Configuration object for initializing the Cronhost client.

Core Entity Types

Schedule

Represents a scheduled HTTP request configuration.

Job

Represents an individual execution of a scheduled HTTP request.

Input Types

CreateScheduleData

Data required to create a new schedule.

UpdateScheduleData

Data for updating an existing schedule. All fields are optional.

GetJobsParams

Parameters for filtering and paginating a schedule’s job history.

JobsPage

Paginated result returned by getJobs.

Response Types

ApiResponse<T>

Generic wrapper for successful API responses.

ApiError

Structure for API error responses.

Notification Types

NotificationChannel

A destination that receives schedule alerts. Secrets (webhook URLs, bot tokens) are never returned.

CreateNotificationChannelData

Discriminated union on type; the config shape depends on the channel type.

UpdateNotificationChannelData

The channel type is immutable; only the label and/or config can change.

Schedule notification preferences

Enum Types

Job Status

HTTP Methods

Usage Examples

Type-safe Schedule Creation

Type-safe Job Monitoring

Custom Type Guards