phenoml 12.5.0 → 13.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 +3 -0
- package/dist/cjs/BaseClient.js +17 -2
- package/dist/cjs/api/resources/agent/client/Client.js +17 -9
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +7 -7
- package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +1 -1
- package/dist/cjs/api/resources/cohort/client/Client.js +1 -1
- package/dist/cjs/api/resources/construe/client/Client.js +39 -11
- package/dist/cjs/api/resources/fhir/client/Client.js +10 -6
- package/dist/cjs/api/resources/fhirProvider/client/Client.js +7 -7
- package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +11 -3
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +16 -8
- package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.ts +2 -0
- package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentRequest.d.ts +2 -0
- package/dist/cjs/api/resources/lang2Fhir/types/CreateMultiResponse.d.ts +3 -1
- package/dist/cjs/api/resources/lang2Fhir/types/DocumentConfig.d.ts +7 -0
- package/dist/cjs/api/resources/lang2Fhir/types/DocumentConfig.js +3 -0
- package/dist/cjs/api/resources/lang2Fhir/types/DocumentMultiResponse.d.ts +5 -0
- package/dist/cjs/api/resources/lang2Fhir/types/DocumentMultiResponse.js +3 -0
- package/dist/cjs/api/resources/lang2Fhir/types/PageClassification.d.ts +11 -0
- package/dist/cjs/api/resources/lang2Fhir/types/PageClassification.js +3 -0
- package/dist/cjs/api/resources/lang2Fhir/types/PageFilter.d.ts +7 -0
- package/dist/cjs/api/resources/lang2Fhir/types/PageFilter.js +3 -0
- package/dist/cjs/api/resources/lang2Fhir/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/lang2Fhir/types/index.js +4 -0
- package/dist/cjs/api/resources/summary/client/Client.js +6 -6
- package/dist/cjs/api/resources/tools/client/Client.js +4 -4
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.ts +0 -2
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +4 -4
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +4 -4
- package/dist/cjs/api/resources/workflows/client/Client.js +22 -6
- package/dist/cjs/core/auth/AuthProvider.d.ts +1 -0
- package/dist/cjs/core/auth/AuthProvider.js +7 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +2 -2
- package/dist/cjs/core/auth/BasicAuth.js +7 -1
- package/dist/cjs/core/auth/index.d.ts +1 -1
- package/dist/cjs/core/auth/index.js +3 -1
- package/dist/cjs/core/fetcher/Fetcher.d.ts +8 -0
- package/dist/cjs/core/fetcher/Fetcher.js +13 -8
- package/dist/cjs/core/fetcher/requestWithRetries.js +4 -1
- package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
- package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
- package/dist/cjs/core/url/index.d.ts +1 -0
- package/dist/cjs/core/url/index.js +3 -1
- package/dist/cjs/core/url/qs.d.ts +2 -1
- package/dist/cjs/core/url/qs.js +24 -12
- package/dist/cjs/errors/handleNonStatusCodeError.js +4 -1
- package/dist/cjs/errors/phenomlError.d.ts +3 -1
- package/dist/cjs/errors/phenomlError.js +4 -1
- package/dist/cjs/errors/phenomlTimeoutError.d.ts +4 -1
- package/dist/cjs/errors/phenomlTimeoutError.js +4 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +3 -0
- package/dist/esm/BaseClient.mjs +17 -2
- package/dist/esm/api/resources/agent/client/Client.mjs +17 -9
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +7 -7
- package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +1 -1
- package/dist/esm/api/resources/cohort/client/Client.mjs +1 -1
- package/dist/esm/api/resources/construe/client/Client.mjs +39 -11
- package/dist/esm/api/resources/fhir/client/Client.mjs +10 -6
- package/dist/esm/api/resources/fhirProvider/client/Client.mjs +7 -7
- package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +11 -3
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +16 -8
- package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.mts +2 -0
- package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentRequest.d.mts +2 -0
- package/dist/esm/api/resources/lang2Fhir/types/CreateMultiResponse.d.mts +3 -1
- package/dist/esm/api/resources/lang2Fhir/types/DocumentConfig.d.mts +7 -0
- package/dist/esm/api/resources/lang2Fhir/types/DocumentConfig.mjs +2 -0
- package/dist/esm/api/resources/lang2Fhir/types/DocumentMultiResponse.d.mts +5 -0
- package/dist/esm/api/resources/lang2Fhir/types/DocumentMultiResponse.mjs +2 -0
- package/dist/esm/api/resources/lang2Fhir/types/PageClassification.d.mts +11 -0
- package/dist/esm/api/resources/lang2Fhir/types/PageClassification.mjs +2 -0
- package/dist/esm/api/resources/lang2Fhir/types/PageFilter.d.mts +7 -0
- package/dist/esm/api/resources/lang2Fhir/types/PageFilter.mjs +2 -0
- package/dist/esm/api/resources/lang2Fhir/types/index.d.mts +4 -0
- package/dist/esm/api/resources/lang2Fhir/types/index.mjs +4 -0
- package/dist/esm/api/resources/summary/client/Client.mjs +6 -6
- package/dist/esm/api/resources/tools/client/Client.mjs +4 -4
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.mts +0 -2
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +4 -4
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +4 -4
- package/dist/esm/api/resources/workflows/client/Client.mjs +22 -6
- package/dist/esm/core/auth/AuthProvider.d.mts +1 -0
- package/dist/esm/core/auth/AuthProvider.mjs +6 -1
- package/dist/esm/core/auth/BasicAuth.d.mts +2 -2
- package/dist/esm/core/auth/BasicAuth.mjs +7 -1
- package/dist/esm/core/auth/index.d.mts +1 -1
- package/dist/esm/core/auth/index.mjs +1 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +8 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +13 -8
- package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -1
- package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
- package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
- package/dist/esm/core/url/index.d.mts +1 -0
- package/dist/esm/core/url/index.mjs +1 -0
- package/dist/esm/core/url/qs.d.mts +2 -1
- package/dist/esm/core/url/qs.mjs +24 -12
- package/dist/esm/errors/handleNonStatusCodeError.mjs +4 -1
- package/dist/esm/errors/phenomlError.d.mts +3 -1
- package/dist/esm/errors/phenomlError.mjs +4 -1
- package/dist/esm/errors/phenomlTimeoutError.d.mts +4 -1
- package/dist/esm/errors/phenomlTimeoutError.mjs +4 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +11 -3
|
@@ -75,16 +75,11 @@ const SENSITIVE_QUERY_PARAMS = new Set([
|
|
|
75
75
|
]);
|
|
76
76
|
function redactQueryParameters(queryParameters) {
|
|
77
77
|
if (queryParameters == null) {
|
|
78
|
-
return
|
|
78
|
+
return undefined;
|
|
79
79
|
}
|
|
80
80
|
const redacted = {};
|
|
81
81
|
for (const [key, value] of Object.entries(queryParameters)) {
|
|
82
|
-
|
|
83
|
-
redacted[key] = "[REDACTED]";
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
redacted[key] = value;
|
|
87
|
-
}
|
|
82
|
+
redacted[key] = SENSITIVE_QUERY_PARAMS.has(key.toLowerCase()) ? "[REDACTED]" : value;
|
|
88
83
|
}
|
|
89
84
|
return redacted;
|
|
90
85
|
}
|
|
@@ -186,7 +181,13 @@ function getHeaders(args) {
|
|
|
186
181
|
function fetcherImpl(args) {
|
|
187
182
|
return __awaiter(this, void 0, void 0, function* () {
|
|
188
183
|
var _a, _b, _c;
|
|
189
|
-
|
|
184
|
+
let url = args.url;
|
|
185
|
+
if (args.queryString != null && args.queryString.length > 0) {
|
|
186
|
+
url = `${url}?${args.queryString}`;
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
url = (0, createRequestUrl_js_1.createRequestUrl)(args.url, args.queryParameters);
|
|
190
|
+
}
|
|
190
191
|
const requestBody = yield (0, getRequestBody_js_1.getRequestBody)({
|
|
191
192
|
body: args.body,
|
|
192
193
|
type: (_a = args.requestType) !== null && _a !== void 0 ? _a : "other",
|
|
@@ -261,6 +262,7 @@ function fetcherImpl(args) {
|
|
|
261
262
|
error: {
|
|
262
263
|
reason: "unknown",
|
|
263
264
|
errorMessage: "The user aborted a request",
|
|
265
|
+
cause: error,
|
|
264
266
|
},
|
|
265
267
|
rawResponse: RawResponse_js_1.abortRawResponse,
|
|
266
268
|
};
|
|
@@ -278,6 +280,7 @@ function fetcherImpl(args) {
|
|
|
278
280
|
ok: false,
|
|
279
281
|
error: {
|
|
280
282
|
reason: "timeout",
|
|
283
|
+
cause: error,
|
|
281
284
|
},
|
|
282
285
|
rawResponse: RawResponse_js_1.abortRawResponse,
|
|
283
286
|
};
|
|
@@ -296,6 +299,7 @@ function fetcherImpl(args) {
|
|
|
296
299
|
error: {
|
|
297
300
|
reason: "unknown",
|
|
298
301
|
errorMessage: error.message,
|
|
302
|
+
cause: error,
|
|
299
303
|
},
|
|
300
304
|
rawResponse: RawResponse_js_1.unknownRawResponse,
|
|
301
305
|
};
|
|
@@ -313,6 +317,7 @@ function fetcherImpl(args) {
|
|
|
313
317
|
error: {
|
|
314
318
|
reason: "unknown",
|
|
315
319
|
errorMessage: (0, json_js_1.toJson)(error),
|
|
320
|
+
cause: error,
|
|
316
321
|
},
|
|
317
322
|
rawResponse: RawResponse_js_1.unknownRawResponse,
|
|
318
323
|
};
|
|
@@ -14,6 +14,9 @@ const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
|
14
14
|
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
15
15
|
const DEFAULT_MAX_RETRIES = 2;
|
|
16
16
|
const JITTER_FACTOR = 0.2; // 20% random jitter
|
|
17
|
+
function isRetryableStatusCode(statusCode) {
|
|
18
|
+
return [408, 429].includes(statusCode) || statusCode >= 500;
|
|
19
|
+
}
|
|
17
20
|
function addPositiveJitter(delay) {
|
|
18
21
|
const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR;
|
|
19
22
|
return delay * jitterMultiplier;
|
|
@@ -53,7 +56,7 @@ function requestWithRetries(requestFn_1) {
|
|
|
53
56
|
return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
54
57
|
let response = yield requestFn();
|
|
55
58
|
for (let i = 0; i < maxRetries; ++i) {
|
|
56
|
-
if (
|
|
59
|
+
if (isRetryableStatusCode(response.status)) {
|
|
57
60
|
const delay = getRetryDelayFromHeaders(response, i);
|
|
58
61
|
yield new Promise((resolve) => setTimeout(resolve, delay));
|
|
59
62
|
response = yield requestFn();
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a fluent builder for constructing URL query strings.
|
|
3
|
+
*
|
|
4
|
+
* Each `.add()` call serializes its value immediately (like C#'s builder),
|
|
5
|
+
* so no format tracking is needed — the style is applied at add-time.
|
|
6
|
+
*
|
|
7
|
+
* Usage (generated code):
|
|
8
|
+
*
|
|
9
|
+
* const qs = core.url.queryBuilder()
|
|
10
|
+
* .add("limit", limit)
|
|
11
|
+
* .add("tags", tags, { style: "comma" }) // explode: false
|
|
12
|
+
* .mergeAdditional(requestOptions?.queryParams)
|
|
13
|
+
* .build();
|
|
14
|
+
*/
|
|
15
|
+
export declare function queryBuilder(): QueryStringBuilder;
|
|
16
|
+
declare class QueryStringBuilder {
|
|
17
|
+
private parts;
|
|
18
|
+
/**
|
|
19
|
+
* Adds a query parameter, serializing it immediately.
|
|
20
|
+
*
|
|
21
|
+
* By default arrays use "repeat" format (`key=a&key=b`).
|
|
22
|
+
* Pass `{ style: "comma" }` for OpenAPI `explode: false` parameters
|
|
23
|
+
* to get comma-separated values (`key=a,b,c`).
|
|
24
|
+
*
|
|
25
|
+
* Null / undefined values are silently skipped.
|
|
26
|
+
*/
|
|
27
|
+
add(key: string, value: unknown, options?: {
|
|
28
|
+
style?: "comma";
|
|
29
|
+
}): this;
|
|
30
|
+
/**
|
|
31
|
+
* Adds multiple query parameters at once from a record.
|
|
32
|
+
* All parameters use the default "repeat" array format.
|
|
33
|
+
* Null / undefined values are silently skipped.
|
|
34
|
+
*/
|
|
35
|
+
addMany(params: Record<string, unknown>): this;
|
|
36
|
+
/**
|
|
37
|
+
* Merges additional query parameters supplied at call-time via
|
|
38
|
+
* `requestOptions.queryParams`. Overrides existing keys (last-write-wins).
|
|
39
|
+
*/
|
|
40
|
+
mergeAdditional(additionalParams?: Record<string, unknown>): this;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the assembled query string (without the leading `?`).
|
|
43
|
+
* Returns an empty string when no parameters were added.
|
|
44
|
+
*/
|
|
45
|
+
build(): string;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.queryBuilder = queryBuilder;
|
|
4
|
+
const qs_js_1 = require("./qs.js");
|
|
5
|
+
/**
|
|
6
|
+
* Creates a fluent builder for constructing URL query strings.
|
|
7
|
+
*
|
|
8
|
+
* Each `.add()` call serializes its value immediately (like C#'s builder),
|
|
9
|
+
* so no format tracking is needed — the style is applied at add-time.
|
|
10
|
+
*
|
|
11
|
+
* Usage (generated code):
|
|
12
|
+
*
|
|
13
|
+
* const qs = core.url.queryBuilder()
|
|
14
|
+
* .add("limit", limit)
|
|
15
|
+
* .add("tags", tags, { style: "comma" }) // explode: false
|
|
16
|
+
* .mergeAdditional(requestOptions?.queryParams)
|
|
17
|
+
* .build();
|
|
18
|
+
*/
|
|
19
|
+
function queryBuilder() {
|
|
20
|
+
return new QueryStringBuilder();
|
|
21
|
+
}
|
|
22
|
+
class QueryStringBuilder {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.parts = new Map();
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Adds a query parameter, serializing it immediately.
|
|
28
|
+
*
|
|
29
|
+
* By default arrays use "repeat" format (`key=a&key=b`).
|
|
30
|
+
* Pass `{ style: "comma" }` for OpenAPI `explode: false` parameters
|
|
31
|
+
* to get comma-separated values (`key=a,b,c`).
|
|
32
|
+
*
|
|
33
|
+
* Null / undefined values are silently skipped.
|
|
34
|
+
*/
|
|
35
|
+
add(key, value, options) {
|
|
36
|
+
if (value === undefined || value === null) {
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
const serialized = (0, qs_js_1.toQueryString)({ [key]: value }, { arrayFormat: (options === null || options === void 0 ? void 0 : options.style) === "comma" ? "comma" : "repeat" });
|
|
40
|
+
if (serialized.length > 0) {
|
|
41
|
+
this.parts.set(key, serialized);
|
|
42
|
+
}
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Adds multiple query parameters at once from a record.
|
|
47
|
+
* All parameters use the default "repeat" array format.
|
|
48
|
+
* Null / undefined values are silently skipped.
|
|
49
|
+
*/
|
|
50
|
+
addMany(params) {
|
|
51
|
+
if (params != null) {
|
|
52
|
+
for (const [key, value] of Object.entries(params)) {
|
|
53
|
+
this.add(key, value);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Merges additional query parameters supplied at call-time via
|
|
60
|
+
* `requestOptions.queryParams`. Overrides existing keys (last-write-wins).
|
|
61
|
+
*/
|
|
62
|
+
mergeAdditional(additionalParams) {
|
|
63
|
+
if (additionalParams != null) {
|
|
64
|
+
for (const [key, value] of Object.entries(additionalParams)) {
|
|
65
|
+
if (value === undefined || value === null) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const serialized = (0, qs_js_1.toQueryString)({ [key]: value }, { arrayFormat: "repeat" });
|
|
69
|
+
if (serialized.length > 0) {
|
|
70
|
+
this.parts.set(key, serialized);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Returns the assembled query string (without the leading `?`).
|
|
78
|
+
* Returns an empty string when no parameters were added.
|
|
79
|
+
*/
|
|
80
|
+
build() {
|
|
81
|
+
return [...this.parts.values()].join("&");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toQueryString = exports.join = exports.encodePathParam = void 0;
|
|
3
|
+
exports.toQueryString = exports.queryBuilder = exports.join = exports.encodePathParam = void 0;
|
|
4
4
|
var encodePathParam_js_1 = require("./encodePathParam.js");
|
|
5
5
|
Object.defineProperty(exports, "encodePathParam", { enumerable: true, get: function () { return encodePathParam_js_1.encodePathParam; } });
|
|
6
6
|
var join_js_1 = require("./join.js");
|
|
7
7
|
Object.defineProperty(exports, "join", { enumerable: true, get: function () { return join_js_1.join; } });
|
|
8
|
+
var QueryStringBuilder_js_1 = require("./QueryStringBuilder.js");
|
|
9
|
+
Object.defineProperty(exports, "queryBuilder", { enumerable: true, get: function () { return QueryStringBuilder_js_1.queryBuilder; } });
|
|
8
10
|
var qs_js_1 = require("./qs.js");
|
|
9
11
|
Object.defineProperty(exports, "toQueryString", { enumerable: true, get: function () { return qs_js_1.toQueryString; } });
|
package/dist/cjs/core/url/qs.js
CHANGED
|
@@ -26,19 +26,31 @@ function stringifyObject(obj, prefix = "", options) {
|
|
|
26
26
|
if (value.length === 0) {
|
|
27
27
|
continue;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const effectiveFormat = options.arrayFormat;
|
|
30
|
+
if (effectiveFormat === "comma") {
|
|
31
|
+
const encodedKey = options.encode ? encodeURIComponent(fullKey) : fullKey;
|
|
32
|
+
const encodedValues = value
|
|
33
|
+
.filter((item) => item !== undefined && item !== null)
|
|
34
|
+
.map((item) => encodeValue(item, options.encode));
|
|
35
|
+
if (encodedValues.length > 0) {
|
|
36
|
+
parts.push(`${encodedKey}=${encodedValues.join(",")}`);
|
|
33
37
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
for (let i = 0; i < value.length; i++) {
|
|
41
|
+
const item = value[i];
|
|
42
|
+
if (item === undefined) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (typeof item === "object" && !Array.isArray(item) && item !== null) {
|
|
46
|
+
const arrayKey = effectiveFormat === "indices" ? `${fullKey}[${i}]` : fullKey;
|
|
47
|
+
parts.push(...stringifyObject(item, arrayKey, options));
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
const arrayKey = effectiveFormat === "indices" ? `${fullKey}[${i}]` : fullKey;
|
|
51
|
+
const encodedKey = options.encode ? encodeURIComponent(arrayKey) : arrayKey;
|
|
52
|
+
parts.push(`${encodedKey}=${encodeValue(item, options.encode)}`);
|
|
53
|
+
}
|
|
42
54
|
}
|
|
43
55
|
}
|
|
44
56
|
}
|
|
@@ -50,11 +50,14 @@ function handleNonStatusCodeError(error, rawResponse, method, path) {
|
|
|
50
50
|
rawResponse: rawResponse,
|
|
51
51
|
});
|
|
52
52
|
case "timeout":
|
|
53
|
-
throw new errors.phenomlTimeoutError(`Timeout exceeded when calling ${method} ${path}
|
|
53
|
+
throw new errors.phenomlTimeoutError(`Timeout exceeded when calling ${method} ${path}.`, {
|
|
54
|
+
cause: error.cause,
|
|
55
|
+
});
|
|
54
56
|
case "unknown":
|
|
55
57
|
throw new errors.phenomlError({
|
|
56
58
|
message: error.errorMessage,
|
|
57
59
|
rawResponse: rawResponse,
|
|
60
|
+
cause: error.cause,
|
|
58
61
|
});
|
|
59
62
|
default:
|
|
60
63
|
throw new errors.phenomlError({
|
|
@@ -3,10 +3,12 @@ export declare class phenomlError extends Error {
|
|
|
3
3
|
readonly statusCode?: number;
|
|
4
4
|
readonly body?: unknown;
|
|
5
5
|
readonly rawResponse?: core.RawResponse;
|
|
6
|
-
|
|
6
|
+
readonly cause?: unknown;
|
|
7
|
+
constructor({ message, statusCode, body, rawResponse, cause, }: {
|
|
7
8
|
message?: string;
|
|
8
9
|
statusCode?: number;
|
|
9
10
|
body?: unknown;
|
|
10
11
|
rawResponse?: core.RawResponse;
|
|
12
|
+
cause?: unknown;
|
|
11
13
|
});
|
|
12
14
|
}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.phenomlError = void 0;
|
|
5
5
|
const json_js_1 = require("../core/json.js");
|
|
6
6
|
class phenomlError extends Error {
|
|
7
|
-
constructor({ message, statusCode, body, rawResponse, }) {
|
|
7
|
+
constructor({ message, statusCode, body, rawResponse, cause, }) {
|
|
8
8
|
super(buildMessage({ message, statusCode, body }));
|
|
9
9
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
10
10
|
if (Error.captureStackTrace) {
|
|
@@ -14,6 +14,9 @@ class phenomlError extends Error {
|
|
|
14
14
|
this.statusCode = statusCode;
|
|
15
15
|
this.body = body;
|
|
16
16
|
this.rawResponse = rawResponse;
|
|
17
|
+
if (cause != null) {
|
|
18
|
+
this.cause = cause;
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
exports.phenomlError = phenomlError;
|
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.phenomlTimeoutError = void 0;
|
|
5
5
|
class phenomlTimeoutError extends Error {
|
|
6
|
-
constructor(message) {
|
|
6
|
+
constructor(message, opts) {
|
|
7
7
|
super(message);
|
|
8
8
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
9
9
|
if (Error.captureStackTrace) {
|
|
10
10
|
Error.captureStackTrace(this, this.constructor);
|
|
11
11
|
}
|
|
12
12
|
this.name = this.constructor.name;
|
|
13
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.cause) != null) {
|
|
14
|
+
this.cause = opts.cause;
|
|
15
|
+
}
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
exports.phenomlTimeoutError = phenomlTimeoutError;
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "13.1.0";
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OAuthAuthProvider } from "./auth/OAuthAuthProvider.mjs";
|
|
2
2
|
import * as core from "./core/index.mjs";
|
|
3
3
|
import type * as environments from "./environments.mjs";
|
|
4
|
+
export type AuthOption = false | core.AuthProvider["getAuthRequest"] | core.AuthProvider | OAuthAuthProvider.AuthOptions;
|
|
4
5
|
export type BaseClientOptions = {
|
|
5
6
|
environment?: core.Supplier<environments.phenomlEnvironment | string>;
|
|
6
7
|
/** Specify a custom URL to connect the client to. */
|
|
@@ -16,6 +17,8 @@ export type BaseClientOptions = {
|
|
|
16
17
|
fetcher?: core.FetchFunction;
|
|
17
18
|
/** Configure logging for the client. */
|
|
18
19
|
logging?: core.logging.LogConfig | core.logging.Logger;
|
|
20
|
+
/** Override auth. Pass false to disable, a function returning auth headers, an AuthProvider, or auth options. */
|
|
21
|
+
auth?: AuthOption;
|
|
19
22
|
} & OAuthAuthProvider.AuthOptions;
|
|
20
23
|
export interface BaseRequestOptions {
|
|
21
24
|
/** The maximum time to wait for a response in seconds. */
|
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "phenoml",
|
|
9
|
-
"X-Fern-SDK-Version": "
|
|
10
|
-
"User-Agent": "phenoml/
|
|
9
|
+
"X-Fern-SDK-Version": "13.1.0",
|
|
10
|
+
"User-Agent": "phenoml/13.1.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -16,6 +16,21 @@ export function normalizeClientOptions(options) {
|
|
|
16
16
|
export function normalizeClientOptionsWithAuth(options) {
|
|
17
17
|
var _a;
|
|
18
18
|
const normalized = normalizeClientOptions(options);
|
|
19
|
+
if (options.auth === false) {
|
|
20
|
+
normalized.authProvider = new core.NoOpAuthProvider();
|
|
21
|
+
return normalized;
|
|
22
|
+
}
|
|
23
|
+
if (options.auth != null) {
|
|
24
|
+
if (typeof options.auth === "function") {
|
|
25
|
+
normalized.authProvider = { getAuthRequest: options.auth };
|
|
26
|
+
return normalized;
|
|
27
|
+
}
|
|
28
|
+
if (core.isAuthProvider(options.auth)) {
|
|
29
|
+
normalized.authProvider = options.auth;
|
|
30
|
+
return normalized;
|
|
31
|
+
}
|
|
32
|
+
Object.assign(normalized, options.auth);
|
|
33
|
+
}
|
|
19
34
|
const normalizedWithNoOpAuthProvider = withNoOpAuthProvider(normalized);
|
|
20
35
|
(_a = normalized.authProvider) !== null && _a !== void 0 ? _a : (normalized.authProvider = OAuthAuthProvider.createInstance(normalizedWithNoOpAuthProvider));
|
|
21
36
|
return normalized;
|
|
@@ -66,7 +66,7 @@ export class AgentClient {
|
|
|
66
66
|
method: "POST",
|
|
67
67
|
headers: _headers,
|
|
68
68
|
contentType: "application/json",
|
|
69
|
-
|
|
69
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
70
70
|
requestType: "json",
|
|
71
71
|
body: request,
|
|
72
72
|
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,
|
|
@@ -130,7 +130,11 @@ export class AgentClient {
|
|
|
130
130
|
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/list"),
|
|
131
131
|
method: "GET",
|
|
132
132
|
headers: _headers,
|
|
133
|
-
|
|
133
|
+
queryString: core.url
|
|
134
|
+
.queryBuilder()
|
|
135
|
+
.addMany(_queryParams)
|
|
136
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
137
|
+
.build(),
|
|
134
138
|
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,
|
|
135
139
|
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,
|
|
136
140
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -185,7 +189,7 @@ export class AgentClient {
|
|
|
185
189
|
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)}`),
|
|
186
190
|
method: "GET",
|
|
187
191
|
headers: _headers,
|
|
188
|
-
|
|
192
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
189
193
|
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,
|
|
190
194
|
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,
|
|
191
195
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -249,7 +253,7 @@ export class AgentClient {
|
|
|
249
253
|
method: "PUT",
|
|
250
254
|
headers: _headers,
|
|
251
255
|
contentType: "application/json",
|
|
252
|
-
|
|
256
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
253
257
|
requestType: "json",
|
|
254
258
|
body: request,
|
|
255
259
|
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,
|
|
@@ -310,7 +314,7 @@ export class AgentClient {
|
|
|
310
314
|
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)}`),
|
|
311
315
|
method: "DELETE",
|
|
312
316
|
headers: _headers,
|
|
313
|
-
|
|
317
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
314
318
|
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
319
|
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
320
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -381,7 +385,7 @@ export class AgentClient {
|
|
|
381
385
|
method: "PATCH",
|
|
382
386
|
headers: _headers,
|
|
383
387
|
contentType: "application/json+patch",
|
|
384
|
-
|
|
388
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
385
389
|
requestType: "json",
|
|
386
390
|
body: request,
|
|
387
391
|
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,
|
|
@@ -452,7 +456,7 @@ export class AgentClient {
|
|
|
452
456
|
method: "POST",
|
|
453
457
|
headers: _headers,
|
|
454
458
|
contentType: "application/json",
|
|
455
|
-
|
|
459
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
456
460
|
requestType: "json",
|
|
457
461
|
body: _body,
|
|
458
462
|
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,
|
|
@@ -507,7 +511,7 @@ export class AgentClient {
|
|
|
507
511
|
method: "POST",
|
|
508
512
|
headers: _headers,
|
|
509
513
|
contentType: "application/json",
|
|
510
|
-
|
|
514
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
511
515
|
requestType: "json",
|
|
512
516
|
body: _body,
|
|
513
517
|
responseType: "sse",
|
|
@@ -588,7 +592,11 @@ export class AgentClient {
|
|
|
588
592
|
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/chat/messages"),
|
|
589
593
|
method: "GET",
|
|
590
594
|
headers: _headers,
|
|
591
|
-
|
|
595
|
+
queryString: core.url
|
|
596
|
+
.queryBuilder()
|
|
597
|
+
.addMany(_queryParams)
|
|
598
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
599
|
+
.build(),
|
|
592
600
|
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,
|
|
593
601
|
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,
|
|
594
602
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -49,7 +49,7 @@ export class PromptsClient {
|
|
|
49
49
|
method: "POST",
|
|
50
50
|
headers: _headers,
|
|
51
51
|
contentType: "application/json",
|
|
52
|
-
|
|
52
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
53
53
|
requestType: "json",
|
|
54
54
|
body: request,
|
|
55
55
|
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,7 +106,7 @@ export class PromptsClient {
|
|
|
106
106
|
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"),
|
|
107
107
|
method: "GET",
|
|
108
108
|
headers: _headers,
|
|
109
|
-
|
|
109
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
110
110
|
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,
|
|
111
111
|
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,
|
|
112
112
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -161,7 +161,7 @@ export class PromptsClient {
|
|
|
161
161
|
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)}`),
|
|
162
162
|
method: "GET",
|
|
163
163
|
headers: _headers,
|
|
164
|
-
|
|
164
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
165
165
|
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,
|
|
166
166
|
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,
|
|
167
167
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -221,7 +221,7 @@ export class PromptsClient {
|
|
|
221
221
|
method: "PUT",
|
|
222
222
|
headers: _headers,
|
|
223
223
|
contentType: "application/json",
|
|
224
|
-
|
|
224
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
225
225
|
requestType: "json",
|
|
226
226
|
body: request,
|
|
227
227
|
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,
|
|
@@ -282,7 +282,7 @@ export class PromptsClient {
|
|
|
282
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/prompts/${core.url.encodePathParam(id)}`),
|
|
283
283
|
method: "DELETE",
|
|
284
284
|
headers: _headers,
|
|
285
|
-
|
|
285
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
286
286
|
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
287
|
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
288
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -353,7 +353,7 @@ export class PromptsClient {
|
|
|
353
353
|
method: "PATCH",
|
|
354
354
|
headers: _headers,
|
|
355
355
|
contentType: "application/json+patch",
|
|
356
|
-
|
|
356
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
357
357
|
requestType: "json",
|
|
358
358
|
body: request,
|
|
359
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,
|
|
@@ -412,7 +412,7 @@ export class PromptsClient {
|
|
|
412
412
|
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"),
|
|
413
413
|
method: "POST",
|
|
414
414
|
headers: _headers,
|
|
415
|
-
|
|
415
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
416
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,
|
|
417
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,
|
|
418
418
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -47,7 +47,7 @@ export class AuthClient {
|
|
|
47
47
|
method: "POST",
|
|
48
48
|
headers: _headers,
|
|
49
49
|
contentType: "application/json",
|
|
50
|
-
|
|
50
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
51
51
|
requestType: "json",
|
|
52
52
|
body: request,
|
|
53
53
|
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,
|
|
@@ -47,7 +47,7 @@ export class CohortClient {
|
|
|
47
47
|
method: "POST",
|
|
48
48
|
headers: _headers,
|
|
49
49
|
contentType: "application/json",
|
|
50
|
-
|
|
50
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
51
51
|
requestType: "json",
|
|
52
52
|
body: request,
|
|
53
53
|
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,
|