// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../resource'; import { isRequestOptions } from '../../core'; import * as Core from '../../core'; import * as WorkQueueCheckAPI from './work-queue-check'; import * as DeploymentsAPI from './deployments'; export class WorkQueueCheck extends APIResource { /** * Get list of work-queues that are able to pick up the specified deployment. * * This endpoint is intended to be used by the UI to provide users warnings about * deployments that are unable to be executed because there are no work queues that * will pick up their runs, based on existing filter criteria. It may be deprecated * in the future because there is not a strict relationship between work queues and * deployments. */ list( id: string, params?: WorkQueueCheckListParams, options?: Core.RequestOptions, ): Core.APIPromise; list(id: string, options?: Core.RequestOptions): Core.APIPromise; list( id: string, params: WorkQueueCheckListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, ): Core.APIPromise { if (isRequestOptions(params)) { return this.list(id, {}, params); } const { 'x-prefect-api-version': xPrefectAPIVersion } = params; return this._client.get(`/api/deployments/${id}/work_queue_check`, { ...options, headers: { ...(xPrefectAPIVersion != null ? { 'x-prefect-api-version': xPrefectAPIVersion } : undefined), ...options?.headers, }, }); } } export type WorkQueueCheckListResponse = Array; export interface WorkQueueCheckListParams { 'x-prefect-api-version'?: string; } export namespace WorkQueueCheck { export import WorkQueueCheckListResponse = WorkQueueCheckAPI.WorkQueueCheckListResponse; export import WorkQueueCheckListParams = WorkQueueCheckAPI.WorkQueueCheckListParams; }