phenoml 12.5.0 → 13.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/cjs/BaseClient.d.ts +3 -0
  2. package/dist/cjs/BaseClient.js +17 -2
  3. package/dist/cjs/api/resources/agent/client/Client.js +17 -9
  4. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +7 -7
  5. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +1 -1
  6. package/dist/cjs/api/resources/cohort/client/Client.js +1 -1
  7. package/dist/cjs/api/resources/construe/client/Client.js +39 -11
  8. package/dist/cjs/api/resources/fhir/client/Client.js +10 -6
  9. package/dist/cjs/api/resources/fhirProvider/client/Client.js +7 -7
  10. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +11 -3
  11. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +16 -8
  12. package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.ts +2 -0
  13. package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentRequest.d.ts +2 -0
  14. package/dist/cjs/api/resources/lang2Fhir/types/CreateMultiResponse.d.ts +3 -1
  15. package/dist/cjs/api/resources/lang2Fhir/types/DocumentConfig.d.ts +7 -0
  16. package/dist/cjs/api/resources/lang2Fhir/types/DocumentConfig.js +3 -0
  17. package/dist/cjs/api/resources/lang2Fhir/types/DocumentMultiResponse.d.ts +5 -0
  18. package/dist/cjs/api/resources/lang2Fhir/types/DocumentMultiResponse.js +3 -0
  19. package/dist/cjs/api/resources/lang2Fhir/types/PageClassification.d.ts +11 -0
  20. package/dist/cjs/api/resources/lang2Fhir/types/PageClassification.js +3 -0
  21. package/dist/cjs/api/resources/lang2Fhir/types/PageFilter.d.ts +7 -0
  22. package/dist/cjs/api/resources/lang2Fhir/types/PageFilter.js +3 -0
  23. package/dist/cjs/api/resources/lang2Fhir/types/index.d.ts +4 -0
  24. package/dist/cjs/api/resources/lang2Fhir/types/index.js +4 -0
  25. package/dist/cjs/api/resources/summary/client/Client.js +6 -6
  26. package/dist/cjs/api/resources/tools/client/Client.js +4 -4
  27. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.ts +0 -2
  28. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +4 -4
  29. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +4 -4
  30. package/dist/cjs/api/resources/workflows/client/Client.js +22 -6
  31. package/dist/cjs/core/auth/AuthProvider.d.ts +1 -0
  32. package/dist/cjs/core/auth/AuthProvider.js +7 -0
  33. package/dist/cjs/core/auth/BasicAuth.d.ts +2 -2
  34. package/dist/cjs/core/auth/BasicAuth.js +7 -1
  35. package/dist/cjs/core/auth/index.d.ts +1 -1
  36. package/dist/cjs/core/auth/index.js +3 -1
  37. package/dist/cjs/core/fetcher/Fetcher.d.ts +8 -0
  38. package/dist/cjs/core/fetcher/Fetcher.js +13 -8
  39. package/dist/cjs/core/fetcher/requestWithRetries.js +4 -1
  40. package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
  41. package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
  42. package/dist/cjs/core/url/index.d.ts +1 -0
  43. package/dist/cjs/core/url/index.js +3 -1
  44. package/dist/cjs/core/url/qs.d.ts +2 -1
  45. package/dist/cjs/core/url/qs.js +24 -12
  46. package/dist/cjs/errors/handleNonStatusCodeError.js +4 -1
  47. package/dist/cjs/errors/phenomlError.d.ts +3 -1
  48. package/dist/cjs/errors/phenomlError.js +4 -1
  49. package/dist/cjs/errors/phenomlTimeoutError.d.ts +4 -1
  50. package/dist/cjs/errors/phenomlTimeoutError.js +4 -1
  51. package/dist/cjs/version.d.ts +1 -1
  52. package/dist/cjs/version.js +1 -1
  53. package/dist/esm/BaseClient.d.mts +3 -0
  54. package/dist/esm/BaseClient.mjs +17 -2
  55. package/dist/esm/api/resources/agent/client/Client.mjs +17 -9
  56. package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +7 -7
  57. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +1 -1
  58. package/dist/esm/api/resources/cohort/client/Client.mjs +1 -1
  59. package/dist/esm/api/resources/construe/client/Client.mjs +39 -11
  60. package/dist/esm/api/resources/fhir/client/Client.mjs +10 -6
  61. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +7 -7
  62. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +11 -3
  63. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +16 -8
  64. package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.mts +2 -0
  65. package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentRequest.d.mts +2 -0
  66. package/dist/esm/api/resources/lang2Fhir/types/CreateMultiResponse.d.mts +3 -1
  67. package/dist/esm/api/resources/lang2Fhir/types/DocumentConfig.d.mts +7 -0
  68. package/dist/esm/api/resources/lang2Fhir/types/DocumentConfig.mjs +2 -0
  69. package/dist/esm/api/resources/lang2Fhir/types/DocumentMultiResponse.d.mts +5 -0
  70. package/dist/esm/api/resources/lang2Fhir/types/DocumentMultiResponse.mjs +2 -0
  71. package/dist/esm/api/resources/lang2Fhir/types/PageClassification.d.mts +11 -0
  72. package/dist/esm/api/resources/lang2Fhir/types/PageClassification.mjs +2 -0
  73. package/dist/esm/api/resources/lang2Fhir/types/PageFilter.d.mts +7 -0
  74. package/dist/esm/api/resources/lang2Fhir/types/PageFilter.mjs +2 -0
  75. package/dist/esm/api/resources/lang2Fhir/types/index.d.mts +4 -0
  76. package/dist/esm/api/resources/lang2Fhir/types/index.mjs +4 -0
  77. package/dist/esm/api/resources/summary/client/Client.mjs +6 -6
  78. package/dist/esm/api/resources/tools/client/Client.mjs +4 -4
  79. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.mts +0 -2
  80. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +4 -4
  81. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +4 -4
  82. package/dist/esm/api/resources/workflows/client/Client.mjs +22 -6
  83. package/dist/esm/core/auth/AuthProvider.d.mts +1 -0
  84. package/dist/esm/core/auth/AuthProvider.mjs +6 -1
  85. package/dist/esm/core/auth/BasicAuth.d.mts +2 -2
  86. package/dist/esm/core/auth/BasicAuth.mjs +7 -1
  87. package/dist/esm/core/auth/index.d.mts +1 -1
  88. package/dist/esm/core/auth/index.mjs +1 -0
  89. package/dist/esm/core/fetcher/Fetcher.d.mts +8 -0
  90. package/dist/esm/core/fetcher/Fetcher.mjs +13 -8
  91. package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -1
  92. package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
  93. package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
  94. package/dist/esm/core/url/index.d.mts +1 -0
  95. package/dist/esm/core/url/index.mjs +1 -0
  96. package/dist/esm/core/url/qs.d.mts +2 -1
  97. package/dist/esm/core/url/qs.mjs +24 -12
  98. package/dist/esm/errors/handleNonStatusCodeError.mjs +4 -1
  99. package/dist/esm/errors/phenomlError.d.mts +3 -1
  100. package/dist/esm/errors/phenomlError.mjs +4 -1
  101. package/dist/esm/errors/phenomlTimeoutError.d.mts +4 -1
  102. package/dist/esm/errors/phenomlTimeoutError.mjs +4 -1
  103. package/dist/esm/version.d.mts +1 -1
  104. package/dist/esm/version.mjs +1 -1
  105. package/package.json +2 -2
  106. package/reference.md +11 -3
@@ -56,7 +56,9 @@ class Lang2FhirClient {
56
56
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
57
  }
58
58
  /**
59
- * Converts natural language text into a structured FHIR resource
59
+ * Converts natural language text into a structured FHIR resource.
60
+ *
61
+ * **Patient identifier handling.** When generating a `patient` (or `patient-canvas`) resource, US Core requires `Patient.identifier` (a business identifier such as an MRN). When the source text contains an identifier, it is extracted with an appropriate URI system. When the source text does not contain a detectable identifier, a synthetic one is generated with `system: "urn:phenoml:lang2fhir-generated-id"` and a UUID `value` so the resource remains FHIR-valid and US Core conformant. Callers who need a tenant-specific namespace should rewrite the synthetic system after extraction.
60
62
  *
61
63
  * @param {phenoml.lang2Fhir.CreateRequest} request
62
64
  * @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -85,7 +87,7 @@ class Lang2FhirClient {
85
87
  method: "POST",
86
88
  headers: _headers,
87
89
  contentType: "application/json",
88
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
90
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
89
91
  requestType: "json",
90
92
  body: request,
91
93
  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,
@@ -121,6 +123,8 @@ class Lang2FhirClient {
121
123
  * Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types from the text.
122
124
  * Resources are linked with proper references (e.g., Conditions reference the Patient).
123
125
  *
126
+ * **Patient identifier handling.** US Core requires `Patient.identifier` (a business identifier such as an MRN). When the source text contains an identifier, it is extracted with an appropriate URI system. When the source text does not contain a detectable identifier, a synthetic one is generated with `system: "urn:phenoml:lang2fhir-generated-id"` and a UUID `value` so the bundle remains FHIR-valid and US Core conformant. Callers who need a tenant-specific namespace should rewrite the synthetic system after extraction.
127
+ *
124
128
  * @param {phenoml.lang2Fhir.CreateMultiRequest} request
125
129
  * @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
126
130
  *
@@ -146,7 +150,7 @@ class Lang2FhirClient {
146
150
  method: "POST",
147
151
  headers: _headers,
148
152
  contentType: "application/json",
149
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
153
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
150
154
  requestType: "json",
151
155
  body: request,
152
156
  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,
@@ -216,7 +220,7 @@ class Lang2FhirClient {
216
220
  method: "POST",
217
221
  headers: _headers,
218
222
  contentType: "application/json",
219
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
223
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
220
224
  requestType: "json",
221
225
  body: request,
222
226
  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,7 +291,7 @@ class Lang2FhirClient {
287
291
  method: "POST",
288
292
  headers: _headers,
289
293
  contentType: "application/json",
290
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
294
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
291
295
  requestType: "json",
292
296
  body: request,
293
297
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
@@ -324,7 +328,9 @@ class Lang2FhirClient {
324
328
  });
325
329
  }
326
330
  /**
327
- * Extracts text from a document (PDF or image) and converts it into a structured FHIR resource
331
+ * Extracts text from a document (PDF or image) and converts it into a structured FHIR resource.
332
+ *
333
+ * **Patient identifier handling.** When generating a `patient` (or `patient-canvas`) resource, US Core requires `Patient.identifier` (a business identifier such as an MRN). When the source text contains an identifier, it is extracted with an appropriate URI system. When the source text does not contain a detectable identifier, a synthetic one is generated with `system: "urn:phenoml:lang2fhir-generated-id"` and a UUID `value` so the resource remains FHIR-valid and US Core conformant. Callers who need a tenant-specific namespace should rewrite the synthetic system after extraction.
328
334
  *
329
335
  * @param {phenoml.lang2Fhir.DocumentRequest} request
330
336
  * @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -353,7 +359,7 @@ class Lang2FhirClient {
353
359
  method: "POST",
354
360
  headers: _headers,
355
361
  contentType: "application/json",
356
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
362
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
357
363
  requestType: "json",
358
364
  body: request,
359
365
  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,
@@ -390,6 +396,8 @@ class Lang2FhirClient {
390
396
  * Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types.
391
397
  * Resources are linked with proper references (e.g., Conditions reference the Patient).
392
398
  *
399
+ * **Patient identifier handling.** US Core requires `Patient.identifier` (a business identifier such as an MRN). When the source text contains an identifier, it is extracted with an appropriate URI system. When the source text does not contain a detectable identifier, a synthetic one is generated with `system: "urn:phenoml:lang2fhir-generated-id"` and a UUID `value` so the bundle remains FHIR-valid and US Core conformant. Callers who need a tenant-specific namespace should rewrite the synthetic system after extraction.
400
+ *
393
401
  * @param {phenoml.lang2Fhir.DocumentMultiRequest} request
394
402
  * @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
395
403
  *
@@ -417,7 +425,7 @@ class Lang2FhirClient {
417
425
  method: "POST",
418
426
  headers: _headers,
419
427
  contentType: "application/json",
420
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
428
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
421
429
  requestType: "json",
422
430
  body: request,
423
431
  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,
@@ -1,3 +1,4 @@
1
+ import type * as phenoml from "../../../../index.js";
1
2
  /**
2
3
  * @example
3
4
  * {
@@ -22,6 +23,7 @@ export interface DocumentMultiRequest {
22
23
  detection_effort?: DocumentMultiRequest.DetectionEffort;
23
24
  /** FHIR validation method to apply to the generated bundle. 'none' skips validation (default). 'check' runs the bundle through a FHIR structure validator and includes the results in the response. 'fix' runs validation and attempts to auto-correct errors using an LLM (up to 3 validation passes). The response includes results from each pass. Warning: 'fix' can significantly increase latency due to multiple LLM and validation round-trips. */
24
25
  validation_method?: DocumentMultiRequest.ValidationMethod;
26
+ config?: phenoml.lang2Fhir.DocumentConfig;
25
27
  }
26
28
  export declare namespace DocumentMultiRequest {
27
29
  /** Detection effort. 'standard' runs detection once, 'deep' runs detection multiple times for higher recall. */
@@ -1,3 +1,4 @@
1
+ import type * as phenoml from "../../../../index.js";
1
2
  /**
2
3
  * @example
3
4
  * {
@@ -17,4 +18,5 @@ export interface DocumentRequest {
17
18
  * File type is auto-detected from content magic bytes.
18
19
  */
19
20
  content: string;
21
+ config?: phenoml.lang2Fhir.DocumentConfig;
20
22
  }
@@ -42,8 +42,10 @@ export declare namespace CreateMultiResponse {
42
42
  tempId?: string | undefined;
43
43
  /** FHIR resource type */
44
44
  resourceType?: string | undefined;
45
- /** Text excerpt this resource was extracted from */
45
+ /** Context-enriched rewritten text excerpt for this resource */
46
46
  description?: string | undefined;
47
+ /** Verbatim text excerpt from the original clinical document */
48
+ originalText?: string | undefined;
47
49
  }
48
50
  }
49
51
  /**
@@ -0,0 +1,7 @@
1
+ import type * as phenoml from "../../../index.js";
2
+ /**
3
+ * Optional processing configuration shared across document endpoints.
4
+ */
5
+ export interface DocumentConfig {
6
+ page_filter?: phenoml.lang2Fhir.PageFilter | undefined;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type * as phenoml from "../../../index.js";
2
+ export interface DocumentMultiResponse extends phenoml.lang2Fhir.CreateMultiResponse {
3
+ /** Per-page classifier decisions. Populated only when a page_filter was supplied in the request. Contains one entry per input page, including both kept and dropped pages. */
4
+ page_classifications?: phenoml.lang2Fhir.PageClassification[] | undefined;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The classifier's decision for a single page of the input document.
3
+ */
4
+ export interface PageClassification {
5
+ /** 1-indexed page number. */
6
+ page_number?: number | undefined;
7
+ /** Whether the page was kept (true) or dropped (false) from FHIR extraction. */
8
+ include?: boolean | undefined;
9
+ /** Short LLM-generated explanation of the decision. */
10
+ reason?: string | undefined;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Configures per-page pre-extraction filtering. When set, each page of text extracted from the document is classified by an LLM, and pages classified as irrelevant to the supplied context are dropped before FHIR extraction.
3
+ */
4
+ export interface PageFilter {
5
+ /** Natural-language description of what IS relevant to the extraction goal. Pages that do not match are dropped from downstream FHIR extraction. */
6
+ context: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,8 @@
1
1
  export * from "./CreateMultiResponse.js";
2
+ export * from "./DocumentConfig.js";
3
+ export * from "./DocumentMultiResponse.js";
2
4
  export * from "./FhirResource.js";
3
5
  export * from "./Lang2FhirUploadProfileResponse.js";
6
+ export * from "./PageClassification.js";
7
+ export * from "./PageFilter.js";
4
8
  export * from "./SearchResponse.js";
@@ -15,6 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CreateMultiResponse.js"), exports);
18
+ __exportStar(require("./DocumentConfig.js"), exports);
19
+ __exportStar(require("./DocumentMultiResponse.js"), exports);
18
20
  __exportStar(require("./FhirResource.js"), exports);
19
21
  __exportStar(require("./Lang2FhirUploadProfileResponse.js"), exports);
22
+ __exportStar(require("./PageClassification.js"), exports);
23
+ __exportStar(require("./PageFilter.js"), exports);
20
24
  __exportStar(require("./SearchResponse.js"), exports);
@@ -78,7 +78,7 @@ class SummaryClient {
78
78
  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"),
79
79
  method: "GET",
80
80
  headers: _headers,
81
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
81
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
82
82
  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,
83
83
  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,
84
84
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -139,7 +139,7 @@ class SummaryClient {
139
139
  method: "POST",
140
140
  headers: _headers,
141
141
  contentType: "application/json",
142
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
142
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
143
143
  requestType: "json",
144
144
  body: request,
145
145
  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,
@@ -199,7 +199,7 @@ class SummaryClient {
199
199
  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)}`),
200
200
  method: "GET",
201
201
  headers: _headers,
202
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
202
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
203
203
  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,
204
204
  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,
205
205
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -267,7 +267,7 @@ class SummaryClient {
267
267
  method: "PUT",
268
268
  headers: _headers,
269
269
  contentType: "application/json",
270
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
270
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
271
271
  requestType: "json",
272
272
  body: request,
273
273
  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,
@@ -331,7 +331,7 @@ class SummaryClient {
331
331
  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)}`),
332
332
  method: "DELETE",
333
333
  headers: _headers,
334
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
334
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
335
335
  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,
336
336
  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,
337
337
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -400,7 +400,7 @@ class SummaryClient {
400
400
  method: "POST",
401
401
  headers: _headers,
402
402
  contentType: "application/json",
403
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
403
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
404
404
  requestType: "json",
405
405
  body: request,
406
406
  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,
@@ -108,7 +108,7 @@ class ToolsClient {
108
108
  method: "POST",
109
109
  headers: _headers,
110
110
  contentType: "application/json",
111
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
111
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
112
112
  requestType: "json",
113
113
  body: _body,
114
114
  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,7 +187,7 @@ class ToolsClient {
187
187
  method: "POST",
188
188
  headers: _headers,
189
189
  contentType: "application/json",
190
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
190
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
191
191
  requestType: "json",
192
192
  body: _body,
193
193
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
@@ -261,7 +261,7 @@ class ToolsClient {
261
261
  method: "POST",
262
262
  headers: _headers,
263
263
  contentType: "application/json",
264
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
264
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
265
265
  requestType: "json",
266
266
  body: _body,
267
267
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
@@ -335,7 +335,7 @@ class ToolsClient {
335
335
  method: "POST",
336
336
  headers: _headers,
337
337
  contentType: "application/json",
338
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
338
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
339
339
  requestType: "json",
340
340
  body: _body,
341
341
  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,
@@ -21,8 +21,6 @@ export interface Lang2FhirAndSearchRequest {
21
21
  text: string;
22
22
  /** Patient ID to filter results */
23
23
  patient_id?: string;
24
- /** Practitioner ID to filter results */
25
- practitioner_id?: string;
26
24
  /** Maximum number of results to return */
27
25
  count?: number;
28
26
  /** FHIR provider ID - must be a valid UUID from existing FHIR providers. also supports provider by name (e.g. medplum) */
@@ -90,7 +90,7 @@ class McpServerClient {
90
90
  method: "POST",
91
91
  headers: _headers,
92
92
  contentType: "application/json",
93
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
93
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
94
94
  requestType: "json",
95
95
  body: request,
96
96
  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,
@@ -147,7 +147,7 @@ class McpServerClient {
147
147
  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, "tools/mcp-server/list"),
148
148
  method: "GET",
149
149
  headers: _headers,
150
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
150
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
151
151
  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,
152
152
  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,
153
153
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -201,7 +201,7 @@ class McpServerClient {
201
201
  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, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}`),
202
202
  method: "GET",
203
203
  headers: _headers,
204
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
204
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
205
205
  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
206
  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
207
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -255,7 +255,7 @@ class McpServerClient {
255
255
  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, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}`),
256
256
  method: "DELETE",
257
257
  headers: _headers,
258
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
258
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
259
259
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
260
260
  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,
261
261
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -80,7 +80,7 @@ class ToolsClient {
80
80
  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, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}/list`),
81
81
  method: "GET",
82
82
  headers: _headers,
83
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
83
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
84
84
  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,
85
85
  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,
86
86
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -134,7 +134,7 @@ class ToolsClient {
134
134
  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, `tools/mcp-server/tool/${core.url.encodePathParam(mcp_server_tool_id)}`),
135
135
  method: "GET",
136
136
  headers: _headers,
137
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
137
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
138
138
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
139
139
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
140
140
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -188,7 +188,7 @@ class ToolsClient {
188
188
  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, `tools/mcp-server/tool/${core.url.encodePathParam(mcp_server_tool_id)}`),
189
189
  method: "DELETE",
190
190
  headers: _headers,
191
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
191
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
192
192
  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,
193
193
  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,
194
194
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -249,7 +249,7 @@ class ToolsClient {
249
249
  method: "POST",
250
250
  headers: _headers,
251
251
  contentType: "application/json",
252
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
252
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
253
253
  requestType: "json",
254
254
  body: request,
255
255
  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,
@@ -97,7 +97,11 @@ class WorkflowsClient {
97
97
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "workflows"),
98
98
  method: "GET",
99
99
  headers: _headers,
100
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
100
+ queryString: core.url
101
+ .queryBuilder()
102
+ .addMany(_queryParams)
103
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
104
+ .build(),
101
105
  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,
102
106
  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,
103
107
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -170,7 +174,11 @@ class WorkflowsClient {
170
174
  method: "POST",
171
175
  headers: _headers,
172
176
  contentType: "application/json",
173
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
177
+ queryString: core.url
178
+ .queryBuilder()
179
+ .addMany(_queryParams)
180
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
181
+ .build(),
174
182
  requestType: "json",
175
183
  body: _body,
176
184
  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,
@@ -239,7 +247,11 @@ class WorkflowsClient {
239
247
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `workflows/${core.url.encodePathParam(id)}`),
240
248
  method: "GET",
241
249
  headers: _headers,
242
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
250
+ queryString: core.url
251
+ .queryBuilder()
252
+ .addMany(_queryParams)
253
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
254
+ .build(),
243
255
  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,
244
256
  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,
245
257
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -316,7 +328,11 @@ class WorkflowsClient {
316
328
  method: "PUT",
317
329
  headers: _headers,
318
330
  contentType: "application/json",
319
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
331
+ queryString: core.url
332
+ .queryBuilder()
333
+ .addMany(_queryParams)
334
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
335
+ .build(),
320
336
  requestType: "json",
321
337
  body: _body,
322
338
  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,
@@ -380,7 +396,7 @@ class WorkflowsClient {
380
396
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `workflows/${core.url.encodePathParam(id)}`),
381
397
  method: "DELETE",
382
398
  headers: _headers,
383
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
399
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
384
400
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
385
401
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
386
402
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -450,7 +466,7 @@ class WorkflowsClient {
450
466
  method: "POST",
451
467
  headers: _headers,
452
468
  contentType: "application/json",
453
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
469
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
454
470
  requestType: "json",
455
471
  body: request,
456
472
  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,
@@ -5,3 +5,4 @@ export interface AuthProvider {
5
5
  endpointMetadata?: EndpointMetadata;
6
6
  }): Promise<AuthRequest>;
7
7
  }
8
+ export declare function isAuthProvider(value: unknown): value is AuthProvider;
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isAuthProvider = isAuthProvider;
4
+ function isAuthProvider(value) {
5
+ return (typeof value === "object" &&
6
+ value !== null &&
7
+ "getAuthRequest" in value &&
8
+ typeof value.getAuthRequest === "function");
9
+ }
@@ -1,6 +1,6 @@
1
1
  export interface BasicAuth {
2
- username: string;
3
- password: string;
2
+ username?: string;
3
+ password?: string;
4
4
  }
5
5
  export declare const BasicAuth: {
6
6
  toAuthorizationHeader: (basicAuth: BasicAuth | undefined) => string | undefined;
@@ -5,10 +5,16 @@ const base64_js_1 = require("../base64.js");
5
5
  const BASIC_AUTH_HEADER_PREFIX = /^Basic /i;
6
6
  exports.BasicAuth = {
7
7
  toAuthorizationHeader: (basicAuth) => {
8
+ var _a, _b;
8
9
  if (basicAuth == null) {
9
10
  return undefined;
10
11
  }
11
- const token = (0, base64_js_1.base64Encode)(`${basicAuth.username}:${basicAuth.password}`);
12
+ const username = (_a = basicAuth.username) !== null && _a !== void 0 ? _a : "";
13
+ const password = (_b = basicAuth.password) !== null && _b !== void 0 ? _b : "";
14
+ if (username === "" && password === "") {
15
+ return undefined;
16
+ }
17
+ const token = (0, base64_js_1.base64Encode)(`${username}:${password}`);
12
18
  return `Basic ${token}`;
13
19
  },
14
20
  fromAuthorizationHeader: (header) => {
@@ -1,4 +1,4 @@
1
- export type { AuthProvider } from "./AuthProvider.js";
1
+ export { type AuthProvider, isAuthProvider } from "./AuthProvider.js";
2
2
  export type { AuthRequest } from "./AuthRequest.js";
3
3
  export { BasicAuth } from "./BasicAuth.js";
4
4
  export { BearerToken } from "./BearerToken.js";
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NoOpAuthProvider = exports.BearerToken = exports.BasicAuth = void 0;
3
+ exports.NoOpAuthProvider = exports.BearerToken = exports.BasicAuth = exports.isAuthProvider = void 0;
4
+ var AuthProvider_js_1 = require("./AuthProvider.js");
5
+ Object.defineProperty(exports, "isAuthProvider", { enumerable: true, get: function () { return AuthProvider_js_1.isAuthProvider; } });
4
6
  var BasicAuth_js_1 = require("./BasicAuth.js");
5
7
  Object.defineProperty(exports, "BasicAuth", { enumerable: true, get: function () { return BasicAuth_js_1.BasicAuth; } });
6
8
  var BearerToken_js_1 = require("./BearerToken.js");
@@ -8,7 +8,13 @@ export declare namespace Fetcher {
8
8
  method: string;
9
9
  contentType?: string;
10
10
  headers?: Record<string, unknown>;
11
+ /**
12
+ * @deprecated Prefer `queryString` (produced by `core.url.queryBuilder()`).
13
+ * Retained for backwards compatibility with custom fetchers and callers that
14
+ * still construct request args with a query-parameter object.
15
+ */
11
16
  queryParameters?: Record<string, unknown>;
17
+ queryString?: string;
12
18
  body?: unknown;
13
19
  timeoutMs?: number;
14
20
  maxRetries?: number;
@@ -38,10 +44,12 @@ export declare namespace Fetcher {
38
44
  }
39
45
  interface TimeoutError {
40
46
  reason: "timeout";
47
+ cause?: unknown;
41
48
  }
42
49
  interface UnknownError {
43
50
  reason: "unknown";
44
51
  errorMessage: string;
52
+ cause?: unknown;
45
53
  }
46
54
  }
47
55
  export declare function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIResponse<R, Fetcher.Error>>;