import * as Schema from "effect/Schema";
import { API } from "../../client.js";
import * as T from "../../traits.js";
import { BadRequest, Forbidden, NotFound } from "../../errors.js";
// Input Schema
export const BatchExportsBackfillsCancelCreateInput = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    batch_export_id: Schema.String.pipe(T.PathParam()),
    id: Schema.String.pipe(T.PathParam()),
    project_id: Schema.String.pipe(T.PathParam()),
    progress: Schema.optional(Schema.NullOr(Schema.Struct({
        total_runs: Schema.optional(Schema.NullOr(Schema.Number)),
        finished_runs: Schema.optional(Schema.NullOr(Schema.Number)),
        progress: Schema.optional(Schema.NullOr(Schema.Number)),
    }))),
    start_at: Schema.optional(Schema.NullOr(Schema.String)),
    end_at: Schema.optional(Schema.NullOr(Schema.String)),
    status: Schema.optional(Schema.Literals([
        "Cancelled",
        "Completed",
        "ContinuedAsNew",
        "Failed",
        "FailedRetryable",
        "Terminated",
        "TimedOut",
        "Running",
        "Starting",
    ])),
    created_at: Schema.optional(Schema.String),
    finished_at: Schema.optional(Schema.NullOr(Schema.String)),
    last_updated_at: Schema.optional(Schema.String),
    total_records_count: Schema.optional(Schema.NullOr(Schema.Number)),
    adjusted_start_at: Schema.optional(Schema.NullOr(Schema.String)),
    team: Schema.optional(Schema.Number),
    batch_export: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "POST",
    path: "/api/projects/{project_id}/batch_exports/{batch_export_id}/backfills/{id}/cancel/",
}));
// Output Schema
export const BatchExportsBackfillsCancelCreateOutput = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Void;
// The operation
/**
 * Cancel a batch export backfill.
 *
 * @param id - A UUID string identifying this batch export backfill.
 * @param project_id - Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
 */
export const batchExportsBackfillsCancelCreate = 
/*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    inputSchema: BatchExportsBackfillsCancelCreateInput,
    outputSchema: BatchExportsBackfillsCancelCreateOutput,
    errors: [BadRequest, Forbidden, NotFound],
}));
//# sourceMappingURL=batchExportsBackfillsCancelCreate.js.map