phenoml 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) 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/cohort/client/Client.js +2 -1
  6. package/dist/cjs/api/resources/construe/client/Client.js +20 -10
  7. package/dist/cjs/api/resources/fhir/client/Client.js +12 -6
  8. package/dist/cjs/api/resources/fhirProvider/client/Client.js +14 -7
  9. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +10 -5
  10. package/dist/cjs/api/resources/summary/client/Client.js +12 -6
  11. package/dist/cjs/api/resources/tools/client/Client.js +8 -4
  12. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +8 -4
  13. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +8 -4
  14. package/dist/cjs/api/resources/workflows/client/Client.js +12 -6
  15. package/dist/cjs/core/fetcher/Fetcher.d.ts +2 -1
  16. package/dist/cjs/core/fetcher/Fetcher.js +4 -4
  17. package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
  18. package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
  19. package/dist/cjs/core/headers.js +6 -4
  20. package/dist/cjs/version.d.ts +1 -1
  21. package/dist/cjs/version.js +1 -1
  22. package/dist/esm/BaseClient.d.mts +2 -0
  23. package/dist/esm/Client.mjs +2 -2
  24. package/dist/esm/api/resources/agent/client/Client.mjs +16 -8
  25. package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +14 -7
  26. package/dist/esm/api/resources/cohort/client/Client.mjs +2 -1
  27. package/dist/esm/api/resources/construe/client/Client.mjs +20 -10
  28. package/dist/esm/api/resources/fhir/client/Client.mjs +12 -6
  29. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +14 -7
  30. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +10 -5
  31. package/dist/esm/api/resources/summary/client/Client.mjs +12 -6
  32. package/dist/esm/api/resources/tools/client/Client.mjs +8 -4
  33. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +8 -4
  34. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +8 -4
  35. package/dist/esm/api/resources/workflows/client/Client.mjs +12 -6
  36. package/dist/esm/core/fetcher/Fetcher.d.mts +2 -1
  37. package/dist/esm/core/fetcher/Fetcher.mjs +4 -4
  38. package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
  39. package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
  40. package/dist/esm/core/headers.mjs +6 -4
  41. package/dist/esm/version.d.mts +1 -1
  42. package/dist/esm/version.mjs +1 -1
  43. package/package.json +2 -2
  44. package/reference.md +1 -1
@@ -45,7 +45,7 @@ export class Construe {
45
45
  }
46
46
  __uploadCodeSystem(request, requestOptions) {
47
47
  return __awaiter(this, void 0, void 0, function* () {
48
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
48
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
49
49
  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);
50
50
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
51
51
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "construe/upload"),
@@ -58,6 +58,7 @@ export class Construe {
58
58
  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,
59
59
  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,
60
60
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
61
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
61
62
  });
62
63
  if (_response.ok) {
63
64
  return {
@@ -129,7 +130,7 @@ export class Construe {
129
130
  }
130
131
  __extractCodes(request, requestOptions) {
131
132
  return __awaiter(this, void 0, void 0, function* () {
132
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
133
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
133
134
  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);
134
135
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
135
136
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "construe/extract"),
@@ -142,6 +143,7 @@ export class Construe {
142
143
  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,
143
144
  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,
144
145
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
146
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
145
147
  });
146
148
  if (_response.ok) {
147
149
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -201,7 +203,7 @@ export class Construe {
201
203
  }
202
204
  __listAvailableCodeSystems(requestOptions) {
203
205
  return __awaiter(this, void 0, void 0, function* () {
204
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
206
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
205
207
  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);
206
208
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
207
209
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "construe/codes/systems"),
@@ -211,6 +213,7 @@ export class Construe {
211
213
  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,
212
214
  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,
213
215
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
216
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
214
217
  });
215
218
  if (_response.ok) {
216
219
  return {
@@ -271,7 +274,7 @@ export class Construe {
271
274
  }
272
275
  __getCodeSystemDetail(codesystem_1) {
273
276
  return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
274
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
277
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
275
278
  const { version } = request;
276
279
  const _queryParams = {};
277
280
  if (version != null) {
@@ -286,6 +289,7 @@ export class Construe {
286
289
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
287
290
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
288
291
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
292
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
289
293
  });
290
294
  if (_response.ok) {
291
295
  return {
@@ -352,7 +356,7 @@ export class Construe {
352
356
  }
353
357
  __deleteCustomCodeSystem(codesystem_1) {
354
358
  return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
355
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
359
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
356
360
  const { version } = request;
357
361
  const _queryParams = {};
358
362
  if (version != null) {
@@ -367,6 +371,7 @@ export class Construe {
367
371
  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,
368
372
  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,
369
373
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
374
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
370
375
  });
371
376
  if (_response.ok) {
372
377
  return {
@@ -438,7 +443,7 @@ export class Construe {
438
443
  }
439
444
  __exportCustomCodeSystem(codesystem_1) {
440
445
  return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
441
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
446
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
442
447
  const { version } = request;
443
448
  const _queryParams = {};
444
449
  if (version != null) {
@@ -453,6 +458,7 @@ export class Construe {
453
458
  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,
454
459
  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,
455
460
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
461
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
456
462
  });
457
463
  if (_response.ok) {
458
464
  return {
@@ -527,7 +533,7 @@ export class Construe {
527
533
  }
528
534
  __listCodesInACodeSystem(codesystem_1) {
529
535
  return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
530
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
536
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
531
537
  const { version, cursor, limit } = request;
532
538
  const _queryParams = {};
533
539
  if (version != null) {
@@ -548,6 +554,7 @@ export class Construe {
548
554
  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,
549
555
  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,
550
556
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
557
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
551
558
  });
552
559
  if (_response.ok) {
553
560
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -612,7 +619,7 @@ export class Construe {
612
619
  }
613
620
  __getASpecificCode(codesystem_1, codeId_1) {
614
621
  return __awaiter(this, arguments, void 0, function* (codesystem, codeId, request = {}, requestOptions) {
615
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
622
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
616
623
  const { version } = request;
617
624
  const _queryParams = {};
618
625
  if (version != null) {
@@ -627,6 +634,7 @@ export class Construe {
627
634
  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,
628
635
  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,
629
636
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
637
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
630
638
  });
631
639
  if (_response.ok) {
632
640
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -708,7 +716,7 @@ export class Construe {
708
716
  }
709
717
  __semanticSearchEmbeddingBased(codesystem, request, requestOptions) {
710
718
  return __awaiter(this, void 0, void 0, function* () {
711
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
719
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
712
720
  const { text, version, limit } = request;
713
721
  const _queryParams = {};
714
722
  _queryParams.text = text;
@@ -727,6 +735,7 @@ export class Construe {
727
735
  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,
728
736
  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,
729
737
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
738
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
730
739
  });
731
740
  if (_response.ok) {
732
741
  return {
@@ -817,7 +826,7 @@ export class Construe {
817
826
  }
818
827
  __terminologyServerTextSearch(codesystem, request, requestOptions) {
819
828
  return __awaiter(this, void 0, void 0, function* () {
820
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
829
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
821
830
  const { q, version, limit } = request;
822
831
  const _queryParams = {};
823
832
  _queryParams.q = q;
@@ -836,6 +845,7 @@ export class Construe {
836
845
  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,
837
846
  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,
838
847
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
848
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
839
849
  });
840
850
  if (_response.ok) {
841
851
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -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 {
@@ -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 {