phenoml 5.3.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.
Files changed (100) hide show
  1. package/dist/cjs/BaseClient.d.ts +2 -0
  2. package/dist/cjs/Client.js +2 -2
  3. package/dist/cjs/api/resources/agent/client/Client.js +16 -8
  4. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +14 -7
  5. package/dist/cjs/api/resources/agent/types/ChatMessageTemplate.d.ts +0 -2
  6. package/dist/cjs/api/resources/agent/types/ChatSessionTemplate.d.ts +0 -2
  7. package/dist/cjs/api/resources/cohort/client/Client.js +2 -1
  8. package/dist/cjs/api/resources/construe/client/Client.d.ts +7 -8
  9. package/dist/cjs/api/resources/construe/client/Client.js +33 -22
  10. package/dist/cjs/api/resources/construe/client/requests/UploadRequest.d.ts +55 -0
  11. package/dist/cjs/api/resources/construe/client/requests/UploadRequest.js +12 -0
  12. package/dist/cjs/api/resources/construe/client/requests/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/construe/errors/GatewayTimeoutError.d.ts +5 -0
  14. package/dist/cjs/api/resources/construe/errors/GatewayTimeoutError.js +50 -0
  15. package/dist/cjs/api/resources/construe/errors/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/construe/errors/index.js +1 -0
  17. package/dist/cjs/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.ts +2 -0
  18. package/dist/cjs/api/resources/construe/types/ExtractedCodeResult.d.ts +1 -3
  19. package/dist/cjs/api/resources/construe/types/GetCodeSystemDetailResponse.d.ts +4 -4
  20. package/dist/cjs/api/resources/construe/types/GetCodeSystemDetailResponse.js +2 -2
  21. package/dist/cjs/api/resources/construe/types/index.d.ts +0 -3
  22. package/dist/cjs/api/resources/construe/types/index.js +0 -3
  23. package/dist/cjs/api/resources/fhir/client/Client.js +12 -6
  24. package/dist/cjs/api/resources/fhirProvider/client/Client.js +14 -7
  25. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +0 -2
  26. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +10 -5
  27. package/dist/cjs/api/resources/summary/client/Client.js +12 -6
  28. package/dist/cjs/api/resources/summary/types/SummaryTemplate.d.ts +0 -1
  29. package/dist/cjs/api/resources/tools/client/Client.js +8 -4
  30. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +8 -4
  31. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +8 -4
  32. package/dist/cjs/api/resources/tools/types/McpServerResponse.d.ts +0 -2
  33. package/dist/cjs/api/resources/tools/types/McpServerToolResponse.d.ts +0 -2
  34. package/dist/cjs/api/resources/workflows/client/Client.js +12 -6
  35. package/dist/cjs/api/resources/workflows/types/WorkflowDefinition.d.ts +0 -2
  36. package/dist/cjs/api/resources/workflows/types/WorkflowResponse.d.ts +0 -2
  37. package/dist/cjs/core/fetcher/Fetcher.d.ts +2 -1
  38. package/dist/cjs/core/fetcher/Fetcher.js +4 -4
  39. package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
  40. package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
  41. package/dist/cjs/core/headers.js +6 -4
  42. package/dist/cjs/version.d.ts +1 -1
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/esm/BaseClient.d.mts +2 -0
  45. package/dist/esm/Client.mjs +2 -2
  46. package/dist/esm/api/resources/agent/client/Client.mjs +16 -8
  47. package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +14 -7
  48. package/dist/esm/api/resources/agent/types/ChatMessageTemplate.d.mts +0 -2
  49. package/dist/esm/api/resources/agent/types/ChatSessionTemplate.d.mts +0 -2
  50. package/dist/esm/api/resources/cohort/client/Client.mjs +2 -1
  51. package/dist/esm/api/resources/construe/client/Client.d.mts +7 -8
  52. package/dist/esm/api/resources/construe/client/Client.mjs +33 -22
  53. package/dist/esm/api/resources/construe/client/requests/UploadRequest.d.mts +55 -0
  54. package/dist/esm/api/resources/construe/client/requests/UploadRequest.mjs +9 -0
  55. package/dist/esm/api/resources/construe/client/requests/index.d.mts +1 -0
  56. package/dist/esm/api/resources/construe/errors/GatewayTimeoutError.d.mts +5 -0
  57. package/dist/esm/api/resources/construe/errors/GatewayTimeoutError.mjs +13 -0
  58. package/dist/esm/api/resources/construe/errors/index.d.mts +1 -0
  59. package/dist/esm/api/resources/construe/errors/index.mjs +1 -0
  60. package/dist/esm/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.mts +2 -0
  61. package/dist/esm/api/resources/construe/types/ExtractedCodeResult.d.mts +1 -3
  62. package/dist/esm/api/resources/construe/types/GetCodeSystemDetailResponse.d.mts +4 -4
  63. package/dist/esm/api/resources/construe/types/GetCodeSystemDetailResponse.mjs +2 -2
  64. package/dist/esm/api/resources/construe/types/index.d.mts +0 -3
  65. package/dist/esm/api/resources/construe/types/index.mjs +0 -3
  66. package/dist/esm/api/resources/fhir/client/Client.mjs +12 -6
  67. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +14 -7
  68. package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +0 -2
  69. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +10 -5
  70. package/dist/esm/api/resources/summary/client/Client.mjs +12 -6
  71. package/dist/esm/api/resources/summary/types/SummaryTemplate.d.mts +0 -1
  72. package/dist/esm/api/resources/tools/client/Client.mjs +8 -4
  73. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +8 -4
  74. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +8 -4
  75. package/dist/esm/api/resources/tools/types/McpServerResponse.d.mts +0 -2
  76. package/dist/esm/api/resources/tools/types/McpServerToolResponse.d.mts +0 -2
  77. package/dist/esm/api/resources/workflows/client/Client.mjs +12 -6
  78. package/dist/esm/api/resources/workflows/types/WorkflowDefinition.d.mts +0 -2
  79. package/dist/esm/api/resources/workflows/types/WorkflowResponse.d.mts +0 -2
  80. package/dist/esm/core/fetcher/Fetcher.d.mts +2 -1
  81. package/dist/esm/core/fetcher/Fetcher.mjs +4 -4
  82. package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
  83. package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
  84. package/dist/esm/core/headers.mjs +6 -4
  85. package/dist/esm/version.d.mts +1 -1
  86. package/dist/esm/version.mjs +1 -1
  87. package/package.json +2 -2
  88. package/reference.md +6 -8
  89. package/dist/cjs/api/resources/construe/types/UploadRequest.d.ts +0 -10
  90. package/dist/cjs/api/resources/construe/types/UploadRequest.js +0 -3
  91. package/dist/cjs/api/resources/construe/types/UploadRequestCsv.d.ts +0 -32
  92. package/dist/cjs/api/resources/construe/types/UploadRequestCsv.js +0 -3
  93. package/dist/cjs/api/resources/construe/types/UploadRequestJson.d.ts +0 -40
  94. package/dist/cjs/api/resources/construe/types/UploadRequestJson.js +0 -3
  95. package/dist/esm/api/resources/construe/types/UploadRequest.d.mts +0 -10
  96. package/dist/esm/api/resources/construe/types/UploadRequest.mjs +0 -2
  97. package/dist/esm/api/resources/construe/types/UploadRequestCsv.d.mts +0 -32
  98. package/dist/esm/api/resources/construe/types/UploadRequestCsv.mjs +0 -2
  99. package/dist/esm/api/resources/construe/types/UploadRequestJson.d.mts +0 -40
  100. package/dist/esm/api/resources/construe/types/UploadRequestJson.mjs +0 -2
@@ -0,0 +1,55 @@
1
+ import type * as phenoml from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * name: "CUSTOM_CODES",
6
+ * version: "1.0",
7
+ * format: "csv"
8
+ * }
9
+ */
10
+ export interface UploadRequest {
11
+ /**
12
+ * Name of the code system. Names are case-insensitive and stored uppercase.
13
+ * Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
14
+ * reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
15
+ */
16
+ name: string;
17
+ /** Version of the code system */
18
+ version: string;
19
+ /** Optional revision number */
20
+ revision?: number;
21
+ /** Upload format */
22
+ format: UploadRequest.Format;
23
+ /**
24
+ * The file contents as a base64-encoded string.
25
+ * For CSV format, this is the CSV file contents.
26
+ * For JSON format, this is a base64-encoded JSON array; prefer using 'codes' instead.
27
+ */
28
+ file?: string;
29
+ /** Column name containing codes (required for CSV format) */
30
+ code_col?: string;
31
+ /** Column name containing descriptions (required for CSV format) */
32
+ desc_col?: string;
33
+ /** Optional column name containing long definitions (for CSV format) */
34
+ defn_col?: string;
35
+ /**
36
+ * The codes to upload as a JSON array (JSON format only).
37
+ * This is the preferred way to upload JSON codes, as it avoids unnecessary base64 encoding.
38
+ * If both 'codes' and 'file' are provided, 'codes' takes precedence.
39
+ */
40
+ codes?: phenoml.construe.CodeResponse[];
41
+ /**
42
+ * If true, replaces an existing code system with the same name and version.
43
+ * Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
44
+ * When false (default), uploading a duplicate returns 409 Conflict.
45
+ */
46
+ replace?: boolean;
47
+ }
48
+ export declare namespace UploadRequest {
49
+ /** Upload format */
50
+ const Format: {
51
+ readonly Csv: "csv";
52
+ readonly Json: "json";
53
+ };
54
+ type Format = (typeof Format)[keyof typeof Format];
55
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.UploadRequest = void 0;
5
+ var UploadRequest;
6
+ (function (UploadRequest) {
7
+ /** Upload format */
8
+ UploadRequest.Format = {
9
+ Csv: "csv",
10
+ Json: "json",
11
+ };
12
+ })(UploadRequest || (exports.UploadRequest = UploadRequest = {}));
@@ -6,3 +6,4 @@ export type { GetConstrueCodesCodesystemSearchSemanticRequest } from "./GetConst
6
6
  export type { GetConstrueCodesCodesystemSearchTextRequest } from "./GetConstrueCodesCodesystemSearchTextRequest.js";
7
7
  export type { GetConstrueCodesSystemsCodesystemExportRequest } from "./GetConstrueCodesSystemsCodesystemExportRequest.js";
8
8
  export type { GetConstrueCodesSystemsCodesystemRequest } from "./GetConstrueCodesSystemsCodesystemRequest.js";
9
+ export type { UploadRequest } from "./UploadRequest.js";
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as errors from "../../../../errors/index.js";
3
+ export declare class GatewayTimeoutError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.GatewayTimeoutError = void 0;
38
+ const errors = __importStar(require("../../../../errors/index.js"));
39
+ class GatewayTimeoutError extends errors.phenomlError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "GatewayTimeoutError",
43
+ statusCode: 504,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, GatewayTimeoutError.prototype);
48
+ }
49
+ }
50
+ exports.GatewayTimeoutError = GatewayTimeoutError;
@@ -2,6 +2,7 @@ export * from "./BadRequestError.js";
2
2
  export * from "./ConflictError.js";
3
3
  export * from "./FailedDependencyError.js";
4
4
  export * from "./ForbiddenError.js";
5
+ export * from "./GatewayTimeoutError.js";
5
6
  export * from "./InternalServerError.js";
6
7
  export * from "./NotFoundError.js";
7
8
  export * from "./NotImplementedError.js";
@@ -18,6 +18,7 @@ __exportStar(require("./BadRequestError.js"), exports);
18
18
  __exportStar(require("./ConflictError.js"), exports);
19
19
  __exportStar(require("./FailedDependencyError.js"), exports);
20
20
  __exportStar(require("./ForbiddenError.js"), exports);
21
+ __exportStar(require("./GatewayTimeoutError.js"), exports);
21
22
  __exportStar(require("./InternalServerError.js"), exports);
22
23
  __exportStar(require("./NotFoundError.js"), exports);
23
24
  __exportStar(require("./NotImplementedError.js"), exports);
@@ -1,3 +1,5 @@
1
1
  export interface ConstrueUploadCodeSystemResponse {
2
2
  status?: string;
3
+ name?: string;
4
+ version?: string;
3
5
  }
@@ -6,10 +6,8 @@ export interface ExtractedCodeResult {
6
6
  description: string;
7
7
  /** Whether the code passed validation. Always true unless include_invalid is set to true, in which case invalid codes will have this set to false. */
8
8
  valid: boolean;
9
- /** Long description of the code */
10
- longDescription?: string;
11
9
  /** Explanation for why this code was extracted (if include_rationale is true) */
12
- rationale?: string;
10
+ reason?: string;
13
11
  /**
14
12
  * Whether this code is an ancestor (parent) of an extracted code rather than directly extracted.
15
13
  * Only present when include_ancestors is true.
@@ -9,9 +9,9 @@ export interface GetCodeSystemDetailResponse {
9
9
  builtin: boolean;
10
10
  /**
11
11
  * Processing status of the code system.
12
- * - "processing": embeddings are being generated (async upload in progress)
12
+ * - "processing": embeddings are being generated
13
13
  * - "ready": code system is ready for use
14
- * - "failed": async processing failed (re-upload with replace=true to retry)
14
+ * - "failed": processing failed (re-upload with replace=true to retry)
15
15
  */
16
16
  status: GetCodeSystemDetailResponse.Status;
17
17
  /** When the code system was created */
@@ -22,9 +22,9 @@ export interface GetCodeSystemDetailResponse {
22
22
  export declare namespace GetCodeSystemDetailResponse {
23
23
  /**
24
24
  * Processing status of the code system.
25
- * - "processing": embeddings are being generated (async upload in progress)
25
+ * - "processing": embeddings are being generated
26
26
  * - "ready": code system is ready for use
27
- * - "failed": async processing failed (re-upload with replace=true to retry)
27
+ * - "failed": processing failed (re-upload with replace=true to retry)
28
28
  */
29
29
  const Status: {
30
30
  readonly Processing: "processing";
@@ -6,9 +6,9 @@ var GetCodeSystemDetailResponse;
6
6
  (function (GetCodeSystemDetailResponse) {
7
7
  /**
8
8
  * Processing status of the code system.
9
- * - "processing": embeddings are being generated (async upload in progress)
9
+ * - "processing": embeddings are being generated
10
10
  * - "ready": code system is ready for use
11
- * - "failed": async processing failed (re-upload with replace=true to retry)
11
+ * - "failed": processing failed (re-upload with replace=true to retry)
12
12
  */
13
13
  GetCodeSystemDetailResponse.Status = {
14
14
  Processing: "processing",
@@ -17,6 +17,3 @@ export * from "./SemanticSearchResponse.js";
17
17
  export * from "./SemanticSearchResult.js";
18
18
  export * from "./TextSearchResponse.js";
19
19
  export * from "./TextSearchResult.js";
20
- export * from "./UploadRequest.js";
21
- export * from "./UploadRequestCsv.js";
22
- export * from "./UploadRequestJson.js";
@@ -33,6 +33,3 @@ __exportStar(require("./SemanticSearchResponse.js"), exports);
33
33
  __exportStar(require("./SemanticSearchResult.js"), exports);
34
34
  __exportStar(require("./TextSearchResponse.js"), exports);
35
35
  __exportStar(require("./TextSearchResult.js"), exports);
36
- __exportStar(require("./UploadRequest.js"), exports);
37
- __exportStar(require("./UploadRequestCsv.js"), exports);
38
- __exportStar(require("./UploadRequestJson.js"), exports);
@@ -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 };
@@ -79,7 +79,7 @@ class FhirProvider {
79
79
  }
80
80
  __create(request, requestOptions) {
81
81
  return __awaiter(this, void 0, void 0, function* () {
82
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
82
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
83
83
  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);
84
84
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
85
85
  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, "fhir-provider"),
@@ -92,6 +92,7 @@ class FhirProvider {
92
92
  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,
93
93
  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,
94
94
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
95
96
  });
96
97
  if (_response.ok) {
97
98
  return {
@@ -153,7 +154,7 @@ class FhirProvider {
153
154
  }
154
155
  __list(requestOptions) {
155
156
  return __awaiter(this, void 0, void 0, function* () {
156
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
157
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
157
158
  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);
158
159
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
159
160
  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, "fhir-provider/list"),
@@ -163,6 +164,7 @@ class FhirProvider {
163
164
  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,
164
165
  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,
165
166
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
167
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
166
168
  });
167
169
  if (_response.ok) {
168
170
  return {
@@ -222,7 +224,7 @@ class FhirProvider {
222
224
  }
223
225
  __get(fhirProviderId, requestOptions) {
224
226
  return __awaiter(this, void 0, void 0, function* () {
225
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
227
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
226
228
  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);
227
229
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
228
230
  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, `fhir-provider/${core.url.encodePathParam(fhirProviderId)}`),
@@ -232,6 +234,7 @@ class FhirProvider {
232
234
  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,
233
235
  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,
234
236
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
237
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
235
238
  });
236
239
  if (_response.ok) {
237
240
  return {
@@ -293,7 +296,7 @@ class FhirProvider {
293
296
  }
294
297
  __delete(fhirProviderId, requestOptions) {
295
298
  return __awaiter(this, void 0, void 0, function* () {
296
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
299
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
297
300
  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);
298
301
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
299
302
  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, `fhir-provider/${core.url.encodePathParam(fhirProviderId)}`),
@@ -303,6 +306,7 @@ class FhirProvider {
303
306
  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,
304
307
  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,
305
308
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
309
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
306
310
  });
307
311
  if (_response.ok) {
308
312
  return {
@@ -371,7 +375,7 @@ class FhirProvider {
371
375
  }
372
376
  __addAuthConfig(fhirProviderId, request, requestOptions) {
373
377
  return __awaiter(this, void 0, void 0, function* () {
374
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
378
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
375
379
  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);
376
380
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
377
381
  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, `fhir-provider/${core.url.encodePathParam(fhirProviderId)}/add-auth-config`),
@@ -384,6 +388,7 @@ class FhirProvider {
384
388
  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,
385
389
  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,
386
390
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
391
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
387
392
  });
388
393
  if (_response.ok) {
389
394
  return {
@@ -457,7 +462,7 @@ class FhirProvider {
457
462
  }
458
463
  __setActiveAuthConfig(fhirProviderId, request, requestOptions) {
459
464
  return __awaiter(this, void 0, void 0, function* () {
460
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
465
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
461
466
  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);
462
467
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
463
468
  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, `fhir-provider/${core.url.encodePathParam(fhirProviderId)}/set-active-auth-config`),
@@ -470,6 +475,7 @@ class FhirProvider {
470
475
  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,
471
476
  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,
472
477
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
478
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
473
479
  });
474
480
  if (_response.ok) {
475
481
  return {
@@ -540,7 +546,7 @@ class FhirProvider {
540
546
  }
541
547
  __removeAuthConfig(fhirProviderId, request, requestOptions) {
542
548
  return __awaiter(this, void 0, void 0, function* () {
543
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
549
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
544
550
  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);
545
551
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
546
552
  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, `fhir-provider/${core.url.encodePathParam(fhirProviderId)}/remove-auth-config`),
@@ -553,6 +559,7 @@ class FhirProvider {
553
559
  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,
554
560
  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,
555
561
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
562
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
556
563
  });
557
564
  if (_response.ok) {
558
565
  return {
@@ -2,8 +2,6 @@ import type * as phenoml from "../../../index.js";
2
2
  export interface FhirProviderTemplate {
3
3
  /** Unique identifier for the FHIR provider */
4
4
  id?: string;
5
- /** ID of the user who owns this FHIR provider */
6
- user_id?: string;
7
5
  /** Display name for the FHIR provider */
8
6
  name?: string;
9
7
  /** Optional description of the FHIR provider */
@@ -75,7 +75,7 @@ class Lang2Fhir {
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, "lang2fhir/create"),
@@ -88,6 +88,7 @@ class Lang2Fhir {
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 };
@@ -147,7 +148,7 @@ class Lang2Fhir {
147
148
  }
148
149
  __createMulti(request, requestOptions) {
149
150
  return __awaiter(this, void 0, void 0, function* () {
150
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
151
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
151
152
  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);
152
153
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
153
154
  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, "lang2fhir/create/multi"),
@@ -160,6 +161,7 @@ class Lang2Fhir {
160
161
  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,
161
162
  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,
162
163
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
164
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
163
165
  });
164
166
  if (_response.ok) {
165
167
  return {
@@ -228,7 +230,7 @@ class Lang2Fhir {
228
230
  }
229
231
  __search(request, requestOptions) {
230
232
  return __awaiter(this, void 0, void 0, function* () {
231
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
233
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
232
234
  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);
233
235
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
234
236
  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, "lang2fhir/search"),
@@ -241,6 +243,7 @@ class Lang2Fhir {
241
243
  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,
242
244
  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,
243
245
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
246
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
244
247
  });
245
248
  if (_response.ok) {
246
249
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -310,7 +313,7 @@ class Lang2Fhir {
310
313
  }
311
314
  __uploadProfile(request, requestOptions) {
312
315
  return __awaiter(this, void 0, void 0, function* () {
313
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
316
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
314
317
  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);
315
318
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
316
319
  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, "lang2fhir/profile/upload"),
@@ -323,6 +326,7 @@ class Lang2Fhir {
323
326
  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,
324
327
  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,
325
328
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
329
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
326
330
  });
327
331
  if (_response.ok) {
328
332
  return {
@@ -387,7 +391,7 @@ class Lang2Fhir {
387
391
  }
388
392
  __document(request, requestOptions) {
389
393
  return __awaiter(this, void 0, void 0, function* () {
390
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
394
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
391
395
  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);
392
396
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
393
397
  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, "lang2fhir/document"),
@@ -400,6 +404,7 @@ class Lang2Fhir {
400
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,
401
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,
402
406
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
407
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
403
408
  });
404
409
  if (_response.ok) {
405
410
  return { data: _response.body, rawResponse: _response.rawResponse };