basant307/AI_Governance_Project
048
1// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.2import { APIResource } from "../core/resource.mjs";3import { CursorPage } from "../core/pagination.mjs";4import { path } from "../internal/utils/path.mjs";5export class Batches extends APIResource {6 /**7 * Creates and executes a batch from an uploaded file of requests8 */9 create(body, options) {10 return this._client.post('/batches', { body, ...options });11 }12 /**13 * Retrieves a batch.14 */15 retrieve(batchID, options) {16 return this._client.get(path `/batches/${batchID}`, options);17 }18 /**19 * List your organization's batches.20 */21 list(query = {}, options) {22 return this._client.getAPIList('/batches', (CursorPage), { query, ...options });23 }24 /**25 * Cancels an in-progress batch. The batch will be in status `cancelling` for up to26 * 10 minutes, before changing to `cancelled`, where it will have partial results27 * (if any) available in the output file.28 */29 cancel(batchID, options) {30 return this._client.post(path `/batches/${batchID}/cancel`, options);31 }32}33//# sourceMappingURL=batches.mjs.map