@azure/arm-healthcareapis 1.1.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/README.md +69 -83
- package/dist/index.js +2292 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/checkNameAvailability.d.ts +2 -0
- package/dist-esm/samples-dev/checkNameAvailability.d.ts.map +1 -0
- package/dist-esm/samples-dev/checkNameAvailability.js +33 -0
- package/dist-esm/samples-dev/checkNameAvailability.js.map +1 -0
- package/dist-esm/samples-dev/createOrUpdateAServiceWithAllParameters.d.ts +2 -0
- package/dist-esm/samples-dev/createOrUpdateAServiceWithAllParameters.d.ts.map +1 -0
- package/dist-esm/samples-dev/createOrUpdateAServiceWithAllParameters.js +62 -0
- package/dist-esm/samples-dev/createOrUpdateAServiceWithAllParameters.js.map +1 -0
- package/dist-esm/samples-dev/createOrUpdateAServiceWithMinimumParameters.d.ts +2 -0
- package/dist-esm/samples-dev/createOrUpdateAServiceWithMinimumParameters.d.ts.map +1 -0
- package/dist-esm/samples-dev/createOrUpdateAServiceWithMinimumParameters.js +39 -0
- package/dist-esm/samples-dev/createOrUpdateAServiceWithMinimumParameters.js.map +1 -0
- package/dist-esm/samples-dev/deleteService.d.ts +2 -0
- package/dist-esm/samples-dev/deleteService.d.ts.map +1 -0
- package/dist-esm/samples-dev/deleteService.js +31 -0
- package/dist-esm/samples-dev/deleteService.js.map +1 -0
- package/dist-esm/samples-dev/getMetadata.d.ts +2 -0
- package/dist-esm/samples-dev/getMetadata.d.ts.map +1 -0
- package/dist-esm/samples-dev/getMetadata.js +31 -0
- package/dist-esm/samples-dev/getMetadata.js.map +1 -0
- package/dist-esm/samples-dev/getOperationResult.d.ts +2 -0
- package/dist-esm/samples-dev/getOperationResult.d.ts.map +1 -0
- package/dist-esm/samples-dev/getOperationResult.js +31 -0
- package/dist-esm/samples-dev/getOperationResult.js.map +1 -0
- package/dist-esm/samples-dev/listAllServicesInResourceGroup.d.ts +2 -0
- package/dist-esm/samples-dev/listAllServicesInResourceGroup.d.ts.map +1 -0
- package/dist-esm/samples-dev/listAllServicesInResourceGroup.js +44 -0
- package/dist-esm/samples-dev/listAllServicesInResourceGroup.js.map +1 -0
- package/dist-esm/samples-dev/listAllServicesInSubscription.d.ts +2 -0
- package/dist-esm/samples-dev/listAllServicesInSubscription.d.ts.map +1 -0
- package/dist-esm/samples-dev/listAllServicesInSubscription.js +43 -0
- package/dist-esm/samples-dev/listAllServicesInSubscription.js.map +1 -0
- package/dist-esm/samples-dev/listOperations.d.ts +2 -0
- package/dist-esm/samples-dev/listOperations.d.ts.map +1 -0
- package/dist-esm/samples-dev/listOperations.js +43 -0
- package/dist-esm/samples-dev/listOperations.js.map +1 -0
- package/dist-esm/samples-dev/patchService.d.ts +2 -0
- package/dist-esm/samples-dev/patchService.d.ts.map +1 -0
- package/dist-esm/samples-dev/patchService.js +34 -0
- package/dist-esm/samples-dev/patchService.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionCreateOrUpdate.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionCreateOrUpdate.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionCreateOrUpdate.js +38 -0
- package/dist-esm/samples-dev/privateEndpointConnectionCreateOrUpdate.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionGetConnection.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionGetConnection.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionGetConnection.js +32 -0
- package/dist-esm/samples-dev/privateEndpointConnectionGetConnection.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionList.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionList.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionList.js +45 -0
- package/dist-esm/samples-dev/privateEndpointConnectionList.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDelete.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDelete.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDelete.js +32 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDelete.js.map +1 -0
- package/dist-esm/samples-dev/privateLinkResourcesGet.d.ts +2 -0
- package/dist-esm/samples-dev/privateLinkResourcesGet.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateLinkResourcesGet.js +32 -0
- package/dist-esm/samples-dev/privateLinkResourcesGet.js.map +1 -0
- package/dist-esm/samples-dev/privateLinkResourcesListGroupIds.d.ts +2 -0
- package/dist-esm/samples-dev/privateLinkResourcesListGroupIds.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateLinkResourcesListGroupIds.js +31 -0
- package/dist-esm/samples-dev/privateLinkResourcesListGroupIds.js.map +1 -0
- package/dist-esm/src/healthcareApisManagementClient.d.ts +22 -0
- package/dist-esm/src/healthcareApisManagementClient.d.ts.map +1 -0
- package/dist-esm/src/healthcareApisManagementClient.js +55 -0
- package/dist-esm/src/healthcareApisManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +609 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +65 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +32 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +335 -321
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +18 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +159 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +3 -5
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operationResults.d.ts +20 -0
- package/dist-esm/src/operations/operationResults.d.ts.map +1 -0
- package/dist-esm/src/operations/operationResults.js +56 -0
- package/dist-esm/src/operations/operationResults.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +78 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +314 -0
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts +28 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.js +85 -0
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operations/services.d.ts +114 -0
- package/dist-esm/src/operations/services.d.ts.map +1 -0
- package/dist-esm/src/operations/services.js +527 -0
- package/dist-esm/src/operations/services.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operationResults.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/operationResults.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operationResults.js +9 -0
- package/dist-esm/src/operationsInterfaces/operationResults.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +61 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +20 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/services.d.ts +78 -0
- package/dist-esm/src/operationsInterfaces/services.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/services.js +9 -0
- package/dist-esm/src/operationsInterfaces/services.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +80 -33
- package/review/arm-healthcareapis.api.md +535 -0
- package/rollup.config.js +181 -30
- package/src/healthcareApisManagementClient.ts +82 -43
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +450 -739
- package/src/models/mappers.ts +336 -319
- package/src/models/parameters.ts +111 -48
- package/src/operations/index.ts +3 -5
- package/src/operations/operationResults.ts +39 -54
- package/src/operations/operations.ts +87 -73
- package/src/operations/privateEndpointConnections.ts +321 -161
- package/src/operations/privateLinkResources.ts +64 -97
- package/src/operations/services.ts +538 -362
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operationResults.ts +27 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +115 -0
- package/src/operationsInterfaces/privateLinkResources.ts +42 -0
- package/src/operationsInterfaces/services.ts +152 -0
- package/tsconfig.json +5 -4
- package/types/arm-healthcareapis.d.ts +885 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-healthcareapis.js +0 -2100
- package/dist/arm-healthcareapis.js.map +0 -1
- package/dist/arm-healthcareapis.min.js +0 -1
- package/dist/arm-healthcareapis.min.js.map +0 -1
- package/esm/healthcareApisManagementClient.d.ts +0 -28
- package/esm/healthcareApisManagementClient.d.ts.map +0 -1
- package/esm/healthcareApisManagementClient.js +0 -42
- package/esm/healthcareApisManagementClient.js.map +0 -1
- package/esm/healthcareApisManagementClientContext.d.ts +0 -22
- package/esm/healthcareApisManagementClientContext.d.ts.map +0 -1
- package/esm/healthcareApisManagementClientContext.js +0 -61
- package/esm/healthcareApisManagementClientContext.js.map +0 -1
- package/esm/models/index.d.ts +0 -907
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -8
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -33
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationResultsMappers.d.ts +0 -2
- package/esm/models/operationResultsMappers.d.ts.map +0 -1
- package/esm/models/operationResultsMappers.js +0 -9
- package/esm/models/operationResultsMappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -9
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -12
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -120
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
- package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.js +0 -9
- package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
- package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
- package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
- package/esm/models/privateLinkResourcesMappers.js +0 -9
- package/esm/models/privateLinkResourcesMappers.js.map +0 -1
- package/esm/models/servicesMappers.d.ts +0 -2
- package/esm/models/servicesMappers.d.ts.map +0 -1
- package/esm/models/servicesMappers.js +0 -9
- package/esm/models/servicesMappers.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operationResults.d.ts +0 -34
- package/esm/operations/operationResults.d.ts.map +0 -1
- package/esm/operations/operationResults.js +0 -61
- package/esm/operations/operationResults.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -77
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/privateEndpointConnections.d.ts +0 -104
- package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
- package/esm/operations/privateEndpointConnections.js +0 -209
- package/esm/operations/privateEndpointConnections.js.map +0 -1
- package/esm/operations/privateLinkResources.d.ts +0 -58
- package/esm/operations/privateLinkResources.d.ts.map +0 -1
- package/esm/operations/privateLinkResources.js +0 -91
- package/esm/operations/privateLinkResources.js.map +0 -1
- package/esm/operations/services.d.ts +0 -177
- package/esm/operations/services.d.ts.map +0 -1
- package/esm/operations/services.js +0 -362
- package/esm/operations/services.js.map +0 -1
- package/src/healthcareApisManagementClientContext.ts +0 -68
- package/src/models/operationResultsMappers.ts +0 -13
- package/src/models/operationsMappers.ts +0 -15
- package/src/models/privateEndpointConnectionsMappers.ts +0 -31
- package/src/models/privateLinkResourcesMappers.ts +0 -31
- package/src/models/servicesMappers.ts +0 -34
package/rollup.config.js
CHANGED
@@ -1,37 +1,188 @@
|
|
1
|
-
|
2
|
-
|
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
|
+
/**
|
18
|
+
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
19
|
+
*
|
20
|
+
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
21
|
+
* __exportStar downleveled helper function to declare its exports which confuses
|
22
|
+
* rollup's automatic discovery mechanism.
|
23
|
+
*
|
24
|
+
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
25
|
+
*/
|
26
|
+
export function openTelemetryCommonJs() {
|
27
|
+
const namedExports = {};
|
28
|
+
|
29
|
+
for (const key of [
|
30
|
+
"@opentelemetry/api",
|
31
|
+
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
32
|
+
]) {
|
33
|
+
namedExports[key] = [
|
34
|
+
"SpanKind",
|
35
|
+
"TraceFlags",
|
36
|
+
"getSpan",
|
37
|
+
"setSpan",
|
38
|
+
"SpanStatusCode",
|
39
|
+
"getSpanContext",
|
40
|
+
"setSpanContext"
|
41
|
+
];
|
42
|
+
}
|
43
|
+
|
44
|
+
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
45
|
+
|
46
|
+
for (const version of releasedOpenTelemetryVersions) {
|
47
|
+
namedExports[
|
48
|
+
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
49
|
+
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
50
|
+
] = [
|
51
|
+
"SpanKind",
|
52
|
+
"TraceFlags",
|
53
|
+
"getSpan",
|
54
|
+
"setSpan",
|
55
|
+
"StatusCode",
|
56
|
+
"CanonicalCode",
|
57
|
+
"getSpanContext",
|
58
|
+
"setSpanContext"
|
59
|
+
];
|
60
|
+
}
|
61
|
+
|
62
|
+
return namedExports;
|
63
|
+
}
|
64
|
+
|
65
|
+
// #region Warning Handler
|
4
66
|
|
5
67
|
/**
|
6
|
-
*
|
68
|
+
* A function that can determine whether a rollupwarning should be ignored. If
|
69
|
+
* the function returns `true`, then the warning will not be displayed.
|
7
70
|
*/
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
71
|
+
|
72
|
+
function ignoreNiseSinonEvalWarnings(warning) {
|
73
|
+
return (
|
74
|
+
warning.code === "EVAL" &&
|
75
|
+
warning.id &&
|
76
|
+
(warning.id.includes("node_modules/nise") ||
|
77
|
+
warning.id.includes("node_modules/sinon")) === true
|
78
|
+
);
|
79
|
+
}
|
80
|
+
|
81
|
+
function ignoreChaiCircularDependencyWarnings(warning) {
|
82
|
+
return (
|
83
|
+
warning.code === "CIRCULAR_DEPENDENCY" &&
|
84
|
+
warning.importer && warning.importer.includes("node_modules/chai") === true
|
85
|
+
);
|
86
|
+
}
|
87
|
+
|
88
|
+
const warningInhibitors = [
|
89
|
+
ignoreChaiCircularDependencyWarnings,
|
90
|
+
ignoreNiseSinonEvalWarnings
|
91
|
+
];
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Construct a warning handler for the shared rollup configuration
|
95
|
+
* that ignores certain warnings that are not relevant to testing.
|
96
|
+
*/
|
97
|
+
function makeOnWarnForTesting() {
|
98
|
+
return (warning, warn) => {
|
99
|
+
// If every inhibitor returns false (i.e. no inhibitors), then show the warning
|
100
|
+
if (warningInhibitors.every((inhib) => !inhib(warning))) {
|
101
|
+
warn(warning);
|
102
|
+
}
|
103
|
+
};
|
104
|
+
}
|
105
|
+
|
106
|
+
// #endregion
|
107
|
+
|
108
|
+
function makeBrowserTestConfig() {
|
109
|
+
const config = {
|
110
|
+
input: {
|
111
|
+
include: ["dist-esm/test/**/*.spec.js"],
|
112
|
+
exclude: ["dist-esm/test/**/node/**"]
|
22
113
|
},
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
114
|
+
output: {
|
115
|
+
file: `dist-test/index.browser.js`,
|
116
|
+
format: "umd",
|
117
|
+
sourcemap: true
|
118
|
+
},
|
119
|
+
preserveSymlinks: false,
|
120
|
+
plugins: [
|
121
|
+
multiEntry({ exports: false }),
|
122
|
+
nodeResolve({
|
123
|
+
mainFields: ["module", "browser"]
|
124
|
+
}),
|
125
|
+
cjs({
|
126
|
+
namedExports: {
|
127
|
+
// Chai's strange internal architecture makes it impossible to statically
|
128
|
+
// analyze its exports.
|
129
|
+
chai: [
|
130
|
+
"version",
|
131
|
+
"use",
|
132
|
+
"util",
|
133
|
+
"config",
|
134
|
+
"expect",
|
135
|
+
"should",
|
136
|
+
"assert"
|
137
|
+
],
|
138
|
+
...openTelemetryCommonJs()
|
139
|
+
}
|
140
|
+
}),
|
141
|
+
json(),
|
142
|
+
sourcemaps()
|
143
|
+
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
144
|
+
],
|
145
|
+
onwarn: makeOnWarnForTesting(),
|
146
|
+
// Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
|
147
|
+
// rollup started respecting the "sideEffects" field in package.json. Since
|
148
|
+
// our package.json sets "sideEffects=false", this also applies to test
|
149
|
+
// code, which causes all tests to be removed by tree-shaking.
|
150
|
+
treeshake: false
|
151
|
+
};
|
152
|
+
|
153
|
+
return config;
|
154
|
+
}
|
155
|
+
|
156
|
+
const defaultConfigurationOptions = {
|
157
|
+
disableBrowserBundle: false
|
35
158
|
};
|
36
159
|
|
37
|
-
export
|
160
|
+
export function makeConfig(pkg, options) {
|
161
|
+
options = {
|
162
|
+
...defaultConfigurationOptions,
|
163
|
+
...(options || {})
|
164
|
+
};
|
165
|
+
|
166
|
+
const baseConfig = {
|
167
|
+
// Use the package's module field if it has one
|
168
|
+
input: pkg["module"] || "dist-esm/src/index.js",
|
169
|
+
external: [
|
170
|
+
...nodeBuiltins,
|
171
|
+
...Object.keys(pkg.dependencies),
|
172
|
+
...Object.keys(pkg.devDependencies)
|
173
|
+
],
|
174
|
+
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
175
|
+
preserveSymlinks: false,
|
176
|
+
plugins: [sourcemaps(), nodeResolve(), cjs()]
|
177
|
+
};
|
178
|
+
|
179
|
+
const config = [baseConfig];
|
180
|
+
|
181
|
+
if (!options.disableBrowserBundle) {
|
182
|
+
config.push(makeBrowserTestConfig());
|
183
|
+
}
|
184
|
+
|
185
|
+
return config;
|
186
|
+
}
|
187
|
+
|
188
|
+
export default makeConfig(require("./package.json"));
|
@@ -1,56 +1,95 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
3
|
-
* Licensed under the MIT License.
|
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
|
12
|
-
import
|
13
|
-
import
|
14
|
-
|
15
|
-
|
16
|
-
|
9
|
+
import * as coreClient from "@azure/core-client";
|
10
|
+
import * as coreAuth from "@azure/core-auth";
|
11
|
+
import {
|
12
|
+
ServicesImpl,
|
13
|
+
OperationsImpl,
|
14
|
+
OperationResultsImpl,
|
15
|
+
PrivateEndpointConnectionsImpl,
|
16
|
+
PrivateLinkResourcesImpl
|
17
|
+
} from "./operations";
|
18
|
+
import {
|
19
|
+
Services,
|
20
|
+
Operations,
|
21
|
+
OperationResults,
|
22
|
+
PrivateEndpointConnections,
|
23
|
+
PrivateLinkResources
|
24
|
+
} from "./operationsInterfaces";
|
25
|
+
import { HealthcareApisManagementClientOptionalParams } from "./models";
|
17
26
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
operations: operations.Operations;
|
23
|
-
operationResults: operations.OperationResults;
|
24
|
-
privateEndpointConnections: operations.PrivateEndpointConnections;
|
25
|
-
privateLinkResources: operations.PrivateLinkResources;
|
27
|
+
export class HealthcareApisManagementClient extends coreClient.ServiceClient {
|
28
|
+
$host: string;
|
29
|
+
apiVersion: string;
|
30
|
+
subscriptionId: string;
|
26
31
|
|
27
32
|
/**
|
28
33
|
* Initializes a new instance of the HealthcareApisManagementClient class.
|
29
|
-
* @param 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.
|
34
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
35
35
|
* @param subscriptionId The subscription identifier.
|
36
|
-
* @param
|
36
|
+
* @param options The parameter options
|
37
37
|
*/
|
38
|
-
constructor(
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
38
|
+
constructor(
|
39
|
+
credentials: coreAuth.TokenCredential,
|
40
|
+
subscriptionId: string,
|
41
|
+
options?: HealthcareApisManagementClientOptionalParams
|
42
|
+
) {
|
43
|
+
if (credentials === undefined) {
|
44
|
+
throw new Error("'credentials' cannot be null");
|
45
|
+
}
|
46
|
+
if (subscriptionId === undefined) {
|
47
|
+
throw new Error("'subscriptionId' cannot be null");
|
48
|
+
}
|
49
|
+
|
50
|
+
// Initializing default values for options
|
51
|
+
if (!options) {
|
52
|
+
options = {};
|
53
|
+
}
|
54
|
+
const defaults: HealthcareApisManagementClientOptionalParams = {
|
55
|
+
requestContentType: "application/json; charset=utf-8",
|
56
|
+
credential: credentials
|
57
|
+
};
|
47
58
|
|
48
|
-
|
59
|
+
const packageDetails = `azsdk-js-arm-healthcareapis/2.0.0`;
|
60
|
+
const userAgentPrefix =
|
61
|
+
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
62
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
63
|
+
: `${packageDetails}`;
|
49
64
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
65
|
+
if (!options.credentialScopes) {
|
66
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
67
|
+
}
|
68
|
+
const optionsWithDefaults = {
|
69
|
+
...defaults,
|
70
|
+
...options,
|
71
|
+
userAgentOptions: {
|
72
|
+
userAgentPrefix
|
73
|
+
},
|
74
|
+
baseUri: options.endpoint || "https://management.azure.com"
|
75
|
+
};
|
76
|
+
super(optionsWithDefaults);
|
77
|
+
// Parameter assignments
|
78
|
+
this.subscriptionId = subscriptionId;
|
79
|
+
|
80
|
+
// Assigning values to Constant parameters
|
81
|
+
this.$host = options.$host || "https://management.azure.com";
|
82
|
+
this.apiVersion = options.apiVersion || "2021-01-11";
|
83
|
+
this.services = new ServicesImpl(this);
|
84
|
+
this.operations = new OperationsImpl(this);
|
85
|
+
this.operationResults = new OperationResultsImpl(this);
|
86
|
+
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
|
87
|
+
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
|
88
|
+
}
|
89
|
+
|
90
|
+
services: Services;
|
91
|
+
operations: Operations;
|
92
|
+
operationResults: OperationResults;
|
93
|
+
privateEndpointConnections: PrivateEndpointConnections;
|
94
|
+
privateLinkResources: PrivateLinkResources;
|
95
|
+
}
|
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 { HealthcareApisManagementClient } from "./healthcareApisManagementClient";
|
12
|
+
export * from "./operationsInterfaces";
|
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
|
+
}
|