/**
 * Cloudflare IMAGES API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service images
 */
import * as Schema from "effect/Schema";
import type * as HttpClient from "effect/unstable/http/HttpClient";
import * as API from "../client/api.ts";
import type { Credentials } from "../credentials.ts";
import { type DefaultErrors } from "../errors.ts";
declare const ImageAlreadyExists_base: Schema.Class<ImageAlreadyExists, Schema.TaggedStruct<"ImageAlreadyExists", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class ImageAlreadyExists extends ImageAlreadyExists_base {
}
declare const ImageNotFound_base: Schema.Class<ImageNotFound, Schema.TaggedStruct<"ImageNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class ImageNotFound extends ImageNotFound_base {
}
declare const ImagesAccessNotEnabled_base: Schema.Class<ImagesAccessNotEnabled, Schema.TaggedStruct<"ImagesAccessNotEnabled", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class ImagesAccessNotEnabled extends ImagesAccessNotEnabled_base {
}
declare const InvalidUploadFormat_base: Schema.Class<InvalidUploadFormat, Schema.TaggedStruct<"InvalidUploadFormat", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class InvalidUploadFormat extends InvalidUploadFormat_base {
}
declare const KeyNotFound_base: Schema.Class<KeyNotFound, Schema.TaggedStruct<"KeyNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class KeyNotFound extends KeyNotFound_base {
}
declare const VariantNameNotAllowed_base: Schema.Class<VariantNameNotAllowed, Schema.TaggedStruct<"VariantNameNotAllowed", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class VariantNameNotAllowed extends VariantNameNotAllowed_base {
}
declare const VariantNotFound_base: Schema.Class<VariantNotFound, Schema.TaggedStruct<"VariantNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class VariantNotFound extends VariantNotFound_base {
}
export interface GetV1Request {
    imageId: string;
    /** Account identifier tag. */
    accountId: string;
}
export declare const GetV1Request: Schema.Schema<GetV1Request>;
export interface GetV1Response {
    /** Image unique identifier. */
    id?: string | null;
    /** Can set the creator field with an internal user ID. */
    creator?: string | null;
    /** Image file name. */
    filename?: string | null;
    /** User modifiable key-value store. Can be used for keeping references to another system of record for managing images. Metadata must not exceed 1024 bytes. */
    meta?: unknown | null;
    /** Indicates whether the image can be a accessed only using it's UID. If set to true, a signed token needs to be generated with a signing key to view the image. */
    requireSignedURLs?: boolean | null;
    /** When the media item was uploaded. */
    uploaded?: string | null;
    /** Object specifying available variants for an image. */
    variants?: string[] | null;
}
export declare const GetV1Response: Schema.Schema<GetV1Response>;
export type GetV1Error = DefaultErrors | ImagesAccessNotEnabled | ImageNotFound;
export declare const getV1: API.OperationMethod<GetV1Request, GetV1Response, GetV1Error, Credentials | HttpClient.HttpClient>;
export interface ListV1sRequest {
    /** Path param: Account identifier tag. */
    accountId: string;
    page?: number;
    perPage?: number;
    /** Query param: Internal user ID set within the creator field. Setting to empty string "" will return images where creator field is not set */
    creator?: string | null;
}
export declare const ListV1sRequest: Schema.Schema<ListV1sRequest>;
export interface ListV1sResponse {
    result: {
        items?: {
            images?: {
                id?: string | null;
                creator?: string | null;
                filename?: string | null;
                meta?: unknown | null;
                requireSignedURLs?: boolean | null;
                uploaded?: string | null;
                variants?: string[] | null;
            }[] | null;
        }[] | null;
    };
    resultInfo?: {
        count?: number | null;
        page?: number | null;
        perPage?: number | null;
        totalCount?: number | null;
    } | null;
}
export declare const ListV1sResponse: Schema.Schema<ListV1sResponse>;
export type ListV1sError = DefaultErrors | ImagesAccessNotEnabled;
export declare const listV1s: API.PaginatedOperationMethod<ListV1sRequest, ListV1sResponse, ListV1sError, Credentials | HttpClient.HttpClient>;
export interface CreateV1Request {
    /** Path param: Account identifier tag. */
    accountId: string;
    /** Body param: An optional custom unique identifier for your image. */
    id?: string;
    /** Body param: Can set the creator field with an internal user ID. */
    creator?: string;
    /** Body param: An image binary data. Only needed when type is uploading a file. */
    file?: File | Blob;
    /** Body param: User modifiable key-value store. Can use used for keeping references to another system of record for managing images. */
    metadata?: unknown;
    /** Body param: Indicates whether the image requires a signature token for the access. */
    requireSignedURLs?: boolean;
    /** Body param: A URL to fetch an image from origin. Only needed when type is uploading from a URL. */
    url?: string;
}
export declare const CreateV1Request: Schema.Schema<CreateV1Request>;
export interface CreateV1Response {
    /** Image unique identifier. */
    id?: string | null;
    /** Can set the creator field with an internal user ID. */
    creator?: string | null;
    /** Image file name. */
    filename?: string | null;
    /** User modifiable key-value store. Can be used for keeping references to another system of record for managing images. Metadata must not exceed 1024 bytes. */
    meta?: unknown | null;
    /** Indicates whether the image can be a accessed only using it's UID. If set to true, a signed token needs to be generated with a signing key to view the image. */
    requireSignedURLs?: boolean | null;
    /** When the media item was uploaded. */
    uploaded?: string | null;
    /** Object specifying available variants for an image. */
    variants?: string[] | null;
}
export declare const CreateV1Response: Schema.Schema<CreateV1Response>;
export type CreateV1Error = DefaultErrors | ImagesAccessNotEnabled;
export declare const createV1: API.OperationMethod<CreateV1Request, CreateV1Response, CreateV1Error, Credentials | HttpClient.HttpClient>;
export interface PatchV1Request {
    imageId: string;
    /** Path param: Account identifier tag. */
    accountId: string;
    /** Body param: Can set the creator field with an internal user ID. */
    creator?: string;
    /** Body param: User modifiable key-value store. Can be used for keeping references to another system of record for managing images. No change if not specified. */
    metadata?: unknown;
    /** Body param: Indicates whether the image can be accessed using only its UID. If set to `true`, a signed token needs to be generated with a signing key to view the image. Returns a new UID on a change.  */
    requireSignedURLs?: boolean;
}
export declare const PatchV1Request: Schema.Schema<PatchV1Request>;
export interface PatchV1Response {
    /** Image unique identifier. */
    id?: string | null;
    /** Can set the creator field with an internal user ID. */
    creator?: string | null;
    /** Image file name. */
    filename?: string | null;
    /** User modifiable key-value store. Can be used for keeping references to another system of record for managing images. Metadata must not exceed 1024 bytes. */
    meta?: unknown | null;
    /** Indicates whether the image can be a accessed only using it's UID. If set to true, a signed token needs to be generated with a signing key to view the image. */
    requireSignedURLs?: boolean | null;
    /** When the media item was uploaded. */
    uploaded?: string | null;
    /** Object specifying available variants for an image. */
    variants?: string[] | null;
}
export declare const PatchV1Response: Schema.Schema<PatchV1Response>;
export type PatchV1Error = DefaultErrors | ImagesAccessNotEnabled | ImageNotFound;
export declare const patchV1: API.OperationMethod<PatchV1Request, PatchV1Response, PatchV1Error, Credentials | HttpClient.HttpClient>;
export interface DeleteV1Request {
    imageId: string;
    /** Account identifier tag. */
    accountId: string;
}
export declare const DeleteV1Request: Schema.Schema<DeleteV1Request>;
export type DeleteV1Response = string;
export declare const DeleteV1Response: Schema.Schema<DeleteV1Response>;
export type DeleteV1Error = DefaultErrors | ImagesAccessNotEnabled | ImageNotFound;
export declare const deleteV1: API.OperationMethod<DeleteV1Request, DeleteV1Response, DeleteV1Error, Credentials | HttpClient.HttpClient>;
export interface GetV1BlobRequest {
    imageId: string;
    /** Account identifier tag. */
    accountId: string;
}
export declare const GetV1BlobRequest: Schema.Schema<GetV1BlobRequest>;
export type GetV1BlobResponse = unknown;
export declare const GetV1BlobResponse: Schema.Schema<GetV1BlobResponse>;
export type GetV1BlobError = DefaultErrors | ImagesAccessNotEnabled | ImageNotFound;
export declare const getV1Blob: API.OperationMethod<GetV1BlobRequest, GetV1BlobResponse, GetV1BlobError, Credentials | HttpClient.HttpClient>;
export interface ListV1KeysRequest {
    /** Account identifier tag. */
    accountId: string;
}
export declare const ListV1KeysRequest: Schema.Schema<ListV1KeysRequest>;
export interface ListV1KeysResponse {
    keys?: {
        name?: string | null;
        value?: string | null;
    }[] | null;
}
export declare const ListV1KeysResponse: Schema.Schema<ListV1KeysResponse>;
export type ListV1KeysError = DefaultErrors | ImagesAccessNotEnabled;
export declare const listV1Keys: API.OperationMethod<ListV1KeysRequest, ListV1KeysResponse, ListV1KeysError, Credentials | HttpClient.HttpClient>;
export interface PutV1KeyRequest {
    signingKeyName: string;
    /** Account identifier tag. */
    accountId: string;
}
export declare const PutV1KeyRequest: Schema.Schema<PutV1KeyRequest>;
export interface PutV1KeyResponse {
    keys?: {
        name?: string | null;
        value?: string | null;
    }[] | null;
}
export declare const PutV1KeyResponse: Schema.Schema<PutV1KeyResponse>;
export type PutV1KeyError = DefaultErrors | ImagesAccessNotEnabled;
export declare const putV1Key: API.OperationMethod<PutV1KeyRequest, PutV1KeyResponse, PutV1KeyError, Credentials | HttpClient.HttpClient>;
export interface DeleteV1KeyRequest {
    signingKeyName: string;
    /** Account identifier tag. */
    accountId: string;
}
export declare const DeleteV1KeyRequest: Schema.Schema<DeleteV1KeyRequest>;
export interface DeleteV1KeyResponse {
    keys?: {
        name?: string | null;
        value?: string | null;
    }[] | null;
}
export declare const DeleteV1KeyResponse: Schema.Schema<DeleteV1KeyResponse>;
export type DeleteV1KeyError = DefaultErrors | ImagesAccessNotEnabled | KeyNotFound;
export declare const deleteV1Key: API.OperationMethod<DeleteV1KeyRequest, DeleteV1KeyResponse, DeleteV1KeyError, Credentials | HttpClient.HttpClient>;
export interface GetV1StatRequest {
    /** Account identifier tag. */
    accountId: string;
}
export declare const GetV1StatRequest: Schema.Schema<GetV1StatRequest>;
export interface GetV1StatResponse {
    count?: {
        allowed?: number | null;
        current?: number | null;
    } | null;
}
export declare const GetV1StatResponse: Schema.Schema<GetV1StatResponse>;
export type GetV1StatError = DefaultErrors | ImagesAccessNotEnabled;
export declare const getV1Stat: API.OperationMethod<GetV1StatRequest, GetV1StatResponse, GetV1StatError, Credentials | HttpClient.HttpClient>;
export interface GetV1VariantRequest {
    variantId: string;
    /** Account identifier tag. */
    accountId: string;
}
export declare const GetV1VariantRequest: Schema.Schema<GetV1VariantRequest>;
export interface GetV1VariantResponse {
    variant?: {
        id: string;
        options: {
            fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
            height: number;
            metadata: "keep" | "copyright" | "none";
            width: number;
        };
        neverRequireSignedURLs?: boolean | null;
    } | null;
}
export declare const GetV1VariantResponse: Schema.Schema<GetV1VariantResponse>;
export type GetV1VariantError = DefaultErrors | ImagesAccessNotEnabled | VariantNameNotAllowed | VariantNotFound;
export declare const getV1Variant: API.OperationMethod<GetV1VariantRequest, GetV1VariantResponse, GetV1VariantError, Credentials | HttpClient.HttpClient>;
export interface ListV1VariantsRequest {
    /** Account identifier tag. */
    accountId: string;
}
export declare const ListV1VariantsRequest: Schema.Schema<ListV1VariantsRequest>;
export interface ListV1VariantsResponse {
    id: string;
    /** Allows you to define image resizing sizes for different use cases. */
    options: {
        fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
        height: number;
        metadata: "keep" | "copyright" | "none";
        width: number;
    };
    /** Indicates whether the variant can access an image without a signature, regardless of image access control. */
    neverRequireSignedURLs?: boolean | null;
}
export declare const ListV1VariantsResponse: Schema.Schema<ListV1VariantsResponse>;
export type ListV1VariantsError = DefaultErrors | ImagesAccessNotEnabled;
export declare const listV1Variants: API.OperationMethod<ListV1VariantsRequest, ListV1VariantsResponse, ListV1VariantsError, Credentials | HttpClient.HttpClient>;
export interface CreateV1VariantRequest {
    /** Path param: Account identifier tag. */
    accountId: string;
    /** Body param: */
    id: string;
    /** Body param: Allows you to define image resizing sizes for different use cases. */
    options: {
        fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
        height: number;
        metadata: "keep" | "copyright" | "none";
        width: number;
    };
    /** Body param: Indicates whether the variant can access an image without a signature, regardless of image access control. */
    neverRequireSignedURLs?: boolean;
}
export declare const CreateV1VariantRequest: Schema.Schema<CreateV1VariantRequest>;
export interface CreateV1VariantResponse {
    variant?: {
        id: string;
        options: {
            fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
            height: number;
            metadata: "keep" | "copyright" | "none";
            width: number;
        };
        neverRequireSignedURLs?: boolean | null;
    } | null;
}
export declare const CreateV1VariantResponse: Schema.Schema<CreateV1VariantResponse>;
export type CreateV1VariantError = DefaultErrors | ImagesAccessNotEnabled | VariantNameNotAllowed;
export declare const createV1Variant: API.OperationMethod<CreateV1VariantRequest, CreateV1VariantResponse, CreateV1VariantError, Credentials | HttpClient.HttpClient>;
export interface PatchV1VariantRequest {
    variantId: string;
    /** Path param: Account identifier tag. */
    accountId: string;
    /** Body param: Allows you to define image resizing sizes for different use cases. */
    options: {
        fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
        height: number;
        metadata: "keep" | "copyright" | "none";
        width: number;
    };
    /** Body param: Indicates whether the variant can access an image without a signature, regardless of image access control. */
    neverRequireSignedURLs?: boolean;
}
export declare const PatchV1VariantRequest: Schema.Schema<PatchV1VariantRequest>;
export interface PatchV1VariantResponse {
    variant?: {
        id: string;
        options: {
            fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
            height: number;
            metadata: "keep" | "copyright" | "none";
            width: number;
        };
        neverRequireSignedURLs?: boolean | null;
    } | null;
}
export declare const PatchV1VariantResponse: Schema.Schema<PatchV1VariantResponse>;
export type PatchV1VariantError = DefaultErrors | ImagesAccessNotEnabled | VariantNameNotAllowed | VariantNotFound;
export declare const patchV1Variant: API.OperationMethod<PatchV1VariantRequest, PatchV1VariantResponse, PatchV1VariantError, Credentials | HttpClient.HttpClient>;
export interface DeleteV1VariantRequest {
    variantId: string;
    /** Account identifier tag. */
    accountId: string;
}
export declare const DeleteV1VariantRequest: Schema.Schema<DeleteV1VariantRequest>;
export type DeleteV1VariantResponse = string;
export declare const DeleteV1VariantResponse: Schema.Schema<DeleteV1VariantResponse>;
export type DeleteV1VariantError = DefaultErrors | ImagesAccessNotEnabled | VariantNameNotAllowed | VariantNotFound;
export declare const deleteV1Variant: API.OperationMethod<DeleteV1VariantRequest, DeleteV1VariantResponse, DeleteV1VariantError, Credentials | HttpClient.HttpClient>;
export interface ListV2sRequest {
    /** Path param: Account identifier tag. */
    accountId: string;
    /** Query param: Continuation token for a next page. List images V2 returns continuation_token */
    continuationToken?: string | null;
    /** Query param: Internal user ID set within the creator field. Setting to empty string "" will return images where creator field is not set */
    creator?: string | null;
    /** Query param: Number of items per page. */
    perPage?: number;
    /** Query param: Sorting order by upload time. */
    sortOrder?: "asc" | "desc";
}
export declare const ListV2sRequest: Schema.Schema<ListV2sRequest>;
export interface ListV2sResponse {
    /** Continuation token to fetch next page. Passed as a query param when requesting List V2 api endpoint. */
    continuationToken?: string | null;
    images?: {
        id?: string | null;
        creator?: string | null;
        filename?: string | null;
        meta?: unknown | null;
        requireSignedURLs?: boolean | null;
        uploaded?: string | null;
        variants?: string[] | null;
    }[] | null;
}
export declare const ListV2sResponse: Schema.Schema<ListV2sResponse>;
export type ListV2sError = DefaultErrors | ImagesAccessNotEnabled;
export declare const listV2s: API.OperationMethod<ListV2sRequest, ListV2sResponse, ListV2sError, Credentials | HttpClient.HttpClient>;
export interface CreateV2DirectUploadRequest {
    /** Path param: Account identifier tag. */
    accountId: string;
    /** Body param: Optional Image Custom ID. Up to 1024 chars. Can include any number of subpaths, and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a UUID. */
    id?: string;
    /** Body param: Can set the creator field with an internal user ID. */
    creator?: string;
    /** Body param: The date after which the upload will not be accepted. Minimum: Now + 2 minutes. Maximum: Now + 6 hours. */
    expiry?: string;
    /** Body param: User modifiable key-value store. Can be used for keeping references to another system of record, for managing images. */
    metadata?: unknown;
    /** Body param: Indicates whether the image requires a signature token to be accessed. */
    requireSignedURLs?: boolean;
}
export declare const CreateV2DirectUploadRequest: Schema.Schema<CreateV2DirectUploadRequest>;
export interface CreateV2DirectUploadResponse {
    /** Image unique identifier. */
    id?: string | null;
    /** The URL the unauthenticated upload can be performed to using a single HTTP POST (multipart/form-data) request. */
    uploadURL?: string | null;
}
export declare const CreateV2DirectUploadResponse: Schema.Schema<CreateV2DirectUploadResponse>;
export type CreateV2DirectUploadError = DefaultErrors | ImagesAccessNotEnabled | ImageAlreadyExists | InvalidUploadFormat;
export declare const createV2DirectUpload: API.OperationMethod<CreateV2DirectUploadRequest, CreateV2DirectUploadResponse, CreateV2DirectUploadError, Credentials | HttpClient.HttpClient>;
export {};
//# sourceMappingURL=images.d.ts.map