@azure/keyvault-certificates 4.4.0-beta.2 → 4.4.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 (48) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/README.md +14 -11
  3. package/dist/index.js +286 -153
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/keyvault-certificates/src/certificatesModels.js +42 -2
  6. package/dist-esm/keyvault-certificates/src/certificatesModels.js.map +1 -1
  7. package/dist-esm/keyvault-certificates/src/constants.js +1 -1
  8. package/dist-esm/keyvault-certificates/src/constants.js.map +1 -1
  9. package/dist-esm/keyvault-certificates/src/generated/keyVaultClient.js +1 -1
  10. package/dist-esm/keyvault-certificates/src/generated/keyVaultClient.js.map +1 -1
  11. package/dist-esm/keyvault-certificates/src/generated/keyVaultClientContext.js +6 -7
  12. package/dist-esm/keyvault-certificates/src/generated/keyVaultClientContext.js.map +1 -1
  13. package/dist-esm/keyvault-certificates/src/generated/models/index.js +55 -1
  14. package/dist-esm/keyvault-certificates/src/generated/models/index.js.map +1 -1
  15. package/dist-esm/keyvault-certificates/src/identifier.js.map +1 -1
  16. package/dist-esm/keyvault-certificates/src/index.js +27 -23
  17. package/dist-esm/keyvault-certificates/src/index.js.map +1 -1
  18. package/dist-esm/keyvault-certificates/src/lro/create/operation.js +2 -2
  19. package/dist-esm/keyvault-certificates/src/lro/create/operation.js.map +1 -1
  20. package/dist-esm/keyvault-certificates/src/lro/create/poller.js +2 -2
  21. package/dist-esm/keyvault-certificates/src/lro/create/poller.js.map +1 -1
  22. package/dist-esm/keyvault-certificates/src/lro/delete/operation.js +1 -1
  23. package/dist-esm/keyvault-certificates/src/lro/delete/operation.js.map +1 -1
  24. package/dist-esm/keyvault-certificates/src/lro/delete/poller.js +2 -2
  25. package/dist-esm/keyvault-certificates/src/lro/delete/poller.js.map +1 -1
  26. package/dist-esm/keyvault-certificates/src/lro/keyVaultCertificatePoller.js +2 -2
  27. package/dist-esm/keyvault-certificates/src/lro/keyVaultCertificatePoller.js.map +1 -1
  28. package/dist-esm/keyvault-certificates/src/lro/operation/operation.js +3 -3
  29. package/dist-esm/keyvault-certificates/src/lro/operation/operation.js.map +1 -1
  30. package/dist-esm/keyvault-certificates/src/lro/operation/poller.js +2 -2
  31. package/dist-esm/keyvault-certificates/src/lro/operation/poller.js.map +1 -1
  32. package/dist-esm/keyvault-certificates/src/lro/recover/operation.js +2 -2
  33. package/dist-esm/keyvault-certificates/src/lro/recover/operation.js.map +1 -1
  34. package/dist-esm/keyvault-certificates/src/lro/recover/poller.js +3 -3
  35. package/dist-esm/keyvault-certificates/src/lro/recover/poller.js.map +1 -1
  36. package/dist-esm/keyvault-certificates/src/transformations.js +23 -23
  37. package/dist-esm/keyvault-certificates/src/transformations.js.map +1 -1
  38. package/dist-esm/keyvault-certificates/src/utils.js.map +1 -1
  39. package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js +4 -4
  40. package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js.map +1 -1
  41. package/dist-esm/keyvault-common/src/parseKeyvaultIdentifier.js +1 -1
  42. package/dist-esm/keyvault-common/src/parseKeyvaultIdentifier.js.map +1 -1
  43. package/dist-esm/keyvault-common/src/parseWWWAuthenticate.js +1 -1
  44. package/dist-esm/keyvault-common/src/parseWWWAuthenticate.js.map +1 -1
  45. package/dist-esm/keyvault-common/src/tracingHelpers.js +4 -4
  46. package/dist-esm/keyvault-common/src/tracingHelpers.js.map +1 -1
  47. package/package.json +13 -28
  48. package/types/keyvault-certificates.d.ts +12 -8
@@ -10,7 +10,7 @@ const validParsedWWWAuthenticateProperties = [
10
10
  "authorization_url",
11
11
  "resource",
12
12
  "scope",
13
- "tenantId"
13
+ "tenantId",
14
14
  ];
15
15
  /**
16
16
  * Parses an WWW-Authenticate response.
@@ -1 +1 @@
1
- {"version":3,"file":"parseWWWAuthenticate.js","sourceRoot":"","sources":["../../../../keyvault-common/src/parseWWWAuthenticate.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under the MIT license.\n\n/**\n * @internal\n *\n * Valid key names in WWW-Authenticate header.\n */\nconst validParsedWWWAuthenticateProperties = [\n \"authorization\",\n \"authorization_url\",\n \"resource\",\n \"scope\",\n \"tenantId\"\n] as const;\n\n/**\n * @internal\n *\n * A union type representing all valid key names in WWW-Authenticate header.\n */\ntype ValidParsedWWWAuthenticateProperties = typeof validParsedWWWAuthenticateProperties[number];\n\n/**\n * @internal\n *\n * Holds the known WWWAuthenticate keys and their values as a result of\n * parsing a WWW-Authenticate header.\n */\nexport type ParsedWWWAuthenticate = {\n [Key in ValidParsedWWWAuthenticateProperties]?: string;\n};\n\n/**\n * Parses an WWW-Authenticate response.\n * This transforms a string value like:\n * `Bearer authorization=\"https://some.url/tenantId\", resource=\"https://some.url\"`\n * into an object like:\n * `{ authorization: \"https://some.url/tenantId\", resource: \"https://some.url\" }`\n * @param wwwAuthenticate - String value in the WWW-Authenticate header\n */\nexport function parseWWWAuthenticate(wwwAuthenticate: string): ParsedWWWAuthenticate {\n const pairDelimiter = /,? +/;\n const parsed = wwwAuthenticate\n .split(pairDelimiter)\n .reduce<ParsedWWWAuthenticate>((kvPairs, p) => {\n if (p.match(/\\w=\"/)) {\n // 'sampleKey=\"sample_value\"' -> [sampleKey, \"sample_value\"] -> { sampleKey: sample_value }\n const [key, value] = p.split(\"=\");\n if (\n validParsedWWWAuthenticateProperties.includes(key as ValidParsedWWWAuthenticateProperties)\n ) {\n // The values will be wrapped in quotes, which need to be stripped out.\n return { ...kvPairs, [key]: value.slice(1, -1) };\n }\n }\n return kvPairs;\n }, {});\n\n // Finally, we pull the tenantId from the authorization header to support multi-tenant authentication.\n if (parsed.authorization) {\n try {\n const tenantId = new URL(parsed.authorization).pathname.substring(1);\n if (tenantId) {\n parsed.tenantId = tenantId;\n }\n } catch (_) {\n throw new Error(`The challenge authorization URI '${parsed.authorization}' is invalid.`);\n }\n }\n\n return parsed;\n}\n"]}
1
+ {"version":3,"file":"parseWWWAuthenticate.js","sourceRoot":"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esContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * @internal\n *\n * Valid key names in WWW-Authenticate header.\n */\nconst validParsedWWWAuthenticateProperties = [\n \"authorization\",\n \"authorization_url\",\n \"resource\",\n \"scope\",\n \"tenantId\",\n] as const;\n\n/**\n * @internal\n *\n * A union type representing all valid key names in WWW-Authenticate header.\n */\ntype ValidParsedWWWAuthenticateProperties = typeof validParsedWWWAuthenticateProperties[number];\n\n/**\n * @internal\n *\n * Holds the known WWWAuthenticate keys and their values as a result of\n * parsing a WWW-Authenticate header.\n */\nexport type ParsedWWWAuthenticate = {\n [Key in ValidParsedWWWAuthenticateProperties]?: string;\n};\n\n/**\n * Parses an WWW-Authenticate response.\n * This transforms a string value like:\n * `Bearer authorization=\"https://some.url/tenantId\", resource=\"https://some.url\"`\n * into an object like:\n * `{ authorization: \"https://some.url/tenantId\", resource: \"https://some.url\" }`\n * @param wwwAuthenticate - String value in the WWW-Authenticate header\n */\nexport function parseWWWAuthenticate(wwwAuthenticate: string): ParsedWWWAuthenticate {\n const pairDelimiter = /,? +/;\n const parsed = wwwAuthenticate\n .split(pairDelimiter)\n .reduce<ParsedWWWAuthenticate>((kvPairs, p) => {\n if (p.match(/\\w=\"/)) {\n // 'sampleKey=\"sample_value\"' -> [sampleKey, \"sample_value\"] -> { sampleKey: sample_value }\n const [key, value] = p.split(\"=\");\n if (\n validParsedWWWAuthenticateProperties.includes(key as ValidParsedWWWAuthenticateProperties)\n ) {\n // The values will be wrapped in quotes, which need to be stripped out.\n return { ...kvPairs, [key]: value.slice(1, -1) };\n }\n }\n return kvPairs;\n }, {});\n\n // Finally, we pull the tenantId from the authorization header to support multi-tenant authentication.\n if (parsed.authorization) {\n try {\n const tenantId = new URL(parsed.authorization).pathname.substring(1);\n if (tenantId) {\n parsed.tenantId = tenantId;\n }\n } catch (_) {\n throw new Error(`The challenge authorization URI '${parsed.authorization}' is invalid.`);\n }\n }\n\n return parsed;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
- import { createSpanFunction, SpanStatusCode } from "@azure/core-tracing";
3
+ import { SpanStatusCode, createSpanFunction } from "@azure/core-tracing";
4
4
  /**
5
5
  * Returns a function that can be used for tracing options.
6
6
  *
@@ -13,7 +13,7 @@ import { createSpanFunction, SpanStatusCode } from "@azure/core-tracing";
13
13
  export function createTraceFunction(prefix) {
14
14
  const createSpan = createSpanFunction({
15
15
  namespace: "Microsoft.KeyVault",
16
- packagePrefix: prefix
16
+ packagePrefix: prefix,
17
17
  });
18
18
  return async function (operationName, options, cb) {
19
19
  const { updatedOptions, span } = createSpan(operationName, options);
@@ -23,14 +23,14 @@ export function createTraceFunction(prefix) {
23
23
  const result = await cb(updatedOptions, span);
24
24
  // otel 0.16+ needs this or else the code ends up being set as UNSET
25
25
  span.setStatus({
26
- code: SpanStatusCode.OK
26
+ code: SpanStatusCode.OK,
27
27
  });
28
28
  return result;
29
29
  }
30
30
  catch (err) {
31
31
  span.setStatus({
32
32
  code: SpanStatusCode.ERROR,
33
- message: err.message
33
+ message: err.message,
34
34
  });
35
35
  throw err;
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tracingHelpers.js","sourceRoot":"","sources":["../../../../keyvault-common/src/tracingHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,kBAAkB,EAAQ,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAqB/E;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,MAAM,UAAU,GAAG,kBAAkB,CAAC;QACpC,SAAS,EAAE,oBAAoB;QAC/B,aAAa,EAAE,MAAM;KACtB,CAAC,CAAC;IAEH,OAAO,KAAK,WAAU,aAAa,EAAE,OAAO,EAAE,EAAE;QAC9C,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAEpE,IAAI;YACF,6GAA6G;YAC7G,kBAAkB;YAClB,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;YAE9C,oEAAoE;YACpE,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,EAAE;aACxB,CAAC,CAAC;YACH,OAAO,MAAM,CAAC;SACf;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,KAAK;gBAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;aACrB,CAAC,CAAC;YACH,MAAM,GAAG,CAAC;SACX;gBAAS;YACR,IAAI,CAAC,GAAG,EAAE,CAAC;SACZ;IACH,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-http\";\nimport { createSpanFunction, Span, SpanStatusCode } from \"@azure/core-tracing\";\n\n/**\n * An interface representing a function that is traced.\n *\n * A traced function will automatically create and close tracing '\n * spans as needed and will handle setting the status / errors as a\n * result of calling the underlying callback.\n *\n * use {@link createTraceFunction} to add tracing to a block of code.\n *\n * @internal\n */\nexport interface TracedFunction {\n <TOptions extends OperationOptions, TReturn>(\n operationName: string,\n options: TOptions,\n cb: (options: TOptions, span: Span) => Promise<TReturn>\n ): Promise<TReturn>;\n}\n\n/**\n * Returns a function that can be used for tracing options.\n *\n * @param prefix - The prefix to use, likely the name of the class / client.\n *\n * @example const withTrace = createTraceFunction(\"Azure.KeyVault.Certificates.CertificateClient\")\n *\n * @internal\n */\nexport function createTraceFunction(prefix: string): TracedFunction {\n const createSpan = createSpanFunction({\n namespace: \"Microsoft.KeyVault\",\n packagePrefix: prefix\n });\n\n return async function(operationName, options, cb) {\n const { updatedOptions, span } = createSpan(operationName, options);\n\n try {\n // NOTE: we really do need to await on this function here so we can handle any exceptions thrown and properly\n // close the span.\n const result = await cb(updatedOptions, span);\n\n // otel 0.16+ needs this or else the code ends up being set as UNSET\n span.setStatus({\n code: SpanStatusCode.OK\n });\n return result;\n } catch (err) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err.message\n });\n throw err;\n } finally {\n span.end();\n }\n };\n}\n"]}
1
+ {"version":3,"file":"tracingHelpers.js","sourceRoot":"","sources":["../../../../keyvault-common/src/tracingHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAQ,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAsB/E;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,MAAM,UAAU,GAAG,kBAAkB,CAAC;QACpC,SAAS,EAAE,oBAAoB;QAC/B,aAAa,EAAE,MAAM;KACtB,CAAC,CAAC;IAEH,OAAO,KAAK,WAAW,aAAa,EAAE,OAAO,EAAE,EAAE;QAC/C,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAEpE,IAAI;YACF,6GAA6G;YAC7G,kBAAkB;YAClB,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;YAE9C,oEAAoE;YACpE,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,EAAE;aACxB,CAAC,CAAC;YACH,OAAO,MAAM,CAAC;SACf;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,KAAK;gBAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;aACrB,CAAC,CAAC;YACH,MAAM,GAAG,CAAC;SACX;gBAAS;YACR,IAAI,CAAC,GAAG,EAAE,CAAC;SACZ;IACH,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Span, SpanStatusCode, createSpanFunction } from \"@azure/core-tracing\";\nimport { OperationOptions } from \"@azure/core-http\";\n\n/**\n * An interface representing a function that is traced.\n *\n * A traced function will automatically create and close tracing '\n * spans as needed and will handle setting the status / errors as a\n * result of calling the underlying callback.\n *\n * use {@link createTraceFunction} to add tracing to a block of code.\n *\n * @internal\n */\nexport interface TracedFunction {\n <TOptions extends OperationOptions, TReturn>(\n operationName: string,\n options: TOptions,\n cb: (options: TOptions, span: Span) => Promise<TReturn>\n ): Promise<TReturn>;\n}\n\n/**\n * Returns a function that can be used for tracing options.\n *\n * @param prefix - The prefix to use, likely the name of the class / client.\n *\n * @example const withTrace = createTraceFunction(\"Azure.KeyVault.Certificates.CertificateClient\")\n *\n * @internal\n */\nexport function createTraceFunction(prefix: string): TracedFunction {\n const createSpan = createSpanFunction({\n namespace: \"Microsoft.KeyVault\",\n packagePrefix: prefix,\n });\n\n return async function (operationName, options, cb) {\n const { updatedOptions, span } = createSpan(operationName, options);\n\n try {\n // NOTE: we really do need to await on this function here so we can handle any exceptions thrown and properly\n // close the span.\n const result = await cb(updatedOptions, span);\n\n // otel 0.16+ needs this or else the code ends up being set as UNSET\n span.setStatus({\n code: SpanStatusCode.OK,\n });\n return result;\n } catch (err) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err.message,\n });\n throw err;\n } finally {\n span.end();\n }\n };\n}\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@azure/keyvault-certificates",
3
3
  "sdk-type": "client",
4
4
  "author": "Microsoft Corporation",
5
- "version": "4.4.0-beta.2",
5
+ "version": "4.4.0",
6
6
  "license": "MIT",
7
7
  "description": "Isomorphic client library for Azure KeyVault's certificates.",
8
8
  "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/keyvault/keyvault-certificates/README.md",
@@ -41,16 +41,16 @@
41
41
  "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
42
42
  "build:minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js 2>&1",
43
43
  "build:samples": "echo Obsolete.",
44
- "build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
45
- "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
46
- "build:nodebrowser": "rollup -c 2>&1",
47
- "build:test": "tsc -p . && rollup -c rollup.test.config.js 2>&1",
44
+ "build:node": "tsc -p . && dev-tool run bundle",
45
+ "build:browser": "tsc -p . && dev-tool run bundle",
46
+ "build:nodebrowser": "dev-tool run bundle",
47
+ "build:test": "tsc -p . && dev-tool run bundle",
48
48
  "build": "npm run clean && tsc -p . && npm run build:nodebrowser && api-extractor run --local",
49
49
  "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
50
50
  "clean": "rimraf dist-esm dist-test types *.tgz *.log samples/typescript/dist",
51
51
  "execute:samples": "dev-tool samples run samples-dev",
52
52
  "extract-api": "tsc -p . && api-extractor run --local",
53
- "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"samples/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
53
+ "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"samples-dev/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
54
54
  "generate:client": "autorest --typescript swagger/README.md",
55
55
  "integration-test:browser": "karma start --single-run",
56
56
  "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 350000 --full-trace \"dist-esm/**/*.spec.js\"",
@@ -63,10 +63,9 @@
63
63
  "test:node": "npm run clean && npm run build:test && npm run unit-test:node",
64
64
  "test": "npm run clean && npm run build:test && npm run unit-test",
65
65
  "unit-test:browser": "karma start --single-run",
66
- "unit-test:node": "mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 300000 --full-trace \"dist-test/index.node.js\"",
66
+ "unit-test:node": "mocha -r esm --require ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 300000 --full-trace \"test/{,!(browser)/**/}*.spec.ts\"",
67
67
  "unit-test:node:no-timeout": "mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace \"dist-test/index.node.js\"",
68
- "unit-test": "npm run unit-test:node && npm run unit-test:browser",
69
- "docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src"
68
+ "unit-test": "npm run unit-test:node && npm run unit-test:browser"
70
69
  },
71
70
  "sideEffects": false,
72
71
  "//metadata": {
@@ -122,17 +121,9 @@
122
121
  "@azure/test-utils": "^1.0.0",
123
122
  "@azure-tools/test-recorder": "^1.0.0",
124
123
  "@microsoft/api-extractor": "^7.18.11",
125
- "@rollup/plugin-commonjs": "11.0.2",
126
- "@rollup/plugin-json": "^4.0.0",
127
- "@rollup/plugin-multi-entry": "^3.0.0",
128
- "@rollup/plugin-node-resolve": "^8.0.0",
129
- "@rollup/plugin-replace": "^2.2.0",
130
- "@types/chai": "^4.1.6",
131
124
  "@types/mocha": "^7.0.2",
132
125
  "@types/node": "^12.0.0",
133
126
  "@types/sinon": "^9.0.4",
134
- "assert": "^1.4.1",
135
- "chai": "^4.2.0",
136
127
  "cross-env": "^7.0.2",
137
128
  "dotenv": "^8.2.0",
138
129
  "eslint": "^7.15.0",
@@ -151,20 +142,14 @@
151
142
  "karma-mocha-reporter": "^2.2.5",
152
143
  "karma-sourcemap-loader": "^0.3.8",
153
144
  "mocha": "^7.1.1",
154
- "mocha-junit-reporter": "^1.18.0",
155
- "nyc": "^14.0.0",
156
- "prettier": "^1.16.4",
157
- "puppeteer": "^10.2.0",
145
+ "mocha-junit-reporter": "^2.0.0",
146
+ "nyc": "^15.0.0",
147
+ "prettier": "^2.5.1",
148
+ "puppeteer": "^13.5.1",
158
149
  "rimraf": "^3.0.0",
159
- "rollup": "^1.16.3",
160
- "rollup-plugin-shim": "^1.0.0",
161
- "rollup-plugin-sourcemaps": "^0.4.2",
162
- "rollup-plugin-terser": "^5.1.1",
163
- "rollup-plugin-visualizer": "^4.0.4",
164
150
  "sinon": "^9.0.2",
165
151
  "source-map-support": "^0.5.9",
166
152
  "typescript": "~4.2.0",
167
- "url": "^0.11.0",
168
- "typedoc": "0.15.2"
153
+ "url": "^0.11.0"
169
154
  }
170
155
  }
@@ -449,6 +449,9 @@ export declare class CertificateClient {
449
449
  * issuerName: "Self",
450
450
  * subject: "cn=MyCert"
451
451
  * });
452
+ *
453
+ * // You may pass an empty string for version which will update
454
+ * // the latest version of the certificate
452
455
  * await client.updateCertificateProperties("MyCertificate", "", {
453
456
  * tags: {
454
457
  * customTag: "value"
@@ -457,7 +460,7 @@ export declare class CertificateClient {
457
460
  * ```
458
461
  * Updates a certificate
459
462
  * @param certificateName - The name of the certificate
460
- * @param version - The version of the certificate to update
463
+ * @param version - The version of the certificate to update (an empty string will update the latest version)
461
464
  * @param options - The options, including what to update
462
465
  */
463
466
  updateCertificateProperties(certificateName: string, version: string, options?: UpdateCertificateOptions): Promise<KeyVaultCertificate>;
@@ -670,7 +673,7 @@ export declare interface CertificateClientOptions extends coreHttp.PipelineOptio
670
673
  /**
671
674
  * The accepted versions of the KeyVault's service API.
672
675
  */
673
- serviceVersion?: "7.0" | "7.1" | "7.2" | "7.3-preview";
676
+ serviceVersion?: "7.0" | "7.1" | "7.2" | "7.3";
674
677
  }
675
678
 
676
679
  /**
@@ -743,7 +746,7 @@ export declare interface CertificateIssuer extends IssuerProperties {
743
746
  * Defines values for JsonWebKeyCurveName. \
744
747
  * {@link KnownJsonWebKeyCurveName} can be used interchangeably with JsonWebKeyCurveName,
745
748
  * this enum contains the known values that the service supports.
746
- * ### Know values supported by the service
749
+ * ### Known values supported by the service
747
750
  * **P-256** \
748
751
  * **P-384** \
749
752
  * **P-521** \
@@ -755,7 +758,7 @@ export declare type CertificateKeyCurveName = string;
755
758
  * Defines values for JsonWebKeyType. \
756
759
  * {@link KnownJsonWebKeyType} can be used interchangeably with JsonWebKeyType,
757
760
  * this enum contains the known values that the service supports.
758
- * ### Know values supported by the service
761
+ * ### Known values supported by the service
759
762
  * **EC** \
760
763
  * **EC-HSM** \
761
764
  * **RSA** \
@@ -1009,6 +1012,7 @@ export declare interface CertificateProperties {
1009
1012
  readonly vaultUrl?: string;
1010
1013
  /**
1011
1014
  * The version of certificate. May be undefined.
1015
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
1012
1016
  */
1013
1017
  readonly version?: string;
1014
1018
  /**
@@ -1135,7 +1139,7 @@ export declare type DeleteIssuerOptions = coreHttp.OperationOptions;
1135
1139
  * Defines values for DeletionRecoveryLevel. \
1136
1140
  * {@link KnownDeletionRecoveryLevel} can be used interchangeably with DeletionRecoveryLevel,
1137
1141
  * this enum contains the known values that the service supports.
1138
- * ### Know values supported by the service
1142
+ * ### Known values supported by the service
1139
1143
  * **Purgeable**: Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.) \
1140
1144
  * **Recoverable+Purgeable**: Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered \
1141
1145
  * **Recoverable**: Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval(90 days) and while the subscription is still available. System wil permanently delete it after 90 days, if not recovered \
@@ -1291,7 +1295,7 @@ export declare interface IssuerProperties {
1291
1295
  * Defines values for KeyUsageType. \
1292
1296
  * {@link KnownKeyUsageType} can be used interchangeably with KeyUsageType,
1293
1297
  * this enum contains the known values that the service supports.
1294
- * ### Know values supported by the service
1298
+ * ### Known values supported by the service
1295
1299
  * **digitalSignature** \
1296
1300
  * **nonRepudiation** \
1297
1301
  * **keyEncipherment** \
@@ -1436,7 +1440,7 @@ export declare enum KnownCertificateKeyTypes {
1436
1440
  }
1437
1441
 
1438
1442
  /** Known values of {@link DeletionRecoveryLevel} that the service accepts. */
1439
- export declare const enum KnownDeletionRecoveryLevels {
1443
+ export declare enum KnownDeletionRecoveryLevels {
1440
1444
  /** Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.) */
1441
1445
  Purgeable = "Purgeable",
1442
1446
  /** Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered */
@@ -1454,7 +1458,7 @@ export declare const enum KnownDeletionRecoveryLevels {
1454
1458
  }
1455
1459
 
1456
1460
  /** Known values of {@link KeyUsageType} that the service accepts. */
1457
- export declare const enum KnownKeyUsageTypes {
1461
+ export declare enum KnownKeyUsageTypes {
1458
1462
  /**
1459
1463
  * DigitalSignature Usage Type.
1460
1464
  */