phenoml 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.d.ts +2 -0
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/agent/client/Client.js +16 -8
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +14 -7
- package/dist/cjs/api/resources/cohort/client/Client.js +2 -1
- package/dist/cjs/api/resources/construe/client/Client.js +20 -10
- package/dist/cjs/api/resources/fhir/client/Client.js +12 -6
- package/dist/cjs/api/resources/fhirProvider/client/Client.js +14 -7
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +10 -5
- package/dist/cjs/api/resources/summary/client/Client.js +12 -6
- package/dist/cjs/api/resources/tools/client/Client.js +8 -4
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +8 -4
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +8 -4
- package/dist/cjs/api/resources/workflows/client/Client.js +12 -6
- package/dist/cjs/core/fetcher/Fetcher.d.ts +2 -1
- package/dist/cjs/core/fetcher/Fetcher.js +4 -4
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
- package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
- package/dist/cjs/core/headers.js +6 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +2 -0
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/agent/client/Client.mjs +16 -8
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +14 -7
- package/dist/esm/api/resources/cohort/client/Client.mjs +2 -1
- package/dist/esm/api/resources/construe/client/Client.mjs +20 -10
- package/dist/esm/api/resources/fhir/client/Client.mjs +12 -6
- package/dist/esm/api/resources/fhirProvider/client/Client.mjs +14 -7
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +10 -5
- package/dist/esm/api/resources/summary/client/Client.mjs +12 -6
- package/dist/esm/api/resources/tools/client/Client.mjs +8 -4
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +8 -4
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +8 -4
- package/dist/esm/api/resources/workflows/client/Client.mjs +12 -6
- package/dist/esm/core/fetcher/Fetcher.d.mts +2 -1
- package/dist/esm/core/fetcher/Fetcher.mjs +4 -4
- package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
- package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
- package/dist/esm/core/headers.mjs +6 -4
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +1 -1
package/dist/cjs/BaseClient.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export interface BaseClientOptions {
|
|
|
11
11
|
timeoutInSeconds?: number;
|
|
12
12
|
/** The default number of times to retry the request. Defaults to 2. */
|
|
13
13
|
maxRetries?: number;
|
|
14
|
+
/** Provide a custom fetch implementation. Useful for platforms that don't have a built-in fetch or need a custom implementation. */
|
|
15
|
+
fetch?: typeof fetch;
|
|
14
16
|
fetcher?: core.FetchFunction;
|
|
15
17
|
}
|
|
16
18
|
export interface BaseRequestOptions {
|
package/dist/cjs/Client.js
CHANGED
|
@@ -52,8 +52,8 @@ class phenomlClient {
|
|
|
52
52
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
53
53
|
"X-Fern-Language": "JavaScript",
|
|
54
54
|
"X-Fern-SDK-Name": "phenoml",
|
|
55
|
-
"X-Fern-SDK-Version": "6.
|
|
56
|
-
"User-Agent": "phenoml/
|
|
55
|
+
"X-Fern-SDK-Version": "6.1.0",
|
|
56
|
+
"User-Agent": "phenoml/6.1.0",
|
|
57
57
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
58
58
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
59
59
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -92,7 +92,7 @@ class Agent {
|
|
|
92
92
|
}
|
|
93
93
|
__create(request, requestOptions) {
|
|
94
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
95
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
96
96
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
97
97
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
98
98
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "agent/create"),
|
|
@@ -105,6 +105,7 @@ class Agent {
|
|
|
105
105
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
106
106
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
107
107
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
108
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
108
109
|
});
|
|
109
110
|
if (_response.ok) {
|
|
110
111
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -164,7 +165,7 @@ class Agent {
|
|
|
164
165
|
}
|
|
165
166
|
__list() {
|
|
166
167
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
167
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
168
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
168
169
|
const { tags } = request;
|
|
169
170
|
const _queryParams = {};
|
|
170
171
|
if (tags != null) {
|
|
@@ -179,6 +180,7 @@ class Agent {
|
|
|
179
180
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
180
181
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
181
182
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
183
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
182
184
|
});
|
|
183
185
|
if (_response.ok) {
|
|
184
186
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -235,7 +237,7 @@ class Agent {
|
|
|
235
237
|
}
|
|
236
238
|
__get(id, requestOptions) {
|
|
237
239
|
return __awaiter(this, void 0, void 0, function* () {
|
|
238
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
240
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
239
241
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
240
242
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
241
243
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `agent/${core.url.encodePathParam(id)}`),
|
|
@@ -245,6 +247,7 @@ class Agent {
|
|
|
245
247
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
246
248
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
247
249
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
250
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
248
251
|
});
|
|
249
252
|
if (_response.ok) {
|
|
250
253
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -309,7 +312,7 @@ class Agent {
|
|
|
309
312
|
}
|
|
310
313
|
__update(id, request, requestOptions) {
|
|
311
314
|
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
315
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
313
316
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
314
317
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
315
318
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `agent/${core.url.encodePathParam(id)}`),
|
|
@@ -322,6 +325,7 @@ class Agent {
|
|
|
322
325
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
323
326
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
324
327
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
328
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
325
329
|
});
|
|
326
330
|
if (_response.ok) {
|
|
327
331
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -382,7 +386,7 @@ class Agent {
|
|
|
382
386
|
}
|
|
383
387
|
__delete(id, requestOptions) {
|
|
384
388
|
return __awaiter(this, void 0, void 0, function* () {
|
|
385
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
389
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
386
390
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
387
391
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
388
392
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `agent/${core.url.encodePathParam(id)}`),
|
|
@@ -392,6 +396,7 @@ class Agent {
|
|
|
392
396
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
393
397
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
394
398
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
399
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
395
400
|
});
|
|
396
401
|
if (_response.ok) {
|
|
397
402
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -463,7 +468,7 @@ class Agent {
|
|
|
463
468
|
}
|
|
464
469
|
__patch(id, request, requestOptions) {
|
|
465
470
|
return __awaiter(this, void 0, void 0, function* () {
|
|
466
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
471
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
467
472
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
468
473
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
469
474
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `agent/${core.url.encodePathParam(id)}`),
|
|
@@ -476,6 +481,7 @@ class Agent {
|
|
|
476
481
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
477
482
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
478
483
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
484
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
479
485
|
});
|
|
480
486
|
if (_response.ok) {
|
|
481
487
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -541,7 +547,7 @@ class Agent {
|
|
|
541
547
|
}
|
|
542
548
|
__chat(request, requestOptions) {
|
|
543
549
|
return __awaiter(this, void 0, void 0, function* () {
|
|
544
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
550
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
545
551
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider } = request, _body = __rest(request, ["X-Phenoml-On-Behalf-Of", "X-Phenoml-Fhir-Provider"]);
|
|
546
552
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
547
553
|
Authorization: yield this._getAuthorizationHeader(),
|
|
@@ -559,6 +565,7 @@ class Agent {
|
|
|
559
565
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
560
566
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
561
567
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
568
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
562
569
|
});
|
|
563
570
|
if (_response.ok) {
|
|
564
571
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -621,7 +628,7 @@ class Agent {
|
|
|
621
628
|
}
|
|
622
629
|
__getChatMessages(request, requestOptions) {
|
|
623
630
|
return __awaiter(this, void 0, void 0, function* () {
|
|
624
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
631
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
625
632
|
const { chat_session_id: chatSessionId, num_messages: numMessages, role, order } = request;
|
|
626
633
|
const _queryParams = {};
|
|
627
634
|
_queryParams.chat_session_id = chatSessionId;
|
|
@@ -643,6 +650,7 @@ class Agent {
|
|
|
643
650
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
644
651
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
645
652
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
653
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
646
654
|
});
|
|
647
655
|
if (_response.ok) {
|
|
648
656
|
return {
|
|
@@ -75,7 +75,7 @@ class Prompts {
|
|
|
75
75
|
}
|
|
76
76
|
__create(request, requestOptions) {
|
|
77
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
78
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
79
79
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
80
80
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
81
81
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "agent/prompts"),
|
|
@@ -88,6 +88,7 @@ class Prompts {
|
|
|
88
88
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
89
89
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
90
90
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
91
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
91
92
|
});
|
|
92
93
|
if (_response.ok) {
|
|
93
94
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -144,7 +145,7 @@ class Prompts {
|
|
|
144
145
|
}
|
|
145
146
|
__list(requestOptions) {
|
|
146
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
148
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
148
149
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
149
150
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
150
151
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "agent/prompts/list"),
|
|
@@ -154,6 +155,7 @@ class Prompts {
|
|
|
154
155
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
155
156
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
156
157
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
158
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
157
159
|
});
|
|
158
160
|
if (_response.ok) {
|
|
159
161
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -210,7 +212,7 @@ class Prompts {
|
|
|
210
212
|
}
|
|
211
213
|
__get(id, requestOptions) {
|
|
212
214
|
return __awaiter(this, void 0, void 0, function* () {
|
|
213
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
215
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
214
216
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
215
217
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
216
218
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `agent/prompts/${core.url.encodePathParam(id)}`),
|
|
@@ -220,6 +222,7 @@ class Prompts {
|
|
|
220
222
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
221
223
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
222
224
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
225
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
223
226
|
});
|
|
224
227
|
if (_response.ok) {
|
|
225
228
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -280,7 +283,7 @@ class Prompts {
|
|
|
280
283
|
}
|
|
281
284
|
__update(id_1) {
|
|
282
285
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
283
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
286
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
284
287
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
285
288
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
286
289
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `agent/prompts/${core.url.encodePathParam(id)}`),
|
|
@@ -293,6 +296,7 @@ class Prompts {
|
|
|
293
296
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
294
297
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
295
298
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
299
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
296
300
|
});
|
|
297
301
|
if (_response.ok) {
|
|
298
302
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -353,7 +357,7 @@ class Prompts {
|
|
|
353
357
|
}
|
|
354
358
|
__delete(id, requestOptions) {
|
|
355
359
|
return __awaiter(this, void 0, void 0, function* () {
|
|
356
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
360
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
357
361
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
358
362
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
359
363
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `agent/prompts/${core.url.encodePathParam(id)}`),
|
|
@@ -363,6 +367,7 @@ class Prompts {
|
|
|
363
367
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
364
368
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
365
369
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
370
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
366
371
|
});
|
|
367
372
|
if (_response.ok) {
|
|
368
373
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -434,7 +439,7 @@ class Prompts {
|
|
|
434
439
|
}
|
|
435
440
|
__patch(id, request, requestOptions) {
|
|
436
441
|
return __awaiter(this, void 0, void 0, function* () {
|
|
437
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
442
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
438
443
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
439
444
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
440
445
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `agent/prompts/${core.url.encodePathParam(id)}`),
|
|
@@ -447,6 +452,7 @@ class Prompts {
|
|
|
447
452
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
448
453
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
449
454
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
455
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
450
456
|
});
|
|
451
457
|
if (_response.ok) {
|
|
452
458
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -505,7 +511,7 @@ class Prompts {
|
|
|
505
511
|
}
|
|
506
512
|
__loadDefaults(requestOptions) {
|
|
507
513
|
return __awaiter(this, void 0, void 0, function* () {
|
|
508
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
514
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
509
515
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
510
516
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
511
517
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "agent/prompts/load-defaults"),
|
|
@@ -515,6 +521,7 @@ class Prompts {
|
|
|
515
521
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
516
522
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
517
523
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
524
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
518
525
|
});
|
|
519
526
|
if (_response.ok) {
|
|
520
527
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -73,7 +73,7 @@ class Cohort {
|
|
|
73
73
|
}
|
|
74
74
|
__analyze(request, requestOptions) {
|
|
75
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
76
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
77
77
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
78
78
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
79
79
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "cohort"),
|
|
@@ -86,6 +86,7 @@ class Cohort {
|
|
|
86
86
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
87
87
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
88
88
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
89
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
89
90
|
});
|
|
90
91
|
if (_response.ok) {
|
|
91
92
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -81,7 +81,7 @@ class Construe {
|
|
|
81
81
|
}
|
|
82
82
|
__uploadCodeSystem(request, requestOptions) {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
84
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
85
85
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
86
86
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
87
87
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "construe/upload"),
|
|
@@ -94,6 +94,7 @@ class Construe {
|
|
|
94
94
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
95
95
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
96
96
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
97
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
97
98
|
});
|
|
98
99
|
if (_response.ok) {
|
|
99
100
|
return {
|
|
@@ -165,7 +166,7 @@ class Construe {
|
|
|
165
166
|
}
|
|
166
167
|
__extractCodes(request, requestOptions) {
|
|
167
168
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
169
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
169
170
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
170
171
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
171
172
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "construe/extract"),
|
|
@@ -178,6 +179,7 @@ class Construe {
|
|
|
178
179
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
179
180
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
180
181
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
182
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
181
183
|
});
|
|
182
184
|
if (_response.ok) {
|
|
183
185
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -237,7 +239,7 @@ class Construe {
|
|
|
237
239
|
}
|
|
238
240
|
__listAvailableCodeSystems(requestOptions) {
|
|
239
241
|
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
242
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
241
243
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
242
244
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
243
245
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "construe/codes/systems"),
|
|
@@ -247,6 +249,7 @@ class Construe {
|
|
|
247
249
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
248
250
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
249
251
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
252
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
250
253
|
});
|
|
251
254
|
if (_response.ok) {
|
|
252
255
|
return {
|
|
@@ -307,7 +310,7 @@ class Construe {
|
|
|
307
310
|
}
|
|
308
311
|
__getCodeSystemDetail(codesystem_1) {
|
|
309
312
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
310
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
313
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
311
314
|
const { version } = request;
|
|
312
315
|
const _queryParams = {};
|
|
313
316
|
if (version != null) {
|
|
@@ -322,6 +325,7 @@ class Construe {
|
|
|
322
325
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
323
326
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
324
327
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
328
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
325
329
|
});
|
|
326
330
|
if (_response.ok) {
|
|
327
331
|
return {
|
|
@@ -388,7 +392,7 @@ class Construe {
|
|
|
388
392
|
}
|
|
389
393
|
__deleteCustomCodeSystem(codesystem_1) {
|
|
390
394
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
391
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
395
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
392
396
|
const { version } = request;
|
|
393
397
|
const _queryParams = {};
|
|
394
398
|
if (version != null) {
|
|
@@ -403,6 +407,7 @@ class Construe {
|
|
|
403
407
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
404
408
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
405
409
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
410
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
406
411
|
});
|
|
407
412
|
if (_response.ok) {
|
|
408
413
|
return {
|
|
@@ -474,7 +479,7 @@ class Construe {
|
|
|
474
479
|
}
|
|
475
480
|
__exportCustomCodeSystem(codesystem_1) {
|
|
476
481
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
477
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
482
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
478
483
|
const { version } = request;
|
|
479
484
|
const _queryParams = {};
|
|
480
485
|
if (version != null) {
|
|
@@ -489,6 +494,7 @@ class Construe {
|
|
|
489
494
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
490
495
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
491
496
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
497
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
492
498
|
});
|
|
493
499
|
if (_response.ok) {
|
|
494
500
|
return {
|
|
@@ -563,7 +569,7 @@ class Construe {
|
|
|
563
569
|
}
|
|
564
570
|
__listCodesInACodeSystem(codesystem_1) {
|
|
565
571
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
566
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
572
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
567
573
|
const { version, cursor, limit } = request;
|
|
568
574
|
const _queryParams = {};
|
|
569
575
|
if (version != null) {
|
|
@@ -584,6 +590,7 @@ class Construe {
|
|
|
584
590
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
585
591
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
586
592
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
593
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
587
594
|
});
|
|
588
595
|
if (_response.ok) {
|
|
589
596
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -648,7 +655,7 @@ class Construe {
|
|
|
648
655
|
}
|
|
649
656
|
__getASpecificCode(codesystem_1, codeId_1) {
|
|
650
657
|
return __awaiter(this, arguments, void 0, function* (codesystem, codeId, request = {}, requestOptions) {
|
|
651
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
658
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
652
659
|
const { version } = request;
|
|
653
660
|
const _queryParams = {};
|
|
654
661
|
if (version != null) {
|
|
@@ -663,6 +670,7 @@ class Construe {
|
|
|
663
670
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
664
671
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
665
672
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
673
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
666
674
|
});
|
|
667
675
|
if (_response.ok) {
|
|
668
676
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -744,7 +752,7 @@ class Construe {
|
|
|
744
752
|
}
|
|
745
753
|
__semanticSearchEmbeddingBased(codesystem, request, requestOptions) {
|
|
746
754
|
return __awaiter(this, void 0, void 0, function* () {
|
|
747
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
755
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
748
756
|
const { text, version, limit } = request;
|
|
749
757
|
const _queryParams = {};
|
|
750
758
|
_queryParams.text = text;
|
|
@@ -763,6 +771,7 @@ class Construe {
|
|
|
763
771
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
764
772
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
765
773
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
774
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
766
775
|
});
|
|
767
776
|
if (_response.ok) {
|
|
768
777
|
return {
|
|
@@ -853,7 +862,7 @@ class Construe {
|
|
|
853
862
|
}
|
|
854
863
|
__terminologyServerTextSearch(codesystem, request, requestOptions) {
|
|
855
864
|
return __awaiter(this, void 0, void 0, function* () {
|
|
856
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
865
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
857
866
|
const { q, version, limit } = request;
|
|
858
867
|
const _queryParams = {};
|
|
859
868
|
_queryParams.q = q;
|
|
@@ -872,6 +881,7 @@ class Construe {
|
|
|
872
881
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
873
882
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
874
883
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
884
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
875
885
|
});
|
|
876
886
|
if (_response.ok) {
|
|
877
887
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -87,7 +87,7 @@ class Fhir {
|
|
|
87
87
|
}
|
|
88
88
|
__search(fhirProviderId_1, fhirPath_1) {
|
|
89
89
|
return __awaiter(this, arguments, void 0, function* (fhirProviderId, fhirPath, request = {}, requestOptions) {
|
|
90
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
90
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
91
91
|
const { query_parameters: queryParameters, "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, } = request;
|
|
92
92
|
const _queryParams = {};
|
|
93
93
|
if (queryParameters != null) {
|
|
@@ -106,6 +106,7 @@ class Fhir {
|
|
|
106
106
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
107
107
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
108
108
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
109
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
109
110
|
});
|
|
110
111
|
if (_response.ok) {
|
|
111
112
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -192,7 +193,7 @@ class Fhir {
|
|
|
192
193
|
}
|
|
193
194
|
__create(fhirProviderId, fhirPath, request, requestOptions) {
|
|
194
195
|
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
196
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
196
197
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
197
198
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
198
199
|
Authorization: yield this._getAuthorizationHeader(),
|
|
@@ -210,6 +211,7 @@ class Fhir {
|
|
|
210
211
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
211
212
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
212
213
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
214
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
213
215
|
});
|
|
214
216
|
if (_response.ok) {
|
|
215
217
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -296,7 +298,7 @@ class Fhir {
|
|
|
296
298
|
}
|
|
297
299
|
__upsert(fhirProviderId, fhirPath, request, requestOptions) {
|
|
298
300
|
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
301
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
300
302
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
301
303
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
302
304
|
Authorization: yield this._getAuthorizationHeader(),
|
|
@@ -314,6 +316,7 @@ class Fhir {
|
|
|
314
316
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
315
317
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
316
318
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
319
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
317
320
|
});
|
|
318
321
|
if (_response.ok) {
|
|
319
322
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -386,7 +389,7 @@ class Fhir {
|
|
|
386
389
|
}
|
|
387
390
|
__delete(fhirProviderId_1, fhirPath_1) {
|
|
388
391
|
return __awaiter(this, arguments, void 0, function* (fhirProviderId, fhirPath, request = {}, requestOptions) {
|
|
389
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
392
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
390
393
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider } = request;
|
|
391
394
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
392
395
|
Authorization: yield this._getAuthorizationHeader(),
|
|
@@ -401,6 +404,7 @@ class Fhir {
|
|
|
401
404
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
402
405
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
403
406
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
407
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
404
408
|
});
|
|
405
409
|
if (_response.ok) {
|
|
406
410
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -536,7 +540,7 @@ class Fhir {
|
|
|
536
540
|
}
|
|
537
541
|
__patch(fhirProviderId, fhirPath, request, requestOptions) {
|
|
538
542
|
return __awaiter(this, void 0, void 0, function* () {
|
|
539
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
543
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
540
544
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
541
545
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
542
546
|
Authorization: yield this._getAuthorizationHeader(),
|
|
@@ -554,6 +558,7 @@ class Fhir {
|
|
|
554
558
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
555
559
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
556
560
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
561
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
557
562
|
});
|
|
558
563
|
if (_response.ok) {
|
|
559
564
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -656,7 +661,7 @@ class Fhir {
|
|
|
656
661
|
}
|
|
657
662
|
__executeBundle(fhirProviderId, request, requestOptions) {
|
|
658
663
|
return __awaiter(this, void 0, void 0, function* () {
|
|
659
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
664
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
660
665
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
661
666
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
662
667
|
Authorization: yield this._getAuthorizationHeader(),
|
|
@@ -674,6 +679,7 @@ class Fhir {
|
|
|
674
679
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
675
680
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
676
681
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
682
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
677
683
|
});
|
|
678
684
|
if (_response.ok) {
|
|
679
685
|
return { data: _response.body, rawResponse: _response.rawResponse };
|