@azure/container-registry 1.1.1-alpha.20250618.1 → 1.1.1-alpha.20250722.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/containerRegistryChallengeHandler.js +6 -3
- package/dist/browser/containerRegistryChallengeHandler.js.map +1 -1
- package/dist/browser/containerRegistryClient.js +42 -50
- package/dist/browser/containerRegistryClient.js.map +1 -1
- package/dist/browser/containerRegistryTokenCredential.js +9 -1
- package/dist/browser/containerRegistryTokenCredential.js.map +1 -1
- package/dist/browser/containerRepository.js +41 -46
- package/dist/browser/containerRepository.js.map +1 -1
- package/dist/browser/content/containerRegistryContentClient.js +34 -32
- package/dist/browser/content/containerRegistryContentClient.js.map +1 -1
- package/dist/browser/generated/generatedClient.js +12 -3
- package/dist/browser/generated/generatedClient.js.map +1 -1
- package/dist/browser/generated/generatedClientContext.js +9 -2
- package/dist/browser/generated/generatedClientContext.js.map +1 -1
- package/dist/browser/generated/models/mappers.js +63 -29
- package/dist/browser/generated/models/mappers.js.map +1 -1
- package/dist/browser/generated/operations/authentication.js +1 -0
- package/dist/browser/generated/operations/authentication.js.map +1 -1
- package/dist/browser/generated/operations/containerRegistry.js +1 -0
- package/dist/browser/generated/operations/containerRegistry.js.map +1 -1
- package/dist/browser/generated/operations/containerRegistryBlob.js +1 -0
- package/dist/browser/generated/operations/containerRegistryBlob.js.map +1 -1
- package/dist/browser/registryArtifact.js +69 -53
- package/dist/browser/registryArtifact.js.map +1 -1
- package/dist/browser/transformations.js +13 -3
- package/dist/browser/transformations.js.map +1 -1
- package/dist/browser/utils/helpers.js +19 -35
- package/dist/browser/utils/helpers.js.map +1 -1
- package/dist/browser/utils/retriableReadableStream.js +64 -56
- package/dist/browser/utils/retriableReadableStream.js.map +1 -1
- package/dist/browser/utils/tokenCycler.js +7 -6
- package/dist/browser/utils/tokenCycler.js.map +1 -1
- package/dist/commonjs/containerRegistryChallengeHandler.js +6 -3
- package/dist/commonjs/containerRegistryChallengeHandler.js.map +1 -1
- package/dist/commonjs/containerRegistryClient.js +42 -50
- package/dist/commonjs/containerRegistryClient.js.map +1 -1
- package/dist/commonjs/containerRegistryTokenCredential.js +9 -1
- package/dist/commonjs/containerRegistryTokenCredential.js.map +1 -1
- package/dist/commonjs/containerRepository.js +41 -46
- package/dist/commonjs/containerRepository.js.map +1 -1
- package/dist/commonjs/content/containerRegistryContentClient.js +34 -31
- package/dist/commonjs/content/containerRegistryContentClient.js.map +1 -1
- package/dist/commonjs/generated/generatedClient.js +12 -3
- package/dist/commonjs/generated/generatedClient.js.map +1 -1
- package/dist/commonjs/generated/generatedClientContext.js +9 -2
- package/dist/commonjs/generated/generatedClientContext.js.map +1 -1
- package/dist/commonjs/generated/models/mappers.js +63 -29
- package/dist/commonjs/generated/models/mappers.js.map +1 -1
- package/dist/commonjs/generated/operations/authentication.js +1 -0
- package/dist/commonjs/generated/operations/authentication.js.map +1 -1
- package/dist/commonjs/generated/operations/containerRegistry.js +1 -0
- package/dist/commonjs/generated/operations/containerRegistry.js.map +1 -1
- package/dist/commonjs/generated/operations/containerRegistryBlob.js +1 -0
- package/dist/commonjs/generated/operations/containerRegistryBlob.js.map +1 -1
- package/dist/commonjs/registryArtifact.js +69 -53
- package/dist/commonjs/registryArtifact.js.map +1 -1
- package/dist/commonjs/transformations.js +13 -3
- package/dist/commonjs/transformations.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/commonjs/utils/helpers.js +19 -35
- package/dist/commonjs/utils/helpers.js.map +1 -1
- package/dist/commonjs/utils/retriableReadableStream.js +64 -56
- package/dist/commonjs/utils/retriableReadableStream.js.map +1 -1
- package/dist/commonjs/utils/tokenCycler.js +7 -6
- package/dist/commonjs/utils/tokenCycler.js.map +1 -1
- package/dist/esm/containerRegistryChallengeHandler.js +6 -3
- package/dist/esm/containerRegistryChallengeHandler.js.map +1 -1
- package/dist/esm/containerRegistryClient.js +42 -50
- package/dist/esm/containerRegistryClient.js.map +1 -1
- package/dist/esm/containerRegistryTokenCredential.js +9 -1
- package/dist/esm/containerRegistryTokenCredential.js.map +1 -1
- package/dist/esm/containerRepository.js +41 -46
- package/dist/esm/containerRepository.js.map +1 -1
- package/dist/esm/content/containerRegistryContentClient.js +34 -32
- package/dist/esm/content/containerRegistryContentClient.js.map +1 -1
- package/dist/esm/generated/generatedClient.js +12 -3
- package/dist/esm/generated/generatedClient.js.map +1 -1
- package/dist/esm/generated/generatedClientContext.js +9 -2
- package/dist/esm/generated/generatedClientContext.js.map +1 -1
- package/dist/esm/generated/models/mappers.js +63 -29
- package/dist/esm/generated/models/mappers.js.map +1 -1
- package/dist/esm/generated/operations/authentication.js +1 -0
- package/dist/esm/generated/operations/authentication.js.map +1 -1
- package/dist/esm/generated/operations/containerRegistry.js +1 -0
- package/dist/esm/generated/operations/containerRegistry.js.map +1 -1
- package/dist/esm/generated/operations/containerRegistryBlob.js +1 -0
- package/dist/esm/generated/operations/containerRegistryBlob.js.map +1 -1
- package/dist/esm/registryArtifact.js +69 -53
- package/dist/esm/registryArtifact.js.map +1 -1
- package/dist/esm/transformations.js +13 -3
- package/dist/esm/transformations.js.map +1 -1
- package/dist/esm/utils/helpers.js +19 -35
- package/dist/esm/utils/helpers.js.map +1 -1
- package/dist/esm/utils/retriableReadableStream.js +64 -56
- package/dist/esm/utils/retriableReadableStream.js.map +1 -1
- package/dist/esm/utils/tokenCycler.js +7 -6
- package/dist/esm/utils/tokenCycler.js.map +1 -1
- package/dist/react-native/containerRegistryChallengeHandler.js +6 -3
- package/dist/react-native/containerRegistryChallengeHandler.js.map +1 -1
- package/dist/react-native/containerRegistryClient.js +42 -50
- package/dist/react-native/containerRegistryClient.js.map +1 -1
- package/dist/react-native/containerRegistryTokenCredential.js +9 -1
- package/dist/react-native/containerRegistryTokenCredential.js.map +1 -1
- package/dist/react-native/containerRepository.js +41 -46
- package/dist/react-native/containerRepository.js.map +1 -1
- package/dist/react-native/content/containerRegistryContentClient.js +34 -32
- package/dist/react-native/content/containerRegistryContentClient.js.map +1 -1
- package/dist/react-native/generated/generatedClient.js +12 -3
- package/dist/react-native/generated/generatedClient.js.map +1 -1
- package/dist/react-native/generated/generatedClientContext.js +9 -2
- package/dist/react-native/generated/generatedClientContext.js.map +1 -1
- package/dist/react-native/generated/models/mappers.js +63 -29
- package/dist/react-native/generated/models/mappers.js.map +1 -1
- package/dist/react-native/generated/operations/authentication.js +1 -0
- package/dist/react-native/generated/operations/authentication.js.map +1 -1
- package/dist/react-native/generated/operations/containerRegistry.js +1 -0
- package/dist/react-native/generated/operations/containerRegistry.js.map +1 -1
- package/dist/react-native/generated/operations/containerRegistryBlob.js +1 -0
- package/dist/react-native/generated/operations/containerRegistryBlob.js.map +1 -1
- package/dist/react-native/registryArtifact.js +69 -53
- package/dist/react-native/registryArtifact.js.map +1 -1
- package/dist/react-native/transformations.js +13 -3
- package/dist/react-native/transformations.js.map +1 -1
- package/dist/react-native/utils/helpers.js +19 -35
- package/dist/react-native/utils/helpers.js.map +1 -1
- package/dist/react-native/utils/retriableReadableStream.js +64 -56
- package/dist/react-native/utils/retriableReadableStream.js.map +1 -1
- package/dist/react-native/utils/tokenCycler.js +7 -6
- package/dist/react-native/utils/tokenCycler.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../../../src/generated/operations/authentication.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAWtD,kDAAkD;AAClD,MAAM,OAAO,kBAAkB;
|
|
1
|
+
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../../../src/generated/operations/authentication.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAA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CAAC,UAAU,CAAC,GAAG,CAAC;IAC/B,gBAAgB,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,OAAO,CAAC;IAC/D,UAAU;CACX,CAAC;AACF,MAAM,qDAAqD,GAA6B;IACtF,IAAI,EAAE,eAAe;IACrB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,cAAc;SACnC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;KACF;IACD,kBAAkB,EAAE;QAClB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,UAAU;KACtB;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;IAC/B,gBAAgB,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,OAAO,CAAC;IAC/D,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Authentication } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { GeneratedClient } from \"../generatedClient.js\";\nimport {\n PostContentSchemaGrantType,\n AuthenticationExchangeAadAccessTokenForAcrRefreshTokenOptionalParams,\n AuthenticationExchangeAadAccessTokenForAcrRefreshTokenResponse,\n TokenGrantType,\n AuthenticationExchangeAcrRefreshTokenForAcrAccessTokenOptionalParams,\n AuthenticationExchangeAcrRefreshTokenForAcrAccessTokenResponse\n} from \"../models/index.js\";\n\n/** Class containing Authentication operations. */\nexport class AuthenticationImpl implements Authentication {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class Authentication class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Exchange AAD tokens for an ACR refresh Token\n * @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token\n * @param service Indicates the name of your Azure container registry.\n * @param options The options parameters.\n */\n exchangeAadAccessTokenForAcrRefreshToken(\n grantType: PostContentSchemaGrantType,\n service: string,\n options?: AuthenticationExchangeAadAccessTokenForAcrRefreshTokenOptionalParams\n ): Promise<AuthenticationExchangeAadAccessTokenForAcrRefreshTokenResponse> {\n return this.client.sendOperationRequest(\n { grantType, service, options },\n exchangeAadAccessTokenForAcrRefreshTokenOperationSpec\n );\n }\n\n /**\n * Exchange ACR Refresh token for an ACR Access Token\n * @param service Indicates the name of your Azure container registry.\n * @param scope Which is expected to be a valid scope, and can be specified more than once for multiple\n * scope requests. You obtained this from the Www-Authenticate response header from the challenge.\n * @param refreshToken Must be a valid ACR refresh token\n * @param grantType Grant type is expected to be refresh_token\n * @param options The options parameters.\n */\n exchangeAcrRefreshTokenForAcrAccessToken(\n service: string,\n scope: string,\n refreshToken: string,\n grantType: TokenGrantType,\n options?: AuthenticationExchangeAcrRefreshTokenForAcrAccessTokenOptionalParams\n ): Promise<AuthenticationExchangeAcrRefreshTokenForAcrAccessTokenResponse> {\n return this.client.sendOperationRequest(\n { service, scope, refreshToken, grantType, options },\n exchangeAcrRefreshTokenForAcrAccessTokenOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst exchangeAadAccessTokenForAcrRefreshTokenOperationSpec: coreClient.OperationSpec = {\n path: \"/oauth2/exchange\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AcrRefreshToken\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n formDataParameters: [\n Parameters.grantType,\n Parameters.service,\n Parameters.tenant,\n Parameters.refreshToken,\n Parameters.accessToken\n ],\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url],\n headerParameters: [Parameters.contentType3, Parameters.accept4],\n serializer\n};\nconst exchangeAcrRefreshTokenForAcrAccessTokenOperationSpec: coreClient.OperationSpec = {\n path: \"/oauth2/token\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AcrAccessToken\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n formDataParameters: [\n Parameters.service,\n Parameters.scope,\n Parameters.refreshToken1,\n Parameters.grantType1\n ],\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url],\n headerParameters: [Parameters.contentType3, Parameters.accept4],\n serializer\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing ContainerRegistry operations. */
|
|
12
12
|
export class ContainerRegistryImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class ContainerRegistry class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerRegistry.js","sourceRoot":"","sources":["../../../../src/generated/operations/containerRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAqCtD,qDAAqD;AACrD,MAAM,OAAO,qBAAqB;IAGhC;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,oBAAoB,CAClB,OAA6D;QAE7D,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,EACX,iCAAiC,CAClC,CAAC;IACJ,CAAC;IAED;;;;;OAK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ACH,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,wCAAwC;SAChE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC;IACrE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { ContainerRegistry } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { GeneratedClient } from \"../generatedClient.js\";\nimport {\n ContainerRegistryCheckDockerV2SupportOptionalParams,\n ContainerRegistryGetManifestOptionalParams,\n ContainerRegistryGetManifestResponse,\n ContainerRegistryCreateManifestOptionalParams,\n ContainerRegistryCreateManifestResponse,\n ContainerRegistryDeleteManifestOptionalParams,\n ContainerRegistryGetRepositoriesOptionalParams,\n ContainerRegistryGetRepositoriesResponse,\n ContainerRegistryGetPropertiesOptionalParams,\n ContainerRegistryGetPropertiesResponse,\n ContainerRegistryDeleteRepositoryOptionalParams,\n ContainerRegistryUpdatePropertiesOptionalParams,\n ContainerRegistryUpdatePropertiesResponse,\n ContainerRegistryGetTagsOptionalParams,\n ContainerRegistryGetTagsResponse,\n ContainerRegistryGetTagPropertiesOptionalParams,\n ContainerRegistryGetTagPropertiesResponse,\n ContainerRegistryUpdateTagAttributesOptionalParams,\n ContainerRegistryUpdateTagAttributesResponse,\n ContainerRegistryDeleteTagOptionalParams,\n ContainerRegistryGetManifestsOptionalParams,\n ContainerRegistryGetManifestsResponse,\n ContainerRegistryGetManifestPropertiesOptionalParams,\n ContainerRegistryGetManifestPropertiesResponse,\n ContainerRegistryUpdateManifestPropertiesOptionalParams,\n ContainerRegistryUpdateManifestPropertiesResponse,\n ContainerRegistryGetRepositoriesNextOptionalParams,\n ContainerRegistryGetRepositoriesNextResponse,\n ContainerRegistryGetTagsNextOptionalParams,\n ContainerRegistryGetTagsNextResponse,\n ContainerRegistryGetManifestsNextOptionalParams,\n ContainerRegistryGetManifestsNextResponse\n} from \"../models/index.js\";\n\n/** Class containing ContainerRegistry operations. */\nexport class ContainerRegistryImpl implements ContainerRegistry {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class ContainerRegistry class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Tells whether this Docker Registry instance supports Docker Registry HTTP API v2\n * @param options The options parameters.\n */\n checkDockerV2Support(\n options?: ContainerRegistryCheckDockerV2SupportOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { options },\n checkDockerV2SupportOperationSpec\n );\n }\n\n /**\n * Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest.\n * @param name Name of the image (including the namespace)\n * @param reference A tag or a digest, pointing to a specific image\n * @param options The options parameters.\n */\n getManifest(\n name: string,\n reference: string,\n options?: ContainerRegistryGetManifestOptionalParams\n ): Promise<ContainerRegistryGetManifestResponse> {\n return this.client.sendOperationRequest(\n { name, reference, options },\n getManifestOperationSpec\n );\n }\n\n /**\n * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.\n * @param name Name of the image (including the namespace)\n * @param reference A tag or a digest, pointing to a specific image\n * @param payload Manifest body, can take v1 or v2 values depending on accept header\n * @param options The options parameters.\n */\n createManifest(\n name: string,\n reference: string,\n payload: coreRestPipeline.RequestBodyType,\n options?: ContainerRegistryCreateManifestOptionalParams\n ): Promise<ContainerRegistryCreateManifestResponse> {\n return this.client.sendOperationRequest(\n { name, reference, payload, options },\n createManifestOperationSpec\n );\n }\n\n /**\n * Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted\n * by `digest`.\n * @param name Name of the image (including the namespace)\n * @param reference Digest of a BLOB\n * @param options The options parameters.\n */\n deleteManifest(\n name: string,\n reference: string,\n options?: ContainerRegistryDeleteManifestOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { name, reference, options },\n deleteManifestOperationSpec\n );\n }\n\n /**\n * List repositories\n * @param options The options parameters.\n */\n getRepositories(\n options?: ContainerRegistryGetRepositoriesOptionalParams\n ): Promise<ContainerRegistryGetRepositoriesResponse> {\n return this.client.sendOperationRequest(\n { options },\n getRepositoriesOperationSpec\n );\n }\n\n /**\n * Get repository attributes\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n getProperties(\n name: string,\n options?: ContainerRegistryGetPropertiesOptionalParams\n ): Promise<ContainerRegistryGetPropertiesResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n getPropertiesOperationSpec\n );\n }\n\n /**\n * Delete the repository identified by `name`\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n deleteRepository(\n name: string,\n options?: ContainerRegistryDeleteRepositoryOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { name, options },\n deleteRepositoryOperationSpec\n );\n }\n\n /**\n * Update the attribute identified by `name` where `reference` is the name of the repository.\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n updateProperties(\n name: string,\n options?: ContainerRegistryUpdatePropertiesOptionalParams\n ): Promise<ContainerRegistryUpdatePropertiesResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n updatePropertiesOperationSpec\n );\n }\n\n /**\n * List tags of a repository\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n getTags(\n name: string,\n options?: ContainerRegistryGetTagsOptionalParams\n ): Promise<ContainerRegistryGetTagsResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n getTagsOperationSpec\n );\n }\n\n /**\n * Get tag attributes by tag\n * @param name Name of the image (including the namespace)\n * @param reference Tag name\n * @param options The options parameters.\n */\n getTagProperties(\n name: string,\n reference: string,\n options?: ContainerRegistryGetTagPropertiesOptionalParams\n ): Promise<ContainerRegistryGetTagPropertiesResponse> {\n return this.client.sendOperationRequest(\n { name, reference, options },\n getTagPropertiesOperationSpec\n );\n }\n\n /**\n * Update tag attributes\n * @param name Name of the image (including the namespace)\n * @param reference Tag name\n * @param options The options parameters.\n */\n updateTagAttributes(\n name: string,\n reference: string,\n options?: ContainerRegistryUpdateTagAttributesOptionalParams\n ): Promise<ContainerRegistryUpdateTagAttributesResponse> {\n return this.client.sendOperationRequest(\n { name, reference, options },\n updateTagAttributesOperationSpec\n );\n }\n\n /**\n * Delete tag\n * @param name Name of the image (including the namespace)\n * @param reference Tag name\n * @param options The options parameters.\n */\n deleteTag(\n name: string,\n reference: string,\n options?: ContainerRegistryDeleteTagOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { name, reference, options },\n deleteTagOperationSpec\n );\n }\n\n /**\n * List manifests of a repository\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n getManifests(\n name: string,\n options?: ContainerRegistryGetManifestsOptionalParams\n ): Promise<ContainerRegistryGetManifestsResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n getManifestsOperationSpec\n );\n }\n\n /**\n * Get manifest attributes\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param options The options parameters.\n */\n getManifestProperties(\n name: string,\n digest: string,\n options?: ContainerRegistryGetManifestPropertiesOptionalParams\n ): Promise<ContainerRegistryGetManifestPropertiesResponse> {\n return this.client.sendOperationRequest(\n { name, digest, options },\n getManifestPropertiesOperationSpec\n );\n }\n\n /**\n * Update properties of a manifest\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param options The options parameters.\n */\n updateManifestProperties(\n name: string,\n digest: string,\n options?: ContainerRegistryUpdateManifestPropertiesOptionalParams\n ): Promise<ContainerRegistryUpdateManifestPropertiesResponse> {\n return this.client.sendOperationRequest(\n { name, digest, options },\n updateManifestPropertiesOperationSpec\n );\n }\n\n /**\n * GetRepositoriesNext\n * @param nextLink The nextLink from the previous successful call to the GetRepositories method.\n * @param options The options parameters.\n */\n getRepositoriesNext(\n nextLink: string,\n options?: ContainerRegistryGetRepositoriesNextOptionalParams\n ): Promise<ContainerRegistryGetRepositoriesNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n getRepositoriesNextOperationSpec\n );\n }\n\n /**\n * GetTagsNext\n * @param name Name of the image (including the namespace)\n * @param nextLink The nextLink from the previous successful call to the GetTags method.\n * @param options The options parameters.\n */\n getTagsNext(\n name: string,\n nextLink: string,\n options?: ContainerRegistryGetTagsNextOptionalParams\n ): Promise<ContainerRegistryGetTagsNextResponse> {\n return this.client.sendOperationRequest(\n { name, nextLink, options },\n getTagsNextOperationSpec\n );\n }\n\n /**\n * GetManifestsNext\n * @param name Name of the image (including the namespace)\n * @param nextLink The nextLink from the previous successful call to the GetManifests method.\n * @param options The options parameters.\n */\n getManifestsNext(\n name: string,\n nextLink: string,\n options?: ContainerRegistryGetManifestsNextOptionalParams\n ): Promise<ContainerRegistryGetManifestsNextResponse> {\n return this.client.sendOperationRequest(\n { name, nextLink, options },\n getManifestsNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkDockerV2SupportOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/\",\n httpMethod: \"GET\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getManifestOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/manifests/{reference}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: Mappers.ContainerRegistryGetManifestHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept, Parameters.accept1],\n serializer\n};\nconst createManifestOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/manifests/{reference}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.ContainerRegistryCreateManifestHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.payload,\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept2, Parameters.contentType],\n mediaType: \"binary\",\n serializer\n};\nconst deleteManifestOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/manifests/{reference}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {},\n 404: {},\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getRepositoriesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/_catalog\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Repositories,\n headersMapper: Mappers.ContainerRegistryGetRepositoriesHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.last, Parameters.n, Parameters.apiVersion],\n urlParameters: [Parameters.url],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getPropertiesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ContainerRepositoryProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteRepositoryOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {},\n 404: {},\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updatePropertiesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ContainerRepositoryProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.value,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst getTagsOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_tags\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TagList,\n headersMapper: Mappers.ContainerRegistryGetTagsHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [\n Parameters.last,\n Parameters.n,\n Parameters.apiVersion,\n Parameters.orderby,\n Parameters.digest\n ],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getTagPropertiesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_tags/{reference}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ArtifactTagProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateTagAttributesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_tags/{reference}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ArtifactTagProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.value1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst deleteTagOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_tags/{reference}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {},\n 404: {},\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getManifestsOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_manifests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AcrManifests,\n headersMapper: Mappers.ContainerRegistryGetManifestsHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [\n Parameters.last,\n Parameters.n,\n Parameters.apiVersion,\n Parameters.orderby\n ],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getManifestPropertiesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_manifests/{digest}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ArtifactManifestProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateManifestPropertiesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_manifests/{digest}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ArtifactManifestProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.value2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst getRepositoriesNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Repositories,\n headersMapper: Mappers.ContainerRegistryGetRepositoriesNextHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getTagsNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TagList,\n headersMapper: Mappers.ContainerRegistryGetTagsNextHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getManifestsNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AcrManifests,\n headersMapper: Mappers.ContainerRegistryGetManifestsNextHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"containerRegistry.js","sourceRoot":"","sources":["../../../../src/generated/operations/containerRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAqCtD,qDAAqD;AACrD,MAAM,OAAO,qBAAqB;IACf,MAAM,CAAkB;IAEzC;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,oBAAoB,CAClB,OAA6D;QAE7D,OAAO,IAAI,C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BAA6B,GAA6B;IAC9D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,wCAAwC;SAChE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC;IACrE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { ContainerRegistry } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { GeneratedClient } from \"../generatedClient.js\";\nimport {\n ContainerRegistryCheckDockerV2SupportOptionalParams,\n ContainerRegistryGetManifestOptionalParams,\n ContainerRegistryGetManifestResponse,\n ContainerRegistryCreateManifestOptionalParams,\n ContainerRegistryCreateManifestResponse,\n ContainerRegistryDeleteManifestOptionalParams,\n ContainerRegistryGetRepositoriesOptionalParams,\n ContainerRegistryGetRepositoriesResponse,\n ContainerRegistryGetPropertiesOptionalParams,\n ContainerRegistryGetPropertiesResponse,\n ContainerRegistryDeleteRepositoryOptionalParams,\n ContainerRegistryUpdatePropertiesOptionalParams,\n ContainerRegistryUpdatePropertiesResponse,\n ContainerRegistryGetTagsOptionalParams,\n ContainerRegistryGetTagsResponse,\n ContainerRegistryGetTagPropertiesOptionalParams,\n ContainerRegistryGetTagPropertiesResponse,\n ContainerRegistryUpdateTagAttributesOptionalParams,\n ContainerRegistryUpdateTagAttributesResponse,\n ContainerRegistryDeleteTagOptionalParams,\n ContainerRegistryGetManifestsOptionalParams,\n ContainerRegistryGetManifestsResponse,\n ContainerRegistryGetManifestPropertiesOptionalParams,\n ContainerRegistryGetManifestPropertiesResponse,\n ContainerRegistryUpdateManifestPropertiesOptionalParams,\n ContainerRegistryUpdateManifestPropertiesResponse,\n ContainerRegistryGetRepositoriesNextOptionalParams,\n ContainerRegistryGetRepositoriesNextResponse,\n ContainerRegistryGetTagsNextOptionalParams,\n ContainerRegistryGetTagsNextResponse,\n ContainerRegistryGetManifestsNextOptionalParams,\n ContainerRegistryGetManifestsNextResponse\n} from \"../models/index.js\";\n\n/** Class containing ContainerRegistry operations. */\nexport class ContainerRegistryImpl implements ContainerRegistry {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class ContainerRegistry class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Tells whether this Docker Registry instance supports Docker Registry HTTP API v2\n * @param options The options parameters.\n */\n checkDockerV2Support(\n options?: ContainerRegistryCheckDockerV2SupportOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { options },\n checkDockerV2SupportOperationSpec\n );\n }\n\n /**\n * Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest.\n * @param name Name of the image (including the namespace)\n * @param reference A tag or a digest, pointing to a specific image\n * @param options The options parameters.\n */\n getManifest(\n name: string,\n reference: string,\n options?: ContainerRegistryGetManifestOptionalParams\n ): Promise<ContainerRegistryGetManifestResponse> {\n return this.client.sendOperationRequest(\n { name, reference, options },\n getManifestOperationSpec\n );\n }\n\n /**\n * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.\n * @param name Name of the image (including the namespace)\n * @param reference A tag or a digest, pointing to a specific image\n * @param payload Manifest body, can take v1 or v2 values depending on accept header\n * @param options The options parameters.\n */\n createManifest(\n name: string,\n reference: string,\n payload: coreRestPipeline.RequestBodyType,\n options?: ContainerRegistryCreateManifestOptionalParams\n ): Promise<ContainerRegistryCreateManifestResponse> {\n return this.client.sendOperationRequest(\n { name, reference, payload, options },\n createManifestOperationSpec\n );\n }\n\n /**\n * Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted\n * by `digest`.\n * @param name Name of the image (including the namespace)\n * @param reference Digest of a BLOB\n * @param options The options parameters.\n */\n deleteManifest(\n name: string,\n reference: string,\n options?: ContainerRegistryDeleteManifestOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { name, reference, options },\n deleteManifestOperationSpec\n );\n }\n\n /**\n * List repositories\n * @param options The options parameters.\n */\n getRepositories(\n options?: ContainerRegistryGetRepositoriesOptionalParams\n ): Promise<ContainerRegistryGetRepositoriesResponse> {\n return this.client.sendOperationRequest(\n { options },\n getRepositoriesOperationSpec\n );\n }\n\n /**\n * Get repository attributes\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n getProperties(\n name: string,\n options?: ContainerRegistryGetPropertiesOptionalParams\n ): Promise<ContainerRegistryGetPropertiesResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n getPropertiesOperationSpec\n );\n }\n\n /**\n * Delete the repository identified by `name`\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n deleteRepository(\n name: string,\n options?: ContainerRegistryDeleteRepositoryOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { name, options },\n deleteRepositoryOperationSpec\n );\n }\n\n /**\n * Update the attribute identified by `name` where `reference` is the name of the repository.\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n updateProperties(\n name: string,\n options?: ContainerRegistryUpdatePropertiesOptionalParams\n ): Promise<ContainerRegistryUpdatePropertiesResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n updatePropertiesOperationSpec\n );\n }\n\n /**\n * List tags of a repository\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n getTags(\n name: string,\n options?: ContainerRegistryGetTagsOptionalParams\n ): Promise<ContainerRegistryGetTagsResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n getTagsOperationSpec\n );\n }\n\n /**\n * Get tag attributes by tag\n * @param name Name of the image (including the namespace)\n * @param reference Tag name\n * @param options The options parameters.\n */\n getTagProperties(\n name: string,\n reference: string,\n options?: ContainerRegistryGetTagPropertiesOptionalParams\n ): Promise<ContainerRegistryGetTagPropertiesResponse> {\n return this.client.sendOperationRequest(\n { name, reference, options },\n getTagPropertiesOperationSpec\n );\n }\n\n /**\n * Update tag attributes\n * @param name Name of the image (including the namespace)\n * @param reference Tag name\n * @param options The options parameters.\n */\n updateTagAttributes(\n name: string,\n reference: string,\n options?: ContainerRegistryUpdateTagAttributesOptionalParams\n ): Promise<ContainerRegistryUpdateTagAttributesResponse> {\n return this.client.sendOperationRequest(\n { name, reference, options },\n updateTagAttributesOperationSpec\n );\n }\n\n /**\n * Delete tag\n * @param name Name of the image (including the namespace)\n * @param reference Tag name\n * @param options The options parameters.\n */\n deleteTag(\n name: string,\n reference: string,\n options?: ContainerRegistryDeleteTagOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { name, reference, options },\n deleteTagOperationSpec\n );\n }\n\n /**\n * List manifests of a repository\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n getManifests(\n name: string,\n options?: ContainerRegistryGetManifestsOptionalParams\n ): Promise<ContainerRegistryGetManifestsResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n getManifestsOperationSpec\n );\n }\n\n /**\n * Get manifest attributes\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param options The options parameters.\n */\n getManifestProperties(\n name: string,\n digest: string,\n options?: ContainerRegistryGetManifestPropertiesOptionalParams\n ): Promise<ContainerRegistryGetManifestPropertiesResponse> {\n return this.client.sendOperationRequest(\n { name, digest, options },\n getManifestPropertiesOperationSpec\n );\n }\n\n /**\n * Update properties of a manifest\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param options The options parameters.\n */\n updateManifestProperties(\n name: string,\n digest: string,\n options?: ContainerRegistryUpdateManifestPropertiesOptionalParams\n ): Promise<ContainerRegistryUpdateManifestPropertiesResponse> {\n return this.client.sendOperationRequest(\n { name, digest, options },\n updateManifestPropertiesOperationSpec\n );\n }\n\n /**\n * GetRepositoriesNext\n * @param nextLink The nextLink from the previous successful call to the GetRepositories method.\n * @param options The options parameters.\n */\n getRepositoriesNext(\n nextLink: string,\n options?: ContainerRegistryGetRepositoriesNextOptionalParams\n ): Promise<ContainerRegistryGetRepositoriesNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n getRepositoriesNextOperationSpec\n );\n }\n\n /**\n * GetTagsNext\n * @param name Name of the image (including the namespace)\n * @param nextLink The nextLink from the previous successful call to the GetTags method.\n * @param options The options parameters.\n */\n getTagsNext(\n name: string,\n nextLink: string,\n options?: ContainerRegistryGetTagsNextOptionalParams\n ): Promise<ContainerRegistryGetTagsNextResponse> {\n return this.client.sendOperationRequest(\n { name, nextLink, options },\n getTagsNextOperationSpec\n );\n }\n\n /**\n * GetManifestsNext\n * @param name Name of the image (including the namespace)\n * @param nextLink The nextLink from the previous successful call to the GetManifests method.\n * @param options The options parameters.\n */\n getManifestsNext(\n name: string,\n nextLink: string,\n options?: ContainerRegistryGetManifestsNextOptionalParams\n ): Promise<ContainerRegistryGetManifestsNextResponse> {\n return this.client.sendOperationRequest(\n { name, nextLink, options },\n getManifestsNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkDockerV2SupportOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/\",\n httpMethod: \"GET\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getManifestOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/manifests/{reference}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: Mappers.ContainerRegistryGetManifestHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept, Parameters.accept1],\n serializer\n};\nconst createManifestOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/manifests/{reference}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.ContainerRegistryCreateManifestHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.payload,\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept2, Parameters.contentType],\n mediaType: \"binary\",\n serializer\n};\nconst deleteManifestOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/manifests/{reference}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {},\n 404: {},\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getRepositoriesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/_catalog\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Repositories,\n headersMapper: Mappers.ContainerRegistryGetRepositoriesHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.last, Parameters.n, Parameters.apiVersion],\n urlParameters: [Parameters.url],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getPropertiesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ContainerRepositoryProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteRepositoryOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {},\n 404: {},\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updatePropertiesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ContainerRepositoryProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.value,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst getTagsOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_tags\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TagList,\n headersMapper: Mappers.ContainerRegistryGetTagsHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [\n Parameters.last,\n Parameters.n,\n Parameters.apiVersion,\n Parameters.orderby,\n Parameters.digest\n ],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getTagPropertiesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_tags/{reference}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ArtifactTagProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateTagAttributesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_tags/{reference}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ArtifactTagProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.value1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst deleteTagOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_tags/{reference}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {},\n 404: {},\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name, Parameters.reference],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getManifestsOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_manifests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AcrManifests,\n headersMapper: Mappers.ContainerRegistryGetManifestsHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [\n Parameters.last,\n Parameters.n,\n Parameters.apiVersion,\n Parameters.orderby\n ],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getManifestPropertiesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_manifests/{digest}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ArtifactManifestProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateManifestPropertiesOperationSpec: coreClient.OperationSpec = {\n path: \"/acr/v1/{name}/_manifests/{digest}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ArtifactManifestProperties\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.value2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst getRepositoriesNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Repositories,\n headersMapper: Mappers.ContainerRegistryGetRepositoriesNextHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getTagsNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TagList,\n headersMapper: Mappers.ContainerRegistryGetTagsNextHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getManifestsNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AcrManifests,\n headersMapper: Mappers.ContainerRegistryGetManifestsNextHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing ContainerRegistryBlob operations. */
|
|
12
12
|
export class ContainerRegistryBlobImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class ContainerRegistryBlob class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerRegistryBlob.js","sourceRoot":"","sources":["../../../../src/generated/operations/containerRegist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O,CAAC,SAAS;SAC9B;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC;IAChD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,2BAA2B;IACjC,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACxB,cAAc,EAAE,gBAAgB;aACjC;YACD,aAAa,EAAE,OAAO,CAAC,oCAAoC;SAC5D;QACD,OAAO,EAAE,EAAE;KACZ;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC;IACpE,gBAAgB,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC;IACxD,UAAU;CACX,CAAC;AACF,MAAM,6BAA6B,GAA6B;IAC9D,IAAI,EAAE,2BAA2B;IACjC,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,aAAa,EAAE,OAAO,CAAC,4CAA4C;SACpE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC;IACpE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC;IACvD,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { ContainerRegistryBlob } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { GeneratedClient } from \"../generatedClient.js\";\nimport {\n ContainerRegistryBlobGetBlobOptionalParams,\n ContainerRegistryBlobGetBlobResponse,\n ContainerRegistryBlobCheckBlobExistsOptionalParams,\n ContainerRegistryBlobCheckBlobExistsResponse,\n ContainerRegistryBlobDeleteBlobOptionalParams,\n ContainerRegistryBlobDeleteBlobResponse,\n ContainerRegistryBlobMountBlobOptionalParams,\n ContainerRegistryBlobMountBlobResponse,\n ContainerRegistryBlobGetUploadStatusOptionalParams,\n ContainerRegistryBlobGetUploadStatusResponse,\n ContainerRegistryBlobUploadChunkOptionalParams,\n ContainerRegistryBlobUploadChunkResponse,\n ContainerRegistryBlobCompleteUploadOptionalParams,\n ContainerRegistryBlobCompleteUploadResponse,\n ContainerRegistryBlobCancelUploadOptionalParams,\n ContainerRegistryBlobStartUploadOptionalParams,\n ContainerRegistryBlobStartUploadResponse,\n ContainerRegistryBlobGetChunkOptionalParams,\n ContainerRegistryBlobGetChunkResponse,\n ContainerRegistryBlobCheckChunkExistsOptionalParams,\n ContainerRegistryBlobCheckChunkExistsResponse\n} from \"../models/index.js\";\n\n/** Class containing ContainerRegistryBlob operations. */\nexport class ContainerRegistryBlobImpl implements ContainerRegistryBlob {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class ContainerRegistryBlob class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Retrieve the blob from the registry identified by digest.\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param options The options parameters.\n */\n getBlob(\n name: string,\n digest: string,\n options?: ContainerRegistryBlobGetBlobOptionalParams\n ): Promise<ContainerRegistryBlobGetBlobResponse> {\n return this.client.sendOperationRequest(\n { name, digest, options },\n getBlobOperationSpec\n );\n }\n\n /**\n * Same as GET, except only the headers are returned.\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param options The options parameters.\n */\n checkBlobExists(\n name: string,\n digest: string,\n options?: ContainerRegistryBlobCheckBlobExistsOptionalParams\n ): Promise<ContainerRegistryBlobCheckBlobExistsResponse> {\n return this.client.sendOperationRequest(\n { name, digest, options },\n checkBlobExistsOperationSpec\n );\n }\n\n /**\n * Removes an already uploaded blob.\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param options The options parameters.\n */\n deleteBlob(\n name: string,\n digest: string,\n options?: ContainerRegistryBlobDeleteBlobOptionalParams\n ): Promise<ContainerRegistryBlobDeleteBlobResponse> {\n return this.client.sendOperationRequest(\n { name, digest, options },\n deleteBlobOperationSpec\n );\n }\n\n /**\n * Mount a blob identified by the `mount` parameter from another repository.\n * @param name Name of the image (including the namespace)\n * @param fromParam Name of the source repository.\n * @param mount Digest of blob to mount from the source repository.\n * @param options The options parameters.\n */\n mountBlob(\n name: string,\n fromParam: string,\n mount: string,\n options?: ContainerRegistryBlobMountBlobOptionalParams\n ): Promise<ContainerRegistryBlobMountBlobResponse> {\n return this.client.sendOperationRequest(\n { name, fromParam, mount, options },\n mountBlobOperationSpec\n );\n }\n\n /**\n * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the\n * current status of a resumable upload.\n * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial /\n * (must do substring(1) )\n * @param options The options parameters.\n */\n getUploadStatus(\n nextLink: string,\n options?: ContainerRegistryBlobGetUploadStatusOptionalParams\n ): Promise<ContainerRegistryBlobGetUploadStatusResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n getUploadStatusOperationSpec\n );\n }\n\n /**\n * Upload a stream of data without completing the upload.\n * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial /\n * (must do substring(1) )\n * @param value Raw data of blob\n * @param options The options parameters.\n */\n uploadChunk(\n nextLink: string,\n value: coreRestPipeline.RequestBodyType,\n options?: ContainerRegistryBlobUploadChunkOptionalParams\n ): Promise<ContainerRegistryBlobUploadChunkResponse> {\n return this.client.sendOperationRequest(\n { nextLink, value, options },\n uploadChunkOperationSpec\n );\n }\n\n /**\n * Complete the upload, providing all the data in the body, if necessary. A request without a body will\n * just complete the upload with previously uploaded content.\n * @param digest Digest of a BLOB\n * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial /\n * (must do substring(1) )\n * @param options The options parameters.\n */\n completeUpload(\n digest: string,\n nextLink: string,\n options?: ContainerRegistryBlobCompleteUploadOptionalParams\n ): Promise<ContainerRegistryBlobCompleteUploadResponse> {\n return this.client.sendOperationRequest(\n { digest, nextLink, options },\n completeUploadOperationSpec\n );\n }\n\n /**\n * Cancel outstanding upload processes, releasing associated resources. If this is not called, the\n * unfinished uploads will eventually timeout.\n * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial /\n * (must do substring(1) )\n * @param options The options parameters.\n */\n cancelUpload(\n nextLink: string,\n options?: ContainerRegistryBlobCancelUploadOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n cancelUploadOperationSpec\n );\n }\n\n /**\n * Initiate a resumable blob upload with an empty request body.\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n startUpload(\n name: string,\n options?: ContainerRegistryBlobStartUploadOptionalParams\n ): Promise<ContainerRegistryBlobStartUploadResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n startUploadOperationSpec\n );\n }\n\n /**\n * Retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233\n * compliant range requests. Support can be detected by issuing a HEAD request. If the header\n * `Accept-Range: bytes` is returned, range requests can be used to fetch partial content.\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk.\n * @param options The options parameters.\n */\n getChunk(\n name: string,\n digest: string,\n range: string,\n options?: ContainerRegistryBlobGetChunkOptionalParams\n ): Promise<ContainerRegistryBlobGetChunkResponse> {\n return this.client.sendOperationRequest(\n { name, digest, range, options },\n getChunkOperationSpec\n );\n }\n\n /**\n * Same as GET, except only the headers are returned.\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk.\n * @param options The options parameters.\n */\n checkChunkExists(\n name: string,\n digest: string,\n range: string,\n options?: ContainerRegistryBlobCheckChunkExistsOptionalParams\n ): Promise<ContainerRegistryBlobCheckChunkExistsResponse> {\n return this.client.sendOperationRequest(\n { name, digest, range, options },\n checkChunkExistsOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getBlobOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/{digest}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: Mappers.ContainerRegistryBlobGetBlobHeaders\n },\n 307: {\n headersMapper: Mappers.ContainerRegistryBlobGetBlobHeaders\n },\n default: {}\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept3],\n serializer\n};\nconst checkBlobExistsOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/{digest}\",\n httpMethod: \"HEAD\",\n responses: {\n 200: {\n headersMapper: Mappers.ContainerRegistryBlobCheckBlobExistsHeaders\n },\n 307: {\n headersMapper: Mappers.ContainerRegistryBlobCheckBlobExistsHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteBlobOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/{digest}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {\n headersMapper: Mappers.ContainerRegistryBlobDeleteBlobHeaders\n },\n 404: {},\n default: {}\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n serializer\n};\nconst mountBlobOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/uploads/\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n headersMapper: Mappers.ContainerRegistryBlobMountBlobHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.fromParam, Parameters.mount],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getUploadStatusOperationSpec: coreClient.OperationSpec = {\n path: \"/{nextBlobUuidLink}\",\n httpMethod: \"GET\",\n responses: {\n 204: {\n headersMapper: Mappers.ContainerRegistryBlobGetUploadStatusHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.nextLink1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst uploadChunkOperationSpec: coreClient.OperationSpec = {\n path: \"/{nextBlobUuidLink}\",\n httpMethod: \"PATCH\",\n responses: {\n 202: {\n headersMapper: Mappers.ContainerRegistryBlobUploadChunkHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.value3,\n urlParameters: [Parameters.url, Parameters.nextLink1],\n headerParameters: [Parameters.accept2, Parameters.contentType2],\n mediaType: \"binary\",\n serializer\n};\nconst completeUploadOperationSpec: coreClient.OperationSpec = {\n path: \"/{nextBlobUuidLink}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.ContainerRegistryBlobCompleteUploadHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.value4,\n queryParameters: [Parameters.digest2],\n urlParameters: [Parameters.url, Parameters.nextLink1],\n headerParameters: [Parameters.accept2, Parameters.contentType2],\n mediaType: \"binary\",\n serializer\n};\nconst cancelUploadOperationSpec: coreClient.OperationSpec = {\n path: \"/{nextBlobUuidLink}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.nextLink1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst startUploadOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/uploads/\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.ContainerRegistryBlobStartUploadHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getChunkOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/{digest}\",\n httpMethod: \"GET\",\n responses: {\n 206: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: Mappers.ContainerRegistryBlobGetChunkHeaders\n },\n default: {}\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept3, Parameters.range],\n serializer\n};\nconst checkChunkExistsOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/{digest}\",\n httpMethod: \"HEAD\",\n responses: {\n 200: {\n headersMapper: Mappers.ContainerRegistryBlobCheckChunkExistsHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept, Parameters.range],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"containerRegistryBlob.js","sourceRoot":"","sources":["../../../../src/generated/operations/containerRegistryBlob.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AA0BtD,yDAAyD;AACzD,MAAM,OAAO,yBAAyB;IACnB,MAAM,CAAkB;IAEzC;;;OAGG;IACH,YAAY,MAAu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B,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACxB,cAAc,EAAE,gBAAgB;aACjC;YACD,aAAa,EAAE,OAAO,CAAC,oCAAoC;SAC5D;QACD,OAAO,EAAE,EAAE;KACZ;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC;IACpE,gBAAgB,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC;IACxD,UAAU;CACX,CAAC;AACF,MAAM,6BAA6B,GAA6B;IAC9D,IAAI,EAAE,2BAA2B;IACjC,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,aAAa,EAAE,OAAO,CAAC,4CAA4C;SACpE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC;IACpE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC;IACvD,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { ContainerRegistryBlob } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { GeneratedClient } from \"../generatedClient.js\";\nimport {\n ContainerRegistryBlobGetBlobOptionalParams,\n ContainerRegistryBlobGetBlobResponse,\n ContainerRegistryBlobCheckBlobExistsOptionalParams,\n ContainerRegistryBlobCheckBlobExistsResponse,\n ContainerRegistryBlobDeleteBlobOptionalParams,\n ContainerRegistryBlobDeleteBlobResponse,\n ContainerRegistryBlobMountBlobOptionalParams,\n ContainerRegistryBlobMountBlobResponse,\n ContainerRegistryBlobGetUploadStatusOptionalParams,\n ContainerRegistryBlobGetUploadStatusResponse,\n ContainerRegistryBlobUploadChunkOptionalParams,\n ContainerRegistryBlobUploadChunkResponse,\n ContainerRegistryBlobCompleteUploadOptionalParams,\n ContainerRegistryBlobCompleteUploadResponse,\n ContainerRegistryBlobCancelUploadOptionalParams,\n ContainerRegistryBlobStartUploadOptionalParams,\n ContainerRegistryBlobStartUploadResponse,\n ContainerRegistryBlobGetChunkOptionalParams,\n ContainerRegistryBlobGetChunkResponse,\n ContainerRegistryBlobCheckChunkExistsOptionalParams,\n ContainerRegistryBlobCheckChunkExistsResponse\n} from \"../models/index.js\";\n\n/** Class containing ContainerRegistryBlob operations. */\nexport class ContainerRegistryBlobImpl implements ContainerRegistryBlob {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class ContainerRegistryBlob class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Retrieve the blob from the registry identified by digest.\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param options The options parameters.\n */\n getBlob(\n name: string,\n digest: string,\n options?: ContainerRegistryBlobGetBlobOptionalParams\n ): Promise<ContainerRegistryBlobGetBlobResponse> {\n return this.client.sendOperationRequest(\n { name, digest, options },\n getBlobOperationSpec\n );\n }\n\n /**\n * Same as GET, except only the headers are returned.\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param options The options parameters.\n */\n checkBlobExists(\n name: string,\n digest: string,\n options?: ContainerRegistryBlobCheckBlobExistsOptionalParams\n ): Promise<ContainerRegistryBlobCheckBlobExistsResponse> {\n return this.client.sendOperationRequest(\n { name, digest, options },\n checkBlobExistsOperationSpec\n );\n }\n\n /**\n * Removes an already uploaded blob.\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param options The options parameters.\n */\n deleteBlob(\n name: string,\n digest: string,\n options?: ContainerRegistryBlobDeleteBlobOptionalParams\n ): Promise<ContainerRegistryBlobDeleteBlobResponse> {\n return this.client.sendOperationRequest(\n { name, digest, options },\n deleteBlobOperationSpec\n );\n }\n\n /**\n * Mount a blob identified by the `mount` parameter from another repository.\n * @param name Name of the image (including the namespace)\n * @param fromParam Name of the source repository.\n * @param mount Digest of blob to mount from the source repository.\n * @param options The options parameters.\n */\n mountBlob(\n name: string,\n fromParam: string,\n mount: string,\n options?: ContainerRegistryBlobMountBlobOptionalParams\n ): Promise<ContainerRegistryBlobMountBlobResponse> {\n return this.client.sendOperationRequest(\n { name, fromParam, mount, options },\n mountBlobOperationSpec\n );\n }\n\n /**\n * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the\n * current status of a resumable upload.\n * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial /\n * (must do substring(1) )\n * @param options The options parameters.\n */\n getUploadStatus(\n nextLink: string,\n options?: ContainerRegistryBlobGetUploadStatusOptionalParams\n ): Promise<ContainerRegistryBlobGetUploadStatusResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n getUploadStatusOperationSpec\n );\n }\n\n /**\n * Upload a stream of data without completing the upload.\n * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial /\n * (must do substring(1) )\n * @param value Raw data of blob\n * @param options The options parameters.\n */\n uploadChunk(\n nextLink: string,\n value: coreRestPipeline.RequestBodyType,\n options?: ContainerRegistryBlobUploadChunkOptionalParams\n ): Promise<ContainerRegistryBlobUploadChunkResponse> {\n return this.client.sendOperationRequest(\n { nextLink, value, options },\n uploadChunkOperationSpec\n );\n }\n\n /**\n * Complete the upload, providing all the data in the body, if necessary. A request without a body will\n * just complete the upload with previously uploaded content.\n * @param digest Digest of a BLOB\n * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial /\n * (must do substring(1) )\n * @param options The options parameters.\n */\n completeUpload(\n digest: string,\n nextLink: string,\n options?: ContainerRegistryBlobCompleteUploadOptionalParams\n ): Promise<ContainerRegistryBlobCompleteUploadResponse> {\n return this.client.sendOperationRequest(\n { digest, nextLink, options },\n completeUploadOperationSpec\n );\n }\n\n /**\n * Cancel outstanding upload processes, releasing associated resources. If this is not called, the\n * unfinished uploads will eventually timeout.\n * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial /\n * (must do substring(1) )\n * @param options The options parameters.\n */\n cancelUpload(\n nextLink: string,\n options?: ContainerRegistryBlobCancelUploadOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n cancelUploadOperationSpec\n );\n }\n\n /**\n * Initiate a resumable blob upload with an empty request body.\n * @param name Name of the image (including the namespace)\n * @param options The options parameters.\n */\n startUpload(\n name: string,\n options?: ContainerRegistryBlobStartUploadOptionalParams\n ): Promise<ContainerRegistryBlobStartUploadResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n startUploadOperationSpec\n );\n }\n\n /**\n * Retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233\n * compliant range requests. Support can be detected by issuing a HEAD request. If the header\n * `Accept-Range: bytes` is returned, range requests can be used to fetch partial content.\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk.\n * @param options The options parameters.\n */\n getChunk(\n name: string,\n digest: string,\n range: string,\n options?: ContainerRegistryBlobGetChunkOptionalParams\n ): Promise<ContainerRegistryBlobGetChunkResponse> {\n return this.client.sendOperationRequest(\n { name, digest, range, options },\n getChunkOperationSpec\n );\n }\n\n /**\n * Same as GET, except only the headers are returned.\n * @param name Name of the image (including the namespace)\n * @param digest Digest of a BLOB\n * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk.\n * @param options The options parameters.\n */\n checkChunkExists(\n name: string,\n digest: string,\n range: string,\n options?: ContainerRegistryBlobCheckChunkExistsOptionalParams\n ): Promise<ContainerRegistryBlobCheckChunkExistsResponse> {\n return this.client.sendOperationRequest(\n { name, digest, range, options },\n checkChunkExistsOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getBlobOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/{digest}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: Mappers.ContainerRegistryBlobGetBlobHeaders\n },\n 307: {\n headersMapper: Mappers.ContainerRegistryBlobGetBlobHeaders\n },\n default: {}\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept3],\n serializer\n};\nconst checkBlobExistsOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/{digest}\",\n httpMethod: \"HEAD\",\n responses: {\n 200: {\n headersMapper: Mappers.ContainerRegistryBlobCheckBlobExistsHeaders\n },\n 307: {\n headersMapper: Mappers.ContainerRegistryBlobCheckBlobExistsHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteBlobOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/{digest}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {\n headersMapper: Mappers.ContainerRegistryBlobDeleteBlobHeaders\n },\n 404: {},\n default: {}\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n serializer\n};\nconst mountBlobOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/uploads/\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n headersMapper: Mappers.ContainerRegistryBlobMountBlobHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n queryParameters: [Parameters.fromParam, Parameters.mount],\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getUploadStatusOperationSpec: coreClient.OperationSpec = {\n path: \"/{nextBlobUuidLink}\",\n httpMethod: \"GET\",\n responses: {\n 204: {\n headersMapper: Mappers.ContainerRegistryBlobGetUploadStatusHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.nextLink1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst uploadChunkOperationSpec: coreClient.OperationSpec = {\n path: \"/{nextBlobUuidLink}\",\n httpMethod: \"PATCH\",\n responses: {\n 202: {\n headersMapper: Mappers.ContainerRegistryBlobUploadChunkHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.value3,\n urlParameters: [Parameters.url, Parameters.nextLink1],\n headerParameters: [Parameters.accept2, Parameters.contentType2],\n mediaType: \"binary\",\n serializer\n};\nconst completeUploadOperationSpec: coreClient.OperationSpec = {\n path: \"/{nextBlobUuidLink}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.ContainerRegistryBlobCompleteUploadHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n requestBody: Parameters.value4,\n queryParameters: [Parameters.digest2],\n urlParameters: [Parameters.url, Parameters.nextLink1],\n headerParameters: [Parameters.accept2, Parameters.contentType2],\n mediaType: \"binary\",\n serializer\n};\nconst cancelUploadOperationSpec: coreClient.OperationSpec = {\n path: \"/{nextBlobUuidLink}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.nextLink1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst startUploadOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/uploads/\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.ContainerRegistryBlobStartUploadHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getChunkOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/{digest}\",\n httpMethod: \"GET\",\n responses: {\n 206: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: Mappers.ContainerRegistryBlobGetChunkHeaders\n },\n default: {}\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept3, Parameters.range],\n serializer\n};\nconst checkChunkExistsOperationSpec: coreClient.OperationSpec = {\n path: \"/v2/{name}/blobs/{digest}\",\n httpMethod: \"HEAD\",\n responses: {\n 200: {\n headersMapper: Mappers.ContainerRegistryBlobCheckChunkExistsHeaders\n },\n default: {\n bodyMapper: Mappers.AcrErrors\n }\n },\n urlParameters: [Parameters.url, Parameters.name, Parameters.digest1],\n headerParameters: [Parameters.accept, Parameters.range],\n serializer\n};\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
4
3
|
import { tracingClient } from "./tracing.js";
|
|
5
4
|
import { extractNextLink, isDigest } from "./utils/helpers.js";
|
|
6
5
|
import { toArtifactManifestProperties, toServiceTagOrderBy } from "./transformations.js";
|
|
@@ -9,6 +8,22 @@ import { toArtifactManifestProperties, toServiceTagOrderBy } from "./transformat
|
|
|
9
8
|
* @internal
|
|
10
9
|
*/
|
|
11
10
|
export class RegistryArtifactImpl {
|
|
11
|
+
tagOrDigest;
|
|
12
|
+
client;
|
|
13
|
+
/**
|
|
14
|
+
* The Azure Container Registry endpoint.
|
|
15
|
+
*/
|
|
16
|
+
registryEndpoint;
|
|
17
|
+
/**
|
|
18
|
+
* Repository name.
|
|
19
|
+
*/
|
|
20
|
+
repositoryName;
|
|
21
|
+
/**
|
|
22
|
+
* Name of the form 'registry-login-server/repository-name\@digest' or
|
|
23
|
+
* 'registry-login-server/repository-name:tag'
|
|
24
|
+
*/
|
|
25
|
+
fullyQualifiedReference;
|
|
26
|
+
digest;
|
|
12
27
|
/**
|
|
13
28
|
* Creates an instance of a RegistryArtifact.
|
|
14
29
|
* @param registryEndpoint - the URL to the Container Registry endpoint
|
|
@@ -102,12 +117,15 @@ export class RegistryArtifactImpl {
|
|
|
102
117
|
* @param options - options to update manifest properties
|
|
103
118
|
*/
|
|
104
119
|
async updateManifestProperties(options) {
|
|
105
|
-
return tracingClient.withSpan("RegistryArtifactImpl.updateManifestProperties",
|
|
120
|
+
return tracingClient.withSpan("RegistryArtifactImpl.updateManifestProperties", {
|
|
121
|
+
...options,
|
|
122
|
+
value: {
|
|
106
123
|
canDelete: options.canDelete,
|
|
107
124
|
canWrite: options.canWrite,
|
|
108
125
|
canList: options.canList,
|
|
109
126
|
canRead: options.canRead,
|
|
110
|
-
}
|
|
127
|
+
},
|
|
128
|
+
}, async (updatedOptions) => {
|
|
111
129
|
const result = await this.client.containerRegistry.updateManifestProperties(this.repositoryName, await this.getDigest(), updatedOptions);
|
|
112
130
|
return toArtifactManifestProperties(result, this.repositoryName, result.registryLoginServer);
|
|
113
131
|
});
|
|
@@ -155,12 +173,15 @@ export class RegistryArtifactImpl {
|
|
|
155
173
|
if (!tag) {
|
|
156
174
|
throw new Error("invalid tag");
|
|
157
175
|
}
|
|
158
|
-
return tracingClient.withSpan("RegistryArtifactImpl.updateTagProperties",
|
|
176
|
+
return tracingClient.withSpan("RegistryArtifactImpl.updateTagProperties", {
|
|
177
|
+
...options,
|
|
178
|
+
value: {
|
|
159
179
|
canDelete: options.canDelete,
|
|
160
180
|
canWrite: options.canWrite,
|
|
161
181
|
canList: options.canList,
|
|
162
182
|
canRead: options.canRead,
|
|
163
|
-
}
|
|
183
|
+
},
|
|
184
|
+
}, (updatedOptions) => {
|
|
164
185
|
return this.client.containerRegistry.updateTagAttributes(this.repositoryName, tag, updatedOptions);
|
|
165
186
|
});
|
|
166
187
|
}
|
|
@@ -198,57 +219,52 @@ export class RegistryArtifactImpl {
|
|
|
198
219
|
byPage: (settings = {}) => this.listTagsPage(settings, options),
|
|
199
220
|
};
|
|
200
221
|
}
|
|
201
|
-
listTagsItems() {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
for (var _d = true, _e = __asyncValues(this.listTagsPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
206
|
-
_c = _f.value;
|
|
207
|
-
_d = false;
|
|
208
|
-
const page = _c;
|
|
209
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
213
|
-
finally {
|
|
214
|
-
try {
|
|
215
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
216
|
-
}
|
|
217
|
-
finally { if (e_1) throw e_1.error; }
|
|
218
|
-
}
|
|
219
|
-
});
|
|
222
|
+
async *listTagsItems(options = {}) {
|
|
223
|
+
for await (const page of this.listTagsPage({}, options)) {
|
|
224
|
+
yield* page;
|
|
225
|
+
}
|
|
220
226
|
}
|
|
221
|
-
listTagsPage(
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
227
|
+
async *listTagsPage(continuationState, options = {}) {
|
|
228
|
+
const orderby = toServiceTagOrderBy(options.order);
|
|
229
|
+
if (!continuationState.continuationToken) {
|
|
230
|
+
const optionsComplete = {
|
|
231
|
+
...options,
|
|
232
|
+
n: continuationState.maxPageSize,
|
|
233
|
+
orderby,
|
|
234
|
+
};
|
|
235
|
+
const currentPage = await this.client.containerRegistry.getTags(this.repositoryName, optionsComplete);
|
|
236
|
+
continuationState.continuationToken = extractNextLink(currentPage.link);
|
|
237
|
+
if (currentPage.tagAttributeBases) {
|
|
238
|
+
const array = currentPage.tagAttributeBases.map((t) => {
|
|
239
|
+
return {
|
|
240
|
+
registryLoginServer: currentPage.registryLoginServer,
|
|
241
|
+
repositoryName: currentPage.repository,
|
|
242
|
+
...t,
|
|
243
|
+
};
|
|
244
|
+
});
|
|
245
|
+
yield Object.defineProperty(array, "continuationToken", {
|
|
246
|
+
value: continuationState.continuationToken,
|
|
247
|
+
enumerable: true,
|
|
248
|
+
});
|
|
237
249
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
+
}
|
|
251
|
+
while (continuationState.continuationToken) {
|
|
252
|
+
const currentPage = await this.client.containerRegistry.getTagsNext(this.repositoryName, continuationState.continuationToken, options);
|
|
253
|
+
continuationState.continuationToken = extractNextLink(currentPage.link);
|
|
254
|
+
if (currentPage.tagAttributeBases) {
|
|
255
|
+
const array = currentPage.tagAttributeBases.map((t) => {
|
|
256
|
+
return {
|
|
257
|
+
registryLoginServer: currentPage.registryLoginServer,
|
|
258
|
+
repositoryName: currentPage.repository,
|
|
259
|
+
...t,
|
|
260
|
+
};
|
|
261
|
+
});
|
|
262
|
+
yield Object.defineProperty(array, "continuationToken", {
|
|
263
|
+
value: continuationState.continuationToken,
|
|
264
|
+
enumerable: true,
|
|
265
|
+
});
|
|
250
266
|
}
|
|
251
|
-
}
|
|
267
|
+
}
|
|
252
268
|
}
|
|
253
269
|
}
|
|
254
270
|
//# sourceMappingURL=registryArtifact.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registryArtifact.js","sourceRoot":"","sources":["../../src/registryArtifact.ts"],"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,MAAM,KAAK,GAAG,WAAW,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;wBACpD,uBACE,mBAAmB,EAAE,WAAW,CAAC,mBAAmB,EACpD,cAAc,EAAE,WAAW,CAAC,UAAU,IACnC,CAAC,EACJ;oBACJ,CAAC,CAAC,CAAC;oBACH,oBAAM,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,mBAAmB,EAAE;wBACtD,KAAK,EAAE,iBAAiB,CAAC,iBAAiB;wBAC1C,UAAU,EAAE,IAAI;qBACjB,CAAC,CAAA,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;KAAA;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type { OperationOptions } from \"@azure/core-client\";\nimport type { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\nimport type {\n ArtifactTagProperties,\n ArtifactManifestProperties,\n ArtifactTagOrder,\n TagPageResponse,\n} from \"./models.js\";\nimport { tracingClient } from \"./tracing.js\";\nimport type { GeneratedClient } from \"./generated/index.js\";\nimport { extractNextLink, isDigest } from \"./utils/helpers.js\";\nimport { toArtifactManifestProperties, toServiceTagOrderBy } from \"./transformations.js\";\n\n/**\n * Options for the `delete` method of `RegistryArtifact`.\n */\nexport interface DeleteArtifactOptions extends OperationOptions {}\n/**\n * Options for the `deleteTag` method of `RegistryArtifact`.\n */\nexport interface DeleteTagOptions extends OperationOptions {}\n/**\n * Options for the `getManifestProperties` method of `RegistryArtifact`.\n */\nexport interface GetManifestPropertiesOptions extends OperationOptions {}\n/**\n * Options for the `getTagProperties` method of `RegistryArtifact`.\n */\nexport interface GetTagPropertiesOptions extends OperationOptions {}\n\n/**\n * Options for the `updateTagProperties` method of `RegistryArtifact`.\n */\nexport interface UpdateTagPropertiesOptions extends OperationOptions {\n /** Whether or not this tag can be deleted */\n canDelete?: boolean;\n /** Whether or not this tag can be written to */\n canWrite?: boolean;\n /** Whether or not to include this tag when listing tags */\n canList?: boolean;\n /** Whether or not this tag can be read */\n canRead?: boolean;\n}\n\n/**\n * Options for the `updateManifestProperties` method of `RegistryArtifact`.\n */\nexport interface UpdateManifestPropertiesOptions extends OperationOptions {\n /** Whether or not this manifest can be deleted */\n canDelete?: boolean;\n /** Whether or not this manifest can be written to */\n canWrite?: boolean;\n /** Whether or not to include this manifest when listing manifest properties */\n canList?: boolean;\n /** Whether or not this manifest can be read */\n canRead?: boolean;\n}\n\n/**\n * Options for the `listTagProperties` method of `RegistryArtifact`.\n */\nexport interface ListTagPropertiesOptions extends OperationOptions {\n /** order in which the tags are returned */\n order?: ArtifactTagOrder;\n}\n\n/**\n * `Artifact` is the general term for items stored in a container registry,\n * and can include Docker images or other Open Container Initiative (OCI) artifact types.\n *\n * The {@link RegistryArtifact} interface is a helper that groups information and operations about an image\n * or artifact in a container registry.\n *\n */\nexport interface RegistryArtifact {\n /**\n * The Azure Container Registry endpoint.\n */\n readonly registryEndpoint: string;\n /**\n * Repository name.\n */\n readonly repositoryName: string;\n /**\n * fully qualified reference of the artifact.\n */\n readonly fullyQualifiedReference: string;\n /**\n * Deletes this registry artifact by deleting its manifest.\n * @param options -\n */\n delete(options?: DeleteArtifactOptions): Promise<void>;\n /**\n * Deletes a tag. This removes the tag from the artifact and its manifest.\n * @param tag - the name of the tag to delete.\n * @param options -\n */\n deleteTag(tag: string, options?: DeleteTagOptions): Promise<void>;\n /**\n * Retrieves the properties of the manifest that uniquely identifies this artifact.\n * @param options -\n */\n getManifestProperties(\n options?: GetManifestPropertiesOptions,\n ): Promise<ArtifactManifestProperties>;\n /**\n * Updates the properties of the artifact's manifest.\n *\n * Example usage:\n *\n * ```ts snippet:RegistryArtifactUpdateManifestProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * const updated = await artifact.updateManifestProperties({\n * canDelete: false,\n * canList: false,\n * canRead: false,\n * canWrite: false,\n * });\n * ```\n * @param options -\n */\n updateManifestProperties(\n options: UpdateManifestPropertiesOptions,\n ): Promise<ArtifactManifestProperties>;\n /**\n * Retrieves the properties of the specified tag.\n * @param tag - the tag to retrieve properties.\n * @param options - options to get tag properties\n */\n getTagProperties(tag: string, options?: GetTagPropertiesOptions): Promise<ArtifactTagProperties>;\n /**\n * Updates the properties of a given tag.\n *\n * Example usage:\n *\n * ```ts snippet:RegistryArtifactUpdateTagProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const tag = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * const updated = await artifact.updateTagProperties(tag, {\n * canDelete: false,\n * canList: false,\n * canRead: false,\n * canWrite: false,\n * });\n * ```\n * @param tag - name of the tag to update properties on\n * @param options -\n */\n updateTagProperties(\n tag: string,\n options: UpdateTagPropertiesOptions,\n ): Promise<ArtifactTagProperties>;\n /**\n * Returns an async iterable iterator to list the tags that uniquely identify this artifact and the properties of each.\n *\n * Example using `for-await-of` syntax:\n *\n * ```ts snippet:RegistryArtifactListTagProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * for await (const tag of artifact.listTagProperties()) {\n * console.log(\"tag: \", tag);\n * }\n * ```\n *\n * @param options - options to list tags\n */\n listTagProperties(\n options?: ListTagPropertiesOptions,\n ): PagedAsyncIterableIterator<ArtifactTagProperties>;\n}\n\n/**\n * The client class used to interact with the Container Registry service.\n * @internal\n */\nexport class RegistryArtifactImpl {\n private client: GeneratedClient;\n /**\n * The Azure Container Registry endpoint.\n */\n public readonly registryEndpoint: string;\n /**\n * Repository name.\n */\n public readonly repositoryName: string;\n\n /**\n * Name of the form 'registry-login-server/repository-name\\@digest' or\n * 'registry-login-server/repository-name:tag'\n */\n public readonly fullyQualifiedReference: string;\n\n private digest?: string;\n /**\n * Creates an instance of a RegistryArtifact.\n * @param registryEndpoint - the URL to the Container Registry endpoint\n * @param repositoryName - the name of the repository\n * @param tagOrDigest - the tag or digest of this artifact\n * @param client - the generated client that interacts with service\n */\n constructor(\n registryEndpoint: string,\n repositoryName: string,\n private tagOrDigest: string,\n client: GeneratedClient,\n ) {\n this.registryEndpoint = registryEndpoint;\n this.repositoryName = repositoryName;\n\n const parsedUrl = new URL(registryEndpoint);\n if (isDigest(tagOrDigest)) {\n this.digest = tagOrDigest;\n this.fullyQualifiedReference = `${parsedUrl.hostname}/${repositoryName}@${this.digest}`;\n } else {\n this.fullyQualifiedReference = `${parsedUrl.hostname}/${repositoryName}:${tagOrDigest}`;\n }\n\n this.client = client;\n }\n\n /**\n * digest of this artifact.\n */\n private async getDigest(): Promise<string> {\n if (this.digest) {\n return this.digest;\n }\n\n if (!isDigest(this.tagOrDigest)) {\n this.digest = (await this.getTagProperties(this.tagOrDigest)).digest;\n } else {\n this.digest = this.tagOrDigest;\n }\n\n return this.digest;\n }\n\n /**\n * Deletes this registry artifact by deleting its manifest.\n * @param options -\n */\n public async delete(options: DeleteArtifactOptions = {}): Promise<void> {\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.delete\",\n options,\n async (updatedOptions) => {\n await this.client.containerRegistry.deleteManifest(\n this.repositoryName,\n await this.getDigest(),\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Deletes a tag. This removes the tag from the artifact and its manifest.\n * @param tag - the name of the tag to delete.\n * @param options -\n */\n public async deleteTag(tag: string, options: DeleteTagOptions = {}): Promise<void> {\n if (!tag) {\n throw new Error(\"invalid tag\");\n }\n\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.deleteTag\",\n options,\n async (updatedOptions) => {\n await this.client.containerRegistry.deleteTag(this.repositoryName, tag, updatedOptions);\n },\n );\n }\n\n /**\n * Retrieves the properties of the manifest that uniquely identifies this artifact.\n * @param options -\n */\n public async getManifestProperties(\n options: GetManifestPropertiesOptions = {},\n ): Promise<ArtifactManifestProperties> {\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.getManifestProperties\",\n options,\n async (updatedOptions) => {\n const result = await this.client.containerRegistry.getManifestProperties(\n this.repositoryName,\n await this.getDigest(),\n updatedOptions,\n );\n return toArtifactManifestProperties(\n result,\n this.repositoryName,\n result.registryLoginServer!,\n );\n },\n );\n }\n\n /**\n * Updates the properties of the artifact's manifest.\n *\n * Example usage:\n *\n * ```ts snippet:RegistryArtifactUpdateManifestProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * const updated = await artifact.updateManifestProperties({\n * canDelete: false,\n * canList: false,\n * canRead: false,\n * canWrite: false,\n * });\n * ```\n * @param options - options to update manifest properties\n */\n public async updateManifestProperties(\n options: UpdateManifestPropertiesOptions,\n ): Promise<ArtifactManifestProperties> {\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.updateManifestProperties\",\n {\n ...options,\n value: {\n canDelete: options.canDelete,\n canWrite: options.canWrite,\n canList: options.canList,\n canRead: options.canRead,\n },\n },\n async (updatedOptions) => {\n const result = await this.client.containerRegistry.updateManifestProperties(\n this.repositoryName,\n await this.getDigest(),\n updatedOptions,\n );\n return toArtifactManifestProperties(\n result,\n this.repositoryName,\n result.registryLoginServer!,\n );\n },\n );\n }\n\n /**\n * Retrieves the properties of the specified tag.\n * @param tag - the tag to retrieve properties.\n * @param options - options to get tag properties\n */\n public async getTagProperties(\n tag: string,\n options: GetTagPropertiesOptions = {},\n ): Promise<ArtifactTagProperties> {\n if (!tag) {\n throw new Error(\"invalid tag\");\n }\n\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.getTagProperties\",\n options,\n (updatedOptions) => {\n return this.client.containerRegistry.getTagProperties(\n this.repositoryName,\n tag,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Updates the properties of a given tag.\n *\n * Example usage:\n *\n * ```ts snippet:RegistryArtifactUpdateTagProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const tag = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * const updated = await artifact.updateTagProperties(tag, {\n * canDelete: false,\n * canList: false,\n * canRead: false,\n * canWrite: false,\n * });\n * ```\n * @param tag - name of the tag to update properties on\n * @param options - options to update tag properties\n */\n public async updateTagProperties(\n tag: string,\n options: UpdateTagPropertiesOptions,\n ): Promise<ArtifactTagProperties> {\n if (!tag) {\n throw new Error(\"invalid tag\");\n }\n\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.updateTagProperties\",\n {\n ...options,\n value: {\n canDelete: options.canDelete,\n canWrite: options.canWrite,\n canList: options.canList,\n canRead: options.canRead,\n },\n },\n (updatedOptions) => {\n return this.client.containerRegistry.updateTagAttributes(\n this.repositoryName,\n tag,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list the tags that uniquely identify this artifact and the properties of each.\n *\n * Example using `for-await-of` syntax:\n *\n * ```ts snippet:RegistryArtifactListTagProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * for await (const tag of artifact.listTagProperties()) {\n * console.log(\"tag: \", tag);\n * }\n * ```\n *\n * @param options - options to list tags\n */\n public listTagProperties(\n options: ListTagPropertiesOptions = {},\n ): PagedAsyncIterableIterator<ArtifactTagProperties, TagPageResponse> {\n const iter = this.listTagsItems(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => this.listTagsPage(settings, options),\n };\n }\n\n private async *listTagsItems(\n options: ListTagPropertiesOptions = {},\n ): AsyncIterableIterator<ArtifactTagProperties> {\n for await (const page of this.listTagsPage({}, options)) {\n yield* page;\n }\n }\n\n private async *listTagsPage(\n continuationState: PageSettings,\n options: ListTagPropertiesOptions = {},\n ): AsyncIterableIterator<TagPageResponse> {\n const orderby = toServiceTagOrderBy(options.order);\n if (!continuationState.continuationToken) {\n const optionsComplete = {\n ...options,\n n: continuationState.maxPageSize,\n orderby,\n };\n const currentPage = await this.client.containerRegistry.getTags(\n this.repositoryName,\n optionsComplete,\n );\n continuationState.continuationToken = extractNextLink(currentPage.link);\n if (currentPage.tagAttributeBases) {\n const array = currentPage.tagAttributeBases.map((t) => {\n return {\n registryLoginServer: currentPage.registryLoginServer,\n repositoryName: currentPage.repository,\n ...t,\n };\n });\n yield Object.defineProperty(array, \"continuationToken\", {\n value: continuationState.continuationToken,\n enumerable: true,\n });\n }\n }\n while (continuationState.continuationToken) {\n const currentPage = await this.client.containerRegistry.getTagsNext(\n this.repositoryName,\n continuationState.continuationToken,\n options,\n );\n continuationState.continuationToken = extractNextLink(currentPage.link);\n if (currentPage.tagAttributeBases) {\n const array = currentPage.tagAttributeBases.map((t) => {\n return {\n registryLoginServer: currentPage.registryLoginServer,\n repositoryName: currentPage.repository,\n ...t,\n };\n });\n yield Object.defineProperty(array, \"continuationToken\", {\n value: continuationState.continuationToken,\n enumerable: true,\n });\n }\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"registryArtifact.js","sourceRoot":"","sources":["../../src/registryArtifact.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAalC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAwLzF;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IA4BrB;IA3BF,MAAM,CAAkB;IAChC;;OAEG;IACa,gBAAgB,CAAS;IACzC;;OAEG;IACa,cAAc,CAAS;IAEvC;;;OAGG;IACa,uBAAuB,CAAS;IAExC,MAAM,CAAU;IACxB;;;;;;OAMG;IACH,YACE,gBAAwB,EACxB,cAAsB,EACd,WAAmB,EAC3B,MAAuB;QADf,gBAAW,GAAX,WAAW,CAAQ;QAG3B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAC5C,IAAI,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC;YAC1B,IAAI,CAAC,uBAAuB,GAAG,GAAG,SAAS,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AAC,CAAC;gBACH,MAAM,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,mBAAmB,EAAE;oBACtD,KAAK,EAAE,iBAAiB,CAAC,iBAAiB;oBAC1C,UAAU,EAAE,IAAI;iBACjB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,OAAO,iBAAiB,CAAC,iBAAiB,EAAE,CAAC;YAC3C,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,WAAW,CACjE,IAAI,CAAC,cAAc,EACnB,iBAAiB,CAAC,iBAAiB,EACnC,OAAO,CACR,CAAC;YACF,iBAAiB,CAAC,iBAAiB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACxE,IAAI,WAAW,CAAC,iBAAiB,EAAE,CAAC;gBAClC,MAAM,KAAK,GAAG,WAAW,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;oBACpD,OAAO;wBACL,mBAAmB,EAAE,WAAW,CAAC,mBAAmB;wBACpD,cAAc,EAAE,WAAW,CAAC,UAAU;wBACtC,GAAG,CAAC;qBACL,CAAC;gBACJ,CAAC,CAAC,CAAC;gBACH,MAAM,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,mBAAmB,EAAE;oBACtD,KAAK,EAAE,iBAAiB,CAAC,iBAAiB;oBAC1C,UAAU,EAAE,IAAI;iBACjB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type { OperationOptions } from \"@azure/core-client\";\nimport type { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\nimport type {\n ArtifactTagProperties,\n ArtifactManifestProperties,\n ArtifactTagOrder,\n TagPageResponse,\n} from \"./models.js\";\nimport { tracingClient } from \"./tracing.js\";\nimport type { GeneratedClient } from \"./generated/index.js\";\nimport { extractNextLink, isDigest } from \"./utils/helpers.js\";\nimport { toArtifactManifestProperties, toServiceTagOrderBy } from \"./transformations.js\";\n\n/**\n * Options for the `delete` method of `RegistryArtifact`.\n */\nexport interface DeleteArtifactOptions extends OperationOptions {}\n/**\n * Options for the `deleteTag` method of `RegistryArtifact`.\n */\nexport interface DeleteTagOptions extends OperationOptions {}\n/**\n * Options for the `getManifestProperties` method of `RegistryArtifact`.\n */\nexport interface GetManifestPropertiesOptions extends OperationOptions {}\n/**\n * Options for the `getTagProperties` method of `RegistryArtifact`.\n */\nexport interface GetTagPropertiesOptions extends OperationOptions {}\n\n/**\n * Options for the `updateTagProperties` method of `RegistryArtifact`.\n */\nexport interface UpdateTagPropertiesOptions extends OperationOptions {\n /** Whether or not this tag can be deleted */\n canDelete?: boolean;\n /** Whether or not this tag can be written to */\n canWrite?: boolean;\n /** Whether or not to include this tag when listing tags */\n canList?: boolean;\n /** Whether or not this tag can be read */\n canRead?: boolean;\n}\n\n/**\n * Options for the `updateManifestProperties` method of `RegistryArtifact`.\n */\nexport interface UpdateManifestPropertiesOptions extends OperationOptions {\n /** Whether or not this manifest can be deleted */\n canDelete?: boolean;\n /** Whether or not this manifest can be written to */\n canWrite?: boolean;\n /** Whether or not to include this manifest when listing manifest properties */\n canList?: boolean;\n /** Whether or not this manifest can be read */\n canRead?: boolean;\n}\n\n/**\n * Options for the `listTagProperties` method of `RegistryArtifact`.\n */\nexport interface ListTagPropertiesOptions extends OperationOptions {\n /** order in which the tags are returned */\n order?: ArtifactTagOrder;\n}\n\n/**\n * `Artifact` is the general term for items stored in a container registry,\n * and can include Docker images or other Open Container Initiative (OCI) artifact types.\n *\n * The {@link RegistryArtifact} interface is a helper that groups information and operations about an image\n * or artifact in a container registry.\n *\n */\nexport interface RegistryArtifact {\n /**\n * The Azure Container Registry endpoint.\n */\n readonly registryEndpoint: string;\n /**\n * Repository name.\n */\n readonly repositoryName: string;\n /**\n * fully qualified reference of the artifact.\n */\n readonly fullyQualifiedReference: string;\n /**\n * Deletes this registry artifact by deleting its manifest.\n * @param options -\n */\n delete(options?: DeleteArtifactOptions): Promise<void>;\n /**\n * Deletes a tag. This removes the tag from the artifact and its manifest.\n * @param tag - the name of the tag to delete.\n * @param options -\n */\n deleteTag(tag: string, options?: DeleteTagOptions): Promise<void>;\n /**\n * Retrieves the properties of the manifest that uniquely identifies this artifact.\n * @param options -\n */\n getManifestProperties(\n options?: GetManifestPropertiesOptions,\n ): Promise<ArtifactManifestProperties>;\n /**\n * Updates the properties of the artifact's manifest.\n *\n * Example usage:\n *\n * ```ts snippet:RegistryArtifactUpdateManifestProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * const updated = await artifact.updateManifestProperties({\n * canDelete: false,\n * canList: false,\n * canRead: false,\n * canWrite: false,\n * });\n * ```\n * @param options -\n */\n updateManifestProperties(\n options: UpdateManifestPropertiesOptions,\n ): Promise<ArtifactManifestProperties>;\n /**\n * Retrieves the properties of the specified tag.\n * @param tag - the tag to retrieve properties.\n * @param options - options to get tag properties\n */\n getTagProperties(tag: string, options?: GetTagPropertiesOptions): Promise<ArtifactTagProperties>;\n /**\n * Updates the properties of a given tag.\n *\n * Example usage:\n *\n * ```ts snippet:RegistryArtifactUpdateTagProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const tag = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * const updated = await artifact.updateTagProperties(tag, {\n * canDelete: false,\n * canList: false,\n * canRead: false,\n * canWrite: false,\n * });\n * ```\n * @param tag - name of the tag to update properties on\n * @param options -\n */\n updateTagProperties(\n tag: string,\n options: UpdateTagPropertiesOptions,\n ): Promise<ArtifactTagProperties>;\n /**\n * Returns an async iterable iterator to list the tags that uniquely identify this artifact and the properties of each.\n *\n * Example using `for-await-of` syntax:\n *\n * ```ts snippet:RegistryArtifactListTagProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * for await (const tag of artifact.listTagProperties()) {\n * console.log(\"tag: \", tag);\n * }\n * ```\n *\n * @param options - options to list tags\n */\n listTagProperties(\n options?: ListTagPropertiesOptions,\n ): PagedAsyncIterableIterator<ArtifactTagProperties>;\n}\n\n/**\n * The client class used to interact with the Container Registry service.\n * @internal\n */\nexport class RegistryArtifactImpl {\n private client: GeneratedClient;\n /**\n * The Azure Container Registry endpoint.\n */\n public readonly registryEndpoint: string;\n /**\n * Repository name.\n */\n public readonly repositoryName: string;\n\n /**\n * Name of the form 'registry-login-server/repository-name\\@digest' or\n * 'registry-login-server/repository-name:tag'\n */\n public readonly fullyQualifiedReference: string;\n\n private digest?: string;\n /**\n * Creates an instance of a RegistryArtifact.\n * @param registryEndpoint - the URL to the Container Registry endpoint\n * @param repositoryName - the name of the repository\n * @param tagOrDigest - the tag or digest of this artifact\n * @param client - the generated client that interacts with service\n */\n constructor(\n registryEndpoint: string,\n repositoryName: string,\n private tagOrDigest: string,\n client: GeneratedClient,\n ) {\n this.registryEndpoint = registryEndpoint;\n this.repositoryName = repositoryName;\n\n const parsedUrl = new URL(registryEndpoint);\n if (isDigest(tagOrDigest)) {\n this.digest = tagOrDigest;\n this.fullyQualifiedReference = `${parsedUrl.hostname}/${repositoryName}@${this.digest}`;\n } else {\n this.fullyQualifiedReference = `${parsedUrl.hostname}/${repositoryName}:${tagOrDigest}`;\n }\n\n this.client = client;\n }\n\n /**\n * digest of this artifact.\n */\n private async getDigest(): Promise<string> {\n if (this.digest) {\n return this.digest;\n }\n\n if (!isDigest(this.tagOrDigest)) {\n this.digest = (await this.getTagProperties(this.tagOrDigest)).digest;\n } else {\n this.digest = this.tagOrDigest;\n }\n\n return this.digest;\n }\n\n /**\n * Deletes this registry artifact by deleting its manifest.\n * @param options -\n */\n public async delete(options: DeleteArtifactOptions = {}): Promise<void> {\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.delete\",\n options,\n async (updatedOptions) => {\n await this.client.containerRegistry.deleteManifest(\n this.repositoryName,\n await this.getDigest(),\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Deletes a tag. This removes the tag from the artifact and its manifest.\n * @param tag - the name of the tag to delete.\n * @param options -\n */\n public async deleteTag(tag: string, options: DeleteTagOptions = {}): Promise<void> {\n if (!tag) {\n throw new Error(\"invalid tag\");\n }\n\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.deleteTag\",\n options,\n async (updatedOptions) => {\n await this.client.containerRegistry.deleteTag(this.repositoryName, tag, updatedOptions);\n },\n );\n }\n\n /**\n * Retrieves the properties of the manifest that uniquely identifies this artifact.\n * @param options -\n */\n public async getManifestProperties(\n options: GetManifestPropertiesOptions = {},\n ): Promise<ArtifactManifestProperties> {\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.getManifestProperties\",\n options,\n async (updatedOptions) => {\n const result = await this.client.containerRegistry.getManifestProperties(\n this.repositoryName,\n await this.getDigest(),\n updatedOptions,\n );\n return toArtifactManifestProperties(\n result,\n this.repositoryName,\n result.registryLoginServer!,\n );\n },\n );\n }\n\n /**\n * Updates the properties of the artifact's manifest.\n *\n * Example usage:\n *\n * ```ts snippet:RegistryArtifactUpdateManifestProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * const updated = await artifact.updateManifestProperties({\n * canDelete: false,\n * canList: false,\n * canRead: false,\n * canWrite: false,\n * });\n * ```\n * @param options - options to update manifest properties\n */\n public async updateManifestProperties(\n options: UpdateManifestPropertiesOptions,\n ): Promise<ArtifactManifestProperties> {\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.updateManifestProperties\",\n {\n ...options,\n value: {\n canDelete: options.canDelete,\n canWrite: options.canWrite,\n canList: options.canList,\n canRead: options.canRead,\n },\n },\n async (updatedOptions) => {\n const result = await this.client.containerRegistry.updateManifestProperties(\n this.repositoryName,\n await this.getDigest(),\n updatedOptions,\n );\n return toArtifactManifestProperties(\n result,\n this.repositoryName,\n result.registryLoginServer!,\n );\n },\n );\n }\n\n /**\n * Retrieves the properties of the specified tag.\n * @param tag - the tag to retrieve properties.\n * @param options - options to get tag properties\n */\n public async getTagProperties(\n tag: string,\n options: GetTagPropertiesOptions = {},\n ): Promise<ArtifactTagProperties> {\n if (!tag) {\n throw new Error(\"invalid tag\");\n }\n\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.getTagProperties\",\n options,\n (updatedOptions) => {\n return this.client.containerRegistry.getTagProperties(\n this.repositoryName,\n tag,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Updates the properties of a given tag.\n *\n * Example usage:\n *\n * ```ts snippet:RegistryArtifactUpdateTagProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const tag = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * const updated = await artifact.updateTagProperties(tag, {\n * canDelete: false,\n * canList: false,\n * canRead: false,\n * canWrite: false,\n * });\n * ```\n * @param tag - name of the tag to update properties on\n * @param options - options to update tag properties\n */\n public async updateTagProperties(\n tag: string,\n options: UpdateTagPropertiesOptions,\n ): Promise<ArtifactTagProperties> {\n if (!tag) {\n throw new Error(\"invalid tag\");\n }\n\n return tracingClient.withSpan(\n \"RegistryArtifactImpl.updateTagProperties\",\n {\n ...options,\n value: {\n canDelete: options.canDelete,\n canWrite: options.canWrite,\n canList: options.canList,\n canRead: options.canRead,\n },\n },\n (updatedOptions) => {\n return this.client.containerRegistry.updateTagAttributes(\n this.repositoryName,\n tag,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list the tags that uniquely identify this artifact and the properties of each.\n *\n * Example using `for-await-of` syntax:\n *\n * ```ts snippet:RegistryArtifactListTagProperties\n * import { ContainerRegistryClient } from \"@azure/container-registry\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://myregistryname.azurecr.io\";\n * const repositoryName = \"library/hello-world\";\n * const artifactTagOrDigest = \"latest\";\n * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());\n *\n * const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);\n * for await (const tag of artifact.listTagProperties()) {\n * console.log(\"tag: \", tag);\n * }\n * ```\n *\n * @param options - options to list tags\n */\n public listTagProperties(\n options: ListTagPropertiesOptions = {},\n ): PagedAsyncIterableIterator<ArtifactTagProperties, TagPageResponse> {\n const iter = this.listTagsItems(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => this.listTagsPage(settings, options),\n };\n }\n\n private async *listTagsItems(\n options: ListTagPropertiesOptions = {},\n ): AsyncIterableIterator<ArtifactTagProperties> {\n for await (const page of this.listTagsPage({}, options)) {\n yield* page;\n }\n }\n\n private async *listTagsPage(\n continuationState: PageSettings,\n options: ListTagPropertiesOptions = {},\n ): AsyncIterableIterator<TagPageResponse> {\n const orderby = toServiceTagOrderBy(options.order);\n if (!continuationState.continuationToken) {\n const optionsComplete = {\n ...options,\n n: continuationState.maxPageSize,\n orderby,\n };\n const currentPage = await this.client.containerRegistry.getTags(\n this.repositoryName,\n optionsComplete,\n );\n continuationState.continuationToken = extractNextLink(currentPage.link);\n if (currentPage.tagAttributeBases) {\n const array = currentPage.tagAttributeBases.map((t) => {\n return {\n registryLoginServer: currentPage.registryLoginServer,\n repositoryName: currentPage.repository,\n ...t,\n };\n });\n yield Object.defineProperty(array, \"continuationToken\", {\n value: continuationState.continuationToken,\n enumerable: true,\n });\n }\n }\n while (continuationState.continuationToken) {\n const currentPage = await this.client.containerRegistry.getTagsNext(\n this.repositoryName,\n continuationState.continuationToken,\n options,\n );\n continuationState.continuationToken = extractNextLink(currentPage.link);\n if (currentPage.tagAttributeBases) {\n const array = currentPage.tagAttributeBases.map((t) => {\n return {\n registryLoginServer: currentPage.registryLoginServer,\n repositoryName: currentPage.repository,\n ...t,\n };\n });\n yield Object.defineProperty(array, \"continuationToken\", {\n value: continuationState.continuationToken,\n enumerable: true,\n });\n }\n }\n }\n}\n"]}
|