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
|
@@ -84,7 +84,7 @@ class Workflows {
|
|
|
84
84
|
}
|
|
85
85
|
__list() {
|
|
86
86
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
87
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
87
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
88
88
|
const { verbose } = request;
|
|
89
89
|
const _queryParams = {};
|
|
90
90
|
if (verbose != null) {
|
|
@@ -99,6 +99,7 @@ class Workflows {
|
|
|
99
99
|
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,
|
|
100
100
|
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,
|
|
101
101
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
102
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
102
103
|
});
|
|
103
104
|
if (_response.ok) {
|
|
104
105
|
return {
|
|
@@ -168,7 +169,7 @@ class Workflows {
|
|
|
168
169
|
}
|
|
169
170
|
__create(request, requestOptions) {
|
|
170
171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
172
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
172
173
|
const { verbose } = request, _body = __rest(request, ["verbose"]);
|
|
173
174
|
const _queryParams = {};
|
|
174
175
|
if (verbose != null) {
|
|
@@ -186,6 +187,7 @@ class Workflows {
|
|
|
186
187
|
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,
|
|
187
188
|
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,
|
|
188
189
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
190
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
189
191
|
});
|
|
190
192
|
if (_response.ok) {
|
|
191
193
|
return {
|
|
@@ -250,7 +252,7 @@ class Workflows {
|
|
|
250
252
|
}
|
|
251
253
|
__get(id_1) {
|
|
252
254
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
253
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
255
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
254
256
|
const { verbose } = request;
|
|
255
257
|
const _queryParams = {};
|
|
256
258
|
if (verbose != null) {
|
|
@@ -265,6 +267,7 @@ class Workflows {
|
|
|
265
267
|
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,
|
|
266
268
|
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,
|
|
267
269
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
270
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
268
271
|
});
|
|
269
272
|
if (_response.ok) {
|
|
270
273
|
return {
|
|
@@ -338,7 +341,7 @@ class Workflows {
|
|
|
338
341
|
}
|
|
339
342
|
__update(id, request, requestOptions) {
|
|
340
343
|
return __awaiter(this, void 0, void 0, function* () {
|
|
341
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
344
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
342
345
|
const { verbose } = request, _body = __rest(request, ["verbose"]);
|
|
343
346
|
const _queryParams = {};
|
|
344
347
|
if (verbose != null) {
|
|
@@ -356,6 +359,7 @@ class Workflows {
|
|
|
356
359
|
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,
|
|
357
360
|
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,
|
|
358
361
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
362
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
359
363
|
});
|
|
360
364
|
if (_response.ok) {
|
|
361
365
|
return {
|
|
@@ -419,7 +423,7 @@ class Workflows {
|
|
|
419
423
|
}
|
|
420
424
|
__delete(id, requestOptions) {
|
|
421
425
|
return __awaiter(this, void 0, void 0, function* () {
|
|
422
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
426
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
423
427
|
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);
|
|
424
428
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
425
429
|
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, `workflows/${core.url.encodePathParam(id)}`),
|
|
@@ -429,6 +433,7 @@ class Workflows {
|
|
|
429
433
|
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,
|
|
430
434
|
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,
|
|
431
435
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
436
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
432
437
|
});
|
|
433
438
|
if (_response.ok) {
|
|
434
439
|
return {
|
|
@@ -499,7 +504,7 @@ class Workflows {
|
|
|
499
504
|
}
|
|
500
505
|
__execute(id, request, requestOptions) {
|
|
501
506
|
return __awaiter(this, void 0, void 0, function* () {
|
|
502
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
507
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
503
508
|
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);
|
|
504
509
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
505
510
|
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, `workflows/${core.url.encodePathParam(id)}/execute`),
|
|
@@ -512,6 +517,7 @@ class Workflows {
|
|
|
512
517
|
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,
|
|
513
518
|
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,
|
|
514
519
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
520
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
515
521
|
});
|
|
516
522
|
if (_response.ok) {
|
|
517
523
|
return {
|
|
@@ -14,10 +14,11 @@ export declare namespace Fetcher {
|
|
|
14
14
|
maxRetries?: number;
|
|
15
15
|
withCredentials?: boolean;
|
|
16
16
|
abortSignal?: AbortSignal;
|
|
17
|
-
requestType?: "json" | "file" | "bytes";
|
|
17
|
+
requestType?: "json" | "file" | "bytes" | "form" | "other";
|
|
18
18
|
responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer" | "binary-response";
|
|
19
19
|
duplex?: "half";
|
|
20
20
|
endpointMetadata?: EndpointMetadata;
|
|
21
|
+
fetchFn?: typeof fetch;
|
|
21
22
|
}
|
|
22
23
|
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
|
23
24
|
interface FailedStatusCodeError {
|
|
@@ -47,13 +47,13 @@ function getHeaders(args) {
|
|
|
47
47
|
}
|
|
48
48
|
function fetcherImpl(args) {
|
|
49
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
var _a;
|
|
50
|
+
var _a, _b, _c;
|
|
51
51
|
const url = (0, createRequestUrl_js_1.createRequestUrl)(args.url, args.queryParameters);
|
|
52
52
|
const requestBody = yield (0, getRequestBody_js_1.getRequestBody)({
|
|
53
53
|
body: args.body,
|
|
54
|
-
type: args.requestType
|
|
54
|
+
type: (_a = args.requestType) !== null && _a !== void 0 ? _a : "other",
|
|
55
55
|
});
|
|
56
|
-
const fetchFn = yield (0, getFetchFn_js_1.getFetchFn)();
|
|
56
|
+
const fetchFn = (_b = args.fetchFn) !== null && _b !== void 0 ? _b : (yield (0, getFetchFn_js_1.getFetchFn)());
|
|
57
57
|
try {
|
|
58
58
|
const response = yield (0, requestWithRetries_js_1.requestWithRetries)(() => __awaiter(this, void 0, void 0, function* () {
|
|
59
59
|
return (0, makeRequest_js_1.makeRequest)(fetchFn, url, args.method, yield getHeaders(args), requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
|
|
@@ -79,7 +79,7 @@ function fetcherImpl(args) {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
catch (error) {
|
|
82
|
-
if ((
|
|
82
|
+
if ((_c = args.abortSignal) === null || _c === void 0 ? void 0 : _c.aborted) {
|
|
83
83
|
return {
|
|
84
84
|
ok: false,
|
|
85
85
|
error: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare namespace GetRequestBody {
|
|
2
2
|
interface Args {
|
|
3
3
|
body: unknown;
|
|
4
|
-
type: "json" | "file" | "bytes" | "other";
|
|
4
|
+
type: "json" | "file" | "bytes" | "form" | "other";
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
export declare function getRequestBody({ body, type }: GetRequestBody.Args): Promise<BodyInit | undefined>;
|
|
@@ -11,8 +11,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.getRequestBody = getRequestBody;
|
|
13
13
|
const json_js_1 = require("../json.js");
|
|
14
|
+
const qs_js_1 = require("../url/qs.js");
|
|
14
15
|
function getRequestBody(_a) {
|
|
15
16
|
return __awaiter(this, arguments, void 0, function* ({ body, type }) {
|
|
17
|
+
if (type === "form") {
|
|
18
|
+
return (0, qs_js_1.toQueryString)(body, { arrayFormat: "repeat", encode: true });
|
|
19
|
+
}
|
|
16
20
|
if (type.includes("json")) {
|
|
17
21
|
return (0, json_js_1.toJson)(body);
|
|
18
22
|
}
|
package/dist/cjs/core/headers.js
CHANGED
|
@@ -7,11 +7,12 @@ function mergeHeaders(...headersArray) {
|
|
|
7
7
|
for (const [key, value] of headersArray
|
|
8
8
|
.filter((headers) => headers != null)
|
|
9
9
|
.flatMap((headers) => Object.entries(headers))) {
|
|
10
|
+
const insensitiveKey = key.toLowerCase();
|
|
10
11
|
if (value != null) {
|
|
11
|
-
result[
|
|
12
|
+
result[insensitiveKey] = value;
|
|
12
13
|
}
|
|
13
|
-
else if (
|
|
14
|
-
delete result[
|
|
14
|
+
else if (insensitiveKey in result) {
|
|
15
|
+
delete result[insensitiveKey];
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
return result;
|
|
@@ -21,8 +22,9 @@ function mergeOnlyDefinedHeaders(...headersArray) {
|
|
|
21
22
|
for (const [key, value] of headersArray
|
|
22
23
|
.filter((headers) => headers != null)
|
|
23
24
|
.flatMap((headers) => Object.entries(headers))) {
|
|
25
|
+
const insensitiveKey = key.toLowerCase();
|
|
24
26
|
if (value != null) {
|
|
25
|
-
result[
|
|
27
|
+
result[insensitiveKey] = value;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
return result;
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "6.
|
|
1
|
+
export declare const SDK_VERSION = "6.1.0";
|
package/dist/cjs/version.js
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/esm/Client.mjs
CHANGED
|
@@ -16,8 +16,8 @@ export class phenomlClient {
|
|
|
16
16
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
17
17
|
"X-Fern-Language": "JavaScript",
|
|
18
18
|
"X-Fern-SDK-Name": "phenoml",
|
|
19
|
-
"X-Fern-SDK-Version": "6.
|
|
20
|
-
"User-Agent": "phenoml/
|
|
19
|
+
"X-Fern-SDK-Version": "6.1.0",
|
|
20
|
+
"User-Agent": "phenoml/6.1.0",
|
|
21
21
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
22
22
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
23
23
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -56,7 +56,7 @@ export class Agent {
|
|
|
56
56
|
}
|
|
57
57
|
__create(request, requestOptions) {
|
|
58
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
59
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
60
60
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
61
61
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
62
62
|
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"),
|
|
@@ -69,6 +69,7 @@ export class Agent {
|
|
|
69
69
|
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,
|
|
70
70
|
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,
|
|
71
71
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
72
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
72
73
|
});
|
|
73
74
|
if (_response.ok) {
|
|
74
75
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -128,7 +129,7 @@ export class Agent {
|
|
|
128
129
|
}
|
|
129
130
|
__list() {
|
|
130
131
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
131
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
132
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
132
133
|
const { tags } = request;
|
|
133
134
|
const _queryParams = {};
|
|
134
135
|
if (tags != null) {
|
|
@@ -143,6 +144,7 @@ export class Agent {
|
|
|
143
144
|
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,
|
|
144
145
|
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,
|
|
145
146
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
147
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
146
148
|
});
|
|
147
149
|
if (_response.ok) {
|
|
148
150
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -199,7 +201,7 @@ export class Agent {
|
|
|
199
201
|
}
|
|
200
202
|
__get(id, requestOptions) {
|
|
201
203
|
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
204
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
203
205
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
204
206
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
205
207
|
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)}`),
|
|
@@ -209,6 +211,7 @@ export class Agent {
|
|
|
209
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,
|
|
210
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,
|
|
211
213
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
214
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
212
215
|
});
|
|
213
216
|
if (_response.ok) {
|
|
214
217
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -273,7 +276,7 @@ export class Agent {
|
|
|
273
276
|
}
|
|
274
277
|
__update(id, request, requestOptions) {
|
|
275
278
|
return __awaiter(this, void 0, void 0, function* () {
|
|
276
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
279
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
277
280
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
278
281
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
279
282
|
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)}`),
|
|
@@ -286,6 +289,7 @@ export class Agent {
|
|
|
286
289
|
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,
|
|
287
290
|
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,
|
|
288
291
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
292
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
289
293
|
});
|
|
290
294
|
if (_response.ok) {
|
|
291
295
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -346,7 +350,7 @@ export class Agent {
|
|
|
346
350
|
}
|
|
347
351
|
__delete(id, requestOptions) {
|
|
348
352
|
return __awaiter(this, void 0, void 0, function* () {
|
|
349
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
353
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
350
354
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
351
355
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
352
356
|
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)}`),
|
|
@@ -356,6 +360,7 @@ export class Agent {
|
|
|
356
360
|
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,
|
|
357
361
|
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,
|
|
358
362
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
363
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
359
364
|
});
|
|
360
365
|
if (_response.ok) {
|
|
361
366
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -427,7 +432,7 @@ export class Agent {
|
|
|
427
432
|
}
|
|
428
433
|
__patch(id, request, requestOptions) {
|
|
429
434
|
return __awaiter(this, void 0, void 0, function* () {
|
|
430
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
435
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
431
436
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
432
437
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
433
438
|
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)}`),
|
|
@@ -440,6 +445,7 @@ export class Agent {
|
|
|
440
445
|
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,
|
|
441
446
|
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,
|
|
442
447
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
448
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
443
449
|
});
|
|
444
450
|
if (_response.ok) {
|
|
445
451
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -505,7 +511,7 @@ export class Agent {
|
|
|
505
511
|
}
|
|
506
512
|
__chat(request, 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 { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider } = request, _body = __rest(request, ["X-Phenoml-On-Behalf-Of", "X-Phenoml-Fhir-Provider"]);
|
|
510
516
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
511
517
|
Authorization: yield this._getAuthorizationHeader(),
|
|
@@ -523,6 +529,7 @@ export class Agent {
|
|
|
523
529
|
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,
|
|
524
530
|
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,
|
|
525
531
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
532
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
526
533
|
});
|
|
527
534
|
if (_response.ok) {
|
|
528
535
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -585,7 +592,7 @@ export class Agent {
|
|
|
585
592
|
}
|
|
586
593
|
__getChatMessages(request, requestOptions) {
|
|
587
594
|
return __awaiter(this, void 0, void 0, function* () {
|
|
588
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
595
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
589
596
|
const { chat_session_id: chatSessionId, num_messages: numMessages, role, order } = request;
|
|
590
597
|
const _queryParams = {};
|
|
591
598
|
_queryParams.chat_session_id = chatSessionId;
|
|
@@ -607,6 +614,7 @@ export class Agent {
|
|
|
607
614
|
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,
|
|
608
615
|
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,
|
|
609
616
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
617
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
610
618
|
});
|
|
611
619
|
if (_response.ok) {
|
|
612
620
|
return {
|
|
@@ -39,7 +39,7 @@ export class Prompts {
|
|
|
39
39
|
}
|
|
40
40
|
__create(request, requestOptions) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
42
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
43
43
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
44
44
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
45
45
|
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"),
|
|
@@ -52,6 +52,7 @@ export class Prompts {
|
|
|
52
52
|
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,
|
|
53
53
|
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,
|
|
54
54
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
55
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
55
56
|
});
|
|
56
57
|
if (_response.ok) {
|
|
57
58
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -108,7 +109,7 @@ export class Prompts {
|
|
|
108
109
|
}
|
|
109
110
|
__list(requestOptions) {
|
|
110
111
|
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
112
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
112
113
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
113
114
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
114
115
|
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"),
|
|
@@ -118,6 +119,7 @@ export class Prompts {
|
|
|
118
119
|
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,
|
|
119
120
|
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,
|
|
120
121
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
122
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
121
123
|
});
|
|
122
124
|
if (_response.ok) {
|
|
123
125
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -174,7 +176,7 @@ export class Prompts {
|
|
|
174
176
|
}
|
|
175
177
|
__get(id, requestOptions) {
|
|
176
178
|
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
179
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
178
180
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
179
181
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
180
182
|
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)}`),
|
|
@@ -184,6 +186,7 @@ export class Prompts {
|
|
|
184
186
|
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,
|
|
185
187
|
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,
|
|
186
188
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
189
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
187
190
|
});
|
|
188
191
|
if (_response.ok) {
|
|
189
192
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -244,7 +247,7 @@ export class Prompts {
|
|
|
244
247
|
}
|
|
245
248
|
__update(id_1) {
|
|
246
249
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
247
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
250
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
248
251
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
249
252
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
250
253
|
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)}`),
|
|
@@ -257,6 +260,7 @@ export class Prompts {
|
|
|
257
260
|
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,
|
|
258
261
|
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,
|
|
259
262
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
263
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
260
264
|
});
|
|
261
265
|
if (_response.ok) {
|
|
262
266
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -317,7 +321,7 @@ export class Prompts {
|
|
|
317
321
|
}
|
|
318
322
|
__delete(id, requestOptions) {
|
|
319
323
|
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
324
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
321
325
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
322
326
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
323
327
|
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)}`),
|
|
@@ -327,6 +331,7 @@ export class Prompts {
|
|
|
327
331
|
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,
|
|
328
332
|
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,
|
|
329
333
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
334
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
330
335
|
});
|
|
331
336
|
if (_response.ok) {
|
|
332
337
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -398,7 +403,7 @@ export class Prompts {
|
|
|
398
403
|
}
|
|
399
404
|
__patch(id, request, requestOptions) {
|
|
400
405
|
return __awaiter(this, void 0, void 0, function* () {
|
|
401
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
406
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
402
407
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
403
408
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
404
409
|
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)}`),
|
|
@@ -411,6 +416,7 @@ export class Prompts {
|
|
|
411
416
|
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,
|
|
412
417
|
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,
|
|
413
418
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
419
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
414
420
|
});
|
|
415
421
|
if (_response.ok) {
|
|
416
422
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -469,7 +475,7 @@ export class Prompts {
|
|
|
469
475
|
}
|
|
470
476
|
__loadDefaults(requestOptions) {
|
|
471
477
|
return __awaiter(this, void 0, void 0, function* () {
|
|
472
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
478
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
473
479
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
474
480
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
475
481
|
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"),
|
|
@@ -479,6 +485,7 @@ export class Prompts {
|
|
|
479
485
|
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,
|
|
480
486
|
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,
|
|
481
487
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
488
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
482
489
|
});
|
|
483
490
|
if (_response.ok) {
|
|
484
491
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -37,7 +37,7 @@ export class Cohort {
|
|
|
37
37
|
}
|
|
38
38
|
__analyze(request, requestOptions) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
40
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
41
41
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
42
42
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
43
43
|
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"),
|
|
@@ -50,6 +50,7 @@ export class Cohort {
|
|
|
50
50
|
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,
|
|
51
51
|
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,
|
|
52
52
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
53
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
53
54
|
});
|
|
54
55
|
if (_response.ok) {
|
|
55
56
|
return { data: _response.body, rawResponse: _response.rawResponse };
|