@azure/container-registry 1.0.0-beta.3 → 1.0.0

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +70 -37
  3. package/dist/index.js +1255 -1123
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/src/containerRegistryChallengeHandler.js +35 -38
  6. package/dist-esm/src/containerRegistryChallengeHandler.js.map +1 -1
  7. package/dist-esm/src/containerRegistryClient.js +69 -50
  8. package/dist-esm/src/containerRegistryClient.js.map +1 -1
  9. package/dist-esm/src/containerRegistryTokenCredential.js +39 -126
  10. package/dist-esm/src/containerRegistryTokenCredential.js.map +1 -1
  11. package/dist-esm/src/containerRepository.js +100 -63
  12. package/dist-esm/src/containerRepository.js.map +1 -1
  13. package/dist-esm/src/generated/generatedClient.js +7 -6
  14. package/dist-esm/src/generated/generatedClient.js.map +1 -1
  15. package/dist-esm/src/generated/generatedClientContext.js +13 -2
  16. package/dist-esm/src/generated/generatedClientContext.js.map +1 -1
  17. package/dist-esm/src/generated/index.js +1 -0
  18. package/dist-esm/src/generated/index.js.map +1 -1
  19. package/dist-esm/src/generated/models/index.js +61 -1
  20. package/dist-esm/src/generated/models/index.js.map +1 -1
  21. package/dist-esm/src/generated/models/mappers.js +514 -557
  22. package/dist-esm/src/generated/models/mappers.js.map +1 -1
  23. package/dist-esm/src/generated/models/parameters.js +87 -7
  24. package/dist-esm/src/generated/models/parameters.js.map +1 -1
  25. package/dist-esm/src/generated/operations/authentication.js +28 -8
  26. package/dist-esm/src/generated/operations/authentication.js.map +1 -1
  27. package/dist-esm/src/generated/operations/containerRegistry.js +27 -7
  28. package/dist-esm/src/generated/operations/containerRegistry.js.map +1 -1
  29. package/dist-esm/src/generated/operations/containerRegistryBlob.js +2 -2
  30. package/dist-esm/src/generated/operations/containerRegistryBlob.js.map +1 -1
  31. package/dist-esm/src/generated/operationsInterfaces/authentication.js +9 -0
  32. package/dist-esm/src/generated/operationsInterfaces/authentication.js.map +1 -0
  33. package/dist-esm/src/generated/operationsInterfaces/containerRegistry.js +9 -0
  34. package/dist-esm/src/generated/operationsInterfaces/containerRegistry.js.map +1 -0
  35. package/dist-esm/src/generated/operationsInterfaces/containerRegistryBlob.js +9 -0
  36. package/dist-esm/src/generated/operationsInterfaces/containerRegistryBlob.js.map +1 -0
  37. package/dist-esm/src/generated/operationsInterfaces/index.js +11 -0
  38. package/dist-esm/src/generated/operationsInterfaces/index.js.map +1 -0
  39. package/dist-esm/src/index.js.map +1 -1
  40. package/dist-esm/src/models.js +43 -2
  41. package/dist-esm/src/models.js.map +1 -1
  42. package/dist-esm/src/registryArtifact.js +176 -135
  43. package/dist-esm/src/registryArtifact.js.map +1 -1
  44. package/dist-esm/src/tracing.js +1 -1
  45. package/dist-esm/src/tracing.js.map +1 -1
  46. package/dist-esm/src/transformations.js +2 -2
  47. package/dist-esm/src/transformations.js.map +1 -1
  48. package/dist-esm/src/{base64.browser.js → utils/base64.browser.js} +0 -0
  49. package/dist-esm/src/utils/base64.browser.js.map +1 -0
  50. package/dist-esm/src/{base64.js → utils/base64.js} +0 -0
  51. package/dist-esm/src/utils/base64.js.map +1 -0
  52. package/dist-esm/src/{utils.js → utils/helpers.js} +1 -1
  53. package/dist-esm/src/utils/helpers.js.map +1 -0
  54. package/dist-esm/src/{tokenCycler.js → utils/tokenCycler.js} +29 -34
  55. package/dist-esm/src/utils/tokenCycler.js.map +1 -0
  56. package/dist-esm/src/{url.browser.js → utils/url.browser.js} +0 -0
  57. package/dist-esm/src/utils/url.browser.js.map +1 -0
  58. package/dist-esm/src/{url.js → utils/url.js} +0 -0
  59. package/dist-esm/src/utils/url.js.map +1 -0
  60. package/dist-esm/src/{wwwAuthenticateParser.js → utils/wwwAuthenticateParser.js} +0 -0
  61. package/dist-esm/src/utils/wwwAuthenticateParser.js.map +1 -0
  62. package/package.json +22 -25
  63. package/types/container-registry.d.ts +258 -83
  64. package/dist-esm/src/base64.browser.js.map +0 -1
  65. package/dist-esm/src/base64.js.map +0 -1
  66. package/dist-esm/src/constants.js +0 -4
  67. package/dist-esm/src/constants.js.map +0 -1
  68. package/dist-esm/src/tokenCycler.js.map +0 -1
  69. package/dist-esm/src/url.browser.js.map +0 -1
  70. package/dist-esm/src/url.js.map +0 -1
  71. package/dist-esm/src/utils.js.map +0 -1
  72. package/dist-esm/src/wwwAuthenticateParser.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await, __awaiter } from "tslib";
3
+ import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
4
4
  import { SpanStatusCode } from "@azure/core-tracing";
5
5
  import "@azure/core-paging";
6
6
  import { createSpan } from "./tracing";
7
7
  import { RegistryArtifactImpl } from "./registryArtifact";
8
8
  import { toArtifactManifestProperties, toServiceManifestOrderBy } from "./transformations";
9
- import { extractNextLink } from "./utils";
9
+ import { extractNextLink } from "./utils/helpers";
10
10
  /**
11
11
  * The client class used to interact with the Container Registry service.
12
12
  * @internal
@@ -24,27 +24,25 @@ export class ContainerRepositoryImpl {
24
24
  this.client = client;
25
25
  }
26
26
  /**
27
- * Deletes this repository.
27
+ * Deletes this repository and all artifacts that are part of its logical group.
28
28
  *
29
29
  * @param options - optional configuration for the operation
30
30
  */
31
- delete(options = {}) {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- const { span, updatedOptions } = createSpan("ContainerRepository-delete", options);
34
- try {
35
- yield this.client.containerRegistry.deleteRepository(this.name, updatedOptions);
36
- }
37
- catch (e) {
38
- span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });
39
- throw e;
40
- }
41
- finally {
42
- span.end();
43
- }
44
- });
31
+ async delete(options = {}) {
32
+ const { span, updatedOptions } = createSpan("ContainerRepository-delete", options);
33
+ try {
34
+ await this.client.containerRegistry.deleteRepository(this.name, updatedOptions);
35
+ }
36
+ catch (e) {
37
+ span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });
38
+ throw e;
39
+ }
40
+ finally {
41
+ span.end();
42
+ }
45
43
  }
46
44
  /**
47
- * Returns an instance of RegistryArtifact.
45
+ * Returns an helper instance of {@link RegistryArtifact} for the given tag or digest.
48
46
  * @param tagOrDigest - the tag or digest of the artifact
49
47
  */
50
48
  getArtifact(tagOrDigest) {
@@ -54,61 +52,100 @@ export class ContainerRepositoryImpl {
54
52
  return new RegistryArtifactImpl(this.registryEndpoint, this.name, tagOrDigest, this.client);
55
53
  }
56
54
  /**
57
- * Retrieves properties of this repository.
55
+ * Retrieves the properties of this repository.
58
56
  * @param options -
59
57
  */
60
- getProperties(options = {}) {
61
- return __awaiter(this, void 0, void 0, function* () {
62
- const { span, updatedOptions } = createSpan("ContainerRepository-getProperties", options);
63
- try {
64
- return yield this.client.containerRegistry.getProperties(this.name, updatedOptions);
65
- }
66
- catch (e) {
67
- span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });
68
- throw e;
69
- }
70
- finally {
71
- span.end();
72
- }
73
- });
58
+ async getProperties(options = {}) {
59
+ const { span, updatedOptions } = createSpan("ContainerRepository-getProperties", options);
60
+ try {
61
+ return await this.client.containerRegistry.getProperties(this.name, updatedOptions);
62
+ }
63
+ catch (e) {
64
+ span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });
65
+ throw e;
66
+ }
67
+ finally {
68
+ span.end();
69
+ }
74
70
  }
75
71
  /**
76
- * Updates repository attributes.
72
+ * Updates the properties of this repository.
73
+ *
74
+ * Example usage:
75
+ *
76
+ * ```javascript
77
+ * const client = new ContainerRegistryClient(url, credential);
78
+ * const repository = client.getRepository(repositoryName)
79
+ * const updated = await repository.updateProperties({
80
+ * canDelete: false,
81
+ * canList: false,
82
+ * canRead: false,
83
+ * canWrite: false
84
+ * });
85
+ * ```
77
86
  * @param options -
78
87
  */
79
- updateProperties(options) {
80
- return __awaiter(this, void 0, void 0, function* () {
81
- const value = {
82
- canDelete: options.canDelete,
83
- canWrite: options.canWrite,
84
- canList: options.canList,
85
- canRead: options.canRead,
86
- teleportEnabled: options.teleportEnabled
87
- };
88
- const { span, updatedOptions } = createSpan("ContainerRepository-updateProperties", Object.assign(Object.assign({}, options), { value }));
89
- try {
90
- return yield this.client.containerRegistry.updateProperties(this.name, updatedOptions);
91
- }
92
- catch (e) {
93
- span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });
94
- throw e;
95
- }
96
- finally {
97
- span.end();
98
- }
99
- });
88
+ async updateProperties(options) {
89
+ const value = {
90
+ canDelete: options.canDelete,
91
+ canWrite: options.canWrite,
92
+ canList: options.canList,
93
+ canRead: options.canRead,
94
+ };
95
+ const { span, updatedOptions } = createSpan("ContainerRepository-updateProperties", Object.assign(Object.assign({}, options), { value }));
96
+ try {
97
+ return await this.client.containerRegistry.updateProperties(this.name, updatedOptions);
98
+ }
99
+ catch (e) {
100
+ span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });
101
+ throw e;
102
+ }
103
+ finally {
104
+ span.end();
105
+ }
100
106
  }
101
107
  /**
102
- * Iterates manifests.
108
+ * Returns an async iterable iterator to list manifest properties.
109
+ * This is useful for determining the collection of artifacts associated with
110
+ * this repository, as each artifact is uniquely identified by its manifest.
103
111
  *
104
- * Example usage:
105
- * ```ts
106
- * const client = new ContainerRegistryClient(url, credentials);
112
+ * Example using `for-await-of` syntax:
113
+ *
114
+ * ```javascript
115
+ * const client = new ContainerRegistryClient(url, credential);
107
116
  * const repository = client.getRepository(repositoryName)
108
117
  * for await (const manifest of repository.listManifestProperties()) {
109
118
  * console.log("manifest: ", manifest);
110
119
  * }
111
120
  * ```
121
+ *
122
+ * Example using `iter.next()`:
123
+ *
124
+ * ```javascript
125
+ * const iter = repository.listManifestProperties();
126
+ * let item = await iter.next();
127
+ * while (!item.done) {
128
+ * console.log("manifest properties: ", item.value);
129
+ * item = await iter.next();
130
+ * }
131
+ * ```
132
+ *
133
+ * Example using `byPage()`:
134
+ *
135
+ * ```javascript
136
+ * const pages = repository.listManifestProperties().byPage({ maxPageSize: 2 });
137
+ * let page = await pages.next();
138
+ * let i = 1;
139
+ * while (!page.done) {
140
+ * if (page.value) {
141
+ * console.log(`-- page ${i++}`);
142
+ * for (const manifestProperties of page.value) {
143
+ * console.log(` manifest properties: ${manifestProperties}`);
144
+ * }
145
+ * }
146
+ * page = await pages.next();
147
+ * }
148
+ * ```
112
149
  * @param options -
113
150
  */
114
151
  listManifestProperties(options = {}) {
@@ -120,7 +157,7 @@ export class ContainerRepositoryImpl {
120
157
  [Symbol.asyncIterator]() {
121
158
  return this;
122
159
  },
123
- byPage: (settings = {}) => this.listManifestsPage(settings, options)
160
+ byPage: (settings = {}) => this.listManifestsPage(settings, options),
124
161
  };
125
162
  }
126
163
  listManifestsItems(options = {}) {
@@ -143,7 +180,7 @@ export class ContainerRepositoryImpl {
143
180
  }
144
181
  listManifestsPage(continuationState, options = {}) {
145
182
  return __asyncGenerator(this, arguments, function* listManifestsPage_1() {
146
- const orderby = toServiceManifestOrderBy(options.orderBy);
183
+ const orderby = toServiceManifestOrderBy(options.order);
147
184
  if (!continuationState.continuationToken) {
148
185
  const optionsComplete = Object.assign(Object.assign({}, options), { n: continuationState.maxPageSize, orderby });
149
186
  const currentPage = yield __await(this.client.containerRegistry.getManifests(this.name, optionsComplete));
@@ -152,7 +189,7 @@ export class ContainerRepositoryImpl {
152
189
  const array = currentPage.manifests.map((t) => toArtifactManifestProperties(t, this.name, currentPage.registryLoginServer));
153
190
  yield yield __await(Object.defineProperty(array, "continuationToken", {
154
191
  value: continuationState.continuationToken,
155
- enumerable: true
192
+ enumerable: true,
156
193
  }));
157
194
  }
158
195
  }
@@ -163,7 +200,7 @@ export class ContainerRepositoryImpl {
163
200
  const array = currentPage.manifests.map((t) => toArtifactManifestProperties(t, this.name, currentPage.registryLoginServer));
164
201
  yield yield __await(Object.defineProperty(array, "continuationToken", {
165
202
  value: continuationState.continuationToken,
166
- enumerable: true
203
+ enumerable: true,
167
204
  }));
168
205
  }
169
206
  }
@@ -1 +1 @@
1
- {"version":3,"file":"containerRepository.js","sourceRoot":"","sources":["../../src/containerRepository.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAKlC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,oBAAoB,CAAC;AAI5B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAOvC,OAAO,EAAoB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAsF1C;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAWlC;;;;;OAKG;IACH,YAAY,gBAAwB,EAAE,IAAY,EAAE,MAAuB;QACzE,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACU,MAAM,CAAC,UAAmC,EAAE;;YACvD,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;YAEnF,IAAI;gBACF,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;aACjF;YAAC,OAAO,CAAC,EAAE;gBACV,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;gBACnE,MAAM,CAAC,CAAC;aACT;oBAAS;gBACR,IAAI,CAAC,GAAG,EAAE,CAAC;aACZ;QACH,CAAC;KAAA;IAED;;;OAGG;IACI,WAAW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ACF;QACH,CAAC;KAAA;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport { SpanStatusCode } from \"@azure/core-tracing\";\nimport \"@azure/core-paging\";\nimport { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\nimport { GeneratedClient, RepositoryWriteableProperties } from \"./generated\";\nimport { createSpan } from \"./tracing\";\nimport {\n ManifestOrderBy,\n ContainerRepositoryProperties,\n ArtifactManifestProperties,\n ManifestPageResponse\n} from \"./models\";\nimport { RegistryArtifact, RegistryArtifactImpl } from \"./registryArtifact\";\nimport { toArtifactManifestProperties, toServiceManifestOrderBy } from \"./transformations\";\nimport { extractNextLink } from \"./utils\";\n\n/**\n * Options for delete repository operation.\n */\nexport interface DeleteRepositoryOptions extends OperationOptions {}\n/**\n * Options for the `listRegistryArtifacts` method of `ContainerRepository`.\n */\nexport interface ListManifestPropertiesOptions extends OperationOptions {\n /** orderby query parameter */\n orderBy?: ManifestOrderBy;\n}\n/**\n * Options for the `getProperties` method of `ContainerRepository`.\n */\nexport interface GetRepositoryPropertiesOptions extends OperationOptions {}\n/**\n * Options for the `setProperties` method of `ContainerRepository`.\n */\nexport interface UpdateRepositoryPropertiesOptions extends OperationOptions {\n /** Delete enabled */\n canDelete?: boolean;\n /** Write enabled */\n canWrite?: boolean;\n /** List enabled */\n canList?: boolean;\n /** Read enabled */\n canRead?: boolean;\n /** Enables Teleport functionality on new images in the repository improving Container startup performance */\n teleportEnabled?: boolean;\n}\n\n/**\n * The helper used to interact with the Container Registry service.\n */\nexport interface ContainerRepository {\n /**\n * The Azure Container Registry endpoint.\n */\n readonly registryEndpoint: string;\n /**\n * Repository name.\n */\n readonly name: string;\n /**\n * Deletes this repository.\n *\n * @param options - optional configuration for the operation\n */\n delete(options?: DeleteRepositoryOptions): Promise<void>;\n /**\n * Returns an instance of RegistryArtifact.\n * @param tagOrDigest - the tag or digest of the artifact\n */\n getArtifact(tagOrDigest: string): RegistryArtifact;\n /**\n * Retrieves properties of this repository.\n * @param options -\n */\n getProperties(options?: GetRepositoryPropertiesOptions): Promise<ContainerRepositoryProperties>;\n /**\n * Updates repository attributes.\n * @param options -\n */\n updateProperties(\n options: UpdateRepositoryPropertiesOptions\n ): Promise<ContainerRepositoryProperties>;\n /**\n * Iterates manifests.\n *\n * Example usage:\n * ```ts\n * const client = new ContainerRegistryClient(url, credentials);\n * const repository = client.getRepository(repositoryName)\n * for await (const manifest of repository.listManifestProperties()) {\n * console.log(\"manifest: \", manifest);\n * }\n * ```\n * @param options -\n */\n listManifestProperties(\n options?: ListManifestPropertiesOptions\n ): PagedAsyncIterableIterator<ArtifactManifestProperties>;\n}\n\n/**\n * The client class used to interact with the Container Registry service.\n * @internal\n */\nexport class ContainerRepositoryImpl {\n private readonly client: GeneratedClient;\n /**\n * The Azure Container Registry endpoint.\n */\n public readonly registryEndpoint: string;\n /**\n * Repository name.\n */\n public readonly name: string;\n\n /**\n * Creates an instance of a ContainerRepository.\n * @param registryEndpoint - the URL to the Container Registry endpoint\n * @param name - the name of the repository\n * @param client - the generated client that interacts with service\n */\n constructor(registryEndpoint: string, name: string, client: GeneratedClient) {\n this.registryEndpoint = registryEndpoint;\n this.name = name;\n\n this.client = client;\n }\n\n /**\n * Deletes this repository.\n *\n * @param options - optional configuration for the operation\n */\n public async delete(options: DeleteRepositoryOptions = {}): Promise<void> {\n const { span, updatedOptions } = createSpan(\"ContainerRepository-delete\", options);\n\n try {\n await this.client.containerRegistry.deleteRepository(this.name, updatedOptions);\n } catch (e) {\n span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns an instance of RegistryArtifact.\n * @param tagOrDigest - the tag or digest of the artifact\n */\n public getArtifact(tagOrDigest: string): RegistryArtifact {\n if (!tagOrDigest) {\n throw new Error(\"invalid tagOrDigest\");\n }\n return new RegistryArtifactImpl(this.registryEndpoint, this.name, tagOrDigest, this.client);\n }\n\n /**\n * Retrieves properties of this repository.\n * @param options -\n */\n public async getProperties(\n options: GetRepositoryPropertiesOptions = {}\n ): Promise<ContainerRepositoryProperties> {\n const { span, updatedOptions } = createSpan(\"ContainerRepository-getProperties\", options);\n\n try {\n return await this.client.containerRegistry.getProperties(this.name, updatedOptions);\n } catch (e) {\n span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Updates repository attributes.\n * @param options -\n */\n public async updateProperties(\n options: UpdateRepositoryPropertiesOptions\n ): Promise<ContainerRepositoryProperties> {\n const value: RepositoryWriteableProperties = {\n canDelete: options.canDelete,\n canWrite: options.canWrite,\n canList: options.canList,\n canRead: options.canRead,\n teleportEnabled: options.teleportEnabled\n };\n const { span, updatedOptions } = createSpan(\"ContainerRepository-updateProperties\", {\n ...options,\n value\n });\n\n try {\n return await this.client.containerRegistry.updateProperties(this.name, updatedOptions);\n } catch (e) {\n span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates manifests.\n *\n * Example usage:\n * ```ts\n * const client = new ContainerRegistryClient(url, credentials);\n * const repository = client.getRepository(repositoryName)\n * for await (const manifest of repository.listManifestProperties()) {\n * console.log(\"manifest: \", manifest);\n * }\n * ```\n * @param options -\n */\n public listManifestProperties(\n options: ListManifestPropertiesOptions = {}\n ): PagedAsyncIterableIterator<ArtifactManifestProperties, ManifestPageResponse> {\n const iter = this.listManifestsItems(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => this.listManifestsPage(settings, options)\n };\n }\n\n private async *listManifestsItems(\n options: ListManifestPropertiesOptions = {}\n ): AsyncIterableIterator<ArtifactManifestProperties> {\n for await (const page of this.listManifestsPage({}, options)) {\n yield* page;\n }\n }\n\n private async *listManifestsPage(\n continuationState: PageSettings,\n options: ListManifestPropertiesOptions = {}\n ): AsyncIterableIterator<ManifestPageResponse> {\n const orderby = toServiceManifestOrderBy(options.orderBy);\n if (!continuationState.continuationToken) {\n const optionsComplete = {\n ...options,\n n: continuationState.maxPageSize,\n orderby\n };\n const currentPage = await this.client.containerRegistry.getManifests(\n this.name,\n optionsComplete\n );\n continuationState.continuationToken = extractNextLink(currentPage.link);\n if (currentPage.manifests) {\n const array = currentPage.manifests.map((t) =>\n toArtifactManifestProperties(t, this.name, currentPage.registryLoginServer!)\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.getManifestsNext(\n this.name,\n continuationState.continuationToken,\n options\n );\n continuationState.continuationToken = extractNextLink(currentPage.link);\n if (currentPage.manifests) {\n const array = currentPage.manifests.map((t) =>\n toArtifactManifestProperties(t, this.name, currentPage.registryLoginServer!)\n );\n yield Object.defineProperty(array, \"continuationToken\", {\n value: continuationState.continuationToken,\n enumerable: true\n });\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"containerRepository.js","sourceRoot":"","sources":["../../src/containerRepository.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAKlC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,oBAAoB,CAAC;AAI5B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAOvC,OAAO,EAAoB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAoIlD;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAWlC;;;;;OAKG;IACH,YAAY,gBAAwB,EAAE,IAAY,EAAE,MAAuB;QACzE,IAAI,CAAC,gBAAgB,GAAG,gBA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AiB,CAAC,iBAAiB,EAAE;gBAC1C,MAAM,WAAW,GAAG,cAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,gBAAgB,CACtE,IAAI,CAAC,IAAI,EACT,iBAAiB,CAAC,iBAAiB,EACnC,OAAO,CACR,CAAA,CAAC;gBACF,iBAAiB,CAAC,iBAAiB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBACxE,IAAI,WAAW,CAAC,SAAS,EAAE;oBACzB,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAC5C,4BAA4B,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,mBAAoB,CAAC,CAC7E,CAAC;oBACF,oBAAM,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,mBAAmB,EAAE;wBACtD,KAAK,EAAE,iBAAiB,CAAC,iBAAiB;wBAC1C,UAAU,EAAE,IAAI;qBACjB,CAAC,CAAA,CAAC;iBACJ;aACF;QACH,CAAC;KAAA;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport { SpanStatusCode } from \"@azure/core-tracing\";\nimport \"@azure/core-paging\";\nimport { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\nimport { GeneratedClient, RepositoryWriteableProperties } from \"./generated\";\nimport { createSpan } from \"./tracing\";\nimport {\n ArtifactManifestOrder,\n ContainerRepositoryProperties,\n ArtifactManifestProperties,\n ManifestPageResponse,\n} from \"./models\";\nimport { RegistryArtifact, RegistryArtifactImpl } from \"./registryArtifact\";\nimport { toArtifactManifestProperties, toServiceManifestOrderBy } from \"./transformations\";\nimport { extractNextLink } from \"./utils/helpers\";\n\n/**\n * Options for delete repository operation.\n */\nexport interface DeleteRepositoryOptions extends OperationOptions {}\n/**\n * Options for the `listRegistryArtifacts` method of `ContainerRepository`.\n */\nexport interface ListManifestPropertiesOptions extends OperationOptions {\n /** order in which the manifest properties are returned */\n order?: ArtifactManifestOrder;\n}\n/**\n * Options for the `getProperties` method of `ContainerRepository`.\n */\nexport interface GetRepositoryPropertiesOptions extends OperationOptions {}\n/**\n * Options for the `setProperties` method of `ContainerRepository`.\n */\nexport interface UpdateRepositoryPropertiesOptions extends OperationOptions {\n /** Whether or not this repository can be deleted */\n canDelete?: boolean;\n /** Whether or not this repository can be written to */\n canWrite?: boolean;\n /** Whether or not include this repository when listing repositories */\n canList?: boolean;\n /** Whether or not this repository can be read */\n canRead?: boolean;\n}\n\n/**\n * A `repository` in a container registry is a logical grouping of images or artifacts that share the same name. For example,\n * different versions of a `hello-world` application could have tags `v1` and `v2`, and be grouped by the repository `hello-world`.\n *\n * The {@link ContainerRepository} interface is a helper that groups information and operations about a repository in this\n * container registry.\n */\nexport interface ContainerRepository {\n /**\n * The Azure Container Registry endpoint.\n */\n readonly registryEndpoint: string;\n /**\n * Repository name.\n */\n readonly name: string;\n /**\n * Deletes this repository and all artifacts that are part of its logical group.\n *\n * @param options - optional configuration for the operation\n */\n delete(options?: DeleteRepositoryOptions): Promise<void>;\n /**\n * Returns an helper instance of {@link RegistryArtifact} for the given tag or digest.\n * @param tagOrDigest - the tag or digest of the artifact\n */\n getArtifact(tagOrDigest: string): RegistryArtifact;\n /**\n * Retrieves the properties of this repository.\n * @param options -\n */\n getProperties(options?: GetRepositoryPropertiesOptions): Promise<ContainerRepositoryProperties>;\n /**\n * Updates the properties of this repository.\n *\n * Example usage:\n *\n * ```javascript\n * const client = new ContainerRegistryClient(url, credential);\n * const repository = client.getRepository(repositoryName)\n * const updated = await repository.updateProperties({\n * canDelete: false,\n * canList: false,\n * canRead: false,\n * canWrite: false\n * });\n * ```\n * @param options -\n */\n updateProperties(\n options: UpdateRepositoryPropertiesOptions\n ): Promise<ContainerRepositoryProperties>;\n /**\n * Returns an async iterable iterator to list manifest properties.\n * This is useful for determining the collection of artifacts associated with\n * this repository, as each artifact is uniquely identified by its manifest.\n *\n * Example using `for-await-of` syntax:\n *\n * ```javascript\n * const client = new ContainerRegistryClient(url, credential);\n * const repository = client.getRepository(repositoryName)\n * for await (const manifest of repository.listManifestProperties()) {\n * console.log(\"manifest: \", manifest);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```javascript\n * const iter = repository.listManifestProperties();\n * let item = await iter.next();\n * while (!item.done) {\n * console.log(\"manifest properties: \", item.value);\n * item = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```javascript\n * const pages = repository.listManifestProperties().byPage({ maxPageSize: 2 });\n * let page = await pages.next();\n * let i = 1;\n * while (!page.done) {\n * if (page.value) {\n * console.log(`-- page ${i++}`);\n * for (const manifestProperties of page.value) {\n * console.log(` manifest properties: ${manifestProperties}`);\n * }\n * }\n * page = await pages.next();\n * }\n * ```\n * @param options -\n */\n listManifestProperties(\n options?: ListManifestPropertiesOptions\n ): PagedAsyncIterableIterator<ArtifactManifestProperties>;\n}\n\n/**\n * The client class used to interact with the Container Registry service.\n * @internal\n */\nexport class ContainerRepositoryImpl {\n private readonly client: GeneratedClient;\n /**\n * The Azure Container Registry endpoint.\n */\n public readonly registryEndpoint: string;\n /**\n * Repository name.\n */\n public readonly name: string;\n\n /**\n * Creates an instance of a ContainerRepository.\n * @param registryEndpoint - the URL to the Container Registry endpoint\n * @param name - the name of the repository\n * @param client - the generated client that interacts with service\n */\n constructor(registryEndpoint: string, name: string, client: GeneratedClient) {\n this.registryEndpoint = registryEndpoint;\n this.name = name;\n\n this.client = client;\n }\n\n /**\n * Deletes this repository and all artifacts that are part of its logical group.\n *\n * @param options - optional configuration for the operation\n */\n public async delete(options: DeleteRepositoryOptions = {}): Promise<void> {\n const { span, updatedOptions } = createSpan(\"ContainerRepository-delete\", options);\n\n try {\n await this.client.containerRegistry.deleteRepository(this.name, updatedOptions);\n } catch (e) {\n span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns an helper instance of {@link RegistryArtifact} for the given tag or digest.\n * @param tagOrDigest - the tag or digest of the artifact\n */\n public getArtifact(tagOrDigest: string): RegistryArtifact {\n if (!tagOrDigest) {\n throw new Error(\"invalid tagOrDigest\");\n }\n return new RegistryArtifactImpl(this.registryEndpoint, this.name, tagOrDigest, this.client);\n }\n\n /**\n * Retrieves the properties of this repository.\n * @param options -\n */\n public async getProperties(\n options: GetRepositoryPropertiesOptions = {}\n ): Promise<ContainerRepositoryProperties> {\n const { span, updatedOptions } = createSpan(\"ContainerRepository-getProperties\", options);\n\n try {\n return await this.client.containerRegistry.getProperties(this.name, updatedOptions);\n } catch (e) {\n span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Updates the properties of this repository.\n *\n * Example usage:\n *\n * ```javascript\n * const client = new ContainerRegistryClient(url, credential);\n * const repository = client.getRepository(repositoryName)\n * const updated = await repository.updateProperties({\n * canDelete: false,\n * canList: false,\n * canRead: false,\n * canWrite: false\n * });\n * ```\n * @param options -\n */\n public async updateProperties(\n options: UpdateRepositoryPropertiesOptions\n ): Promise<ContainerRepositoryProperties> {\n const value: RepositoryWriteableProperties = {\n canDelete: options.canDelete,\n canWrite: options.canWrite,\n canList: options.canList,\n canRead: options.canRead,\n };\n const { span, updatedOptions } = createSpan(\"ContainerRepository-updateProperties\", {\n ...options,\n value,\n });\n\n try {\n return await this.client.containerRegistry.updateProperties(this.name, updatedOptions);\n } catch (e) {\n span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns an async iterable iterator to list manifest properties.\n * This is useful for determining the collection of artifacts associated with\n * this repository, as each artifact is uniquely identified by its manifest.\n *\n * Example using `for-await-of` syntax:\n *\n * ```javascript\n * const client = new ContainerRegistryClient(url, credential);\n * const repository = client.getRepository(repositoryName)\n * for await (const manifest of repository.listManifestProperties()) {\n * console.log(\"manifest: \", manifest);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```javascript\n * const iter = repository.listManifestProperties();\n * let item = await iter.next();\n * while (!item.done) {\n * console.log(\"manifest properties: \", item.value);\n * item = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```javascript\n * const pages = repository.listManifestProperties().byPage({ maxPageSize: 2 });\n * let page = await pages.next();\n * let i = 1;\n * while (!page.done) {\n * if (page.value) {\n * console.log(`-- page ${i++}`);\n * for (const manifestProperties of page.value) {\n * console.log(` manifest properties: ${manifestProperties}`);\n * }\n * }\n * page = await pages.next();\n * }\n * ```\n * @param options -\n */\n public listManifestProperties(\n options: ListManifestPropertiesOptions = {}\n ): PagedAsyncIterableIterator<ArtifactManifestProperties, ManifestPageResponse> {\n const iter = this.listManifestsItems(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => this.listManifestsPage(settings, options),\n };\n }\n\n private async *listManifestsItems(\n options: ListManifestPropertiesOptions = {}\n ): AsyncIterableIterator<ArtifactManifestProperties> {\n for await (const page of this.listManifestsPage({}, options)) {\n yield* page;\n }\n }\n\n private async *listManifestsPage(\n continuationState: PageSettings,\n options: ListManifestPropertiesOptions = {}\n ): AsyncIterableIterator<ManifestPageResponse> {\n const orderby = toServiceManifestOrderBy(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.getManifests(\n this.name,\n optionsComplete\n );\n continuationState.continuationToken = extractNextLink(currentPage.link);\n if (currentPage.manifests) {\n const array = currentPage.manifests.map((t) =>\n toArtifactManifestProperties(t, this.name, currentPage.registryLoginServer!)\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.getManifestsNext(\n this.name,\n continuationState.continuationToken,\n options\n );\n continuationState.continuationToken = extractNextLink(currentPage.link);\n if (currentPage.manifests) {\n const array = currentPage.manifests.map((t) =>\n toArtifactManifestProperties(t, this.name, currentPage.registryLoginServer!)\n );\n yield Object.defineProperty(array, \"continuationToken\", {\n value: continuationState.continuationToken,\n enumerable: true,\n });\n }\n }\n }\n}\n"]}
@@ -5,20 +5,21 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { ContainerRegistry, ContainerRegistryBlob, Authentication } from "./operations";
8
+ import { ContainerRegistryImpl, ContainerRegistryBlobImpl, AuthenticationImpl } from "./operations";
9
9
  import { GeneratedClientContext } from "./generatedClientContext";
10
10
  /** @internal */
11
11
  export class GeneratedClient extends GeneratedClientContext {
12
12
  /**
13
13
  * Initializes a new instance of the GeneratedClient class.
14
14
  * @param url Registry login URL
15
+ * @param apiVersion Api Version
15
16
  * @param options The parameter options
16
17
  */
17
- constructor(url, options) {
18
- super(url, options);
19
- this.containerRegistry = new ContainerRegistry(this);
20
- this.containerRegistryBlob = new ContainerRegistryBlob(this);
21
- this.authentication = new Authentication(this);
18
+ constructor(url, apiVersion, options) {
19
+ super(url, apiVersion, options);
20
+ this.containerRegistry = new ContainerRegistryImpl(this);
21
+ this.containerRegistryBlob = new ContainerRegistryBlobImpl(this);
22
+ this.authentication = new AuthenticationImpl(this);
22
23
  }
23
24
  }
24
25
  //# sourceMappingURL=generatedClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generatedClient.js","sourceRoot":"","sources":["../../../src/generated/generatedClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,gBAAgB;AAChB,MAAM,OAAO,eAAgB,SAAQ,sBAAsB;IACzD;;;;OAIG;IACH,YAAY,GAAW,EAAE,OAAuC;QAC9D,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACpB,IAAI,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,qBAAqB,GAAG,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC7D,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;CAKF","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 {\n ContainerRegistry,\n ContainerRegistryBlob,\n Authentication\n} from \"./operations\";\nimport { GeneratedClientContext } from \"./generatedClientContext\";\nimport { GeneratedClientOptionalParams } from \"./models\";\n\n/** @internal */\nexport class GeneratedClient extends GeneratedClientContext {\n /**\n * Initializes a new instance of the GeneratedClient class.\n * @param url Registry login URL\n * @param options The parameter options\n */\n constructor(url: string, options?: GeneratedClientOptionalParams) {\n super(url, options);\n this.containerRegistry = new ContainerRegistry(this);\n this.containerRegistryBlob = new ContainerRegistryBlob(this);\n this.authentication = new Authentication(this);\n }\n\n containerRegistry: ContainerRegistry;\n containerRegistryBlob: ContainerRegistryBlob;\n authentication: Authentication;\n}\n"]}
1
+ {"version":3,"file":"generatedClient.js","sourceRoot":"","sources":["../../../src/generated/generatedClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAMtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,gBAAgB;AAChB,MAAM,OAAO,eAAgB,SAAQ,sBAAsB;IACzD;;;;;OAKG;IACH,YACE,GAAW,EACX,UAA8B,EAC9B,OAAuC;QAEvC,KAAK,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAChC,IAAI,CAAC,iBAAiB,GAAG,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,CAAC,qBAAqB,GAAG,IAAI,yBAAyB,CAAC,IAAI,CAAC,CAAC;QACjE,IAAI,CAAC,cAAc,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;CAKF","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 {\n ContainerRegistryImpl,\n ContainerRegistryBlobImpl,\n AuthenticationImpl\n} from \"./operations\";\nimport {\n ContainerRegistry,\n ContainerRegistryBlob,\n Authentication\n} from \"./operationsInterfaces\";\nimport { GeneratedClientContext } from \"./generatedClientContext\";\nimport { GeneratedClientOptionalParams, ApiVersion20210701 } from \"./models\";\n\n/** @internal */\nexport class GeneratedClient extends GeneratedClientContext {\n /**\n * Initializes a new instance of the GeneratedClient class.\n * @param url Registry login URL\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(\n url: string,\n apiVersion: ApiVersion20210701,\n options?: GeneratedClientOptionalParams\n ) {\n super(url, apiVersion, options);\n this.containerRegistry = new ContainerRegistryImpl(this);\n this.containerRegistryBlob = new ContainerRegistryBlobImpl(this);\n this.authentication = new AuthenticationImpl(this);\n }\n\n containerRegistry: ContainerRegistry;\n containerRegistryBlob: ContainerRegistryBlob;\n authentication: Authentication;\n}\n"]}
@@ -11,12 +11,16 @@ export class GeneratedClientContext extends coreClient.ServiceClient {
11
11
  /**
12
12
  * Initializes a new instance of the GeneratedClientContext class.
13
13
  * @param url Registry login URL
14
+ * @param apiVersion Api Version
14
15
  * @param options The parameter options
15
16
  */
16
- constructor(url, options) {
17
+ constructor(url, apiVersion, options) {
17
18
  if (url === undefined) {
18
19
  throw new Error("'url' cannot be null");
19
20
  }
21
+ if (apiVersion === undefined) {
22
+ throw new Error("'apiVersion' cannot be null");
23
+ }
20
24
  // Initializing default values for options
21
25
  if (!options) {
22
26
  options = {};
@@ -24,10 +28,17 @@ export class GeneratedClientContext extends coreClient.ServiceClient {
24
28
  const defaults = {
25
29
  requestContentType: "application/json; charset=utf-8"
26
30
  };
27
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { baseUri: options.endpoint || "{url}" });
31
+ const packageDetails = `azsdk-js-container-registry/1.0.0`;
32
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
33
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
34
+ : `${packageDetails}`;
35
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
36
+ userAgentPrefix
37
+ }, baseUri: options.endpoint || "{url}" });
28
38
  super(optionsWithDefaults);
29
39
  // Parameter assignments
30
40
  this.url = url;
41
+ this.apiVersion = apiVersion;
31
42
  }
32
43
  }
33
44
  //# sourceMappingURL=generatedClientContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAGlE;;;;OAIG;IACH,YAAY,GAAW,EAAE,OAAuC;QAC9D,IAAI,GAAG,KAAK,SAAS,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;SACzC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QAED,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,OAAO,GACrC,CAAC;QAEF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;CACF","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 * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n url: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param url Registry login URL\n * @param options The parameter options\n */\n constructor(url: string, options?: GeneratedClientOptionalParams) {\n if (url === undefined) {\n throw new Error(\"'url' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n baseUri: options.endpoint || \"{url}\"\n };\n\n super(optionsWithDefaults);\n // Parameter assignments\n this.url = url;\n }\n}\n"]}
1
+ {"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAIlE;;;;;OAKG;IACH,YACE,GAAW,EACX,UAA8B,EAC9B,OAAuC;QAEvC,IAAI,GAAG,KAAK,SAAS,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;SACzC;QACD,IAAI,UAAU,KAAK,SAAS,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAChD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,mCAAmC,CAAC;QAC3D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,OAAO,GACrC,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF","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 * as coreClient from \"@azure/core-client\";\nimport { ApiVersion20210701, GeneratedClientOptionalParams } from \"./models\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n url: string;\n apiVersion: ApiVersion20210701;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param url Registry login URL\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(\n url: string,\n apiVersion: ApiVersion20210701,\n options?: GeneratedClientOptionalParams\n ) {\n if (url === undefined) {\n throw new Error(\"'url' cannot be null\");\n }\n if (apiVersion === undefined) {\n throw new Error(\"'apiVersion' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-container-registry/1.0.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{url}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.url = url;\n this.apiVersion = apiVersion;\n }\n}\n"]}
@@ -8,4 +8,5 @@
8
8
  export * from "./models";
9
9
  export { GeneratedClient } from "./generatedClient";
10
10
  export { GeneratedClientContext } from "./generatedClientContext";
11
+ export * from "./operationsInterfaces";
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,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\nexport * from \"./models\";\nexport { GeneratedClient } from \"./generatedClient\";\nexport { GeneratedClientContext } from \"./generatedClientContext\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,wBAAwB,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\nexport * from \"./models\";\nexport { GeneratedClient } from \"./generatedClient\";\nexport { GeneratedClientContext } from \"./generatedClientContext\";\nexport * from \"./operationsInterfaces\";\n"]}
@@ -5,5 +5,65 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- export {};
8
+ /** Known values of {@link ApiVersion20210701} that the service accepts. */
9
+ export var KnownApiVersion20210701;
10
+ (function (KnownApiVersion20210701) {
11
+ /** Api Version '2021-07-01' */
12
+ KnownApiVersion20210701["TwoThousandTwentyOne0701"] = "2021-07-01";
13
+ })(KnownApiVersion20210701 || (KnownApiVersion20210701 = {}));
14
+ /** Known values of {@link ArtifactArchitecture} that the service accepts. */
15
+ export var KnownArtifactArchitecture;
16
+ (function (KnownArtifactArchitecture) {
17
+ /** i386 */
18
+ KnownArtifactArchitecture["I386"] = "386";
19
+ /** AMD64 */
20
+ KnownArtifactArchitecture["Amd64"] = "amd64";
21
+ /** ARM */
22
+ KnownArtifactArchitecture["Arm"] = "arm";
23
+ /** ARM64 */
24
+ KnownArtifactArchitecture["Arm64"] = "arm64";
25
+ /** MIPS */
26
+ KnownArtifactArchitecture["Mips"] = "mips";
27
+ /** MIPSLE */
28
+ KnownArtifactArchitecture["MipsLe"] = "mipsle";
29
+ /** MIPS64 */
30
+ KnownArtifactArchitecture["Mips64"] = "mips64";
31
+ /** MIPS64LE */
32
+ KnownArtifactArchitecture["Mips64Le"] = "mips64le";
33
+ /** PPC64 */
34
+ KnownArtifactArchitecture["Ppc64"] = "ppc64";
35
+ /** PPC64LE */
36
+ KnownArtifactArchitecture["Ppc64Le"] = "ppc64le";
37
+ /** RISCv64 */
38
+ KnownArtifactArchitecture["RiscV64"] = "riscv64";
39
+ /** s390x */
40
+ KnownArtifactArchitecture["S390X"] = "s390x";
41
+ /** Wasm */
42
+ KnownArtifactArchitecture["Wasm"] = "wasm";
43
+ })(KnownArtifactArchitecture || (KnownArtifactArchitecture = {}));
44
+ /** Known values of {@link ArtifactOperatingSystem} that the service accepts. */
45
+ export var KnownArtifactOperatingSystem;
46
+ (function (KnownArtifactOperatingSystem) {
47
+ KnownArtifactOperatingSystem["Aix"] = "aix";
48
+ KnownArtifactOperatingSystem["Android"] = "android";
49
+ KnownArtifactOperatingSystem["Darwin"] = "darwin";
50
+ KnownArtifactOperatingSystem["Dragonfly"] = "dragonfly";
51
+ KnownArtifactOperatingSystem["FreeBsd"] = "freebsd";
52
+ KnownArtifactOperatingSystem["Illumos"] = "illumos";
53
+ KnownArtifactOperatingSystem["IOS"] = "ios";
54
+ KnownArtifactOperatingSystem["JS"] = "js";
55
+ KnownArtifactOperatingSystem["Linux"] = "linux";
56
+ KnownArtifactOperatingSystem["NetBsd"] = "netbsd";
57
+ KnownArtifactOperatingSystem["OpenBsd"] = "openbsd";
58
+ KnownArtifactOperatingSystem["Plan9"] = "plan9";
59
+ KnownArtifactOperatingSystem["Solaris"] = "solaris";
60
+ KnownArtifactOperatingSystem["Windows"] = "windows";
61
+ })(KnownArtifactOperatingSystem || (KnownArtifactOperatingSystem = {}));
62
+ /** Known values of {@link PostContentSchemaGrantType} that the service accepts. */
63
+ export var KnownPostContentSchemaGrantType;
64
+ (function (KnownPostContentSchemaGrantType) {
65
+ KnownPostContentSchemaGrantType["AccessTokenRefreshToken"] = "access_token_refresh_token";
66
+ KnownPostContentSchemaGrantType["AccessToken"] = "access_token";
67
+ KnownPostContentSchemaGrantType["RefreshToken"] = "refresh_token";
68
+ })(KnownPostContentSchemaGrantType || (KnownPostContentSchemaGrantType = {}));
9
69
  //# sourceMappingURL=index.js.map