// Copyright (c) Cratis. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. import { Guid } from '@cratis/fundamentals'; import type { JobSummaryResponse, JobStepSummaryResponse } from '@cratis/chronicle.contracts'; import { JobId } from './JobId.js'; /** * Defines the API for working with jobs in Chronicle. */ export interface IJobs { /** * Stops the job with the specified identifier. * @param jobId - The job identifier. */ stop(jobId: JobId | Guid | string): Promise; /** * Resumes the job with the specified identifier. * @param jobId - The job identifier. */ resume(jobId: JobId | Guid | string): Promise; /** * Deletes the job with the specified identifier. * @param jobId - The job identifier. */ delete(jobId: JobId | Guid | string): Promise; /** * Gets a job by identifier. * @param jobId - The job identifier. * @returns The job, or undefined when not found. */ getJob(jobId: JobId | Guid | string): Promise; /** * Gets all jobs for the event store namespace. * @returns All jobs. */ getJobs(): Promise; /** * Gets all steps for a specific job. * @param jobId - The job identifier. * @returns The job steps. */ getJobSteps(jobId: JobId | Guid | string): Promise; }