/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import { Scale } from "../../../.."; export declare namespace Tasks { interface Options { environment?: environments.ScaleEnvironment | string; token?: core.Supplier; } } export declare class Tasks { private readonly options; constructor(options: Tasks.Options); /** * This API endpoint retrieves a specific task. */ get(taskId: string): Promise; /** * This is a paginated endpoint that retrieves a list of your tasks. The tasks will be returned in descending order based on `created_at` time. All time filters expect an [ISO 8601-formatted string](https://timestampgenerator.com/), like '2021-04-25' or '2021-04-25T03:14:15-07:00' The pagination is based on the `limit` and `next_token` parameters, which determine the page size and the current page we are on. The value of `next_token` is a unique pagination token for each page ([nerdy details if you were curious](https://www.mixmax.com/engineering/api-paging-built-the-right-way/)). Make the call again using the returned token to retrieve the next page. */ list(request?: Scale.ListTasksRequest): Promise; /** * This endpoint cancels a task so that it will not be completed. You may only cancel pending tasks, and the endpoint will return a 400 error code if you attempt to cancel a completed task If the task to be cancled had a unique id, specifying `clear_unique_id=true` will remove the unique id. Canceling tasks is idempotent such that calling this endpoint multiple times will still return a 200 success response. */ cancel(taskId: string, request?: Scale.CancelTasksRequest): Promise; /** * This endpoint sets the `metadata` field on a task. You may set the `metadata` field on any existing task using valid key-value data. Updating a task's `metadata` field is idempotent such that calling this endpoint multiple times will still return a 200 success response. */ setMetadata(taskId: string, request: Scale.SetTaskMetadataRequest): Promise; }