import { BaseApi } from "../base-api"; import type { ApiRecordsV2, OffsetPagination } from "../types"; import type { BaseJob, CalculateAffectedRowsInput, CalculateAffectedRowsJob, CollectAccessRulesBillingDataInput, CollectAccessRulesBillingDataJob, CollectAccessRulesBillingDataResult, ColumnDetails, ColumnStatDataType, CostsInput, CostsJob, CreateTableInput, DatasetsCalculateColumnStatsJob, DatasetsCreateTableJob, DatasetsDeleteTableJob, DatasetsDeliverDataJob, DatasetsEnforceRowTtlRetentionPolicyJob, DatasetsEnforceTableTtlRetentionPolicyJob, DatasetsExecuteDmlJob, DatasetsExecuteSelectJob, DatasetsSampleJob, DatasetsSuggestMappingsJob, DatasetsTruncateTableJob, DeleteInput, DeliverInput, EnabledColumnStatFlags, EnforceRowTtlRetentionPolicyInput, EnforceTableTtlRetentionPolicyInput, ExecuteDmlInput, ExecuteDmlResult, ExecuteSelectInput, ExecuteSelectResult, ExplainInput, ExplainJob, ExplainOutput, ForecastInput, ForecastInternalJob, ForecastJob, HealthCheckJob, Job, JobExecutionCluster, JobRequestSource, JobRequestSourceApiUser, JobRequestSourceProcess, JobType, KnownJob, MaterializedViewInput, MaterializedViewJob, MaterializedViewOutput, MaterializedViewRowStats, ModelInferenceRunInput, ModelInferenceRunJob, ModelInferenceRunJobResult, ModelsDeliverModelInput, ModelsDeliverModelJob, ModelsTrainClassifierJob, ModelTrainingRunInput, ModelTrainingRunJob, RefreshMaterializedViewResult, SampleInput, StatsInput, StatsInputV2, SuggestMappingsInput, SuggestMappingsResult, TruncateTableInput, UnknownJob } from "./types"; import { isKnownJob, KNOWN_JOB_TYPES } from "./types"; type JobStateFilter = "cancelled" | "completed" | "failed" | "pending" | "pending_cancellation" | "running" | "scheduled"; interface GetJobsParameters extends OffsetPagination { data_plane_id?: string; dataset_id?: number; order_by?: "created_at_asc" | "created_at_desc" | "updated_at_asc" | "updated_at_desc"; state?: JobStateFilter | JobStateFilter[]; type?: string | string[]; tag?: string | string[]; } /** * @module JobsApi * @description This module provides methods for fetching jobs records. * @extends BaseApi */ declare class JobsApi extends BaseApi { /** * Get all jobs for the current company * @returns {Promise>} - Promise resolving with a page of jobs plus pagination * metadata (current_page, total_pages, total_records, prev_page, next_page). */ getJobs(parameters?: GetJobsParameters): Promise>; /** * Get a specific job by id * @returns {Promise} - Promise resolving with the job. */ getJob(jobId: string): Promise; /** * Requests cancellation of a job by id, moving a `pending`/`running` job to * `pending_cancellation` so the data plane can stop the work. Use the `jobs/{id}/cancel` * endpoint (not yet exposed by this SDK) to finalize cancellation afterwards. * @returns {Promise} - Promise resolving with the job's state after the request. */ cancelJob(jobId: string): Promise; } export { type BaseJob, type CalculateAffectedRowsInput, type CalculateAffectedRowsJob, type CollectAccessRulesBillingDataInput, type CollectAccessRulesBillingDataJob, type CollectAccessRulesBillingDataResult, type ColumnDetails, type ColumnStatDataType, type CostsInput, type CostsJob, type CreateTableInput, type DatasetsCalculateColumnStatsJob, type DatasetsCreateTableJob, type DatasetsDeleteTableJob, type DatasetsDeliverDataJob, type DatasetsEnforceRowTtlRetentionPolicyJob, type DatasetsEnforceTableTtlRetentionPolicyJob, type DatasetsExecuteDmlJob, type DatasetsExecuteSelectJob, type DatasetsSampleJob, type DatasetsSuggestMappingsJob, type DatasetsTruncateTableJob, type DeleteInput, type DeliverInput, type EnabledColumnStatFlags, type EnforceRowTtlRetentionPolicyInput, type EnforceTableTtlRetentionPolicyInput, type ExecuteDmlInput, type ExecuteDmlResult, type ExecuteSelectInput, type ExecuteSelectResult, type ExplainInput, type ExplainJob, type ExplainOutput, type ForecastInput, type ForecastInternalJob, type ForecastJob, type GetJobsParameters, type HealthCheckJob, isKnownJob, type Job, type JobExecutionCluster, type JobRequestSource, type JobRequestSourceApiUser, type JobRequestSourceProcess, type JobStateFilter, JobsApi, type JobType, KNOWN_JOB_TYPES, type KnownJob, type MaterializedViewInput, type MaterializedViewJob, type MaterializedViewOutput, type MaterializedViewRowStats, type ModelInferenceRunInput, type ModelInferenceRunJob, type ModelInferenceRunJobResult, type ModelsDeliverModelInput, type ModelsDeliverModelJob, type ModelsTrainClassifierJob, type ModelTrainingRunInput, type ModelTrainingRunJob, type RefreshMaterializedViewResult, type SampleInput, type StatsInput, type StatsInputV2, type SuggestMappingsInput, type SuggestMappingsResult, type TruncateTableInput, type UnknownJob, };