import type { TokenCredential } from "@azure/core-auth"; import type { DeleteBlobOptions, DeleteManifestOptions, DownloadBlobOptions, DownloadBlobResult, GetManifestOptions, GetManifestResult, UploadBlobOptions, UploadBlobResult, SetManifestOptions, SetManifestResult, OciImageManifest } from "./models.js"; import type { CommonClientOptions } from "@azure/core-client"; /** * Error thrown when the Docker content digest returned from the * server does not match the digest calculated from the content. */ export declare class DigestMismatchError extends Error { constructor(message: string); } /** * Client options used to configure Container Registry Blob API requests. */ export interface ContainerRegistryContentClientOptions extends CommonClientOptions { /** * Gets or sets the audience to use for authentication with Azure Active Directory. * The authentication scope will be set from this audience. * See {@link KnownContainerRegistryAudience} for known audience values. */ audience?: string; /** * The version of service API to make calls against. */ serviceVersion?: "2021-07-01"; } /** * The Azure Container Registry blob client, responsible for uploading and downloading blobs and manifests, the building blocks of artifacts. */ export declare class ContainerRegistryContentClient { /** * The Azure Container Registry endpoint. */ readonly endpoint: string; /** * The name of the repository that logically groups the artifact parts. */ readonly repositoryName: string; private client; /** * Creates an instance of a ContainerRegistryContentClient for managing container images and artifacts. * * Example usage: * ```ts snippet:SampleReadmeCreateContainerRegistryContentClient * import { ContainerRegistryContentClient } from "@azure/container-registry"; * import { DefaultAzureCredential } from "@azure/identity"; * * const endpoint = "https://myregistryname.azurecr.io"; * const repository = "library/hello-world"; * const client = new ContainerRegistryContentClient( * endpoint, * repository, * new DefaultAzureCredential(), * ); * ``` * @param endpoint - the URL endpoint of the container registry * @param repositoryName - the name of the repository that logically groups the artifact parts * @param credential - used to authenticate requests to the service * @param options - optional configuration used to send requests to the service */ constructor(endpoint: string, repositoryName: string, credential: TokenCredential, options?: ContainerRegistryContentClientOptions); /** * Delete a blob. * @param digest - the digest of the blob to delete * @param options - optional configuration used to send requests to the service */ deleteBlob(digest: string, options?: DeleteBlobOptions): Promise; /** * Upload a manifest for an OCI artifact. * * @param manifest - the manifest to upload. */ setManifest(manifest: Buffer | NodeJS.ReadableStream | OciImageManifest | Record, options?: SetManifestOptions): Promise; /** * Downloads the manifest for an OCI artifact. * * @param tagOrDigest - a tag or digest that identifies the artifact * @returns - the downloaded manifest. */ getManifest(tagOrDigest: string, options?: GetManifestOptions): Promise; /** * Delete a manifest. Doing so effectively deletes an artifact from the registry. * * @param digest - the digest of the manifest to delete * @param options - optional configuration used to send requests to the service */ deleteManifest(digest: string, options?: DeleteManifestOptions): Promise; /** * Upload an artifact blob. * * @param blobStream - the stream containing the blob data. */ uploadBlob(blob: NodeJS.ReadableStream | Buffer, options?: UploadBlobOptions): Promise; /** * Download a blob that is part of an artifact. * * @param digest - the digest of the blob to download * @param options - optional configuration used to send requests to the service * @returns - the downloaded blob */ downloadBlob(digest: string, options?: DownloadBlobOptions): Promise; } //# sourceMappingURL=containerRegistryContentClient.d.ts.map