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.mjs";
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,9 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var UploadRequest;
3
+ (function (UploadRequest) {
4
+ /** Upload format */
5
+ UploadRequest.Format = {
6
+ Csv: "csv",
7
+ Json: "json",
8
+ };
9
+ })(UploadRequest || (UploadRequest = {}));
@@ -6,3 +6,4 @@ export type { GetConstrueCodesCodesystemSearchSemanticRequest } from "./GetConst
6
6
  export type { GetConstrueCodesCodesystemSearchTextRequest } from "./GetConstrueCodesCodesystemSearchTextRequest.mjs";
7
7
  export type { GetConstrueCodesSystemsCodesystemExportRequest } from "./GetConstrueCodesSystemsCodesystemExportRequest.mjs";
8
8
  export type { GetConstrueCodesSystemsCodesystemRequest } from "./GetConstrueCodesSystemsCodesystemRequest.mjs";
9
+ export type { UploadRequest } from "./UploadRequest.mjs";
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.mjs";
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export declare class GatewayTimeoutError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export class GatewayTimeoutError extends errors.phenomlError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "GatewayTimeoutError",
7
+ statusCode: 504,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, GatewayTimeoutError.prototype);
12
+ }
13
+ }
@@ -2,6 +2,7 @@ export * from "./BadRequestError.mjs";
2
2
  export * from "./ConflictError.mjs";
3
3
  export * from "./FailedDependencyError.mjs";
4
4
  export * from "./ForbiddenError.mjs";
5
+ export * from "./GatewayTimeoutError.mjs";
5
6
  export * from "./InternalServerError.mjs";
6
7
  export * from "./NotFoundError.mjs";
7
8
  export * from "./NotImplementedError.mjs";
@@ -2,6 +2,7 @@ export * from "./BadRequestError.mjs";
2
2
  export * from "./ConflictError.mjs";
3
3
  export * from "./FailedDependencyError.mjs";
4
4
  export * from "./ForbiddenError.mjs";
5
+ export * from "./GatewayTimeoutError.mjs";
5
6
  export * from "./InternalServerError.mjs";
6
7
  export * from "./NotFoundError.mjs";
7
8
  export * from "./NotImplementedError.mjs";
@@ -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";
@@ -3,9 +3,9 @@ export var GetCodeSystemDetailResponse;
3
3
  (function (GetCodeSystemDetailResponse) {
4
4
  /**
5
5
  * Processing status of the code system.
6
- * - "processing": embeddings are being generated (async upload in progress)
6
+ * - "processing": embeddings are being generated
7
7
  * - "ready": code system is ready for use
8
- * - "failed": async processing failed (re-upload with replace=true to retry)
8
+ * - "failed": processing failed (re-upload with replace=true to retry)
9
9
  */
10
10
  GetCodeSystemDetailResponse.Status = {
11
11
  Processing: "processing",
@@ -17,6 +17,3 @@ export * from "./SemanticSearchResponse.mjs";
17
17
  export * from "./SemanticSearchResult.mjs";
18
18
  export * from "./TextSearchResponse.mjs";
19
19
  export * from "./TextSearchResult.mjs";
20
- export * from "./UploadRequest.mjs";
21
- export * from "./UploadRequestCsv.mjs";
22
- export * from "./UploadRequestJson.mjs";
@@ -17,6 +17,3 @@ export * from "./SemanticSearchResponse.mjs";
17
17
  export * from "./SemanticSearchResult.mjs";
18
18
  export * from "./TextSearchResponse.mjs";
19
19
  export * from "./TextSearchResult.mjs";
20
- export * from "./UploadRequest.mjs";
21
- export * from "./UploadRequestCsv.mjs";
22
- export * from "./UploadRequestJson.mjs";
@@ -51,7 +51,7 @@ export class Fhir {
51
51
  }
52
52
  __search(fhirProviderId_1, fhirPath_1) {
53
53
  return __awaiter(this, arguments, void 0, function* (fhirProviderId, fhirPath, request = {}, requestOptions) {
54
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
54
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
55
55
  const { query_parameters: queryParameters, "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, } = request;
56
56
  const _queryParams = {};
57
57
  if (queryParameters != null) {
@@ -70,6 +70,7 @@ export class Fhir {
70
70
  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,
71
71
  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,
72
72
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
73
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
73
74
  });
74
75
  if (_response.ok) {
75
76
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -156,7 +157,7 @@ export class Fhir {
156
157
  }
157
158
  __create(fhirProviderId, fhirPath, request, requestOptions) {
158
159
  return __awaiter(this, void 0, void 0, function* () {
159
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
160
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
160
161
  const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
161
162
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
162
163
  Authorization: yield this._getAuthorizationHeader(),
@@ -174,6 +175,7 @@ export class Fhir {
174
175
  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,
175
176
  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,
176
177
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
178
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
177
179
  });
178
180
  if (_response.ok) {
179
181
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -260,7 +262,7 @@ export class Fhir {
260
262
  }
261
263
  __upsert(fhirProviderId, fhirPath, request, requestOptions) {
262
264
  return __awaiter(this, void 0, void 0, function* () {
263
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
265
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
264
266
  const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
265
267
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
266
268
  Authorization: yield this._getAuthorizationHeader(),
@@ -278,6 +280,7 @@ export class Fhir {
278
280
  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,
279
281
  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,
280
282
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
283
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
281
284
  });
282
285
  if (_response.ok) {
283
286
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -350,7 +353,7 @@ export class Fhir {
350
353
  }
351
354
  __delete(fhirProviderId_1, fhirPath_1) {
352
355
  return __awaiter(this, arguments, void 0, function* (fhirProviderId, fhirPath, request = {}, requestOptions) {
353
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
356
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
354
357
  const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider } = request;
355
358
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
356
359
  Authorization: yield this._getAuthorizationHeader(),
@@ -365,6 +368,7 @@ export class Fhir {
365
368
  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,
366
369
  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,
367
370
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
371
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
368
372
  });
369
373
  if (_response.ok) {
370
374
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -500,7 +504,7 @@ export class Fhir {
500
504
  }
501
505
  __patch(fhirProviderId, fhirPath, request, requestOptions) {
502
506
  return __awaiter(this, void 0, void 0, function* () {
503
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
507
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
504
508
  const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
505
509
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
506
510
  Authorization: yield this._getAuthorizationHeader(),
@@ -518,6 +522,7 @@ export class Fhir {
518
522
  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,
519
523
  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,
520
524
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
525
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
521
526
  });
522
527
  if (_response.ok) {
523
528
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -620,7 +625,7 @@ export class Fhir {
620
625
  }
621
626
  __executeBundle(fhirProviderId, request, requestOptions) {
622
627
  return __awaiter(this, void 0, void 0, function* () {
623
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
628
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
624
629
  const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
625
630
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
626
631
  Authorization: yield this._getAuthorizationHeader(),
@@ -638,6 +643,7 @@ export class Fhir {
638
643
  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,
639
644
  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,
640
645
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
646
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
641
647
  });
642
648
  if (_response.ok) {
643
649
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -43,7 +43,7 @@ export class FhirProvider {
43
43
  }
44
44
  __create(request, requestOptions) {
45
45
  return __awaiter(this, void 0, void 0, function* () {
46
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
46
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
47
47
  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);
48
48
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
49
49
  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"),
@@ -56,6 +56,7 @@ export class FhirProvider {
56
56
  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,
57
57
  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,
58
58
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
59
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
59
60
  });
60
61
  if (_response.ok) {
61
62
  return {
@@ -117,7 +118,7 @@ export class FhirProvider {
117
118
  }
118
119
  __list(requestOptions) {
119
120
  return __awaiter(this, void 0, void 0, function* () {
120
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
121
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
121
122
  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);
122
123
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
123
124
  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"),
@@ -127,6 +128,7 @@ export class FhirProvider {
127
128
  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,
128
129
  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,
129
130
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
131
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
130
132
  });
131
133
  if (_response.ok) {
132
134
  return {
@@ -186,7 +188,7 @@ export class FhirProvider {
186
188
  }
187
189
  __get(fhirProviderId, requestOptions) {
188
190
  return __awaiter(this, void 0, void 0, function* () {
189
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
191
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
190
192
  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);
191
193
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
192
194
  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)}`),
@@ -196,6 +198,7 @@ export class FhirProvider {
196
198
  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,
197
199
  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,
198
200
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
201
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
199
202
  });
200
203
  if (_response.ok) {
201
204
  return {
@@ -257,7 +260,7 @@ export class FhirProvider {
257
260
  }
258
261
  __delete(fhirProviderId, requestOptions) {
259
262
  return __awaiter(this, void 0, void 0, function* () {
260
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
263
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
261
264
  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);
262
265
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
263
266
  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)}`),
@@ -267,6 +270,7 @@ export class FhirProvider {
267
270
  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,
268
271
  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,
269
272
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
273
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
270
274
  });
271
275
  if (_response.ok) {
272
276
  return {
@@ -335,7 +339,7 @@ export class FhirProvider {
335
339
  }
336
340
  __addAuthConfig(fhirProviderId, request, requestOptions) {
337
341
  return __awaiter(this, void 0, void 0, function* () {
338
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
342
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
339
343
  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);
340
344
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
341
345
  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`),
@@ -348,6 +352,7 @@ export class FhirProvider {
348
352
  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,
349
353
  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,
350
354
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
355
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
351
356
  });
352
357
  if (_response.ok) {
353
358
  return {
@@ -421,7 +426,7 @@ export class FhirProvider {
421
426
  }
422
427
  __setActiveAuthConfig(fhirProviderId, request, requestOptions) {
423
428
  return __awaiter(this, void 0, void 0, function* () {
424
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
429
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
425
430
  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);
426
431
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
427
432
  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`),
@@ -434,6 +439,7 @@ export class FhirProvider {
434
439
  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,
435
440
  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,
436
441
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
442
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
437
443
  });
438
444
  if (_response.ok) {
439
445
  return {
@@ -504,7 +510,7 @@ export class FhirProvider {
504
510
  }
505
511
  __removeAuthConfig(fhirProviderId, request, requestOptions) {
506
512
  return __awaiter(this, void 0, void 0, function* () {
507
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
513
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
508
514
  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);
509
515
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
510
516
  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`),
@@ -517,6 +523,7 @@ export class FhirProvider {
517
523
  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,
518
524
  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,
519
525
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
526
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
520
527
  });
521
528
  if (_response.ok) {
522
529
  return {
@@ -2,8 +2,6 @@ import type * as phenoml from "../../../index.mjs";
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 */
@@ -39,7 +39,7 @@ export class Lang2Fhir {
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, "lang2fhir/create"),
@@ -52,6 +52,7 @@ export class Lang2Fhir {
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 };
@@ -111,7 +112,7 @@ export class Lang2Fhir {
111
112
  }
112
113
  __createMulti(request, requestOptions) {
113
114
  return __awaiter(this, void 0, void 0, function* () {
114
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
115
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
115
116
  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);
116
117
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
117
118
  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"),
@@ -124,6 +125,7 @@ export class Lang2Fhir {
124
125
  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,
125
126
  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,
126
127
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
128
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
127
129
  });
128
130
  if (_response.ok) {
129
131
  return {
@@ -192,7 +194,7 @@ export class Lang2Fhir {
192
194
  }
193
195
  __search(request, requestOptions) {
194
196
  return __awaiter(this, void 0, void 0, function* () {
195
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
197
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
196
198
  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);
197
199
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
198
200
  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"),
@@ -205,6 +207,7 @@ export class Lang2Fhir {
205
207
  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,
206
208
  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,
207
209
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
210
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
208
211
  });
209
212
  if (_response.ok) {
210
213
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -274,7 +277,7 @@ export class Lang2Fhir {
274
277
  }
275
278
  __uploadProfile(request, requestOptions) {
276
279
  return __awaiter(this, void 0, void 0, function* () {
277
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
280
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
278
281
  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);
279
282
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
280
283
  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"),
@@ -287,6 +290,7 @@ export class Lang2Fhir {
287
290
  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,
288
291
  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,
289
292
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
293
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
290
294
  });
291
295
  if (_response.ok) {
292
296
  return {
@@ -351,7 +355,7 @@ export class Lang2Fhir {
351
355
  }
352
356
  __document(request, requestOptions) {
353
357
  return __awaiter(this, void 0, void 0, function* () {
354
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
358
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
355
359
  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);
356
360
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
357
361
  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"),
@@ -364,6 +368,7 @@ export class Lang2Fhir {
364
368
  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,
365
369
  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,
366
370
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
371
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
367
372
  });
368
373
  if (_response.ok) {
369
374
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -33,7 +33,7 @@ export class Summary {
33
33
  }
34
34
  __listTemplates(requestOptions) {
35
35
  return __awaiter(this, void 0, void 0, function* () {
36
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
36
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
37
37
  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);
38
38
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
39
39
  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, "fhir2summary/templates"),
@@ -43,6 +43,7 @@ export class Summary {
43
43
  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,
44
44
  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,
45
45
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
46
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
46
47
  });
47
48
  if (_response.ok) {
48
49
  return {
@@ -104,7 +105,7 @@ export class Summary {
104
105
  }
105
106
  __createTemplate(request, requestOptions) {
106
107
  return __awaiter(this, void 0, void 0, function* () {
107
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
108
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
108
109
  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);
109
110
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
110
111
  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, "fhir2summary/template"),
@@ -117,6 +118,7 @@ export class Summary {
117
118
  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,
118
119
  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,
119
120
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
121
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
120
122
  });
121
123
  if (_response.ok) {
122
124
  return {
@@ -176,7 +178,7 @@ export class Summary {
176
178
  }
177
179
  __getTemplate(id, requestOptions) {
178
180
  return __awaiter(this, void 0, void 0, function* () {
179
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
181
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
180
182
  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);
181
183
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
182
184
  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, `fhir2summary/template/${core.url.encodePathParam(id)}`),
@@ -186,6 +188,7 @@ export class Summary {
186
188
  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
189
  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
190
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
191
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
189
192
  });
190
193
  if (_response.ok) {
191
194
  return {
@@ -254,7 +257,7 @@ export class Summary {
254
257
  }
255
258
  __updateTemplate(id, request, requestOptions) {
256
259
  return __awaiter(this, void 0, void 0, function* () {
257
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
260
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
258
261
  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);
259
262
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
260
263
  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, `fhir2summary/template/${core.url.encodePathParam(id)}`),
@@ -267,6 +270,7 @@ export class Summary {
267
270
  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,
268
271
  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,
269
272
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
273
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
270
274
  });
271
275
  if (_response.ok) {
272
276
  return {
@@ -330,7 +334,7 @@ export class Summary {
330
334
  }
331
335
  __deleteTemplate(id, requestOptions) {
332
336
  return __awaiter(this, void 0, void 0, function* () {
333
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
337
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
334
338
  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);
335
339
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
336
340
  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, `fhir2summary/template/${core.url.encodePathParam(id)}`),
@@ -340,6 +344,7 @@ export class Summary {
340
344
  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,
341
345
  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,
342
346
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
347
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
343
348
  });
344
349
  if (_response.ok) {
345
350
  return {
@@ -409,7 +414,7 @@ export class Summary {
409
414
  }
410
415
  __create(request, requestOptions) {
411
416
  return __awaiter(this, void 0, void 0, function* () {
412
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
417
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
413
418
  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);
414
419
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
415
420
  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, "fhir2summary/create"),
@@ -422,6 +427,7 @@ export class Summary {
422
427
  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,
423
428
  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,
424
429
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
430
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
425
431
  });
426
432
  if (_response.ok) {
427
433
  return {
@@ -1,6 +1,5 @@
1
1
  export interface SummaryTemplate {
2
2
  id?: string;
3
- user_id?: string;
4
3
  name?: string;
5
4
  description?: string;
6
5
  /** Template with {{resource.field}} placeholders */