@azure-rest/health-insights-clinicalmatching 1.0.0-alpha.20241125.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/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/clinicalMatchingRest.d.ts +11 -0
- package/dist/browser/clinicalMatchingRest.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/clinicalMatchingRest.js +1 -1
- package/dist/browser/clinicalMatchingRest.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 +302 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/outputModels.d.ts +186 -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/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/clinicalMatchingRest.d.ts +11 -0
- package/dist/commonjs/clinicalMatchingRest.d.ts.map +1 -0
- package/dist/commonjs/clinicalMatchingRest.js +33 -0
- package/dist/commonjs/clinicalMatchingRest.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 +302 -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 +186 -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/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/clinicalMatchingRest.d.ts +11 -0
- package/dist/esm/clinicalMatchingRest.d.ts.map +1 -0
- package/dist/esm/clinicalMatchingRest.js +30 -0
- package/dist/esm/clinicalMatchingRest.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 +302 -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 +186 -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-clinicalmatching-rest.d.ts +650 -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/clinicalMatchingRest.d.ts +11 -0
- package/dist/react-native/clinicalMatchingRest.d.ts.map +1 -0
- package/dist/react-native/clinicalMatchingRest.js +30 -0
- package/dist/react-native/clinicalMatchingRest.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 +302 -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 +186 -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/clientDefinitions.js.map +0 -1
- package/dist-esm/src/clinicalMatchingRest.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-clinicalmatching.api.md +0 -411
- /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,186 @@
|
|
|
1
|
+
/** The response for the Trial Matcher request. */
|
|
2
|
+
export interface TrialMatcherResultOutput {
|
|
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 Trial Matcher request. */
|
|
20
|
+
readonly results?: TrialMatcherResultsOutput;
|
|
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 Trial Matcher request. */
|
|
43
|
+
export interface TrialMatcherResultsOutput {
|
|
44
|
+
/** Results for the patients given in the request. */
|
|
45
|
+
patients: Array<TrialMatcherPatientResultOutput>;
|
|
46
|
+
/** The version of the model used for inference, expressed as the model date. */
|
|
47
|
+
modelVersion: string;
|
|
48
|
+
/** The date when the clinical trials knowledge graph was last updated. */
|
|
49
|
+
knowledgeGraphLastUpdateDate?: string;
|
|
50
|
+
}
|
|
51
|
+
/** The results of the model's work for a single patient. */
|
|
52
|
+
export interface TrialMatcherPatientResultOutput {
|
|
53
|
+
/** The identifier given for the patient in the request. */
|
|
54
|
+
id: string;
|
|
55
|
+
/** The model's inferences for the given patient. */
|
|
56
|
+
inferences: Array<TrialMatcherInferenceOutput>;
|
|
57
|
+
/** Clinical information which is needed to provide better trial matching results for the patient. */
|
|
58
|
+
neededClinicalInfo?: Array<ExtendedClinicalCodedElementOutput>;
|
|
59
|
+
}
|
|
60
|
+
/** An inference made by the Trial Matcher model regarding a patient. */
|
|
61
|
+
export interface TrialMatcherInferenceOutput {
|
|
62
|
+
/**
|
|
63
|
+
* The type of the Trial Matcher inference.
|
|
64
|
+
*
|
|
65
|
+
* Possible values: trialEligibility
|
|
66
|
+
*/
|
|
67
|
+
type: string;
|
|
68
|
+
/** The value of the inference, as relevant for the given inference type. */
|
|
69
|
+
value: string;
|
|
70
|
+
/** The description corresponding to the inference value. */
|
|
71
|
+
description?: string;
|
|
72
|
+
/** Confidence score for this inference. */
|
|
73
|
+
confidenceScore?: number;
|
|
74
|
+
/** The evidence corresponding to the inference value. */
|
|
75
|
+
evidence?: Array<TrialMatcherInferenceEvidenceOutput>;
|
|
76
|
+
/** The identifier of the clinical trial. */
|
|
77
|
+
id?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Possible sources of a clinical trial.
|
|
80
|
+
*
|
|
81
|
+
* Possible values: custom, clinicaltrials.gov
|
|
82
|
+
*/
|
|
83
|
+
source?: string;
|
|
84
|
+
/** Trial data which is of interest to the potential participant. */
|
|
85
|
+
metadata?: ClinicalTrialMetadataOutput;
|
|
86
|
+
}
|
|
87
|
+
/** A piece of evidence corresponding to a Trial Matcher inference. */
|
|
88
|
+
export interface TrialMatcherInferenceEvidenceOutput {
|
|
89
|
+
/** A piece of evidence from the eligibility criteria text of a clinical trial. */
|
|
90
|
+
eligibilityCriteriaEvidence?: string;
|
|
91
|
+
/** A piece of evidence from a clinical note (text document). */
|
|
92
|
+
patientDataEvidence?: ClinicalNoteEvidenceOutput;
|
|
93
|
+
/**
|
|
94
|
+
* A piece of clinical information, expressed as a code in a clinical coding
|
|
95
|
+
* system.
|
|
96
|
+
*/
|
|
97
|
+
patientInfoEvidence?: ClinicalCodedElementOutput;
|
|
98
|
+
/** A value indicating how important this piece of evidence is for the inference. */
|
|
99
|
+
importance?: number;
|
|
100
|
+
}
|
|
101
|
+
/** A piece of evidence from a clinical note (text document). */
|
|
102
|
+
export interface ClinicalNoteEvidenceOutput {
|
|
103
|
+
/** The identifier of the document containing the evidence. */
|
|
104
|
+
id: string;
|
|
105
|
+
/** The actual text span which is evidence for the inference. */
|
|
106
|
+
text?: string;
|
|
107
|
+
/** The start index of the evidence text span in the document (0 based). */
|
|
108
|
+
offset: number;
|
|
109
|
+
/** The length of the evidence text span. */
|
|
110
|
+
length: number;
|
|
111
|
+
}
|
|
112
|
+
/** A piece of clinical information, expressed as a code in a clinical coding system. */
|
|
113
|
+
export interface ClinicalCodedElementOutput {
|
|
114
|
+
/** The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. */
|
|
115
|
+
system: string;
|
|
116
|
+
/** The code within the given clinical coding system. */
|
|
117
|
+
code: string;
|
|
118
|
+
/** The name of this coded concept in the coding system. */
|
|
119
|
+
name?: string;
|
|
120
|
+
/** A value associated with the code within the given clinical coding system. */
|
|
121
|
+
value?: string;
|
|
122
|
+
}
|
|
123
|
+
/** Trial data which is of interest to the potential participant. */
|
|
124
|
+
export interface ClinicalTrialMetadataOutput {
|
|
125
|
+
/**
|
|
126
|
+
* Phases which are relevant for the clinical trial.
|
|
127
|
+
* Each clinical trial can be in a certain phase or in multiple phases.
|
|
128
|
+
*/
|
|
129
|
+
phases?: string[];
|
|
130
|
+
/**
|
|
131
|
+
* Possible study types of a clinical trial.
|
|
132
|
+
*
|
|
133
|
+
* Possible values: interventional, observational, expandedAccess, patientRegistries
|
|
134
|
+
*/
|
|
135
|
+
studyType?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Possible recruitment status of a clinical trial.
|
|
138
|
+
*
|
|
139
|
+
* Possible values: unknownStatus, notYetRecruiting, recruiting, enrollingByInvitation
|
|
140
|
+
*/
|
|
141
|
+
recruitmentStatus?: string;
|
|
142
|
+
/** Medical conditions and their synonyms which are relevant for the clinical trial, given as strings. */
|
|
143
|
+
conditions: string[];
|
|
144
|
+
/** Sponsors/collaborators involved with the trial. */
|
|
145
|
+
sponsors?: string[];
|
|
146
|
+
/** Contact details of the trial administrators, for patients that want to participate in the trial. */
|
|
147
|
+
contacts?: Array<ContactDetailsOutput>;
|
|
148
|
+
/** Research facilities where the clinical trial is conducted. */
|
|
149
|
+
facilities?: Array<ClinicalTrialResearchFacilityOutput>;
|
|
150
|
+
}
|
|
151
|
+
/** A person's contact details. */
|
|
152
|
+
export interface ContactDetailsOutput {
|
|
153
|
+
/** The person's name. */
|
|
154
|
+
name?: string;
|
|
155
|
+
/** The person's email. */
|
|
156
|
+
email?: string;
|
|
157
|
+
/** A person's phone number. */
|
|
158
|
+
phone?: string;
|
|
159
|
+
}
|
|
160
|
+
/** Details of a research facility where a clinical trial is conducted. */
|
|
161
|
+
export interface ClinicalTrialResearchFacilityOutput {
|
|
162
|
+
/** The facility's name. */
|
|
163
|
+
name: string;
|
|
164
|
+
/** City name. */
|
|
165
|
+
city?: string;
|
|
166
|
+
/** State name. */
|
|
167
|
+
state?: string;
|
|
168
|
+
/** Country/region name. */
|
|
169
|
+
countryOrRegion: string;
|
|
170
|
+
}
|
|
171
|
+
/** A piece of clinical information, expressed as a code in a clinical coding system, extended by semantic information. */
|
|
172
|
+
export interface ExtendedClinicalCodedElementOutput {
|
|
173
|
+
/** The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. */
|
|
174
|
+
system: string;
|
|
175
|
+
/** The code within the given clinical coding system. */
|
|
176
|
+
code: string;
|
|
177
|
+
/** The name of this coded concept in the coding system. */
|
|
178
|
+
name?: string;
|
|
179
|
+
/** A value associated with the code within the given clinical coding system. */
|
|
180
|
+
value?: string;
|
|
181
|
+
/** The [UMLS semantic type](https://www.nlm.nih.gov/research/umls/META3_current_semantic_types.html) associated with the coded concept. */
|
|
182
|
+
semanticType?: string;
|
|
183
|
+
/** The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, Medication, Examination. */
|
|
184
|
+
category?: string;
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=outputModels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"A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AE,MAAM,CAAC;IACf,2IAA2I;IAC3I,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+GAA+G;IAC/G,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -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 Trial Matcher request. */\nexport interface TrialMatcherResultOutput {\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 Trial Matcher request. */\n readonly results?: TrialMatcherResultsOutput;\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 Trial Matcher request. */\nexport interface TrialMatcherResultsOutput {\n /** Results for the patients given in the request. */\n patients: Array<TrialMatcherPatientResultOutput>;\n /** The version of the model used for inference, expressed as the model date. */\n modelVersion: string;\n /** The date when the clinical trials knowledge graph was last updated. */\n knowledgeGraphLastUpdateDate?: string;\n}\n\n/** The results of the model's work for a single patient. */\nexport interface TrialMatcherPatientResultOutput {\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<TrialMatcherInferenceOutput>;\n /** Clinical information which is needed to provide better trial matching results for the patient. */\n neededClinicalInfo?: Array<ExtendedClinicalCodedElementOutput>;\n}\n\n/** An inference made by the Trial Matcher model regarding a patient. */\nexport interface TrialMatcherInferenceOutput {\n /**\n * The type of the Trial Matcher inference.\n *\n * Possible values: trialEligibility\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<TrialMatcherInferenceEvidenceOutput>;\n /** The identifier of the clinical trial. */\n id?: string;\n /**\n * Possible sources of a clinical trial.\n *\n * Possible values: custom, clinicaltrials.gov\n */\n source?: string;\n /** Trial data which is of interest to the potential participant. */\n metadata?: ClinicalTrialMetadataOutput;\n}\n\n/** A piece of evidence corresponding to a Trial Matcher inference. */\nexport interface TrialMatcherInferenceEvidenceOutput {\n /** A piece of evidence from the eligibility criteria text of a clinical trial. */\n eligibilityCriteriaEvidence?: string;\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\n/** Trial data which is of interest to the potential participant. */\nexport interface ClinicalTrialMetadataOutput {\n /**\n * Phases which are relevant for the clinical trial.\n * Each clinical trial can be in a certain phase or in multiple phases.\n */\n phases?: string[];\n /**\n * Possible study types of a clinical trial.\n *\n * Possible values: interventional, observational, expandedAccess, patientRegistries\n */\n studyType?: string;\n /**\n * Possible recruitment status of a clinical trial.\n *\n * Possible values: unknownStatus, notYetRecruiting, recruiting, enrollingByInvitation\n */\n recruitmentStatus?: string;\n /** Medical conditions and their synonyms which are relevant for the clinical trial, given as strings. */\n conditions: string[];\n /** Sponsors/collaborators involved with the trial. */\n sponsors?: string[];\n /** Contact details of the trial administrators, for patients that want to participate in the trial. */\n contacts?: Array<ContactDetailsOutput>;\n /** Research facilities where the clinical trial is conducted. */\n facilities?: Array<ClinicalTrialResearchFacilityOutput>;\n}\n\n/** A person's contact details. */\nexport interface ContactDetailsOutput {\n /** The person's name. */\n name?: string;\n /** The person's email. */\n email?: string;\n /** A person's phone number. */\n phone?: string;\n}\n\n/** Details of a research facility where a clinical trial is conducted. */\nexport interface ClinicalTrialResearchFacilityOutput {\n /** The facility's name. */\n name: string;\n /** City name. */\n city?: string;\n /** State name. */\n state?: string;\n /** Country/region name. */\n countryOrRegion: string;\n}\n\n/** A piece of clinical information, expressed as a code in a clinical coding system, extended by semantic information. */\nexport interface ExtendedClinicalCodedElementOutput {\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 /** The [UMLS semantic type](https://www.nlm.nih.gov/research/umls/META3_current_semantic_types.html) associated with the coded concept. */\n semanticType?: string;\n /** The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, Medication, Examination. */\n category?: 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 { TrialMatcherData } 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?: TrialMatcherData;
|
|
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,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,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,gBAAgB,CAAC;CACzB;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 { TrialMatcherData } 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?: TrialMatcherData;\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,kCA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,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"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { RawHttpHeaders } from "@azure/core-rest-pipeline";
|
|
2
|
+
import type { HttpResponse, ErrorResponse } from "@azure-rest/core-client";
|
|
3
|
+
import type { TrialMatcherResultOutput } from "./outputModels.js";
|
|
4
|
+
/** The request has succeeded. */
|
|
5
|
+
export interface GetJob200Response extends HttpResponse {
|
|
6
|
+
status: "200";
|
|
7
|
+
body: TrialMatcherResultOutput;
|
|
8
|
+
}
|
|
9
|
+
export interface GetJobDefaultHeaders {
|
|
10
|
+
/** String error code indicating what went wrong. */
|
|
11
|
+
"x-ms-error-code"?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface GetJobDefaultResponse extends HttpResponse {
|
|
14
|
+
status: string;
|
|
15
|
+
body: ErrorResponse;
|
|
16
|
+
headers: RawHttpHeaders & GetJobDefaultHeaders;
|
|
17
|
+
}
|
|
18
|
+
/** The request has succeeded. */
|
|
19
|
+
export interface CreateJob200Response extends HttpResponse {
|
|
20
|
+
status: "200";
|
|
21
|
+
body: TrialMatcherResultOutput;
|
|
22
|
+
}
|
|
23
|
+
export interface CreateJob202Headers {
|
|
24
|
+
/** The location for monitoring the operation state. */
|
|
25
|
+
"operation-location": string;
|
|
26
|
+
/** The Retry-After header can indicate how long the client should wait before polling the operation status. */
|
|
27
|
+
"retry-after"?: number;
|
|
28
|
+
/** Indicates whether the repeatable request was accepted or rejected. */
|
|
29
|
+
"repeatability-result"?: "accepted" | "rejected";
|
|
30
|
+
}
|
|
31
|
+
/** The request has been accepted for processing, but processing has not yet completed. */
|
|
32
|
+
export interface CreateJob202Response extends HttpResponse {
|
|
33
|
+
status: "202";
|
|
34
|
+
headers: RawHttpHeaders & CreateJob202Headers;
|
|
35
|
+
}
|
|
36
|
+
export interface CreateJobDefaultHeaders {
|
|
37
|
+
/** String error code indicating what went wrong. */
|
|
38
|
+
"x-ms-error-code"?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface CreateJobDefaultResponse extends HttpResponse {
|
|
41
|
+
status: string;
|
|
42
|
+
body: ErrorResponse;
|
|
43
|
+
headers: RawHttpHeaders & CreateJobDefaultHeaders;
|
|
44
|
+
}
|
|
45
|
+
/** The final response for long-running createJob operation */
|
|
46
|
+
export interface CreateJobLogicalResponse extends HttpResponse {
|
|
47
|
+
status: "200";
|
|
48
|
+
body: TrialMatcherResultOutput;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=responses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAElE,iCAAiC;AACjC,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,wBAAwB,CAAC;CAChC;AAED,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,oBAAoB,CAAC;CAChD;AAED,iCAAiC;AACjC,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,wBAAwB,CAAC;CAChC;AAED,MAAM,WAAW,mBAAmB;IAClC,uDAAuD;IACvD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,+GAA+G;IAC/G,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,sBAAsB,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;CAClD;AAED,0FAA0F;AAC1F,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,MAAM,EAAE,KAAK,CAAC;IACd,OAAO,EAAE,cAAc,GAAG,mBAAmB,CAAC;CAC/C;AAED,MAAM,WAAW,uBAAuB;IACtC,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,uBAAuB,CAAC;CACnD;AAED,8DAA8D;AAC9D,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,wBAAwB,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type { HttpResponse, ErrorResponse } from \"@azure-rest/core-client\";\nimport type { TrialMatcherResultOutput } from \"./outputModels.js\";\n\n/** The request has succeeded. */\nexport interface GetJob200Response extends HttpResponse {\n status: \"200\";\n body: TrialMatcherResultOutput;\n}\n\nexport interface GetJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetJobDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface CreateJob200Response extends HttpResponse {\n status: \"200\";\n body: TrialMatcherResultOutput;\n}\n\nexport interface CreateJob202Headers {\n /** The location for monitoring the operation state. */\n \"operation-location\": string;\n /** The Retry-After header can indicate how long the client should wait before polling the operation status. */\n \"retry-after\"?: number;\n /** Indicates whether the repeatable request was accepted or rejected. */\n \"repeatability-result\"?: \"accepted\" | \"rejected\";\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface CreateJob202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & CreateJob202Headers;\n}\n\nexport interface CreateJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface CreateJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & CreateJobDefaultHeaders;\n}\n\n/** The final response for long-running createJob operation */\nexport interface CreateJobLogicalResponse extends HttpResponse {\n status: \"200\";\n body: TrialMatcherResultOutput;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@azure-rest/health-insights-clinicalmatching",
|
|
3
3
|
"sdk-type": "client",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
|
-
"version": "1.0.0-alpha.
|
|
5
|
+
"version": "1.0.0-alpha.20241126.1",
|
|
6
6
|
"description": "A generated SDK for Health Insights Clinical Matching Rest",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"node",
|
|
@@ -13,31 +13,28 @@
|
|
|
13
13
|
"isomorphic"
|
|
14
14
|
],
|
|
15
15
|
"license": "MIT",
|
|
16
|
-
"main": "dist/index.js",
|
|
17
|
-
"module": "./dist
|
|
18
|
-
"types": "./
|
|
16
|
+
"main": "./dist/commonjs/index.js",
|
|
17
|
+
"module": "./dist/esm/index.js",
|
|
18
|
+
"types": "./dist/commonjs/index.d.ts",
|
|
19
19
|
"repository": "github:Azure/azure-sdk-for-js",
|
|
20
20
|
"bugs": {
|
|
21
21
|
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"dist/",
|
|
25
|
-
"dist-esm/src/",
|
|
26
|
-
"types/health-indights-clinicalmatching.d.ts",
|
|
27
25
|
"README.md",
|
|
28
|
-
"LICENSE"
|
|
29
|
-
"review/*"
|
|
26
|
+
"LICENSE"
|
|
30
27
|
],
|
|
31
28
|
"engines": {
|
|
32
29
|
"node": ">=18.0.0"
|
|
33
30
|
},
|
|
34
31
|
"scripts": {
|
|
35
|
-
"build": "npm run clean &&
|
|
36
|
-
"build:browser": "
|
|
37
|
-
"build:debug": "
|
|
38
|
-
"build:node": "
|
|
32
|
+
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
|
|
33
|
+
"build:browser": "dev-tool run build-package && dev-tool run bundle",
|
|
34
|
+
"build:debug": "dev-tool run build-package && dev-tool run bundle && dev-tool run extract-api",
|
|
35
|
+
"build:node": "dev-tool run build-package && dev-tool run bundle --browser-test false",
|
|
39
36
|
"build:samples": "echo skipped.",
|
|
40
|
-
"build:test": "
|
|
37
|
+
"build:test": "dev-tool run build-package && dev-tool run bundle",
|
|
41
38
|
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
|
|
42
39
|
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
43
40
|
"execute:samples": "echo skipped",
|
|
@@ -45,8 +42,8 @@
|
|
|
45
42
|
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
|
|
46
43
|
"generate:client": "echo skipped",
|
|
47
44
|
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
|
48
|
-
"integration-test:browser": "dev-tool run test:browser",
|
|
49
|
-
"integration-test:node": "dev-tool run test:
|
|
45
|
+
"integration-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
|
|
46
|
+
"integration-test:node": "dev-tool run test:vitest",
|
|
50
47
|
"lint": "eslint package.json api-extractor.json src test",
|
|
51
48
|
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
|
|
52
49
|
"pack": "npm pack 2>&1",
|
|
@@ -54,49 +51,37 @@
|
|
|
54
51
|
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
|
|
55
52
|
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
|
|
56
53
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
|
57
|
-
"unit-test:browser": "dev-tool run test:browser",
|
|
58
|
-
"unit-test:node": "dev-tool run test:
|
|
54
|
+
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
|
|
55
|
+
"unit-test:node": "dev-tool run test:vitest",
|
|
59
56
|
"update-snippets": "echo skipped"
|
|
60
57
|
},
|
|
61
58
|
"sideEffects": false,
|
|
62
59
|
"autoPublish": false,
|
|
63
60
|
"dependencies": {
|
|
64
|
-
"@azure-rest/core-client": "^
|
|
65
|
-
"@azure/abort-controller": "^1.
|
|
66
|
-
"@azure/core-auth": "^1.
|
|
67
|
-
"@azure/core-lro": "^2.
|
|
68
|
-
"@azure/core-rest-pipeline": "
|
|
69
|
-
"@azure/logger": "^1.
|
|
70
|
-
"tslib": "^2.
|
|
61
|
+
"@azure-rest/core-client": "^2.3.1",
|
|
62
|
+
"@azure/abort-controller": "^2.1.2",
|
|
63
|
+
"@azure/core-auth": "^1.9.0",
|
|
64
|
+
"@azure/core-lro": "^2.7.2",
|
|
65
|
+
"@azure/core-rest-pipeline": ">=1.18.0-alpha <1.18.0-alphb",
|
|
66
|
+
"@azure/logger": "^1.1.4",
|
|
67
|
+
"tslib": "^2.8.1"
|
|
71
68
|
},
|
|
72
69
|
"devDependencies": {
|
|
73
|
-
"@azure-tools/test-credential": "^
|
|
74
|
-
"@azure-tools/test-recorder": "
|
|
70
|
+
"@azure-tools/test-credential": "^2.0.0",
|
|
71
|
+
"@azure-tools/test-recorder": ">=4.1.0-alpha <4.1.0-alphb",
|
|
72
|
+
"@azure-tools/test-utils-vitest": ">=1.0.0-alpha <1.0.0-alphb",
|
|
75
73
|
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
|
|
76
74
|
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
|
|
77
75
|
"@azure/identity": "^4.0.1",
|
|
78
|
-
"@types/chai": "^4.2.8",
|
|
79
|
-
"@types/mocha": "^10.0.0",
|
|
80
76
|
"@types/node": "^18.0.0",
|
|
77
|
+
"@vitest/browser": "^2.1.5",
|
|
78
|
+
"@vitest/coverage-istanbul": "^2.1.5",
|
|
81
79
|
"autorest": "latest",
|
|
82
|
-
"chai": "^4.2.0",
|
|
83
80
|
"dotenv": "^16.0.0",
|
|
84
81
|
"eslint": "^9.9.0",
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"karma-env-preprocessor": "^0.1.1",
|
|
89
|
-
"karma-firefox-launcher": "^1.1.0",
|
|
90
|
-
"karma-junit-reporter": "^2.0.1",
|
|
91
|
-
"karma-mocha": "^2.0.1",
|
|
92
|
-
"karma-mocha-reporter": "^2.2.5",
|
|
93
|
-
"karma-source-map-support": "~1.4.0",
|
|
94
|
-
"karma-sourcemap-loader": "^0.3.8",
|
|
95
|
-
"mocha": "^10.0.0",
|
|
96
|
-
"nyc": "^17.0.0",
|
|
97
|
-
"source-map-support": "^0.5.9",
|
|
98
|
-
"ts-node": "^10.0.0",
|
|
99
|
-
"typescript": "~5.6.2"
|
|
82
|
+
"playwright": "^1.49.0",
|
|
83
|
+
"typescript": "~5.6.2",
|
|
84
|
+
"vitest": "^2.1.5"
|
|
100
85
|
},
|
|
101
86
|
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/health-insights-clinicalmatching-rest/README.md",
|
|
102
87
|
"//metadata": {
|
|
@@ -107,9 +92,7 @@
|
|
|
107
92
|
}
|
|
108
93
|
]
|
|
109
94
|
},
|
|
110
|
-
"browser":
|
|
111
|
-
"./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js"
|
|
112
|
-
},
|
|
95
|
+
"browser": "./dist/browser/index.js",
|
|
113
96
|
"//sampleConfiguration": {
|
|
114
97
|
"productName": "HealthInsightsClinicalmatching",
|
|
115
98
|
"productSlugs": [
|
|
@@ -117,5 +100,42 @@
|
|
|
117
100
|
],
|
|
118
101
|
"disableDocsMs": true,
|
|
119
102
|
"apiRefLink": "https://docs.microsoft.com/javascript/api"
|
|
103
|
+
},
|
|
104
|
+
"type": "module",
|
|
105
|
+
"tshy": {
|
|
106
|
+
"exports": {
|
|
107
|
+
"./package.json": "./package.json",
|
|
108
|
+
".": "./src/index.ts"
|
|
109
|
+
},
|
|
110
|
+
"dialects": [
|
|
111
|
+
"esm",
|
|
112
|
+
"commonjs"
|
|
113
|
+
],
|
|
114
|
+
"esmDialects": [
|
|
115
|
+
"browser",
|
|
116
|
+
"react-native"
|
|
117
|
+
],
|
|
118
|
+
"selfLink": false
|
|
119
|
+
},
|
|
120
|
+
"exports": {
|
|
121
|
+
"./package.json": "./package.json",
|
|
122
|
+
".": {
|
|
123
|
+
"browser": {
|
|
124
|
+
"types": "./dist/browser/index.d.ts",
|
|
125
|
+
"default": "./dist/browser/index.js"
|
|
126
|
+
},
|
|
127
|
+
"react-native": {
|
|
128
|
+
"types": "./dist/react-native/index.d.ts",
|
|
129
|
+
"default": "./dist/react-native/index.js"
|
|
130
|
+
},
|
|
131
|
+
"import": {
|
|
132
|
+
"types": "./dist/esm/index.d.ts",
|
|
133
|
+
"default": "./dist/esm/index.js"
|
|
134
|
+
},
|
|
135
|
+
"require": {
|
|
136
|
+
"types": "./dist/commonjs/index.d.ts",
|
|
137
|
+
"default": "./dist/commonjs/index.js"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
120
140
|
}
|
|
121
141
|
}
|