@azure-rest/health-insights-radiologyinsights 1.0.0-alpha.20240306.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +275 -0
- package/dist/index.js +159 -0
- package/dist/index.js.map +1 -0
- package/dist-esm/src/azureHealthInsightsClient.js +28 -0
- package/dist-esm/src/azureHealthInsightsClient.js.map +1 -0
- package/dist-esm/src/clientDefinitions.js +4 -0
- package/dist-esm/src/clientDefinitions.js.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/isUnexpected.js +72 -0
- package/dist-esm/src/isUnexpected.js.map +1 -0
- package/dist-esm/src/logger.js +5 -0
- package/dist-esm/src/logger.js.map +1 -0
- package/dist-esm/src/models.js +4 -0
- package/dist-esm/src/models.js.map +1 -0
- package/dist-esm/src/outputModels.js +4 -0
- package/dist-esm/src/outputModels.js.map +1 -0
- package/dist-esm/src/parameters.js +4 -0
- package/dist-esm/src/parameters.js.map +1 -0
- package/dist-esm/src/pollingHelper.js +43 -0
- package/dist-esm/src/pollingHelper.js.map +1 -0
- package/dist-esm/src/responses.js +4 -0
- package/dist-esm/src/responses.js.map +1 -0
- package/package.json +125 -0
- package/review/health-insights-radiologyinsights.api.md +1093 -0
package/README.md
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# Azure Cognitive Services Health Insights Radiology Insights REST client library for JavaScript
|
|
2
|
+
|
|
3
|
+
[Health Insights][health_insights] is an Azure Applied AI Service built with the Azure Cognitive Services Framework, that leverages multiple Cognitive Services, Healthcare API services and other Azure resources.
|
|
4
|
+
|
|
5
|
+
[Radiology Insights][radiology_insights_docs] is a model that aims to provide quality checks as feedback on errors and inconsistencies (mismatches) and ensures critical findings are identified and communicated using the full context of the report. Follow-up recommendations and clinical findings with measurements (sizes) documented by the radiologist are also identified.
|
|
6
|
+
|
|
7
|
+
**Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library**
|
|
8
|
+
|
|
9
|
+
Key links:
|
|
10
|
+
|
|
11
|
+
Key links:
|
|
12
|
+
|
|
13
|
+
- [Source code]
|
|
14
|
+
- [Package (NPM)]
|
|
15
|
+
- [API reference documentation]
|
|
16
|
+
- [Product Information](https://docs.microsoft.com/rest/api/maps/route)
|
|
17
|
+
- [Samples]
|
|
18
|
+
|
|
19
|
+
## Getting started
|
|
20
|
+
|
|
21
|
+
### Currently supported environments
|
|
22
|
+
|
|
23
|
+
- LTS versions of Node.js
|
|
24
|
+
- Latest versions of Safari, Chrome, Edge and Firefox.
|
|
25
|
+
|
|
26
|
+
### Prerequisites
|
|
27
|
+
|
|
28
|
+
- LTS versions of Node.js
|
|
29
|
+
- You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package.
|
|
30
|
+
- An existing Cognitive Services Health Insights instance.
|
|
31
|
+
|
|
32
|
+
### Install the `@azure-rest/health-insights-radiologyinsights` package
|
|
33
|
+
|
|
34
|
+
Install the RadiologyInsights REST client library for JavaScript with `npm`:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install @azure-rest/health-insights-radiologyinsights
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Create and authenticate a `RadiologyInsightsClient`
|
|
41
|
+
|
|
42
|
+
|SDK version|Supported API version of service |
|
|
43
|
+
|-------------|---------------|
|
|
44
|
+
|1.0.0-beta.1 | 2024-01-19-preview|
|
|
45
|
+
|
|
46
|
+
To use an [Azure Active Directory (AAD) token credential][token_credential],
|
|
47
|
+
provide an instance of the desired credential type obtained from the [Azure Identity library][azure_identity].
|
|
48
|
+
|
|
49
|
+
To authenticate with AAD, you must first `npm` install [`@azure/identity`][identity]
|
|
50
|
+
|
|
51
|
+
After setup, you can choose which type of [credential][credential] from `@azure/identity` to use.
|
|
52
|
+
As an example, [DefaultAzureCredential][defaultazurecredential]
|
|
53
|
+
can be used to authenticate the client.
|
|
54
|
+
|
|
55
|
+
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:
|
|
56
|
+
AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
### Create a RadiologyInsights asynchronous client
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
const apiKey = process.env["HEALTH_INSIGHTS_API_KEY"] || "";
|
|
64
|
+
const endpoint = process.env["HEALTH_INSIGHTS_ENDPOINT"] || "";
|
|
65
|
+
const credential = new AzureKeyCredential(apiKey);
|
|
66
|
+
const client = RadiologyInsightsRestClient(endpoint, credential);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Build a request, send it to the client and print the description of a Critical Result Inference
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
|
|
73
|
+
export async function main() {
|
|
74
|
+
const credential = new AzureKeyCredential(apiKey);
|
|
75
|
+
const client = AzureHealthInsightsClient(endpoint, credential);
|
|
76
|
+
|
|
77
|
+
// Create request body
|
|
78
|
+
const radiologyInsightsParameter = createRequestBody();
|
|
79
|
+
|
|
80
|
+
// Initiate radiology insights job and retrieve results
|
|
81
|
+
const initialResponse = await client.path("/radiology-insights/jobs").post(radiologyInsightsParameter);
|
|
82
|
+
if (isUnexpected(initialResponse)) {
|
|
83
|
+
throw initialResponse;
|
|
84
|
+
}
|
|
85
|
+
const poller = await getLongRunningPoller(client, initialResponse);
|
|
86
|
+
const RadiologyInsightsResult = await poller.pollUntilDone();
|
|
87
|
+
if (isUnexpected(RadiologyInsightsResult)) {
|
|
88
|
+
throw RadiologyInsightsResult;
|
|
89
|
+
}
|
|
90
|
+
const resultBody = RadiologyInsightsResult.body;
|
|
91
|
+
printResults(resultBody);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function createRequestBody(): CreateJobParameters {
|
|
95
|
+
|
|
96
|
+
const codingData = {
|
|
97
|
+
system: "Http://hl7.org/fhir/ValueSet/cpt-all",
|
|
98
|
+
code: "USPELVIS",
|
|
99
|
+
display: "US PELVIS COMPLETE"
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const code = {
|
|
103
|
+
coding: [codingData]
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const patientInfo = {
|
|
107
|
+
sex: "female",
|
|
108
|
+
birthDate: new Date("1959-11-11T19:00:00+00:00"),
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const encounterData = {
|
|
112
|
+
id: "encounterid1",
|
|
113
|
+
period: {
|
|
114
|
+
"start": "2021-8-28T00:00:00",
|
|
115
|
+
"end": "2021-8-28T00:00:00"
|
|
116
|
+
},
|
|
117
|
+
class: "inpatient"
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const authorData = {
|
|
121
|
+
"id": "authorid1",
|
|
122
|
+
"name": "authorname1"
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const orderedProceduresData = {
|
|
126
|
+
code: code,
|
|
127
|
+
description: "US PELVIS COMPLETE"
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const administrativeMetadata = {
|
|
131
|
+
orderedProcedures: [orderedProceduresData],
|
|
132
|
+
encounterId: "encounterid1"
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const content = {
|
|
136
|
+
sourceType: "inline",
|
|
137
|
+
value: "CLINICAL HISTORY: "
|
|
138
|
+
+ "\r\n20-year-old female presenting with abdominal pain. Surgical history significant for appendectomy."
|
|
139
|
+
+ "\r\n "
|
|
140
|
+
+ "\r\nCOMPARISON: "
|
|
141
|
+
+ "\r\nRight upper quadrant sonographic performed 1 day prior."
|
|
142
|
+
+ "\r\n "
|
|
143
|
+
+ "\r\nTECHNIQUE: "
|
|
144
|
+
+ "\r\nTransabdominal grayscale pelvic sonography with duplex color Doppler "
|
|
145
|
+
+ "\r\nand spectral waveform analysis of the ovaries."
|
|
146
|
+
+ "\r\n "
|
|
147
|
+
+ "\r\nFINDINGS: "
|
|
148
|
+
+ "\r\nThe uterus is unremarkable given the transabdominal technique with "
|
|
149
|
+
+ "\r\nendometrial echo complex within physiologic normal limits. The "
|
|
150
|
+
+ "\r\novaries are symmetric in size, measuring 2.5 x 1.2 x 3.0 cm and the "
|
|
151
|
+
+ "\r\nleft measuring 2.8 x 1.5 x 1.9 cm.\n \r\nOn duplex imaging, Doppler signal is symmetric."
|
|
152
|
+
+ "\r\n "
|
|
153
|
+
+ "\r\nIMPRESSION: "
|
|
154
|
+
+ "\r\n1. Normal pelvic sonography. Findings of testicular torsion."
|
|
155
|
+
+ "\r\n\nA new US pelvis within the next 6 months is recommended."
|
|
156
|
+
+ "\n\nThese results have been discussed with Dr. Jones at 3 PM on November 5 2020.\n "
|
|
157
|
+
+ "\r\n"
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const patientDocumentData = {
|
|
161
|
+
type: "note",
|
|
162
|
+
clinicalType: "radiologyReport",
|
|
163
|
+
id: "docid1",
|
|
164
|
+
language: "en",
|
|
165
|
+
authors: [authorData],
|
|
166
|
+
specialtyType: "radiology",
|
|
167
|
+
administrativeMetadata: administrativeMetadata,
|
|
168
|
+
content: content,
|
|
169
|
+
createdDateTime: new Date("2021-06-01T00:00:00.000"),
|
|
170
|
+
orderedProceduresAsCsv: "US PELVIS COMPLETE"
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
const patientData = {
|
|
175
|
+
id: "Samantha Jones",
|
|
176
|
+
info: patientInfo,
|
|
177
|
+
encounters: [encounterData],
|
|
178
|
+
patientDocuments: [patientDocumentData]
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
const inferenceTypes = [
|
|
182
|
+
"finding",
|
|
183
|
+
"ageMismatch",
|
|
184
|
+
"lateralityDiscrepancy",
|
|
185
|
+
"sexMismatch",
|
|
186
|
+
"completeOrderDiscrepancy",
|
|
187
|
+
"limitedOrderDiscrepancy",
|
|
188
|
+
"criticalResult",
|
|
189
|
+
"criticalRecommendation",
|
|
190
|
+
"followupRecommendation",
|
|
191
|
+
"followupCommunication",
|
|
192
|
+
"radiologyProcedure"];
|
|
193
|
+
|
|
194
|
+
const followupRecommendationOptions = {
|
|
195
|
+
includeRecommendationsWithNoSpecifiedModality: true,
|
|
196
|
+
includeRecommendationsInReferences: true,
|
|
197
|
+
provideFocusedSentenceEvidence: true
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
const findingOptions = {
|
|
201
|
+
provideFocusedSentenceEvidence: true
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const inferenceOptions = {
|
|
205
|
+
followupRecommendationOptions: followupRecommendationOptions,
|
|
206
|
+
findingOptions: findingOptions
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
const configuration = {
|
|
210
|
+
inferenceOptions: inferenceOptions,
|
|
211
|
+
inferenceTypes: inferenceTypes,
|
|
212
|
+
locale: "en-US",
|
|
213
|
+
verbose: false,
|
|
214
|
+
includeEvidence: true
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
const radiologyInsightsData = {
|
|
218
|
+
patients: [patientData],
|
|
219
|
+
configuration: configuration
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
return {
|
|
223
|
+
body: radiologyInsightsData
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function printResults(radiologyInsightsResult: RadiologyInsightsResultOutput): void {
|
|
229
|
+
if (radiologyInsightsResult.status === "succeeded") {
|
|
230
|
+
const results = radiologyInsightsResult.result;
|
|
231
|
+
if (results !== undefined) {
|
|
232
|
+
results.patientResults.forEach((patientResult: { inferences: any[]; }) => {
|
|
233
|
+
if (patientResult.inferences) {
|
|
234
|
+
patientResult.inferences.forEach((inference) => {
|
|
235
|
+
if (inference.kind === "criticalResult") {
|
|
236
|
+
if ("result" in inference) {
|
|
237
|
+
console.log("Critical Result Inference found: " + inference.result.description);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
} else {
|
|
245
|
+
const error = radiologyInsightsResult.error;
|
|
246
|
+
if (error) {
|
|
247
|
+
console.log(error.code, ":", error.message);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Troubleshooting
|
|
254
|
+
|
|
255
|
+
### Logging
|
|
256
|
+
|
|
257
|
+
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
|
258
|
+
|
|
259
|
+
```javascript
|
|
260
|
+
const { setLogLevel } = require("@azure/logger");
|
|
261
|
+
|
|
262
|
+
setLogLevel("info");
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
|
|
266
|
+
|
|
267
|
+
<!-- LINKS -->
|
|
268
|
+
[health_insights]: https://learn.microsoft.com/azure/azure-health-insights/overview
|
|
269
|
+
[radiology_insights_docs]: https://learn.microsoft.com/azure/azure-health-insights/radiology-insights/
|
|
270
|
+
|
|
271
|
+
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity
|
|
272
|
+
[identity]: https://www.npmjs.com/package/@azure/identity
|
|
273
|
+
[token_credential]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token
|
|
274
|
+
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity#defaultazurecredential
|
|
275
|
+
[credential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var coreClient = require('@azure-rest/core-client');
|
|
6
|
+
var logger$1 = require('@azure/logger');
|
|
7
|
+
var coreLro = require('@azure/core-lro');
|
|
8
|
+
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT license.
|
|
11
|
+
const logger = logger$1.createClientLogger("health-insights-radiologyinsights");
|
|
12
|
+
|
|
13
|
+
// Copyright (c) Microsoft Corporation.
|
|
14
|
+
// Licensed under the MIT license.
|
|
15
|
+
/**
|
|
16
|
+
* Initialize a new instance of `AzureHealthInsightsClient`
|
|
17
|
+
* @param endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).
|
|
18
|
+
* @param credentials - uniquely identify client credential
|
|
19
|
+
* @param options - the parameter for all optional parameters
|
|
20
|
+
*/
|
|
21
|
+
function createClient(endpoint, credentials, options = {}) {
|
|
22
|
+
var _a, _b, _c, _d, _e, _f;
|
|
23
|
+
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}/health-insights`;
|
|
24
|
+
options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2023-09-01-preview";
|
|
25
|
+
const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0-beta.2`;
|
|
26
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
27
|
+
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
28
|
+
: `${userAgentInfo}`;
|
|
29
|
+
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
30
|
+
userAgentPrefix,
|
|
31
|
+
}, loggingOptions: {
|
|
32
|
+
logger: (_d = (_c = options.loggingOptions) === null || _c === void 0 ? void 0 : _c.logger) !== null && _d !== void 0 ? _d : logger.info,
|
|
33
|
+
}, credentials: {
|
|
34
|
+
apiKeyHeaderName: (_f = (_e = options.credentials) === null || _e === void 0 ? void 0 : _e.apiKeyHeaderName) !== null && _f !== void 0 ? _f : "Ocp-Apim-Subscription-Key",
|
|
35
|
+
} });
|
|
36
|
+
return coreClient.getClient(baseUrl, credentials, options);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Copyright (c) Microsoft Corporation.
|
|
40
|
+
// Licensed under the MIT license.
|
|
41
|
+
const responseMap = {
|
|
42
|
+
"GET /radiology-insights/jobs/{id}": ["200"],
|
|
43
|
+
"POST /radiology-insights/jobs": ["202"],
|
|
44
|
+
"GET /radiology-insights/jobs": ["200", "202"],
|
|
45
|
+
};
|
|
46
|
+
function isUnexpected(response) {
|
|
47
|
+
const lroOriginal = response.headers["x-ms-original-url"];
|
|
48
|
+
const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
|
|
49
|
+
const method = response.request.method;
|
|
50
|
+
let pathDetails = responseMap[`${method} ${url.pathname}`];
|
|
51
|
+
if (!pathDetails) {
|
|
52
|
+
pathDetails = getParametrizedPathSuccess(method, url.pathname);
|
|
53
|
+
}
|
|
54
|
+
return !pathDetails.includes(response.status);
|
|
55
|
+
}
|
|
56
|
+
function getParametrizedPathSuccess(method, path) {
|
|
57
|
+
var _a, _b, _c, _d;
|
|
58
|
+
const pathParts = path.split("/");
|
|
59
|
+
// Traverse list to match the longest candidate
|
|
60
|
+
// matchedLen: the length of candidate path
|
|
61
|
+
// matchedValue: the matched status code array
|
|
62
|
+
let matchedLen = -1, matchedValue = [];
|
|
63
|
+
// Iterate the responseMap to find a match
|
|
64
|
+
for (const [key, value] of Object.entries(responseMap)) {
|
|
65
|
+
// Extracting the path from the map key which is in format
|
|
66
|
+
// GET /path/foo
|
|
67
|
+
if (!key.startsWith(method)) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
const candidatePath = getPathFromMapKey(key);
|
|
71
|
+
// Get each part of the url path
|
|
72
|
+
const candidateParts = candidatePath.split("/");
|
|
73
|
+
// track if we have found a match to return the values found.
|
|
74
|
+
let found = true;
|
|
75
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
76
|
+
if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
|
|
77
|
+
const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
|
|
78
|
+
// If the current part of the candidate is a "template" part
|
|
79
|
+
// Try to use the suffix of pattern to match the path
|
|
80
|
+
// {guid} ==> $
|
|
81
|
+
// {guid}:export ==> :export$
|
|
82
|
+
const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
|
|
83
|
+
if (!isMatched) {
|
|
84
|
+
found = false;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
// If the candidate part is not a template and
|
|
90
|
+
// the parts don't match mark the candidate as not found
|
|
91
|
+
// to move on with the next candidate path.
|
|
92
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
93
|
+
found = false;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// We finished evaluating the current candidate parts
|
|
98
|
+
// Update the matched value if and only if we found the longer pattern
|
|
99
|
+
if (found && candidatePath.length > matchedLen) {
|
|
100
|
+
matchedLen = candidatePath.length;
|
|
101
|
+
matchedValue = value;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return matchedValue;
|
|
105
|
+
}
|
|
106
|
+
function getPathFromMapKey(mapKey) {
|
|
107
|
+
const pathStart = mapKey.indexOf("/");
|
|
108
|
+
return mapKey.slice(pathStart);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Copyright (c) Microsoft Corporation.
|
|
112
|
+
// Licensed under the MIT license.
|
|
113
|
+
async function getLongRunningPoller(client, initialResponse, options = {}) {
|
|
114
|
+
var _a;
|
|
115
|
+
const poller = {
|
|
116
|
+
requestMethod: initialResponse.request.method,
|
|
117
|
+
requestPath: initialResponse.request.url,
|
|
118
|
+
sendInitialRequest: async () => {
|
|
119
|
+
// In the case of Rest Clients we are building the LRO poller object from a response that's the reason
|
|
120
|
+
// we are not triggering the initial request here, just extracting the information from the
|
|
121
|
+
// response we were provided.
|
|
122
|
+
return getLroResponse(initialResponse);
|
|
123
|
+
},
|
|
124
|
+
sendPollRequest: async (path) => {
|
|
125
|
+
// This is the callback that is going to be called to poll the service
|
|
126
|
+
// to get the latest status. We use the client provided and the polling path
|
|
127
|
+
// which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
|
|
128
|
+
// depending on the lro pattern that the service implements. If non is provided we default to the initial path.
|
|
129
|
+
const response = await client.pathUnchecked(path !== null && path !== void 0 ? path : initialResponse.request.url).get();
|
|
130
|
+
const lroResponse = getLroResponse(response);
|
|
131
|
+
lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url;
|
|
132
|
+
return lroResponse;
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
options.resolveOnUnsuccessful = (_a = options.resolveOnUnsuccessful) !== null && _a !== void 0 ? _a : true;
|
|
136
|
+
return coreLro.createHttpPoller(poller, options);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Converts a Rest Client response to a response that the LRO implementation understands
|
|
140
|
+
* @param response - a rest client http response
|
|
141
|
+
* @returns - An LRO response that the LRO implementation understands
|
|
142
|
+
*/
|
|
143
|
+
function getLroResponse(response) {
|
|
144
|
+
if (Number.isNaN(response.status)) {
|
|
145
|
+
throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
flatResponse: response,
|
|
149
|
+
rawResponse: Object.assign(Object.assign({}, response), { statusCode: Number.parseInt(response.status), body: response.body }),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Copyright (c) Microsoft Corporation.
|
|
154
|
+
// Licensed under the MIT license.
|
|
155
|
+
|
|
156
|
+
exports.default = createClient;
|
|
157
|
+
exports.getLongRunningPoller = getLongRunningPoller;
|
|
158
|
+
exports.isUnexpected = isUnexpected;
|
|
159
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/logger.ts","../src/azureHealthInsightsClient.ts","../src/isUnexpected.ts","../src/pollingHelper.ts","../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"health-insights-radiologyinsights\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger\";\nimport { KeyCredential } from \"@azure/core-auth\";\nimport { AzureHealthInsightsClient } from \"./clientDefinitions\";\n\n/**\n * Initialize a new instance of `AzureHealthInsightsClient`\n * @param endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentials: KeyCredential,\n options: ClientOptions = {},\n): AzureHealthInsightsClient {\n const baseUrl = options.baseUrl ?? `${endpoint}/health-insights`;\n options.apiVersion = options.apiVersion ?? \"2023-09-01-preview\";\n const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n return getClient(baseUrl, credentials, options) as AzureHealthInsightsClient;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n GetJob200Response,\n GetJobDefaultResponse,\n CreateJob202Response,\n CreateJobLogicalResponse,\n CreateJobDefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /radiology-insights/jobs/{id}\": [\"200\"],\n \"POST /radiology-insights/jobs\": [\"202\"],\n \"GET /radiology-insights/jobs\": [\"200\", \"202\"],\n};\n\nexport function isUnexpected(\n response: GetJob200Response | GetJobDefaultResponse,\n): response is GetJobDefaultResponse;\nexport function isUnexpected(\n response: CreateJob202Response | CreateJobLogicalResponse | CreateJobDefaultResponse,\n): response is CreateJobDefaultResponse;\nexport function isUnexpected(\n response:\n | GetJob200Response\n | GetJobDefaultResponse\n | CreateJob202Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is GetJobDefaultResponse | CreateJobDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport {\n CreateHttpPollerOptions,\n LongRunningOperation,\n LroResponse,\n OperationState,\n SimplePollerLike,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport {\n CreateJob202Response,\n CreateJobDefaultResponse,\n CreateJobLogicalResponse,\n} from \"./responses\";\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport async function getLongRunningPoller<\n TResult extends CreateJobLogicalResponse | CreateJobDefaultResponse,\n>(\n client: Client,\n initialResponse: CreateJob202Response | CreateJobDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {},\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n requestPath: initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client.pathUnchecked(path ?? initialResponse.request.url).get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n return createHttpPoller(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(response: TResult): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport AzureHealthInsightsClient from \"./azureHealthInsightsClient\";\n\nexport * from \"./azureHealthInsightsClient\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./pollingHelper\";\n\nexport default A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license.
|
|
3
|
+
import { getClient } from "@azure-rest/core-client";
|
|
4
|
+
import { logger } from "./logger";
|
|
5
|
+
/**
|
|
6
|
+
* Initialize a new instance of `AzureHealthInsightsClient`
|
|
7
|
+
* @param endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).
|
|
8
|
+
* @param credentials - uniquely identify client credential
|
|
9
|
+
* @param options - the parameter for all optional parameters
|
|
10
|
+
*/
|
|
11
|
+
export default function createClient(endpoint, credentials, options = {}) {
|
|
12
|
+
var _a, _b, _c, _d, _e, _f;
|
|
13
|
+
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}/health-insights`;
|
|
14
|
+
options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2023-09-01-preview";
|
|
15
|
+
const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0-beta.2`;
|
|
16
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
17
|
+
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
18
|
+
: `${userAgentInfo}`;
|
|
19
|
+
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
20
|
+
userAgentPrefix,
|
|
21
|
+
}, loggingOptions: {
|
|
22
|
+
logger: (_d = (_c = options.loggingOptions) === null || _c === void 0 ? void 0 : _c.logger) !== null && _d !== void 0 ? _d : logger.info,
|
|
23
|
+
}, credentials: {
|
|
24
|
+
apiKeyHeaderName: (_f = (_e = options.credentials) === null || _e === void 0 ? void 0 : _e.apiKeyHeaderName) !== null && _f !== void 0 ? _f : "Ocp-Apim-Subscription-Key",
|
|
25
|
+
} });
|
|
26
|
+
return getClient(baseUrl, credentials, options);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=azureHealthInsightsClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azureHealthInsightsClient.js","sourceRoot":"","sources":["../../src/azureHealthInsightsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAgB,EAChB,WAA0B,EAC1B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,kBAAkB,CAAC;IACjE,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,8DAA8D,CAAC;IACrF,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,gBAAgB,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,gBAAgB,mCAAI,2BAA2B;SACvF,GACF,CAAC;IAEF,OAAO,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAA8B,CAAC;AAC/E,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger\";\nimport { KeyCredential } from \"@azure/core-auth\";\nimport { AzureHealthInsightsClient } from \"./clientDefinitions\";\n\n/**\n * Initialize a new instance of `AzureHealthInsightsClient`\n * @param endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentials: KeyCredential,\n options: ClientOptions = {},\n): AzureHealthInsightsClient {\n const baseUrl = options.baseUrl ?? `${endpoint}/health-insights`;\n options.apiVersion = options.apiVersion ?? \"2023-09-01-preview\";\n const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n return getClient(baseUrl, credentials, options) as AzureHealthInsightsClient;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { GetJobParameters, CreateJobParameters } from \"./parameters\";\nimport {\n GetJob200Response,\n GetJobDefaultResponse,\n CreateJob202Response,\n CreateJobDefaultResponse,\n} from \"./responses\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetJob {\n /** Gets the status and details of the Radiology Insights job. */\n get(options?: GetJobParameters): StreamableMethod<GetJob200Response | GetJobDefaultResponse>;\n}\n\nexport interface CreateJob {\n /** Creates a Radiology Insights job with the given request body. */\n post(\n options?: CreateJobParameters,\n ): StreamableMethod<CreateJob202Response | CreateJobDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/radiology-insights/jobs/\\{id\\}' has methods for the following verbs: get */\n (path: \"/radiology-insights/jobs/{id}\", id: string): GetJob;\n /** Resource for '/radiology-insights/jobs' has methods for the following verbs: post */\n (path: \"/radiology-insights/jobs\"): CreateJob;\n}\n\nexport type AzureHealthInsightsClient = Client & {\n path: Routes;\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
import AzureHealthInsightsClient from "./azureHealthInsightsClient";
|
|
4
|
+
export * from "./azureHealthInsightsClient";
|
|
5
|
+
export * from "./parameters";
|
|
6
|
+
export * from "./responses";
|
|
7
|
+
export * from "./clientDefinitions";
|
|
8
|
+
export * from "./isUnexpected";
|
|
9
|
+
export * from "./models";
|
|
10
|
+
export * from "./outputModels";
|
|
11
|
+
export * from "./pollingHelper";
|
|
12
|
+
export default AzureHealthInsightsClient;
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAEhC,eAAe,yBAAyB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport AzureHealthInsightsClient from \"./azureHealthInsightsClient\";\n\nexport * from \"./azureHealthInsightsClient\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./pollingHelper\";\n\nexport default AzureHealthInsightsClient;\n"]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
const responseMap = {
|
|
4
|
+
"GET /radiology-insights/jobs/{id}": ["200"],
|
|
5
|
+
"POST /radiology-insights/jobs": ["202"],
|
|
6
|
+
"GET /radiology-insights/jobs": ["200", "202"],
|
|
7
|
+
};
|
|
8
|
+
export function isUnexpected(response) {
|
|
9
|
+
const lroOriginal = response.headers["x-ms-original-url"];
|
|
10
|
+
const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
|
|
11
|
+
const method = response.request.method;
|
|
12
|
+
let pathDetails = responseMap[`${method} ${url.pathname}`];
|
|
13
|
+
if (!pathDetails) {
|
|
14
|
+
pathDetails = getParametrizedPathSuccess(method, url.pathname);
|
|
15
|
+
}
|
|
16
|
+
return !pathDetails.includes(response.status);
|
|
17
|
+
}
|
|
18
|
+
function getParametrizedPathSuccess(method, path) {
|
|
19
|
+
var _a, _b, _c, _d;
|
|
20
|
+
const pathParts = path.split("/");
|
|
21
|
+
// Traverse list to match the longest candidate
|
|
22
|
+
// matchedLen: the length of candidate path
|
|
23
|
+
// matchedValue: the matched status code array
|
|
24
|
+
let matchedLen = -1, matchedValue = [];
|
|
25
|
+
// Iterate the responseMap to find a match
|
|
26
|
+
for (const [key, value] of Object.entries(responseMap)) {
|
|
27
|
+
// Extracting the path from the map key which is in format
|
|
28
|
+
// GET /path/foo
|
|
29
|
+
if (!key.startsWith(method)) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const candidatePath = getPathFromMapKey(key);
|
|
33
|
+
// Get each part of the url path
|
|
34
|
+
const candidateParts = candidatePath.split("/");
|
|
35
|
+
// track if we have found a match to return the values found.
|
|
36
|
+
let found = true;
|
|
37
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
38
|
+
if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
|
|
39
|
+
const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
|
|
40
|
+
// If the current part of the candidate is a "template" part
|
|
41
|
+
// Try to use the suffix of pattern to match the path
|
|
42
|
+
// {guid} ==> $
|
|
43
|
+
// {guid}:export ==> :export$
|
|
44
|
+
const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
|
|
45
|
+
if (!isMatched) {
|
|
46
|
+
found = false;
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
// If the candidate part is not a template and
|
|
52
|
+
// the parts don't match mark the candidate as not found
|
|
53
|
+
// to move on with the next candidate path.
|
|
54
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
55
|
+
found = false;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// We finished evaluating the current candidate parts
|
|
60
|
+
// Update the matched value if and only if we found the longer pattern
|
|
61
|
+
if (found && candidatePath.length > matchedLen) {
|
|
62
|
+
matchedLen = candidatePath.length;
|
|
63
|
+
matchedValue = value;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return matchedValue;
|
|
67
|
+
}
|
|
68
|
+
function getPathFromMapKey(mapKey) {
|
|
69
|
+
const pathStart = mapKey.indexOf("/");
|
|
70
|
+
return mapKey.slice(pathStart);
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=isUnexpected.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"m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K,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n GetJob200Response,\n GetJobDefaultResponse,\n CreateJob202Response,\n CreateJobLogicalResponse,\n CreateJobDefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /radiology-insights/jobs/{id}\": [\"200\"],\n \"POST /radiology-insights/jobs\": [\"202\"],\n \"GET /radiology-insights/jobs\": [\"200\", \"202\"],\n};\n\nexport function isUnexpected(\n response: GetJob200Response | GetJobDefaultResponse,\n): response is GetJobDefaultResponse;\nexport function isUnexpected(\n response: CreateJob202Response | CreateJobLogicalResponse | CreateJobDefaultResponse,\n): response is CreateJobDefaultResponse;\nexport function isUnexpected(\n response:\n | GetJob200Response\n | GetJobDefaultResponse\n | CreateJob202Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is GetJobDefaultResponse | CreateJobDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,mCAAmC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"health-insights-radiologyinsights\");\n"]}
|