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 BatchExportsRunsCancelCreateInput = 
/*@__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()),
    status: Schema.optional(Schema.Literals([
        "Cancelled",
        "Completed",
        "ContinuedAsNew",
        "Failed",
        "FailedRetryable",
        "FailedBilling",
        "Terminated",
        "TimedOut",
        "Running",
        "Starting",
    ])),
    records_completed: Schema.optional(Schema.NullOr(Schema.Number)),
    records_failed: Schema.optional(Schema.NullOr(Schema.Number)),
    latest_error: Schema.optional(Schema.NullOr(Schema.String)),
    data_interval_start: Schema.optional(Schema.NullOr(Schema.String)),
    data_interval_end: Schema.optional(Schema.String),
    cursor: Schema.optional(Schema.NullOr(Schema.String)),
    created_at: Schema.optional(Schema.String),
    finished_at: Schema.optional(Schema.NullOr(Schema.String)),
    last_updated_at: Schema.optional(Schema.String),
    records_total_count: Schema.optional(Schema.NullOr(Schema.Number)),
    bytes_exported: Schema.optional(Schema.NullOr(Schema.Number)),
    batch_export: Schema.optional(Schema.String),
    backfill: Schema.optional(Schema.NullOr(Schema.String)),
}).pipe(T.Http({
    method: "POST",
    path: "/api/projects/{project_id}/batch_exports/{batch_export_id}/runs/{id}/cancel/",
}));
// Output Schema
export const BatchExportsRunsCancelCreateOutput = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Void;
// The operation
/**
 * Cancel a batch export run.
 *
 * @param id - A UUID string identifying this batch export run.
 * @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 batchExportsRunsCancelCreate = 
/*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    inputSchema: BatchExportsRunsCancelCreateInput,
    outputSchema: BatchExportsRunsCancelCreateOutput,
    errors: [BadRequest, Forbidden, NotFound],
}));
//# sourceMappingURL=batchExportsRunsCancelCreate.js.map