import { GatewayClient } from "./client.js"; export type ScheduleKind = "schedule_cron" | "schedule_once" | "event" | "webhook"; export type ScheduleStatus = "active" | "paused" | "completed" | "disabled"; export interface SchedulePolicy { catchupPolicy?: "skip" | "all"; overlapPolicy?: "allow" | "skip"; jitterMs?: number; } export interface CreateScheduleOptions { definition: string; kind: ScheduleKind; input?: unknown; cron?: string; timezone?: string; startAt?: string; endAt?: string; policy?: SchedulePolicy; at?: string | Date; eventType?: string; } export interface ScheduleFireRecord { scheduledFor: string | null; receiptId?: string | null; state: string; firedAt: string | null; executionId: string | null; error?: unknown; } export interface ScheduleSummary { id: string; kind: ScheduleKind; status: ScheduleStatus; definitionSlug: string; cron: string | null; timezone: string | null; eventType: string | null; publicId: string | null; secretVersion: number | null; graceUntil: string | null; revokedAt: string | null; nextFireAt: string | null; createdAt: string; } export interface ScheduleDetail extends ScheduleSummary { input: unknown; startAt: string | null; endAt: string | null; policy: unknown; recentFires: ScheduleFireRecord[]; } export interface WebhookSecretMaterial { secret: string; url: string; } export type CreateScheduleResult = ScheduleDetail & Partial; export interface ListSchedulesOptions { definition: string; status?: ScheduleStatus; limit?: number; offset?: number; } export interface CronPreviewOptions { cron: string; timezone?: string; count?: number; } export interface CronPreview { cron: string; timezone: string; occurrences: string[]; } export declare function createSchedule(opts: CreateScheduleOptions, client: GatewayClient): Promise; export declare function listSchedules(opts: ListSchedulesOptions, client: GatewayClient): Promise; export declare function getSchedule(id: string, client: GatewayClient): Promise; export declare function cancelSchedule(id: string, client: GatewayClient): Promise<{ id: string; status: ScheduleStatus; }>; export declare function rotateScheduleSecret(id: string, client: GatewayClient): Promise; export declare function completeScheduleSecretRotation(id: string, client: GatewayClient): Promise; export declare function revokeScheduleSecret(id: string, client: GatewayClient): Promise; export declare function previewCron(opts: CronPreviewOptions, client: GatewayClient): Promise;