@azure/arm-keyvault-profile-2020-09-01-hybrid 1.1.0 → 2.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 (178) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +80 -83
  4. package/dist/index.js +3453 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/keyVaultManagementClient.d.ts +23 -0
  13. package/dist-esm/src/keyVaultManagementClient.d.ts.map +1 -0
  14. package/dist-esm/src/keyVaultManagementClient.js +56 -0
  15. package/dist-esm/src/keyVaultManagementClient.js.map +1 -0
  16. package/dist-esm/src/lroImpl.d.ts +16 -0
  17. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  18. package/dist-esm/src/lroImpl.js +29 -0
  19. package/dist-esm/src/lroImpl.js.map +1 -0
  20. package/dist-esm/src/models/index.d.ts +1008 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +123 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +48 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/mappers.js +728 -617
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +26 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/dist-esm/src/models/parameters.js +220 -0
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  33. package/dist-esm/src/operations/index.d.ts.map +1 -0
  34. package/{esm → dist-esm/src}/operations/index.js +3 -5
  35. package/dist-esm/src/operations/index.js.map +1 -0
  36. package/dist-esm/src/operations/operations.d.ts +32 -0
  37. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/operations.js +120 -0
  39. package/dist-esm/src/operations/operations.js.map +1 -0
  40. package/dist-esm/src/operations/privateEndpointConnections.d.ts +51 -0
  41. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  42. package/dist-esm/src/operations/privateEndpointConnections.js +187 -0
  43. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  44. package/dist-esm/src/operations/privateLinkResources.d.ts +20 -0
  45. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  46. package/dist-esm/src/operations/privateLinkResources.js +53 -0
  47. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  48. package/dist-esm/src/operations/secrets.d.ts +72 -0
  49. package/dist-esm/src/operations/secrets.d.ts.map +1 -0
  50. package/dist-esm/src/operations/secrets.js +247 -0
  51. package/dist-esm/src/operations/secrets.js.map +1 -0
  52. package/dist-esm/src/operations/vaults.d.ts +166 -0
  53. package/dist-esm/src/operations/vaults.d.ts.map +1 -0
  54. package/dist-esm/src/operations/vaults.js +816 -0
  55. package/dist-esm/src/operations/vaults.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
  57. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/index.js +13 -0
  59. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  61. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  63. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +43 -0
  65. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  67. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +12 -0
  69. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  71. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/secrets.d.ts +45 -0
  73. package/dist-esm/src/operationsInterfaces/secrets.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/secrets.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/secrets.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/vaults.d.ts +103 -0
  77. package/dist-esm/src/operationsInterfaces/vaults.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/vaults.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/vaults.js.map +1 -0
  80. package/dist-esm/test/sampleTest.d.ts +2 -0
  81. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  82. package/dist-esm/test/sampleTest.js +40 -0
  83. package/dist-esm/test/sampleTest.js.map +1 -0
  84. package/package.json +73 -22
  85. package/review/arm-keyvault-profile-2020-09-01-hybrid.api.md +876 -0
  86. package/rollup.config.js +115 -30
  87. package/src/index.ts +12 -0
  88. package/src/keyVaultManagementClient.ts +84 -45
  89. package/src/lroImpl.ts +34 -0
  90. package/src/models/index.ts +849 -1276
  91. package/src/models/mappers.ts +730 -609
  92. package/src/models/parameters.ts +153 -76
  93. package/src/operations/index.ts +3 -5
  94. package/src/operations/operations.ts +87 -73
  95. package/src/operations/privateEndpointConnections.ts +174 -154
  96. package/src/operations/privateLinkResources.ts +39 -54
  97. package/src/operations/secrets.ts +215 -248
  98. package/src/operations/vaults.ts +731 -629
  99. package/src/operationsInterfaces/index.ts +13 -0
  100. package/src/operationsInterfaces/operations.ts +22 -0
  101. package/src/operationsInterfaces/privateEndpointConnections.ts +85 -0
  102. package/src/operationsInterfaces/privateLinkResources.ts +27 -0
  103. package/src/operationsInterfaces/secrets.ts +86 -0
  104. package/src/operationsInterfaces/vaults.ts +197 -0
  105. package/tsconfig.json +14 -6
  106. package/types/arm-keyvault-profile-2020-09-01-hybrid.d.ts +1360 -0
  107. package/types/tsdoc-metadata.json +11 -0
  108. package/dist/arm-keyvault-profile-2020-09-01-hybrid.js +0 -3058
  109. package/dist/arm-keyvault-profile-2020-09-01-hybrid.js.map +0 -1
  110. package/dist/arm-keyvault-profile-2020-09-01-hybrid.min.js +0 -1
  111. package/dist/arm-keyvault-profile-2020-09-01-hybrid.min.js.map +0 -1
  112. package/esm/keyVaultManagementClient.d.ts +0 -29
  113. package/esm/keyVaultManagementClient.d.ts.map +0 -1
  114. package/esm/keyVaultManagementClient.js +0 -43
  115. package/esm/keyVaultManagementClient.js.map +0 -1
  116. package/esm/keyVaultManagementClientContext.d.ts +0 -23
  117. package/esm/keyVaultManagementClientContext.d.ts.map +0 -1
  118. package/esm/keyVaultManagementClientContext.js +0 -62
  119. package/esm/keyVaultManagementClientContext.js.map +0 -1
  120. package/esm/models/index.d.ts +0 -1449
  121. package/esm/models/index.d.ts.map +0 -1
  122. package/esm/models/index.js +0 -8
  123. package/esm/models/index.js.map +0 -1
  124. package/esm/models/mappers.d.ts +0 -46
  125. package/esm/models/mappers.d.ts.map +0 -1
  126. package/esm/models/mappers.js.map +0 -1
  127. package/esm/models/operationsMappers.d.ts +0 -2
  128. package/esm/models/operationsMappers.d.ts.map +0 -1
  129. package/esm/models/operationsMappers.js +0 -9
  130. package/esm/models/operationsMappers.js.map +0 -1
  131. package/esm/models/parameters.d.ts +0 -17
  132. package/esm/models/parameters.d.ts.map +0 -1
  133. package/esm/models/parameters.js +0 -178
  134. package/esm/models/parameters.js.map +0 -1
  135. package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
  136. package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
  137. package/esm/models/privateEndpointConnectionsMappers.js +0 -9
  138. package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
  139. package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
  140. package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
  141. package/esm/models/privateLinkResourcesMappers.js +0 -9
  142. package/esm/models/privateLinkResourcesMappers.js.map +0 -1
  143. package/esm/models/secretsMappers.d.ts +0 -2
  144. package/esm/models/secretsMappers.d.ts.map +0 -1
  145. package/esm/models/secretsMappers.js +0 -9
  146. package/esm/models/secretsMappers.js.map +0 -1
  147. package/esm/models/vaultsMappers.d.ts +0 -2
  148. package/esm/models/vaultsMappers.d.ts.map +0 -1
  149. package/esm/models/vaultsMappers.js +0 -9
  150. package/esm/models/vaultsMappers.js.map +0 -1
  151. package/esm/operations/index.d.ts.map +0 -1
  152. package/esm/operations/index.js.map +0 -1
  153. package/esm/operations/operations.d.ts +0 -46
  154. package/esm/operations/operations.d.ts.map +0 -1
  155. package/esm/operations/operations.js +0 -77
  156. package/esm/operations/operations.js.map +0 -1
  157. package/esm/operations/privateEndpointConnections.d.ts +0 -91
  158. package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
  159. package/esm/operations/privateEndpointConnections.js +0 -164
  160. package/esm/operations/privateEndpointConnections.js.map +0 -1
  161. package/esm/operations/privateLinkResources.d.ts +0 -34
  162. package/esm/operations/privateLinkResources.d.ts.map +0 -1
  163. package/esm/operations/privateLinkResources.js +0 -58
  164. package/esm/operations/privateLinkResources.js.map +0 -1
  165. package/esm/operations/secrets.d.ts +0 -139
  166. package/esm/operations/secrets.d.ts.map +0 -1
  167. package/esm/operations/secrets.js +0 -201
  168. package/esm/operations/secrets.js.map +0 -1
  169. package/esm/operations/vaults.d.ts +0 -317
  170. package/esm/operations/vaults.d.ts.map +0 -1
  171. package/esm/operations/vaults.js +0 -557
  172. package/esm/operations/vaults.js.map +0 -1
  173. package/src/keyVaultManagementClientContext.ts +0 -69
  174. package/src/models/operationsMappers.ts +0 -16
  175. package/src/models/privateEndpointConnectionsMappers.ts +0 -40
  176. package/src/models/privateLinkResourcesMappers.ts +0 -39
  177. package/src/models/secretsMappers.ts +0 -39
  178. package/src/models/vaultsMappers.ts +0 -45
package/rollup.config.js CHANGED
@@ -1,37 +1,122 @@
1
- import rollup from "rollup";
2
- import nodeResolve from "rollup-plugin-node-resolve";
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import nodeResolve from "@rollup/plugin-node-resolve";
10
+ import cjs from "@rollup/plugin-commonjs";
3
11
  import sourcemaps from "rollup-plugin-sourcemaps";
12
+ import multiEntry from "@rollup/plugin-multi-entry";
13
+ import json from "@rollup/plugin-json";
14
+
15
+ import nodeBuiltins from "builtin-modules";
16
+
17
+ // #region Warning Handler
18
+
19
+ /**
20
+ * A function that can determine whether a rollup warning should be ignored. If
21
+ * the function returns `true`, then the warning will not be displayed.
22
+ */
23
+
24
+ function ignoreNiseSinonEval(warning) {
25
+ return (
26
+ warning.code === "EVAL" &&
27
+ warning.id &&
28
+ (warning.id.includes("node_modules/nise") ||
29
+ warning.id.includes("node_modules/sinon")) === true
30
+ );
31
+ }
32
+
33
+ function ignoreChaiCircularDependency(warning) {
34
+ return (
35
+ warning.code === "CIRCULAR_DEPENDENCY" &&
36
+ warning.importer && warning.importer.includes("node_modules/chai") === true
37
+ );
38
+ }
39
+
40
+ const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
4
41
 
5
42
  /**
6
- * @type {rollup.RollupFileOptions}
43
+ * Construct a warning handler for the shared rollup configuration
44
+ * that ignores certain warnings that are not relevant to testing.
7
45
  */
8
- const config = {
9
- input: "./esm/keyVaultManagementClient.js",
10
- external: [
11
- "@azure/ms-rest-js",
12
- "@azure/ms-rest-azure-js"
13
- ],
14
- output: {
15
- file: "./dist/arm-keyvault-profile-2020-09-01-hybrid.js",
16
- format: "umd",
17
- name: "Azure.ArmKeyvaultProfile20200901Hybrid",
18
- sourcemap: true,
19
- globals: {
20
- "@azure/ms-rest-js": "msRest",
21
- "@azure/ms-rest-azure-js": "msRestAzure"
46
+ function makeOnWarnForTesting() {
47
+ return (warning, warn) => {
48
+ // If every inhibitor returns false (i.e. no inhibitors), then show the warning
49
+ if (warningInhibitors.every((inhib) => !inhib(warning))) {
50
+ warn(warning);
51
+ }
52
+ };
53
+ }
54
+
55
+ // #endregion
56
+
57
+ function makeBrowserTestConfig() {
58
+ const config = {
59
+ input: {
60
+ include: ["dist-esm/test/**/*.spec.js"],
61
+ exclude: ["dist-esm/test/**/node/**"]
22
62
  },
23
- banner: `/*
24
- * Copyright (c) Microsoft Corporation. All rights reserved.
25
- * Licensed under the MIT License. See License.txt in the project root for license information.
26
- *
27
- * Code generated by Microsoft (R) AutoRest Code Generator.
28
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
29
- */`
30
- },
31
- plugins: [
32
- nodeResolve({ mainFields: ['module', 'main'] }),
33
- sourcemaps()
34
- ]
63
+ output: {
64
+ file: `dist-test/index.browser.js`,
65
+ format: "umd",
66
+ sourcemap: true
67
+ },
68
+ preserveSymlinks: false,
69
+ plugins: [
70
+ multiEntry({ exports: false }),
71
+ nodeResolve({
72
+ mainFields: ["module", "browser"]
73
+ }),
74
+ cjs(),
75
+ json(),
76
+ sourcemaps()
77
+ //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
78
+ ],
79
+ onwarn: makeOnWarnForTesting(),
80
+ // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
81
+ // rollup started respecting the "sideEffects" field in package.json. Since
82
+ // our package.json sets "sideEffects=false", this also applies to test
83
+ // code, which causes all tests to be removed by tree-shaking.
84
+ treeshake: false
85
+ };
86
+
87
+ return config;
88
+ }
89
+
90
+ const defaultConfigurationOptions = {
91
+ disableBrowserBundle: false
35
92
  };
36
93
 
37
- export default config;
94
+ export function makeConfig(pkg, options) {
95
+ options = {
96
+ ...defaultConfigurationOptions,
97
+ ...(options || {})
98
+ };
99
+
100
+ const baseConfig = {
101
+ // Use the package's module field if it has one
102
+ input: pkg["module"] || "dist-esm/src/index.js",
103
+ external: [
104
+ ...nodeBuiltins,
105
+ ...Object.keys(pkg.dependencies),
106
+ ...Object.keys(pkg.devDependencies)
107
+ ],
108
+ output: { file: "dist/index.js", format: "cjs", sourcemap: true },
109
+ preserveSymlinks: false,
110
+ plugins: [sourcemaps(), nodeResolve()]
111
+ };
112
+
113
+ const config = [baseConfig];
114
+
115
+ if (!options.disableBrowserBundle) {
116
+ config.push(makeBrowserTestConfig());
117
+ }
118
+
119
+ return config;
120
+ }
121
+
122
+ export default makeConfig(require("./package.json"));
package/src/index.ts ADDED
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ /// <reference lib="esnext.asynciterable" />
10
+ export * from "./models";
11
+ export { KeyVaultManagementClient } from "./keyVaultManagementClient";
12
+ export * from "./operationsInterfaces";
@@ -1,57 +1,96 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
12
- import { TokenCredential } from "@azure/core-auth";
13
- import * as Models from "./models";
14
- import * as Mappers from "./models/mappers";
15
- import * as operations from "./operations";
16
- import { KeyVaultManagementClientContext } from "./keyVaultManagementClientContext";
9
+ import * as coreClient from "@azure/core-client";
10
+ import * as coreAuth from "@azure/core-auth";
11
+ import {
12
+ VaultsImpl,
13
+ PrivateEndpointConnectionsImpl,
14
+ PrivateLinkResourcesImpl,
15
+ OperationsImpl,
16
+ SecretsImpl
17
+ } from "./operations";
18
+ import {
19
+ Vaults,
20
+ PrivateEndpointConnections,
21
+ PrivateLinkResources,
22
+ Operations,
23
+ Secrets
24
+ } from "./operationsInterfaces";
25
+ import { KeyVaultManagementClientOptionalParams } from "./models";
17
26
 
18
-
19
- class KeyVaultManagementClient extends KeyVaultManagementClientContext {
20
- // Operation groups
21
- vaults: operations.Vaults;
22
- privateEndpointConnections: operations.PrivateEndpointConnections;
23
- privateLinkResources: operations.PrivateLinkResources;
24
- operations: operations.Operations;
25
- secrets: operations.Secrets;
27
+ export class KeyVaultManagementClient extends coreClient.ServiceClient {
28
+ $host: string;
29
+ apiVersion: string;
30
+ subscriptionId: string;
26
31
 
27
32
  /**
28
33
  * Initializes a new instance of the KeyVaultManagementClient class.
29
- * @param credentials Credentials needed for the client to connect to Azure. Credentials
30
- * implementing the TokenCredential interface from the @azure/identity package are recommended. For
31
- * more information about these credentials, see
32
- * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
33
- * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
34
- * @azure/ms-rest-browserauth are also supported.
35
- * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure
36
- * subscription. The subscription ID forms part of the URI for every service call.
37
- * @param [options] The parameter options
34
+ * @param credentials Subscription credentials which uniquely identify client subscription.
35
+ * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription.
36
+ * The subscription ID forms part of the URI for every service call.
37
+ * @param options The parameter options
38
38
  */
39
- constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) {
40
- super(credentials, subscriptionId, options);
41
- this.vaults = new operations.Vaults(this);
42
- this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
43
- this.privateLinkResources = new operations.PrivateLinkResources(this);
44
- this.operations = new operations.Operations(this);
45
- this.secrets = new operations.Secrets(this);
46
- }
47
- }
39
+ constructor(
40
+ credentials: coreAuth.TokenCredential,
41
+ subscriptionId: string,
42
+ options?: KeyVaultManagementClientOptionalParams
43
+ ) {
44
+ if (credentials === undefined) {
45
+ throw new Error("'credentials' cannot be null");
46
+ }
47
+ if (subscriptionId === undefined) {
48
+ throw new Error("'subscriptionId' cannot be null");
49
+ }
50
+
51
+ // Initializing default values for options
52
+ if (!options) {
53
+ options = {};
54
+ }
55
+ const defaults: KeyVaultManagementClientOptionalParams = {
56
+ requestContentType: "application/json; charset=utf-8",
57
+ credential: credentials
58
+ };
48
59
 
49
- // Operation Specifications
60
+ const packageDetails = `azsdk-js-arm-keyvault-profile-2020-09-01-hybrid/2.0.0`;
61
+ const userAgentPrefix =
62
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
63
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
64
+ : `${packageDetails}`;
50
65
 
51
- export {
52
- KeyVaultManagementClient,
53
- KeyVaultManagementClientContext,
54
- Models as KeyVaultManagementModels,
55
- Mappers as KeyVaultManagementMappers
56
- };
57
- export * from "./operations";
66
+ if (!options.credentialScopes) {
67
+ options.credentialScopes = ["https://management.azure.com/.default"];
68
+ }
69
+ const optionsWithDefaults = {
70
+ ...defaults,
71
+ ...options,
72
+ userAgentOptions: {
73
+ userAgentPrefix
74
+ },
75
+ baseUri: options.endpoint || "https://management.azure.com"
76
+ };
77
+ super(optionsWithDefaults);
78
+ // Parameter assignments
79
+ this.subscriptionId = subscriptionId;
80
+
81
+ // Assigning values to Constant parameters
82
+ this.$host = options.$host || "https://management.azure.com";
83
+ this.apiVersion = options.apiVersion || "2019-09-01";
84
+ this.vaults = new VaultsImpl(this);
85
+ this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
86
+ this.privateLinkResources = new PrivateLinkResourcesImpl(this);
87
+ this.operations = new OperationsImpl(this);
88
+ this.secrets = new SecretsImpl(this);
89
+ }
90
+
91
+ vaults: Vaults;
92
+ privateEndpointConnections: PrivateEndpointConnections;
93
+ privateLinkResources: PrivateLinkResources;
94
+ operations: Operations;
95
+ secrets: Secrets;
96
+ }
package/src/lroImpl.ts ADDED
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { LongRunningOperation, LroResponse } from "@azure/core-lro";
10
+
11
+ export class LroImpl<T> implements LongRunningOperation<T> {
12
+ constructor(
13
+ private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
14
+ private args: Record<string, unknown>,
15
+ private spec: {
16
+ readonly requestBody?: unknown;
17
+ readonly path?: string;
18
+ readonly httpMethod: string;
19
+ } & Record<string, any>,
20
+ public requestPath: string = spec.path!,
21
+ public requestMethod: string = spec.httpMethod
22
+ ) {}
23
+ public async sendInitialRequest(): Promise<LroResponse<T>> {
24
+ return this.sendOperationFn(this.args, this.spec);
25
+ }
26
+ public async sendPollRequest(path: string): Promise<LroResponse<T>> {
27
+ const { requestBody, ...restSpec } = this.spec;
28
+ return this.sendOperationFn(this.args, {
29
+ ...restSpec,
30
+ path,
31
+ httpMethod: "GET"
32
+ });
33
+ }
34
+ }