import { APIResource } from "../resource.js"; import * as Core from "../core.js"; import * as ConcurrencyLimitsV2API from "./concurrency-limits-v2.js"; import * as Shared from "./shared.js"; export declare class ConcurrencyLimitsV2 extends APIResource { /** * Create Concurrency Limit V2 */ create(params: ConcurrencyLimitsV2CreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Read Concurrency Limit V2 */ retrieve(idOrName: string, params?: ConcurrencyLimitsV2RetrieveParams, options?: Core.RequestOptions): Core.APIPromise; retrieve(idOrName: string, options?: Core.RequestOptions): Core.APIPromise; /** * Update Concurrency Limit V2 */ update(idOrName: string, params: ConcurrencyLimitsV2UpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Delete Concurrency Limit V2 */ delete(idOrName: string, params?: ConcurrencyLimitsV2DeleteParams, options?: Core.RequestOptions): Core.APIPromise; delete(idOrName: string, options?: Core.RequestOptions): Core.APIPromise; /** * Bulk Decrement Active Slots */ decrement(params: ConcurrencyLimitsV2DecrementParams, options?: Core.RequestOptions): Core.APIPromise; /** * Read All Concurrency Limits V2 */ filter(params?: ConcurrencyLimitsV2FilterParams, options?: Core.RequestOptions): Core.APIPromise; filter(options?: Core.RequestOptions): Core.APIPromise; /** * Bulk Increment Active Slots */ increment(params: ConcurrencyLimitsV2IncrementParams, options?: Core.RequestOptions): Core.APIPromise; } /** * An ORM representation of a v2 concurrency limit. */ export interface ConcurrencyLimitV2 { /** * The concurrency limit. */ limit: number; /** * The name of the concurrency limit. */ name: string; id?: string; /** * Whether the concurrency limit is active. */ active?: boolean; /** * The number of active slots. */ active_slots?: number; /** * The average amount of time a slot is occupied. */ avg_slot_occupancy_seconds?: number; created?: string | null; /** * The number of denied slots. */ denied_slots?: number; /** * The decay rate for active slots when used as a rate limit. */ slot_decay_per_second?: number; updated?: string | null; } /** * A response object for global concurrency limits. */ export interface GlobalConcurrencyLimitResponse { /** * The number of active slots. */ active_slots: number; /** * The concurrency limit. */ limit: number; /** * The name of the global concurrency limit. */ name: string; id?: string; /** * Whether the global concurrency limit is active. */ active?: boolean; created?: string | null; /** * The decay rate for active slots when used as a rate limit. */ slot_decay_per_second?: number; updated?: string | null; } export type ConcurrencyLimitsV2DecrementResponse = Array; export type ConcurrencyLimitsV2FilterResponse = Array; export type ConcurrencyLimitsV2IncrementResponse = Array; export interface ConcurrencyLimitsV2CreateParams { /** * Body param: The concurrency limit. */ limit: number; /** * Body param: The name of the concurrency limit. */ name: string; /** * Body param: Whether the concurrency limit is active. */ active?: boolean; /** * Body param: The number of active slots. */ active_slots?: number; /** * Body param: The number of denied slots. */ denied_slots?: number; /** * Body param: The decay rate for active slots when used as a rate limit. */ slot_decay_per_second?: number; /** * Header param: */ 'x-prefect-api-version'?: string; } export interface ConcurrencyLimitsV2RetrieveParams { 'x-prefect-api-version'?: string; } export interface ConcurrencyLimitsV2UpdateParams { /** * Body param: */ active?: boolean | null; /** * Body param: */ active_slots?: number | null; /** * Body param: */ denied_slots?: number | null; /** * Body param: */ limit?: number | null; /** * Body param: */ name?: string | null; /** * Body param: */ slot_decay_per_second?: number | null; /** * Header param: */ 'x-prefect-api-version'?: string; } export interface ConcurrencyLimitsV2DeleteParams { 'x-prefect-api-version'?: string; } export interface ConcurrencyLimitsV2DecrementParams { /** * Body param: */ names: Array; /** * Body param: */ slots: number; /** * Body param: */ create_if_missing?: boolean; /** * Body param: */ occupancy_seconds?: number | null; /** * Header param: */ 'x-prefect-api-version'?: string; } export interface ConcurrencyLimitsV2FilterParams { /** * Body param: Defaults to PREFECT_API_DEFAULT_LIMIT if not provided. */ limit?: number; /** * Body param: */ offset?: number; /** * Header param: */ 'x-prefect-api-version'?: string; } export interface ConcurrencyLimitsV2IncrementParams { /** * Body param: */ names: Array; /** * Body param: */ slots: number; /** * Body param: */ create_if_missing?: boolean; /** * Body param: */ mode?: 'concurrency' | 'rate_limit'; /** * Header param: */ 'x-prefect-api-version'?: string; } export declare namespace ConcurrencyLimitsV2 { export import ConcurrencyLimitV2 = ConcurrencyLimitsV2API.ConcurrencyLimitV2; export import GlobalConcurrencyLimitResponse = ConcurrencyLimitsV2API.GlobalConcurrencyLimitResponse; export import ConcurrencyLimitsV2DecrementResponse = ConcurrencyLimitsV2API.ConcurrencyLimitsV2DecrementResponse; export import ConcurrencyLimitsV2FilterResponse = ConcurrencyLimitsV2API.ConcurrencyLimitsV2FilterResponse; export import ConcurrencyLimitsV2IncrementResponse = ConcurrencyLimitsV2API.ConcurrencyLimitsV2IncrementResponse; export import ConcurrencyLimitsV2CreateParams = ConcurrencyLimitsV2API.ConcurrencyLimitsV2CreateParams; export import ConcurrencyLimitsV2RetrieveParams = ConcurrencyLimitsV2API.ConcurrencyLimitsV2RetrieveParams; export import ConcurrencyLimitsV2UpdateParams = ConcurrencyLimitsV2API.ConcurrencyLimitsV2UpdateParams; export import ConcurrencyLimitsV2DeleteParams = ConcurrencyLimitsV2API.ConcurrencyLimitsV2DeleteParams; export import ConcurrencyLimitsV2DecrementParams = ConcurrencyLimitsV2API.ConcurrencyLimitsV2DecrementParams; export import ConcurrencyLimitsV2FilterParams = ConcurrencyLimitsV2API.ConcurrencyLimitsV2FilterParams; export import ConcurrencyLimitsV2IncrementParams = ConcurrencyLimitsV2API.ConcurrencyLimitsV2IncrementParams; } //# sourceMappingURL=concurrency-limits-v2.d.ts.map