import { z } from "zod/v4"; /** * The type of queue, either "task" or "custom" * "task" are created automatically for each task. * "custom" are created by you explicitly in your code. * */ export declare const QueueType: z.ZodEnum<{ custom: "custom"; task: "task"; }>; export type QueueType = z.infer; export declare const RetrieveQueueType: z.ZodEnum<{ custom: "custom"; id: "id"; task: "task"; }>; export type RetrieveQueueType = z.infer; /** * The queue's `version` discriminates its shape. V1 queues carry their own * concurrency limit (applied per key when runs pass a `concurrencyKey`, to the * whole queue when they don't) and its override state. V2 queues are only the * line runs wait in: concurrency is declared with the task `concurrency` * option and read or overridden through `concurrencyLimits`. A response from a * server that predates the discriminator has V1 semantics by definition, so a * missing `version` defaults to "V1" rather than failing the parse. */ declare const QueueItemUnion: import("../utils/zod.js").CompatibleZodDiscriminatedUnion; running: z.ZodNumber; queued: z.ZodNumber; paused: z.ZodBoolean; concurrencyLimit: z.ZodNullable; version: z.ZodLiteral<"V1">; concurrency: z.ZodOptional; base: z.ZodNullable; override: z.ZodNullable; overriddenAt: z.ZodNullable>; overriddenBy: z.ZodNullable; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ id: z.ZodString; name: z.ZodString; type: z.ZodEnum<{ custom: "custom"; task: "task"; }>; running: z.ZodNumber; queued: z.ZodNumber; paused: z.ZodBoolean; concurrencyLimit: z.ZodNullable; version: z.ZodLiteral<"V2">; concurrency: z.ZodOptional; }, z.core.$strip>]>; export declare const QueueItem: z.ZodType<{ id: string; name: string; type: "custom" | "task"; running: number; queued: number; paused: boolean; concurrencyLimit: number | null; version: "V1"; concurrency?: { current: number | null; base: number | null; override: number | null; overriddenAt: Date | null; overriddenBy: string | null; } | undefined; } | { id: string; name: string; type: "custom" | "task"; running: number; queued: number; paused: boolean; concurrencyLimit: number | null; version: "V2"; concurrency?: undefined; }, unknown, z.core.$ZodTypeInternals<{ id: string; name: string; type: "custom" | "task"; running: number; queued: number; paused: boolean; concurrencyLimit: number | null; version: "V1"; concurrency?: { current: number | null; base: number | null; override: number | null; overriddenAt: Date | null; overriddenBy: string | null; } | undefined; } | { id: string; name: string; type: "custom" | "task"; running: number; queued: number; paused: boolean; concurrencyLimit: number | null; version: "V2"; concurrency?: undefined; }, unknown>>; export type QueueItem = z.infer; export declare const ListQueueOptions: z.ZodObject<{ page: z.ZodOptional; perPage: z.ZodOptional; }, z.core.$strip>; export type ListQueueOptions = z.infer; export declare const QueueTypeName: z.ZodObject<{ type: z.ZodEnum<{ custom: "custom"; task: "task"; }>; name: z.ZodString; }, z.core.$strip>; export type QueueTypeName = z.infer; /** * When retrieving a queue you can either use the queue id, * or the type and name. * * @example * * ```ts * // Use a queue id (they start with queue_ * const q1 = await queues.retrieve("queue_12345"); * * // Or use the type and name * // The default queue for your "my-task-id" * const q2 = await queues.retrieve({ type: "task", name: "my-task-id"}); * * // The custom queue you defined in your code * const q3 = await queues.retrieve({ type: "custom", name: "my-custom-queue" }); * ``` */ export declare const RetrieveQueueParam: z.ZodUnion; name: z.ZodString; }, z.core.$strip>]>; export type RetrieveQueueParam = z.infer; /** One bound of a concurrency limit: the enforced value, the declared base, and * any active override. `current` is the cap this bound enforces right now (the * stored value clamped to the environment concurrency limit). Pausing an * environment or queue stops dequeues without changing its configured bounds, * so pause state is reported separately, never as a `current` of 0. */ export declare const ConcurrencyLimitBound: z.ZodObject<{ current: z.ZodNullable; base: z.ZodNullable; override: z.ZodNullable; overriddenAt: z.ZodNullable>; }, z.core.$strip>; export type ConcurrencyLimitBound = z.infer; export declare const ConcurrencyLimitItem: z.ZodObject<{ id: z.ZodString; name: z.ZodString; perKey: z.ZodObject<{ current: z.ZodNullable; base: z.ZodNullable; override: z.ZodNullable; overriddenAt: z.ZodNullable>; }, z.core.$strip>; total: z.ZodObject<{ current: z.ZodNullable; base: z.ZodNullable; override: z.ZodNullable; overriddenAt: z.ZodNullable>; }, z.core.$strip>; running: z.ZodNumber; queued: z.ZodNumber; paused: z.ZodDefault; }, z.core.$strip>; export type ConcurrencyLimitItem = z.infer; export declare const ListConcurrencyLimitOptions: z.ZodObject<{ page: z.ZodOptional; perPage: z.ZodOptional; }, z.core.$strip>; export type ListConcurrencyLimitOptions = z.infer; /** Changes only the given bounds of the limit itself. Zero blocks every run holding * the limit, which is how a limit is paused; `reset` restores the declared values. */ export declare const OverrideConcurrencyLimitBoundsBody: z.ZodObject<{ perKey: z.ZodOptional; total: z.ZodOptional; concurrencyKey: z.ZodOptional; ttl: z.ZodOptional; }, z.core.$strip>; export type OverrideConcurrencyLimitBoundsBody = z.infer; /** A temporary per-key cap on this limit's `perKey` for one concurrencyKey: `0` * blocks the key, and the override expires after `ttl` (a duration such as `"7d"` * or a number of seconds; default 7 days, at most 30 days). `total` is not per key, * so it cannot be given here. `reset` with the same `concurrencyKey` clears it. */ export declare const OverrideConcurrencyLimitKeyBody: z.ZodObject<{ concurrencyKey: z.ZodPipe, z.ZodTransform>, z.ZodString>; perKey: z.ZodNumber; ttl: z.ZodOptional>; total: z.ZodOptional; }, z.core.$strip>; export type OverrideConcurrencyLimitKeyBody = z.infer; /** Either the limit's own bounds or a per-key cap, told apart by `concurrencyKey`. * The output type is the union of the two shapes above, so `total` with a key, a key * without `perKey`, and `ttl` without a key are type errors for SDK callers. Parsing * goes through one flat object with cross-field checks rather than a `z.union`, so an * HTTP caller gets a single message naming the field at fault instead of the failures * of both branches. */ export declare const OverrideConcurrencyLimitRequestBody: z.ZodPipe; total: z.ZodOptional; concurrencyKey: z.ZodOptional, z.ZodTransform>, z.ZodString>>; ttl: z.ZodOptional>; }, z.core.$strip>, z.ZodTransform<{ perKey?: number | undefined; total?: number | undefined; concurrencyKey?: undefined; ttl?: undefined; } | { concurrencyKey: string; perKey: number; ttl?: string | number | undefined; total?: undefined; }, { perKey?: number | undefined; total?: number | undefined; concurrencyKey?: string | undefined; ttl?: string | number | undefined; }>>; export type OverrideConcurrencyLimitRequestBody = z.infer; /** `reset` with a `concurrencyKey` clears that key's override and leaves the limit * itself alone; without one it resets the limit's own override. */ export declare const ResetConcurrencyLimitRequestBody: z.ZodObject<{ concurrencyKey: z.ZodOptional, z.ZodTransform>, z.ZodString>>; }, z.core.$strip>; export type ResetConcurrencyLimitRequestBody = z.infer; export declare const RetrieveConcurrencyLimitOptions: z.ZodObject<{ concurrencyKey: z.ZodOptional, z.ZodTransform>, z.ZodString>>; }, z.core.$strip>; export type RetrieveConcurrencyLimitOptions = z.infer; /** The per-key bound of a limit for one concurrencyKey: `base` is the limit's own * `perKey` as enforced, `override` the key's temporary cap, `current` whichever * applies right now (env-clamped). A paused limit still reports its bounds. */ export declare const ConcurrencyLimitKeyBound: z.ZodObject<{ current: z.ZodNullable; base: z.ZodNullable; override: z.ZodNullable; expiresAt: z.ZodNullable>; }, z.core.$strip>; export type ConcurrencyLimitKeyBound = z.infer; export declare const ConcurrencyLimitKeyItem: z.ZodObject<{ name: z.ZodString; concurrencyKey: z.ZodString; perKey: z.ZodObject<{ current: z.ZodNullable; base: z.ZodNullable; override: z.ZodNullable; expiresAt: z.ZodNullable>; }, z.core.$strip>; running: z.ZodNumber; paused: z.ZodBoolean; }, z.core.$strip>; export type ConcurrencyLimitKeyItem = z.infer; export {};