import { J as Json, S as SdkModule } from '../../module-Bq-w9Ws5.js'; import 'graphql-request'; type JobStatus = 'ACTIVE' | 'ARCHIVED' | 'DISABLED' | 'ERROR' | 'PAUSED' | 'PENDING' | 'RUNNING'; type ScheduleType = 'CRON' | 'INTERVAL' | 'ONE_TIME' | 'RRULE'; interface ScheduledJob { id: string; name: string; description?: string | null; scheduleType: ScheduleType; cronExpression?: string | null; interval?: number | null; intervalUnit?: string | null; rrule?: string | null; timezone?: string | null; startDate?: string | null; endDate?: string | null; status: JobStatus; workspaceId: string; metadata?: Json; payload?: Json; createdAt: string; updatedAt: string; } interface ScheduledJobConnection { edges: Array<{ cursor: string; node: ScheduledJob; }>; totalCount: number; pageInfo: { hasNextPage: boolean; endCursor?: string | null; }; } interface CreateScheduledJobInput { name: string; scheduleType: ScheduleType; description?: string; cronExpression?: string; interval?: number; intervalUnit?: string; rrule?: string; timezone?: string; startDate?: string; endDate?: string; metadata?: Json; payload?: Json; } interface UpdateScheduledJobInput { name?: string; description?: string; scheduleType?: ScheduleType; cronExpression?: string; interval?: number; intervalUnit?: string; rrule?: string; timezone?: string; startDate?: string; endDate?: string; status?: JobStatus; metadata?: Json; payload?: Json; } interface JobFilterInput { status?: JobStatus; scheduleType?: ScheduleType; search?: string; } interface SchedulerPaginationInput { cursor?: string; limit?: number; offset?: number; sortBy?: string; sortOrder?: 'asc' | 'desc'; } interface JobExecution { id: string; scheduleId: string; status: string; attemptNumber: number; startedAt?: string | null; completedAt?: string | null; errorMessage?: string | null; result?: Json; createdAt: string; updatedAt: string; } interface JobExecutionConnection { edges: Array<{ cursor: string; node: JobExecution; }>; totalCount: number; pageInfo: { hasNextPage: boolean; endCursor?: string | null; }; } interface SchedulePreview { count: number; startDate: string; endDate: string; nextExecutions: string[]; } interface PreviewScheduleInput { scheduleType: ScheduleType | string; cronExpression?: string; rrule?: string; interval?: number; intervalUnit?: string; count?: number; startDate?: string; endDate?: string; timezone?: string; } interface ScheduleTemplate { id: string; name: string; description?: string | null; category?: string | null; isPublic: boolean; scheduleType: string; executorType: string; scheduleConfig: Json; executorConfig: Json; payloadTemplate?: Json; retryPolicy?: Json; failurePolicy?: Json; circuitBreaker?: Json; businessCalendarId?: string | null; workspaceId: string; createdBy: string; createdAt: string; updatedAt: string; usageCount: number; } interface ScheduleTemplateConnection { templates: ScheduleTemplate[]; total: number; nextCursor?: string | null; } interface ScheduleTemplateFilterInput { category?: string; createdBy?: string; executorType?: string; isPublic?: boolean; scheduleType?: string; search?: string; } interface CreateScheduleTemplateInput { name: string; scheduleType: string; executorType: string; scheduleConfig: Json; executorConfig: Json; description?: string; category?: string; isPublic?: boolean; businessCalendarId?: string; circuitBreaker?: Json; failurePolicy?: Json; payloadTemplate?: Json; retryPolicy?: Json; } interface UpdateScheduleTemplateInput { name?: string; description?: string; category?: string; isPublic?: boolean; businessCalendarId?: string; circuitBreaker?: Json; failurePolicy?: Json; payloadTemplate?: Json; retryPolicy?: Json; scheduleConfig?: Json; executorConfig?: Json; } interface ScheduledJobTagAssignment { id: string; entityId: string; entityType: string; tagId: string; source: string; assignedAt?: string | null; assignedBy?: string | null; } interface TagScheduledJobInput { entityId: string; tagId: string; source?: string; } interface UntagScheduledJobInput { entityId: string; tagId: string; } interface ReplaceScheduledJobTagsInput { entityId: string; tagIds: string[]; } interface GetScheduledJobTagsInput { entityId: string; } interface ScheduleVersion { id: string; scheduleId: string; version: number; changedBy: string; changedFields: string[]; changeReason?: string | null; config: Json; context?: Json; createdAt: string; } interface ExecutionUpdate { executionId: string; scheduleId: string; status: JobStatus; success: boolean; timestamp: string; duration?: number | null; error?: string | null; output?: Json; progress?: number | null; } interface JobStatusUpdate { scheduleId: string; scheduleName?: string | null; status: JobStatus; previousStatus?: JobStatus | null; lastExecutionAt?: string | null; nextExecutionAt?: string | null; metadata?: Json; timestamp: string; } interface ExecutionsApi { list(jobId: string, pagination?: SchedulerPaginationInput): Promise; get(id: string): Promise; retry(executionId: string): Promise; updatedSubscription(): { query: string; variablesFor(args: { workspaceId: string; scheduleId?: string; executionId?: string; }): Record; }; } interface JobsApi { list(workspaceId: string, filter?: JobFilterInput, pagination?: SchedulerPaginationInput): Promise; get(id: string): Promise; create(workspaceId: string, input: CreateScheduledJobInput): Promise; update(id: string, input: UpdateScheduledJobInput): Promise; delete(id: string): Promise; pause(id: string): Promise; resume(id: string): Promise; activate(id: string): Promise; archive(id: string): Promise; disable(id: string, reason?: string): Promise; clone(args: { sourceId: string; newWorkspaceId?: string; overrides?: CreateScheduledJobInput; }): Promise; executeNow(id: string): Promise; preview(input: PreviewScheduleInput): Promise; statusUpdatedSubscription(): { query: string; variablesFor(args: { workspaceId: string; scheduleId?: string; }): Record; }; } interface ScheduledJobTagsApi { add(input: TagScheduledJobInput): Promise; remove(input: UntagScheduledJobInput): Promise; replace(input: ReplaceScheduledJobTagsInput): Promise; list(input: GetScheduledJobTagsInput): Promise; } interface TemplatesApi { list(workspaceId: string, filter?: ScheduleTemplateFilterInput, pagination?: SchedulerPaginationInput): Promise; listPublic(filter?: ScheduleTemplateFilterInput, pagination?: SchedulerPaginationInput): Promise; get(id: string): Promise; create(workspaceId: string, input: CreateScheduleTemplateInput): Promise; update(id: string, input: UpdateScheduleTemplateInput): Promise; delete(id: string): Promise; createScheduleFromTemplate(args: { templateId: string; workspaceId: string; overrides?: CreateScheduledJobInput; }): Promise; } interface VersionsApi { history(scheduleId: string): Promise; restore(scheduleId: string, versionId: string): Promise; } interface SchedulerApi { jobs: JobsApi; executions: ExecutionsApi; templates: TemplatesApi; tags: ScheduledJobTagsApi; versions: VersionsApi; } declare const schedulerModule: SdkModule; export { type CreateScheduleTemplateInput, type CreateScheduledJobInput, type ExecutionUpdate, type ExecutionsApi, type GetScheduledJobTagsInput, type JobExecution, type JobExecutionConnection, type JobFilterInput, type JobStatus, type JobStatusUpdate, type JobsApi, type PreviewScheduleInput, type ReplaceScheduledJobTagsInput, type SchedulePreview, type ScheduleTemplate, type ScheduleTemplateConnection, type ScheduleTemplateFilterInput, type ScheduleType, type ScheduleVersion, type ScheduledJob, type ScheduledJobConnection, type ScheduledJobTagAssignment, type ScheduledJobTagsApi, type SchedulerApi, type SchedulerPaginationInput, type TagScheduledJobInput, type TemplatesApi, type UntagScheduledJobInput, type UpdateScheduleTemplateInput, type UpdateScheduledJobInput, type VersionsApi, schedulerModule as default };