import * as z from "zod/v4-mini"; import * as models from "../index.js"; import { ModerationAPIError } from "./moderation-api-error.js"; /** * The API key cannot do this, or the plan limit for this resource is reached. */ export type PermissionDeniedErrorData = { /** * Broad error category. Stable; safe to switch on. */ type: "permission_error"; /** * Exactly what went wrong. Stable; safe to branch on. New codes may be added. * * @remarks * * - `permission_denied`: The API key cannot perform this request. * - `account_disabled`: The organization account is disabled. * - `quota_exceeded`: The organization has used all API requests on its plan. * - `plan_feature_unavailable`: The current plan does not include this feature. * - `plan_limit_exceeded`: The request goes over a limit of the current plan. * - `organization_key_required`: This endpoint needs an organization API key, but a project key was used. * - `missing_key_permission`: The organization key does not have the permission this endpoint needs. * - `project_not_reachable`: The organization key is limited to other projects. */ code: models.PermissionDeniedErrorCode; /** * Human-readable explanation. */ message: string; /** * Validation problems, when the request body is invalid. */ issues?: Array | undefined; /** * Identifies this request. Include it when you contact support. */ requestId: string; /** * Documentation for this `code`. */ docUrl: string; }; /** * The API key cannot do this, or the plan limit for this resource is reached. */ export declare class PermissionDeniedError extends ModerationAPIError { /** * Broad error category. Stable; safe to switch on. */ type: "permission_error"; /** * Exactly what went wrong. Stable; safe to branch on. New codes may be added. * * @remarks * * - `permission_denied`: The API key cannot perform this request. * - `account_disabled`: The organization account is disabled. * - `quota_exceeded`: The organization has used all API requests on its plan. * - `plan_feature_unavailable`: The current plan does not include this feature. * - `plan_limit_exceeded`: The request goes over a limit of the current plan. * - `organization_key_required`: This endpoint needs an organization API key, but a project key was used. * - `missing_key_permission`: The organization key does not have the permission this endpoint needs. * - `project_not_reachable`: The organization key is limited to other projects. */ code: models.PermissionDeniedErrorCode; /** * Validation problems, when the request body is invalid. */ issues?: Array | undefined; /** * Identifies this request. Include it when you contact support. */ requestId: string; /** * Documentation for this `code`. */ docUrl: string; /** The original data that was passed to this error instance. */ data$: PermissionDeniedErrorData; constructor(err: PermissionDeniedErrorData, httpMeta: { response: Response; request: Request; body: string; }); } /** @internal */ export declare const PermissionDeniedError$inboundSchema: z.ZodMiniType; //# sourceMappingURL=permission-denied-error.d.ts.map