@azure-rest/health-insights-cancerprofiling 1.0.0-alpha.20241121.1 → 1.0.0-alpha.20241126.1
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/dist/browser/cancerProfilingRest.d.ts +11 -0
- package/dist/browser/cancerProfilingRest.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/cancerProfilingRest.js +1 -1
- package/dist/browser/cancerProfilingRest.js.map +1 -0
- package/dist/browser/clientDefinitions.d.ts +21 -0
- package/dist/browser/clientDefinitions.d.ts.map +1 -0
- package/dist/browser/clientDefinitions.js.map +1 -0
- package/dist/browser/index.d.ts +11 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +14 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/isUnexpected.d.ts +4 -0
- package/dist/browser/isUnexpected.d.ts.map +1 -0
- package/dist/browser/isUnexpected.js.map +1 -0
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/models.d.ts +92 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/outputModels.d.ts +109 -0
- package/dist/browser/outputModels.d.ts.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/parameters.d.ts +18 -0
- package/dist/browser/parameters.d.ts.map +1 -0
- package/dist/browser/parameters.js.map +1 -0
- package/dist/browser/pollingHelper.d.ts +12 -0
- package/dist/browser/pollingHelper.d.ts.map +1 -0
- package/dist/browser/pollingHelper.js.map +1 -0
- package/dist/browser/responses.d.ts +50 -0
- package/dist/browser/responses.d.ts.map +1 -0
- package/dist/browser/responses.js.map +1 -0
- package/dist/commonjs/cancerProfilingRest.d.ts +11 -0
- package/dist/commonjs/cancerProfilingRest.d.ts.map +1 -0
- package/dist/commonjs/cancerProfilingRest.js +33 -0
- package/dist/commonjs/cancerProfilingRest.js.map +1 -0
- package/dist/commonjs/clientDefinitions.d.ts +21 -0
- package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/clientDefinitions.js +5 -0
- package/dist/commonjs/clientDefinitions.js.map +1 -0
- package/dist/commonjs/index.d.ts +11 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +17 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/isUnexpected.d.ts +4 -0
- package/dist/commonjs/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/isUnexpected.js +75 -0
- package/dist/commonjs/isUnexpected.js.map +1 -0
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +8 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models.d.ts +92 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +5 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/outputModels.d.ts +109 -0
- package/dist/commonjs/outputModels.d.ts.map +1 -0
- package/dist/commonjs/outputModels.js +5 -0
- package/dist/commonjs/outputModels.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/parameters.d.ts +18 -0
- package/dist/commonjs/parameters.d.ts.map +1 -0
- package/dist/commonjs/parameters.js +5 -0
- package/dist/commonjs/parameters.js.map +1 -0
- package/dist/commonjs/pollingHelper.d.ts +12 -0
- package/dist/commonjs/pollingHelper.d.ts.map +1 -0
- package/dist/commonjs/pollingHelper.js +46 -0
- package/dist/commonjs/pollingHelper.js.map +1 -0
- package/dist/commonjs/responses.d.ts +50 -0
- package/dist/commonjs/responses.d.ts.map +1 -0
- package/dist/commonjs/responses.js +5 -0
- package/dist/commonjs/responses.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/cancerProfilingRest.d.ts +11 -0
- package/dist/esm/cancerProfilingRest.d.ts.map +1 -0
- package/dist/esm/cancerProfilingRest.js +30 -0
- package/dist/esm/cancerProfilingRest.js.map +1 -0
- package/dist/esm/clientDefinitions.d.ts +21 -0
- package/dist/esm/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/clientDefinitions.js +4 -0
- package/dist/esm/clientDefinitions.js.map +1 -0
- package/dist/esm/index.d.ts +11 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +14 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/isUnexpected.d.ts +4 -0
- package/dist/esm/isUnexpected.d.ts.map +1 -0
- package/dist/esm/isUnexpected.js +72 -0
- package/dist/esm/isUnexpected.js.map +1 -0
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models.d.ts +92 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +4 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/outputModels.d.ts +109 -0
- package/dist/esm/outputModels.d.ts.map +1 -0
- package/dist/esm/outputModels.js +4 -0
- package/dist/esm/outputModels.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/parameters.d.ts +18 -0
- package/dist/esm/parameters.d.ts.map +1 -0
- package/dist/esm/parameters.js +4 -0
- package/dist/esm/parameters.js.map +1 -0
- package/dist/esm/pollingHelper.d.ts +12 -0
- package/dist/esm/pollingHelper.d.ts.map +1 -0
- package/dist/esm/pollingHelper.js +43 -0
- package/dist/esm/pollingHelper.js.map +1 -0
- package/dist/esm/responses.d.ts +50 -0
- package/dist/esm/responses.d.ts.map +1 -0
- package/dist/esm/responses.js +4 -0
- package/dist/esm/responses.js.map +1 -0
- package/dist/health-insights-cancerprofiling-rest.d.ts +346 -0
- package/dist/react-native/cancerProfilingRest.d.ts +11 -0
- package/dist/react-native/cancerProfilingRest.d.ts.map +1 -0
- package/dist/react-native/cancerProfilingRest.js +30 -0
- package/dist/react-native/cancerProfilingRest.js.map +1 -0
- package/dist/react-native/clientDefinitions.d.ts +21 -0
- package/dist/react-native/clientDefinitions.d.ts.map +1 -0
- package/dist/react-native/clientDefinitions.js +4 -0
- package/dist/react-native/clientDefinitions.js.map +1 -0
- package/dist/react-native/index.d.ts +11 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +14 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/isUnexpected.d.ts +4 -0
- package/dist/react-native/isUnexpected.d.ts.map +1 -0
- package/dist/react-native/isUnexpected.js +72 -0
- package/dist/react-native/isUnexpected.js.map +1 -0
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +5 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models.d.ts +92 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +4 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/outputModels.d.ts +109 -0
- package/dist/react-native/outputModels.d.ts.map +1 -0
- package/dist/react-native/outputModels.js +4 -0
- package/dist/react-native/outputModels.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/parameters.d.ts +18 -0
- package/dist/react-native/parameters.d.ts.map +1 -0
- package/dist/react-native/parameters.js +4 -0
- package/dist/react-native/parameters.js.map +1 -0
- package/dist/react-native/pollingHelper.d.ts +12 -0
- package/dist/react-native/pollingHelper.d.ts.map +1 -0
- package/dist/react-native/pollingHelper.js +43 -0
- package/dist/react-native/pollingHelper.js.map +1 -0
- package/dist/react-native/responses.d.ts +50 -0
- package/dist/react-native/responses.d.ts.map +1 -0
- package/dist/react-native/responses.js +4 -0
- package/dist/react-native/responses.js.map +1 -0
- package/package.json +67 -47
- package/dist/index.js +0 -161
- package/dist/index.js.map +0 -1
- package/dist-esm/src/cancerProfilingRest.js.map +0 -1
- package/dist-esm/src/clientDefinitions.js.map +0 -1
- package/dist-esm/src/index.js +0 -13
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/isUnexpected.js.map +0 -1
- package/dist-esm/src/parameters.js.map +0 -1
- package/dist-esm/src/pollingHelper.js.map +0 -1
- package/dist-esm/src/responses.js.map +0 -1
- package/review/health-insights-cancerprofiling.api.md +0 -272
- /package/{dist-esm/src → dist/browser}/clientDefinitions.js +0 -0
- /package/{dist-esm/src → dist/browser}/isUnexpected.js +0 -0
- /package/{dist-esm/src → dist/browser}/logger.js +0 -0
- /package/{dist-esm/src → dist/browser}/logger.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/models.js +0 -0
- /package/{dist-esm/src → dist/browser}/models.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/outputModels.js +0 -0
- /package/{dist-esm/src → dist/browser}/outputModels.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/parameters.js +0 -0
- /package/{dist-esm/src → dist/browser}/pollingHelper.js +0 -0
- /package/{dist-esm/src → dist/browser}/responses.js +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { getClient } from "@azure-rest/core-client";
|
|
4
|
+
import { logger } from "./logger.js";
|
|
5
|
+
/**
|
|
6
|
+
* Initialize a new instance of `CancerProfilingRestClient`
|
|
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}/healthinsights`;
|
|
14
|
+
options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2023-03-01-preview";
|
|
15
|
+
options = Object.assign(Object.assign({}, options), { credentials: {
|
|
16
|
+
apiKeyHeaderName: (_d = (_c = options.credentials) === null || _c === void 0 ? void 0 : _c.apiKeyHeaderName) !== null && _d !== void 0 ? _d : "Ocp-Apim-Subscription-Key",
|
|
17
|
+
} });
|
|
18
|
+
const userAgentInfo = `azsdk-js-health-insights-cancerprofiling-rest/1.0.0-beta.1`;
|
|
19
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
20
|
+
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
21
|
+
: `${userAgentInfo}`;
|
|
22
|
+
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
23
|
+
userAgentPrefix,
|
|
24
|
+
}, loggingOptions: {
|
|
25
|
+
logger: (_f = (_e = options.loggingOptions) === null || _e === void 0 ? void 0 : _e.logger) !== null && _f !== void 0 ? _f : logger.info,
|
|
26
|
+
} });
|
|
27
|
+
const client = getClient(baseUrl, credentials, options);
|
|
28
|
+
return client;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=cancerProfilingRest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancerProfilingRest.js","sourceRoot":"","sources":["../../src/cancerProfilingRest.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC;;;;;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,iBAAiB,CAAC;IAChE,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,gBAAgB,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,gBAAgB,mCAAI,2BAA2B;SACvF,GACF,CAAC;IAEF,MAAM,aAAa,GAAG,4DAA4D,CAAC;IACnF,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,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAA8B,CAAC;IAErF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport type { KeyCredential } from \"@azure/core-auth\";\nimport type { CancerProfilingRestClient } from \"./clientDefinitions.js\";\n\n/**\n * Initialize a new instance of `CancerProfilingRestClient`\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): CancerProfilingRestClient {\n const baseUrl = options.baseUrl ?? `${endpoint}/healthinsights`;\n options.apiVersion = options.apiVersion ?? \"2023-03-01-preview\";\n options = {\n ...options,\n credentials: {\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n const userAgentInfo = `azsdk-js-health-insights-cancerprofiling-rest/1.0.0-beta.1`;\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 };\n\n const client = getClient(baseUrl, credentials, options) as CancerProfilingRestClient;\n\n return client;\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { GetJobParameters, CreateJobParameters } from "./parameters.js";
|
|
2
|
+
import type { GetJob200Response, GetJobDefaultResponse, CreateJob200Response, CreateJob202Response, CreateJobDefaultResponse } from "./responses.js";
|
|
3
|
+
import type { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
4
|
+
export interface GetJob {
|
|
5
|
+
/** Gets the status and details of the Onco Phenotype job. */
|
|
6
|
+
get(options?: GetJobParameters): StreamableMethod<GetJob200Response | GetJobDefaultResponse>;
|
|
7
|
+
}
|
|
8
|
+
export interface CreateJob {
|
|
9
|
+
/** Creates an Onco Phenotype job with the given request body. */
|
|
10
|
+
post(options?: CreateJobParameters): StreamableMethod<CreateJob200Response | CreateJob202Response | CreateJobDefaultResponse>;
|
|
11
|
+
}
|
|
12
|
+
export interface Routes {
|
|
13
|
+
/** Resource for '/oncophenotype/jobs/\{jobId\}' has methods for the following verbs: get */
|
|
14
|
+
(path: "/oncophenotype/jobs/{jobId}", jobId: string): GetJob;
|
|
15
|
+
/** Resource for '/oncophenotype/jobs' has methods for the following verbs: post */
|
|
16
|
+
(path: "/oncophenotype/jobs"): CreateJob;
|
|
17
|
+
}
|
|
18
|
+
export type CancerProfilingRestClient = Client & {
|
|
19
|
+
path: Routes;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=clientDefinitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAExE,MAAM,WAAW,MAAM;IACrB,6DAA6D;IAC7D,GAAG,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,CAAC,iBAAiB,GAAG,qBAAqB,CAAC,CAAC;CAC9F;AAED,MAAM,WAAW,SAAS;IACxB,iEAAiE;IACjE,IAAI,CACF,OAAO,CAAC,EAAE,mBAAmB,GAC5B,gBAAgB,CAAC,oBAAoB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC,CAAC;CAC7F;AAED,MAAM,WAAW,MAAM;IACrB,4FAA4F;IAC5F,CAAC,IAAI,EAAE,6BAA6B,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7D,mFAAmF;IACnF,CAAC,IAAI,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC1C;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG;IAC/C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -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 type { GetJobParameters, CreateJobParameters } from \"./parameters.js\";\nimport type {\n GetJob200Response,\n GetJobDefaultResponse,\n CreateJob200Response,\n CreateJob202Response,\n CreateJobDefaultResponse,\n} from \"./responses.js\";\nimport type { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetJob {\n /** Gets the status and details of the Onco Phenotype job. */\n get(options?: GetJobParameters): StreamableMethod<GetJob200Response | GetJobDefaultResponse>;\n}\n\nexport interface CreateJob {\n /** Creates an Onco Phenotype job with the given request body. */\n post(\n options?: CreateJobParameters,\n ): StreamableMethod<CreateJob200Response | CreateJob202Response | CreateJobDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/oncophenotype/jobs/\\{jobId\\}' has methods for the following verbs: get */\n (path: \"/oncophenotype/jobs/{jobId}\", jobId: string): GetJob;\n /** Resource for '/oncophenotype/jobs' has methods for the following verbs: post */\n (path: \"/oncophenotype/jobs\"): CreateJob;\n}\n\nexport type CancerProfilingRestClient = Client & {\n path: Routes;\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import CancerProfilingRest from "./cancerProfilingRest.js";
|
|
2
|
+
export * from "./cancerProfilingRest.js";
|
|
3
|
+
export * from "./parameters.js";
|
|
4
|
+
export * from "./responses.js";
|
|
5
|
+
export * from "./clientDefinitions.js";
|
|
6
|
+
export * from "./isUnexpected.js";
|
|
7
|
+
export * from "./models.js";
|
|
8
|
+
export * from "./outputModels.js";
|
|
9
|
+
export * from "./pollingHelper.js";
|
|
10
|
+
export default CancerProfilingRest;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AAGnC,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import CancerProfilingRest from "./cancerProfilingRest.js";
|
|
4
|
+
export * from "./cancerProfilingRest.js";
|
|
5
|
+
export * from "./parameters.js";
|
|
6
|
+
export * from "./responses.js";
|
|
7
|
+
export * from "./clientDefinitions.js";
|
|
8
|
+
export * from "./isUnexpected.js";
|
|
9
|
+
export * from "./models.js";
|
|
10
|
+
export * from "./outputModels.js";
|
|
11
|
+
export * from "./pollingHelper.js";
|
|
12
|
+
// eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named
|
|
13
|
+
export default CancerProfilingRest;
|
|
14
|
+
//# 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,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AAEnC,kEAAkE;AAClE,eAAe,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport CancerProfilingRest from \"./cancerProfilingRest.js\";\n\nexport * from \"./cancerProfilingRest.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\nexport * from \"./pollingHelper.js\";\n\n// eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named\nexport default CancerProfilingRest;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GetJob200Response, GetJobDefaultResponse, CreateJob200Response, CreateJob202Response, CreateJobLogicalResponse, CreateJobDefaultResponse } from "./responses.js";
|
|
2
|
+
export declare function isUnexpected(response: GetJob200Response | GetJobDefaultResponse): response is GetJobDefaultResponse;
|
|
3
|
+
export declare function isUnexpected(response: CreateJob200Response | CreateJob202Response | CreateJobLogicalResponse | CreateJobDefaultResponse): response is CreateJobDefaultResponse;
|
|
4
|
+
//# sourceMappingURL=isUnexpected.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AAQxB,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,iBAAiB,GAAG,qBAAqB,GAClD,QAAQ,IAAI,qBAAqB,CAAC;AACrC,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,oBAAoB,GACpB,oBAAoB,GACpB,wBAAwB,GACxB,wBAAwB,GAC3B,QAAQ,IAAI,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
const responseMap = {
|
|
4
|
+
"GET /oncophenotype/jobs/{jobId}": ["200"],
|
|
5
|
+
"POST /oncophenotype/jobs": ["200", "202"],
|
|
6
|
+
"GET /oncophenotype/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":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC,MAAM,WAAW,GAA6B;IAC5C,iCAAiC,EAAE,CAAC,KAAK,CAAC;IAC1C,0BAA0B,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAC1C,yBAAyB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;CAC1C,CAAC;AAYF,MAAM,UAAU,YAAY,CAC1B,QAM4B;IAE5B,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACvC,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,WAAW,GAAG,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,0BAA0B,CAAC,MAAc,EAAE,IAAY;;IAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElC,+CAA+C;IAC/C,2CAA2C;IAC3C,8CAA8C;IAC9C,IAAI,UAAU,GAAG,CAAC,CAAC,EACjB,YAAY,GAAa,EAAE,CAAC;IAE9B,0CAA0C;IAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QACvD,0DAA0D;QAC1D,gBAAgB;QAChB,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,SAAS;QACX,CAAC;QACD,MAAM,aAAa,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC7C,gCAAgC;QAChC,MAAM,cAAc,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEhD,6DAA6D;QAC7D,IAAI,KAAK,GAAG,IAAI,CAAC;QACjB,KAAK,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7F,IAAI,CAAA,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,UAAU,CAAC,GAAG,CAAC,KAAI,CAAA,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,OAAO,CAAC,GAAG,CAAC,MAAK,CAAC,CAAC,EAAE,CAAC;gBACjF,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAC/C,GAAG,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,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 type {\n GetJob200Response,\n GetJobDefaultResponse,\n CreateJob200Response,\n CreateJob202Response,\n CreateJobLogicalResponse,\n CreateJobDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /oncophenotype/jobs/{jobId}\": [\"200\"],\n \"POST /oncophenotype/jobs\": [\"200\", \"202\"],\n \"GET /oncophenotype/jobs\": [\"200\", \"202\"],\n};\n\nexport function isUnexpected(\n response: GetJob200Response | GetJobDefaultResponse,\n): response is GetJobDefaultResponse;\nexport function isUnexpected(\n response:\n | CreateJob200Response\n | CreateJob202Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is CreateJobDefaultResponse;\nexport function isUnexpected(\n response:\n | GetJob200Response\n | GetJobDefaultResponse\n | CreateJob200Response\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.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAAwD,CAAC"}
|
|
@@ -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,iCAAiC,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-cancerprofiling\");\n"]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/** A piece of clinical information, expressed as a code in a clinical coding system. */
|
|
2
|
+
export interface ClinicalCodedElement {
|
|
3
|
+
/** The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. */
|
|
4
|
+
system: string;
|
|
5
|
+
/** The code within the given clinical coding system. */
|
|
6
|
+
code: string;
|
|
7
|
+
/** The name of this coded concept in the coding system. */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** A value associated with the code within the given clinical coding system. */
|
|
10
|
+
value?: string;
|
|
11
|
+
}
|
|
12
|
+
/** The body of the Onco Phenotype request. */
|
|
13
|
+
export interface OncoPhenotypeData {
|
|
14
|
+
/** The list of patients, including their clinical information and data. */
|
|
15
|
+
patients: Array<PatientRecord>;
|
|
16
|
+
/** Configuration affecting the Onco Phenotype model's inference. */
|
|
17
|
+
configuration?: OncoPhenotypeModelConfiguration;
|
|
18
|
+
}
|
|
19
|
+
/** A patient record, including their clinical information and data. */
|
|
20
|
+
export interface PatientRecord {
|
|
21
|
+
/** A given identifier for the patient. Has to be unique across all patients in a single request. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** Patient structured information, including demographics and known structured clinical information. */
|
|
24
|
+
info?: PatientInfo;
|
|
25
|
+
/** Patient unstructured clinical data, given as documents. */
|
|
26
|
+
data?: Array<PatientDocument>;
|
|
27
|
+
}
|
|
28
|
+
/** Patient structured information, including demographics and known structured clinical information. */
|
|
29
|
+
export interface PatientInfo {
|
|
30
|
+
/**
|
|
31
|
+
* The patient's sex.
|
|
32
|
+
*
|
|
33
|
+
* Possible values: female, male, unspecified
|
|
34
|
+
*/
|
|
35
|
+
sex?: string;
|
|
36
|
+
/** The patient's date of birth. */
|
|
37
|
+
birthDate?: Date | string;
|
|
38
|
+
/** Known clinical information for the patient, structured. */
|
|
39
|
+
clinicalInfo?: Array<ClinicalCodedElement>;
|
|
40
|
+
}
|
|
41
|
+
/** A clinical document related to a patient. Document here is in the wide sense - not just a text document (note). */
|
|
42
|
+
export interface PatientDocument {
|
|
43
|
+
/**
|
|
44
|
+
* The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document).
|
|
45
|
+
*
|
|
46
|
+
* Possible values: note, fhirBundle, dicom, genomicSequencing
|
|
47
|
+
*/
|
|
48
|
+
type: string;
|
|
49
|
+
/**
|
|
50
|
+
* The type of the clinical document.
|
|
51
|
+
*
|
|
52
|
+
* Possible values: consultation, dischargeSummary, historyAndPhysical, procedure, progress, imaging, laboratory, pathology
|
|
53
|
+
*/
|
|
54
|
+
clinicalType?: string;
|
|
55
|
+
/** A given identifier for the document. Has to be unique across all documents for a single patient. */
|
|
56
|
+
id: string;
|
|
57
|
+
/** A 2 letter ISO 639-1 representation of the language of the document. */
|
|
58
|
+
language?: string;
|
|
59
|
+
/** The date and time when the document was created. */
|
|
60
|
+
createdDateTime?: Date | string;
|
|
61
|
+
/** The content of the patient document. */
|
|
62
|
+
content: DocumentContent;
|
|
63
|
+
}
|
|
64
|
+
/** The content of the patient document. */
|
|
65
|
+
export interface DocumentContent {
|
|
66
|
+
/**
|
|
67
|
+
* The type of the content's source.
|
|
68
|
+
* In case the source type is 'inline', the content is given as a string (for instance, text).
|
|
69
|
+
* In case the source type is 'reference', the content is given as a URI.
|
|
70
|
+
*
|
|
71
|
+
* Possible values: inline, reference
|
|
72
|
+
*/
|
|
73
|
+
sourceType: string;
|
|
74
|
+
/** The content of the document, given either inline (as a string) or as a reference (URI). */
|
|
75
|
+
value: string;
|
|
76
|
+
}
|
|
77
|
+
/** Configuration affecting the Onco Phenotype model's inference. */
|
|
78
|
+
export interface OncoPhenotypeModelConfiguration {
|
|
79
|
+
/** An indication whether the model should produce verbose output. */
|
|
80
|
+
verbose?: boolean;
|
|
81
|
+
/** An indication whether the model's output should include evidence for the inferences. */
|
|
82
|
+
includeEvidence?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* A list of inference types to be inferred for the current request.
|
|
85
|
+
* This could be used if only part of the Onco Phenotype inferences are required.
|
|
86
|
+
* If this list is omitted or empty, the model will return all the inference types.
|
|
87
|
+
*/
|
|
88
|
+
inferenceTypes?: string[];
|
|
89
|
+
/** An indication whether to perform a preliminary step on the patient's documents to determine whether they relate to a Cancer case. */
|
|
90
|
+
checkForCancerCase?: boolean;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,wFAAwF;AACxF,MAAM,WAAW,oBAAoB;IACnC,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,8CAA8C;AAC9C,MAAM,WAAW,iBAAiB;IAChC,2EAA2E;IAC3E,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC/B,oEAAoE;IACpE,aAAa,CAAC,EAAE,+BAA+B,CAAC;CACjD;AAED,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,oGAAoG;IACpG,EAAE,EAAE,MAAM,CAAC;IACX,wGAAwG;IACxG,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CAC/B;AAED,wGAAwG;AACxG,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,YAAY,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;CAC5C;AAED,sHAAsH;AACtH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uGAAuG;IACvG,EAAE,EAAE,MAAM,CAAC;IACX,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,eAAe,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAChC,2CAA2C;IAC3C,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,2CAA2C;AAC3C,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,KAAK,EAAE,MAAM,CAAC;CACf;AAED,oEAAoE;AACpE,MAAM,WAAW,+BAA+B;IAC9C,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2FAA2F;IAC3F,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,wIAAwI;IACxI,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** A piece of clinical information, expressed as a code in a clinical coding system. */\nexport interface ClinicalCodedElement {\n /** The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. */\n system: string;\n /** The code within the given clinical coding system. */\n code: string;\n /** The name of this coded concept in the coding system. */\n name?: string;\n /** A value associated with the code within the given clinical coding system. */\n value?: string;\n}\n\n/** The body of the Onco Phenotype request. */\nexport interface OncoPhenotypeData {\n /** The list of patients, including their clinical information and data. */\n patients: Array<PatientRecord>;\n /** Configuration affecting the Onco Phenotype model's inference. */\n configuration?: OncoPhenotypeModelConfiguration;\n}\n\n/** A patient record, including their clinical information and data. */\nexport interface PatientRecord {\n /** A given identifier for the patient. Has to be unique across all patients in a single request. */\n id: string;\n /** Patient structured information, including demographics and known structured clinical information. */\n info?: PatientInfo;\n /** Patient unstructured clinical data, given as documents. */\n data?: Array<PatientDocument>;\n}\n\n/** Patient structured information, including demographics and known structured clinical information. */\nexport interface PatientInfo {\n /**\n * The patient's sex.\n *\n * Possible values: female, male, unspecified\n */\n sex?: string;\n /** The patient's date of birth. */\n birthDate?: Date | string;\n /** Known clinical information for the patient, structured. */\n clinicalInfo?: Array<ClinicalCodedElement>;\n}\n\n/** A clinical document related to a patient. Document here is in the wide sense - not just a text document (note). */\nexport interface PatientDocument {\n /**\n * The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document).\n *\n * Possible values: note, fhirBundle, dicom, genomicSequencing\n */\n type: string;\n /**\n * The type of the clinical document.\n *\n * Possible values: consultation, dischargeSummary, historyAndPhysical, procedure, progress, imaging, laboratory, pathology\n */\n clinicalType?: string;\n /** A given identifier for the document. Has to be unique across all documents for a single patient. */\n id: string;\n /** A 2 letter ISO 639-1 representation of the language of the document. */\n language?: string;\n /** The date and time when the document was created. */\n createdDateTime?: Date | string;\n /** The content of the patient document. */\n content: DocumentContent;\n}\n\n/** The content of the patient document. */\nexport interface DocumentContent {\n /**\n * The type of the content's source.\n * In case the source type is 'inline', the content is given as a string (for instance, text).\n * In case the source type is 'reference', the content is given as a URI.\n *\n * Possible values: inline, reference\n */\n sourceType: string;\n /** The content of the document, given either inline (as a string) or as a reference (URI). */\n value: string;\n}\n\n/** Configuration affecting the Onco Phenotype model's inference. */\nexport interface OncoPhenotypeModelConfiguration {\n /** An indication whether the model should produce verbose output. */\n verbose?: boolean;\n /** An indication whether the model's output should include evidence for the inferences. */\n includeEvidence?: boolean;\n /**\n * A list of inference types to be inferred for the current request.\n * This could be used if only part of the Onco Phenotype inferences are required.\n * If this list is omitted or empty, the model will return all the inference types.\n */\n inferenceTypes?: string[];\n /** An indication whether to perform a preliminary step on the patient's documents to determine whether they relate to a Cancer case. */\n checkForCancerCase?: boolean;\n}\n"]}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/** The response for the Onco Phenotype request. */
|
|
2
|
+
export interface OncoPhenotypeResultOutput {
|
|
3
|
+
/** A processing job identifier. */
|
|
4
|
+
readonly jobId: string;
|
|
5
|
+
/** The date and time when the processing job was created. */
|
|
6
|
+
readonly createdDateTime: string;
|
|
7
|
+
/** The date and time when the processing job is set to expire. */
|
|
8
|
+
readonly expirationDateTime: string;
|
|
9
|
+
/** The date and time when the processing job was last updated. */
|
|
10
|
+
readonly lastUpdateDateTime: string;
|
|
11
|
+
/**
|
|
12
|
+
* The status of the processing job.
|
|
13
|
+
*
|
|
14
|
+
* Possible values: notStarted, running, succeeded, failed, partiallyCompleted
|
|
15
|
+
*/
|
|
16
|
+
readonly status: string;
|
|
17
|
+
/** An array of errors, if any errors occurred during the processing job. */
|
|
18
|
+
readonly errors?: Array<ErrorModelOutput>;
|
|
19
|
+
/** The inference results for the Onco Phenotype request. */
|
|
20
|
+
readonly results?: OncoPhenotypeResultsOutput;
|
|
21
|
+
}
|
|
22
|
+
/** The error object. */
|
|
23
|
+
export interface ErrorModelOutput {
|
|
24
|
+
/** One of a server-defined set of error codes. */
|
|
25
|
+
code: string;
|
|
26
|
+
/** A human-readable representation of the error. */
|
|
27
|
+
message: string;
|
|
28
|
+
/** The target of the error. */
|
|
29
|
+
target?: string;
|
|
30
|
+
/** An array of details about specific errors that led to this reported error. */
|
|
31
|
+
details?: Array<ErrorModelOutput>;
|
|
32
|
+
/** An object containing more specific information than the current object about the error. */
|
|
33
|
+
innererror?: InnerErrorOutput;
|
|
34
|
+
}
|
|
35
|
+
/** An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. */
|
|
36
|
+
export interface InnerErrorOutput {
|
|
37
|
+
/** One of a server-defined set of error codes. */
|
|
38
|
+
code?: string;
|
|
39
|
+
/** Inner error. */
|
|
40
|
+
innererror?: InnerErrorOutput;
|
|
41
|
+
}
|
|
42
|
+
/** The inference results for the Onco Phenotype request. */
|
|
43
|
+
export interface OncoPhenotypeResultsOutput {
|
|
44
|
+
/** Results for the patients given in the request. */
|
|
45
|
+
patients: Array<OncoPhenotypePatientResultOutput>;
|
|
46
|
+
/** The version of the model used for inference, expressed as the model date. */
|
|
47
|
+
modelVersion: string;
|
|
48
|
+
}
|
|
49
|
+
/** The results of the model's work for a single patient. */
|
|
50
|
+
export interface OncoPhenotypePatientResultOutput {
|
|
51
|
+
/** The identifier given for the patient in the request. */
|
|
52
|
+
id: string;
|
|
53
|
+
/** The model's inferences for the given patient. */
|
|
54
|
+
inferences: Array<OncoPhenotypeInferenceOutput>;
|
|
55
|
+
}
|
|
56
|
+
/** An inference made by the Onco Phenotype model regarding a patient. */
|
|
57
|
+
export interface OncoPhenotypeInferenceOutput {
|
|
58
|
+
/**
|
|
59
|
+
* The type of the Onco Phenotype inference
|
|
60
|
+
*
|
|
61
|
+
* Possible values: tumorSite, histology, clinicalStageT, clinicalStageN, clinicalStageM, pathologicStageT, pathologicStageN, pathologicStageM
|
|
62
|
+
*/
|
|
63
|
+
type: string;
|
|
64
|
+
/** The value of the inference, as relevant for the given inference type. */
|
|
65
|
+
value: string;
|
|
66
|
+
/** The description corresponding to the inference value. */
|
|
67
|
+
description?: string;
|
|
68
|
+
/** Confidence score for this inference. */
|
|
69
|
+
confidenceScore?: number;
|
|
70
|
+
/** The evidence corresponding to the inference value. */
|
|
71
|
+
evidence?: Array<InferenceEvidenceOutput>;
|
|
72
|
+
/** An identifier for a clinical case, if there are multiple clinical cases regarding the same patient. */
|
|
73
|
+
caseId?: string;
|
|
74
|
+
}
|
|
75
|
+
/** A piece of evidence corresponding to an inference. */
|
|
76
|
+
export interface InferenceEvidenceOutput {
|
|
77
|
+
/** A piece of evidence from a clinical note (text document). */
|
|
78
|
+
patientDataEvidence?: ClinicalNoteEvidenceOutput;
|
|
79
|
+
/**
|
|
80
|
+
* A piece of clinical information, expressed as a code in a clinical coding
|
|
81
|
+
* system.
|
|
82
|
+
*/
|
|
83
|
+
patientInfoEvidence?: ClinicalCodedElementOutput;
|
|
84
|
+
/** A value indicating how important this piece of evidence is for the inference. */
|
|
85
|
+
importance?: number;
|
|
86
|
+
}
|
|
87
|
+
/** A piece of evidence from a clinical note (text document). */
|
|
88
|
+
export interface ClinicalNoteEvidenceOutput {
|
|
89
|
+
/** The identifier of the document containing the evidence. */
|
|
90
|
+
id: string;
|
|
91
|
+
/** The actual text span which is evidence for the inference. */
|
|
92
|
+
text?: string;
|
|
93
|
+
/** The start index of the evidence text span in the document (0 based). */
|
|
94
|
+
offset: number;
|
|
95
|
+
/** The length of the evidence text span. */
|
|
96
|
+
length: number;
|
|
97
|
+
}
|
|
98
|
+
/** A piece of clinical information, expressed as a code in a clinical coding system. */
|
|
99
|
+
export interface ClinicalCodedElementOutput {
|
|
100
|
+
/** The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. */
|
|
101
|
+
system: string;
|
|
102
|
+
/** The code within the given clinical coding system. */
|
|
103
|
+
code: string;
|
|
104
|
+
/** The name of this coded concept in the coding system. */
|
|
105
|
+
name?: string;
|
|
106
|
+
/** A value associated with the code within the given clinical coding system. */
|
|
107
|
+
value?: string;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=outputModels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAGA,mDAAmD;AACnD,MAAM,WAAW,yBAAyB;IACxC,mCAAmC;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,6DAA6D;IAC7D,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,kEAAkE;IAClE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,kEAAkE;IAClE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC1C,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,CAAC,EAAE,0BAA0B,CAAC;CAC/C;AAED,wBAAwB;AACxB,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,OAAO,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAClC,8FAA8F;IAC9F,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,iNAAiN;AACjN,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,4DAA4D;AAC5D,MAAM,WAAW,0BAA0B;IACzC,qDAAqD;IACrD,QAAQ,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;IAClD,gFAAgF;IAChF,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,4DAA4D;AAC5D,MAAM,WAAW,gCAAgC;IAC/C,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,UAAU,EAAE,KAAK,CAAC,4BAA4B,CAAC,CAAC;CACjD;AAED,yEAAyE;AACzE,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC1C,0GAA0G;IAC1G,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yDAAyD;AACzD,MAAM,WAAW,uBAAuB;IACtC,gEAAgE;IAChE,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;IACjD;;;OAGG;IACH,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;IACjD,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,gEAAgE;AAChE,MAAM,WAAW,0BAA0B;IACzC,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wFAAwF;AACxF,MAAM,WAAW,0BAA0B;IACzC,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** The response for the Onco Phenotype request. */\nexport interface OncoPhenotypeResultOutput {\n /** A processing job identifier. */\n readonly jobId: string;\n /** The date and time when the processing job was created. */\n readonly createdDateTime: string;\n /** The date and time when the processing job is set to expire. */\n readonly expirationDateTime: string;\n /** The date and time when the processing job was last updated. */\n readonly lastUpdateDateTime: string;\n /**\n * The status of the processing job.\n *\n * Possible values: notStarted, running, succeeded, failed, partiallyCompleted\n */\n readonly status: string;\n /** An array of errors, if any errors occurred during the processing job. */\n readonly errors?: Array<ErrorModelOutput>;\n /** The inference results for the Onco Phenotype request. */\n readonly results?: OncoPhenotypeResultsOutput;\n}\n\n/** The error object. */\nexport interface ErrorModelOutput {\n /** One of a server-defined set of error codes. */\n code: string;\n /** A human-readable representation of the error. */\n message: string;\n /** The target of the error. */\n target?: string;\n /** An array of details about specific errors that led to this reported error. */\n details?: Array<ErrorModelOutput>;\n /** An object containing more specific information than the current object about the error. */\n innererror?: InnerErrorOutput;\n}\n\n/** An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. */\nexport interface InnerErrorOutput {\n /** One of a server-defined set of error codes. */\n code?: string;\n /** Inner error. */\n innererror?: InnerErrorOutput;\n}\n\n/** The inference results for the Onco Phenotype request. */\nexport interface OncoPhenotypeResultsOutput {\n /** Results for the patients given in the request. */\n patients: Array<OncoPhenotypePatientResultOutput>;\n /** The version of the model used for inference, expressed as the model date. */\n modelVersion: string;\n}\n\n/** The results of the model's work for a single patient. */\nexport interface OncoPhenotypePatientResultOutput {\n /** The identifier given for the patient in the request. */\n id: string;\n /** The model's inferences for the given patient. */\n inferences: Array<OncoPhenotypeInferenceOutput>;\n}\n\n/** An inference made by the Onco Phenotype model regarding a patient. */\nexport interface OncoPhenotypeInferenceOutput {\n /**\n * The type of the Onco Phenotype inference\n *\n * Possible values: tumorSite, histology, clinicalStageT, clinicalStageN, clinicalStageM, pathologicStageT, pathologicStageN, pathologicStageM\n */\n type: string;\n /** The value of the inference, as relevant for the given inference type. */\n value: string;\n /** The description corresponding to the inference value. */\n description?: string;\n /** Confidence score for this inference. */\n confidenceScore?: number;\n /** The evidence corresponding to the inference value. */\n evidence?: Array<InferenceEvidenceOutput>;\n /** An identifier for a clinical case, if there are multiple clinical cases regarding the same patient. */\n caseId?: string;\n}\n\n/** A piece of evidence corresponding to an inference. */\nexport interface InferenceEvidenceOutput {\n /** A piece of evidence from a clinical note (text document). */\n patientDataEvidence?: ClinicalNoteEvidenceOutput;\n /**\n * A piece of clinical information, expressed as a code in a clinical coding\n * system.\n */\n patientInfoEvidence?: ClinicalCodedElementOutput;\n /** A value indicating how important this piece of evidence is for the inference. */\n importance?: number;\n}\n\n/** A piece of evidence from a clinical note (text document). */\nexport interface ClinicalNoteEvidenceOutput {\n /** The identifier of the document containing the evidence. */\n id: string;\n /** The actual text span which is evidence for the inference. */\n text?: string;\n /** The start index of the evidence text span in the document (0 based). */\n offset: number;\n /** The length of the evidence text span. */\n length: number;\n}\n\n/** A piece of clinical information, expressed as a code in a clinical coding system. */\nexport interface ClinicalCodedElementOutput {\n /** The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. */\n system: string;\n /** The code within the given clinical coding system. */\n code: string;\n /** The name of this coded concept in the coding system. */\n name?: string;\n /** A value associated with the code within the given clinical coding system. */\n value?: string;\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RawHttpHeadersInput } from "@azure/core-rest-pipeline";
|
|
2
|
+
import type { RequestParameters } from "@azure-rest/core-client";
|
|
3
|
+
import type { OncoPhenotypeData } from "./models.js";
|
|
4
|
+
export type GetJobParameters = RequestParameters;
|
|
5
|
+
export interface CreateJobHeaders {
|
|
6
|
+
/** An opaque, globally-unique, client-generated string identifier for the request. */
|
|
7
|
+
"Repeatability-Request-ID"?: string;
|
|
8
|
+
/** Specifies the date and time at which the request was first created. */
|
|
9
|
+
"Repeatability-First-Sent"?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CreateJobBodyParam {
|
|
12
|
+
body?: OncoPhenotypeData;
|
|
13
|
+
}
|
|
14
|
+
export interface CreateJobHeaderParam {
|
|
15
|
+
headers?: RawHttpHeadersInput & CreateJobHeaders;
|
|
16
|
+
}
|
|
17
|
+
export type CreateJobParameters = CreateJobHeaderParam & CreateJobBodyParam & RequestParameters;
|
|
18
|
+
//# sourceMappingURL=parameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,sFAAsF;IACtF,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,0EAA0E;IAC1E,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,mBAAmB,GAAG,gBAAgB,CAAC;CAClD;AAED,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,GAAG,kBAAkB,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type { OncoPhenotypeData } from \"./models.js\";\n\nexport type GetJobParameters = RequestParameters;\n\nexport interface CreateJobHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"Repeatability-Request-ID\"?: string;\n /** Specifies the date and time at which the request was first created. */\n \"Repeatability-First-Sent\"?: string;\n}\n\nexport interface CreateJobBodyParam {\n body?: OncoPhenotypeData;\n}\n\nexport interface CreateJobHeaderParam {\n headers?: RawHttpHeadersInput & CreateJobHeaders;\n}\n\nexport type CreateJobParameters = CreateJobHeaderParam & CreateJobBodyParam & RequestParameters;\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Client } from "@azure-rest/core-client";
|
|
2
|
+
import type { CreateHttpPollerOptions, OperationState, SimplePollerLike } from "@azure/core-lro";
|
|
3
|
+
import type { CreateJob200Response, CreateJob202Response, CreateJobDefaultResponse, CreateJobLogicalResponse } from "./responses.js";
|
|
4
|
+
/**
|
|
5
|
+
* Helper function that builds a Poller object to help polling a long running operation.
|
|
6
|
+
* @param client - Client to use for sending the request to get additional pages.
|
|
7
|
+
* @param initialResponse - The initial response.
|
|
8
|
+
* @param options - Options to set a resume state or custom polling interval.
|
|
9
|
+
* @returns - A poller object to poll for operation state updates and eventually get the final response.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getLongRunningPoller<TResult extends CreateJobLogicalResponse | CreateJobDefaultResponse>(client: Client, initialResponse: CreateJob200Response | CreateJob202Response | CreateJobDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
|
|
12
|
+
//# sourceMappingURL=pollingHelper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pollingHelper.d.ts","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAgB,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EACV,uBAAuB,EAGvB,cAAc,EACd,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AACxB;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,EAEnE,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,oBAAoB,GAAG,oBAAoB,GAAG,wBAAwB,EACvF,OAAO,CAAC,EAAE,uBAAuB,CAAC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,GAClE,OAAO,CAAC,gBAAgB,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { createHttpPoller } from "@azure/core-lro";
|
|
4
|
+
export async function getLongRunningPoller(client, initialResponse, options = {}) {
|
|
5
|
+
var _a;
|
|
6
|
+
const poller = {
|
|
7
|
+
requestMethod: initialResponse.request.method,
|
|
8
|
+
requestPath: initialResponse.request.url,
|
|
9
|
+
sendInitialRequest: async () => {
|
|
10
|
+
// In the case of Rest Clients we are building the LRO poller object from a response that's the reason
|
|
11
|
+
// we are not triggering the initial request here, just extracting the information from the
|
|
12
|
+
// response we were provided.
|
|
13
|
+
return getLroResponse(initialResponse);
|
|
14
|
+
},
|
|
15
|
+
sendPollRequest: async (path) => {
|
|
16
|
+
// This is the callback that is going to be called to poll the service
|
|
17
|
+
// to get the latest status. We use the client provided and the polling path
|
|
18
|
+
// which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
|
|
19
|
+
// depending on the lro pattern that the service implements. If non is provided we default to the initial path.
|
|
20
|
+
const response = await client.pathUnchecked(path !== null && path !== void 0 ? path : initialResponse.request.url).get();
|
|
21
|
+
const lroResponse = getLroResponse(response);
|
|
22
|
+
lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url;
|
|
23
|
+
return lroResponse;
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
options.resolveOnUnsuccessful = (_a = options.resolveOnUnsuccessful) !== null && _a !== void 0 ? _a : true;
|
|
27
|
+
return createHttpPoller(poller, options);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Converts a Rest Client response to a response that the LRO implementation understands
|
|
31
|
+
* @param response - a rest client http response
|
|
32
|
+
* @returns - An LRO response that the LRO implementation understands
|
|
33
|
+
*/
|
|
34
|
+
function getLroResponse(response) {
|
|
35
|
+
if (Number.isNaN(response.status)) {
|
|
36
|
+
throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
flatResponse: response,
|
|
40
|
+
rawResponse: Object.assign(Object.assign({}, response), { statusCode: Number.parseInt(response.status), body: response.body }),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=pollingHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAqBnD,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,eAAwB,EACxB,UAAqE,EAAE;;IAEvE,MAAM,MAAM,GAAkC;QAC5C,aAAa,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM;QAC7C,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAC9B,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;YACvF,MAAM,WAAW,GAAG,cAAc,CAAC,QAAmB,CAAC,CAAC;YACxD,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;YACnF,OAAO,WAAW,CAAC;QACrB,CAAC;KACF,CAAC;IAEF,OAAO,CAAC,qBAAqB,GAAG,MAAA,OAAO,CAAC,qBAAqB,mCAAI,IAAI,CAAC;IACtE,OAAO,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAA+B,QAAiB;IACrE,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,SAAS,CAAC,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,kCACN,QAAQ,KACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,GACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport type {\n CreateHttpPollerOptions,\n LongRunningOperation,\n LroResponse,\n OperationState,\n SimplePollerLike,\n} from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport type {\n CreateJob200Response,\n CreateJob202Response,\n CreateJobDefaultResponse,\n CreateJobLogicalResponse,\n} from \"./responses.js\";\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: CreateJob200Response | 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"]}
|