phenoml 13.0.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.d.ts +3 -0
- package/dist/cjs/BaseClient.js +17 -2
- package/dist/cjs/api/resources/agent/client/Client.d.ts +24 -12
- package/dist/cjs/api/resources/agent/client/Client.js +41 -21
- package/dist/cjs/api/resources/agent/client/requests/AgentChatRequest.d.ts +11 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentStreamChatRequest.d.ts +1 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +13 -25
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +19 -70
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.ts +4 -1
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.ts +7 -1
- package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +4 -1
- package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +5 -2
- package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.ts +4 -1
- package/dist/cjs/api/resources/cohort/client/Client.js +1 -1
- package/dist/cjs/api/resources/construe/client/Client.d.ts +95 -11
- package/dist/cjs/api/resources/construe/client/Client.js +134 -22
- package/dist/cjs/api/resources/construe/client/requests/ExtractRequest.d.ts +60 -1
- package/dist/cjs/api/resources/construe/client/requests/FeedbackRequest.d.ts +14 -7
- package/dist/cjs/api/resources/construe/client/requests/UploadRequest.d.ts +18 -1
- package/dist/cjs/api/resources/fhir/client/Client.js +10 -6
- package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +10 -7
- package/dist/cjs/api/resources/fhirProvider/client/Client.js +17 -14
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.ts +5 -3
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.ts +1 -1
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.ts +1 -1
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.ts +6 -4
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +10 -5
- package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +17 -6
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +23 -12
- package/dist/cjs/api/resources/lang2Fhir/client/requests/CreateMultiRequest.d.ts +2 -1
- package/dist/cjs/api/resources/lang2Fhir/client/requests/CreateRequest.d.ts +9 -2
- package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.ts +2 -1
- package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentRequest.d.ts +1 -1
- package/dist/cjs/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.ts +3 -1
- package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.d.ts +2 -2
- package/dist/cjs/api/resources/summary/client/Client.d.ts +74 -9
- package/dist/cjs/api/resources/summary/client/Client.js +80 -15
- package/dist/cjs/api/resources/summary/client/requests/CreateSummaryRequest.d.ts +67 -11
- package/dist/cjs/api/resources/summary/client/requests/CreateSummaryTemplateRequest.d.ts +4 -4
- package/dist/cjs/api/resources/summary/client/requests/UpdateSummaryTemplateRequest.d.ts +4 -4
- package/dist/cjs/api/resources/summary/types/index.d.ts +0 -2
- package/dist/cjs/api/resources/summary/types/index.js +0 -2
- package/dist/cjs/api/resources/tools/client/Client.d.ts +7 -3
- package/dist/cjs/api/resources/tools/client/Client.js +11 -7
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateMultiRequest.d.ts +1 -0
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.ts +3 -2
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.ts +3 -1
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +4 -4
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +4 -4
- package/dist/cjs/api/resources/tools/types/McpServer.d.ts +10 -0
- package/dist/cjs/api/resources/tools/types/McpServerResponse.d.ts +12 -16
- package/dist/cjs/api/resources/tools/types/McpServerTool.d.ts +14 -0
- package/dist/cjs/api/resources/tools/types/McpServerToolResponse.d.ts +7 -20
- package/dist/cjs/api/resources/tools/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/tools/types/index.js +2 -0
- package/dist/cjs/api/resources/workflows/client/Client.d.ts +21 -9
- package/dist/cjs/api/resources/workflows/client/Client.js +43 -15
- package/dist/cjs/api/resources/workflows/client/requests/CreateWorkflowRequest.d.ts +3 -2
- package/dist/cjs/api/resources/workflows/client/requests/ExecuteWorkflowRequest.d.ts +11 -1
- package/dist/cjs/api/resources/workflows/client/requests/UpdateWorkflowRequest.d.ts +6 -5
- package/dist/cjs/core/auth/AuthProvider.d.ts +1 -0
- package/dist/cjs/core/auth/AuthProvider.js +7 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +2 -2
- package/dist/cjs/core/auth/BasicAuth.js +7 -1
- package/dist/cjs/core/auth/index.d.ts +1 -1
- package/dist/cjs/core/auth/index.js +3 -1
- package/dist/cjs/core/fetcher/Fetcher.d.ts +8 -0
- package/dist/cjs/core/fetcher/Fetcher.js +13 -8
- package/dist/cjs/core/fetcher/requestWithRetries.js +4 -1
- package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
- package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
- package/dist/cjs/core/url/index.d.ts +1 -0
- package/dist/cjs/core/url/index.js +3 -1
- package/dist/cjs/core/url/qs.d.ts +2 -1
- package/dist/cjs/core/url/qs.js +24 -12
- package/dist/cjs/errors/handleNonStatusCodeError.js +4 -1
- package/dist/cjs/errors/phenomlError.d.ts +3 -1
- package/dist/cjs/errors/phenomlError.js +4 -1
- package/dist/cjs/errors/phenomlTimeoutError.d.ts +4 -1
- package/dist/cjs/errors/phenomlTimeoutError.js +4 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +3 -0
- package/dist/esm/BaseClient.mjs +17 -2
- package/dist/esm/api/resources/agent/client/Client.d.mts +24 -12
- package/dist/esm/api/resources/agent/client/Client.mjs +41 -21
- package/dist/esm/api/resources/agent/client/requests/AgentChatRequest.d.mts +11 -0
- package/dist/esm/api/resources/agent/client/requests/AgentStreamChatRequest.d.mts +1 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.d.mts +13 -25
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +19 -70
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.mts +4 -1
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.mts +7 -1
- package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +4 -1
- package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +5 -2
- package/dist/esm/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.mts +4 -1
- package/dist/esm/api/resources/cohort/client/Client.mjs +1 -1
- package/dist/esm/api/resources/construe/client/Client.d.mts +95 -11
- package/dist/esm/api/resources/construe/client/Client.mjs +134 -22
- package/dist/esm/api/resources/construe/client/requests/ExtractRequest.d.mts +60 -1
- package/dist/esm/api/resources/construe/client/requests/FeedbackRequest.d.mts +14 -7
- package/dist/esm/api/resources/construe/client/requests/UploadRequest.d.mts +18 -1
- package/dist/esm/api/resources/fhir/client/Client.mjs +10 -6
- package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +10 -7
- package/dist/esm/api/resources/fhirProvider/client/Client.mjs +17 -14
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.mts +5 -3
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.mts +1 -1
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.mts +1 -1
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.mts +6 -4
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +10 -5
- package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +17 -6
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +23 -12
- package/dist/esm/api/resources/lang2Fhir/client/requests/CreateMultiRequest.d.mts +2 -1
- package/dist/esm/api/resources/lang2Fhir/client/requests/CreateRequest.d.mts +9 -2
- package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.mts +2 -1
- package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentRequest.d.mts +1 -1
- package/dist/esm/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.mts +3 -1
- package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.d.mts +2 -2
- package/dist/esm/api/resources/summary/client/Client.d.mts +74 -9
- package/dist/esm/api/resources/summary/client/Client.mjs +80 -15
- package/dist/esm/api/resources/summary/client/requests/CreateSummaryRequest.d.mts +67 -11
- package/dist/esm/api/resources/summary/client/requests/CreateSummaryTemplateRequest.d.mts +4 -4
- package/dist/esm/api/resources/summary/client/requests/UpdateSummaryTemplateRequest.d.mts +4 -4
- package/dist/esm/api/resources/summary/types/index.d.mts +0 -2
- package/dist/esm/api/resources/summary/types/index.mjs +0 -2
- package/dist/esm/api/resources/tools/client/Client.d.mts +7 -3
- package/dist/esm/api/resources/tools/client/Client.mjs +11 -7
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateMultiRequest.d.mts +1 -0
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.mts +3 -2
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.mts +3 -1
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +4 -4
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +4 -4
- package/dist/esm/api/resources/tools/types/McpServer.d.mts +10 -0
- package/dist/esm/api/resources/tools/types/McpServerResponse.d.mts +12 -16
- package/dist/esm/api/resources/tools/types/McpServerTool.d.mts +14 -0
- package/dist/esm/api/resources/tools/types/McpServerToolResponse.d.mts +7 -20
- package/dist/esm/api/resources/tools/types/index.d.mts +2 -0
- package/dist/esm/api/resources/tools/types/index.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/Client.d.mts +21 -9
- package/dist/esm/api/resources/workflows/client/Client.mjs +43 -15
- package/dist/esm/api/resources/workflows/client/requests/CreateWorkflowRequest.d.mts +3 -2
- package/dist/esm/api/resources/workflows/client/requests/ExecuteWorkflowRequest.d.mts +11 -1
- package/dist/esm/api/resources/workflows/client/requests/UpdateWorkflowRequest.d.mts +6 -5
- package/dist/esm/core/auth/AuthProvider.d.mts +1 -0
- package/dist/esm/core/auth/AuthProvider.mjs +6 -1
- package/dist/esm/core/auth/BasicAuth.d.mts +2 -2
- package/dist/esm/core/auth/BasicAuth.mjs +7 -1
- package/dist/esm/core/auth/index.d.mts +1 -1
- package/dist/esm/core/auth/index.mjs +1 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +8 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +13 -8
- package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -1
- package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
- package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
- package/dist/esm/core/url/index.d.mts +1 -0
- package/dist/esm/core/url/index.mjs +1 -0
- package/dist/esm/core/url/qs.d.mts +2 -1
- package/dist/esm/core/url/qs.mjs +24 -12
- package/dist/esm/errors/handleNonStatusCodeError.mjs +4 -1
- package/dist/esm/errors/phenomlError.d.mts +3 -1
- package/dist/esm/errors/phenomlError.mjs +4 -1
- package/dist/esm/errors/phenomlTimeoutError.d.mts +4 -1
- package/dist/esm/errors/phenomlTimeoutError.mjs +4 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +140 -124
- package/dist/cjs/api/resources/summary/types/FhirBundle.d.ts +0 -13
- package/dist/cjs/api/resources/summary/types/FhirResource.d.ts +0 -6
- package/dist/esm/api/resources/summary/types/FhirBundle.d.mts +0 -13
- package/dist/esm/api/resources/summary/types/FhirResource.d.mts +0 -6
- /package/dist/cjs/api/resources/{summary/types/FhirBundle.js → tools/types/McpServer.js} +0 -0
- /package/dist/cjs/api/resources/{summary/types/FhirResource.js → tools/types/McpServerTool.js} +0 -0
- /package/dist/esm/api/resources/{summary/types/FhirBundle.mjs → tools/types/McpServer.mjs} +0 -0
- /package/dist/esm/api/resources/{summary/types/FhirResource.mjs → tools/types/McpServerTool.mjs} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface McpServer {
|
|
2
|
+
/** ID of the MCP server */
|
|
3
|
+
id?: string | undefined;
|
|
4
|
+
/** Name of the MCP server */
|
|
5
|
+
name?: string | undefined;
|
|
6
|
+
/** Description of the MCP server */
|
|
7
|
+
description?: string | undefined;
|
|
8
|
+
/** URL of the MCP server */
|
|
9
|
+
mcp_server_url?: string | undefined;
|
|
10
|
+
}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
+
import type * as phenoml from "../../../index.mjs";
|
|
1
2
|
export interface McpServerResponse {
|
|
2
|
-
/** Whether the
|
|
3
|
+
/** Whether the operation succeeded */
|
|
3
4
|
success?: boolean | undefined;
|
|
4
5
|
/** Status message */
|
|
5
6
|
message?: string | undefined;
|
|
6
|
-
/** MCP server
|
|
7
|
-
data?:
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/** Single MCP server (returned by GET /tools/mcp-server/{mcp_server_id}). */
|
|
8
|
+
data?: phenoml.tools.McpServer | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* List of MCP servers. Returned by /tools/mcp-server/create (the
|
|
11
|
+
* newly created server) and /tools/mcp-server/list (all servers).
|
|
12
|
+
*/
|
|
13
|
+
mcp_servers?: phenoml.tools.McpServer[] | undefined;
|
|
10
14
|
/**
|
|
11
|
-
* MCP server
|
|
15
|
+
* Tools loaded from the MCP server. Returned by /tools/mcp-server/create
|
|
16
|
+
* alongside the server record, since tool discovery happens at create time.
|
|
12
17
|
*/
|
|
13
|
-
|
|
14
|
-
/** ID of the MCP server */
|
|
15
|
-
id?: string | undefined;
|
|
16
|
-
/** Name of the MCP server */
|
|
17
|
-
name?: string | undefined;
|
|
18
|
-
/** Description of the MCP server */
|
|
19
|
-
description?: string | undefined;
|
|
20
|
-
/** URL of the MCP server */
|
|
21
|
-
mcp_server_url?: string | undefined;
|
|
22
|
-
}
|
|
18
|
+
mcp_server_tools?: phenoml.tools.McpServerTool[] | undefined;
|
|
23
19
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface McpServerTool {
|
|
2
|
+
/** ID of the MCP server tool */
|
|
3
|
+
id?: string | undefined;
|
|
4
|
+
/** Name of the MCP server tool */
|
|
5
|
+
name?: string | undefined;
|
|
6
|
+
/** Description of the MCP server tool */
|
|
7
|
+
description?: string | undefined;
|
|
8
|
+
/** Input schema of the MCP server tool */
|
|
9
|
+
input_schema?: Record<string, unknown> | undefined;
|
|
10
|
+
/** ID of the MCP server that the tool belongs to */
|
|
11
|
+
mcp_server_id?: string | undefined;
|
|
12
|
+
/** URL of the MCP server */
|
|
13
|
+
mcp_server_url?: string | undefined;
|
|
14
|
+
}
|
|
@@ -1,27 +1,14 @@
|
|
|
1
|
+
import type * as phenoml from "../../../index.mjs";
|
|
1
2
|
export interface McpServerToolResponse {
|
|
2
|
-
/** Whether the
|
|
3
|
+
/** Whether the operation succeeded */
|
|
3
4
|
success?: boolean | undefined;
|
|
4
5
|
/** Status message */
|
|
5
6
|
message?: string | undefined;
|
|
6
|
-
/** MCP server tool
|
|
7
|
-
data?:
|
|
8
|
-
}
|
|
9
|
-
export declare namespace McpServerToolResponse {
|
|
7
|
+
/** Single MCP server tool (returned by GET /tools/mcp-server/tool/{mcp_server_tool_id}). */
|
|
8
|
+
data?: phenoml.tools.McpServerTool | undefined;
|
|
10
9
|
/**
|
|
11
|
-
* MCP server
|
|
10
|
+
* List of MCP server tools. Returned by
|
|
11
|
+
* /tools/mcp-server/{mcp_server_id}/list.
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
/** ID of the MCP server tool */
|
|
15
|
-
id?: string | undefined;
|
|
16
|
-
/** Name of the MCP server tool */
|
|
17
|
-
name?: string | undefined;
|
|
18
|
-
/** Description of the MCP server tool */
|
|
19
|
-
description?: string | undefined;
|
|
20
|
-
/** Input schema of the MCP server tool */
|
|
21
|
-
input_schema?: Record<string, unknown> | undefined;
|
|
22
|
-
/** ID of the MCP server that the tool belongs to */
|
|
23
|
-
mcp_server_id?: string | undefined;
|
|
24
|
-
/** URL of the MCP server */
|
|
25
|
-
mcp_server_url?: string | undefined;
|
|
26
|
-
}
|
|
13
|
+
mcp_server_tools?: phenoml.tools.McpServerTool[] | undefined;
|
|
27
14
|
}
|
|
@@ -2,7 +2,9 @@ export * from "./CohortResponse.mjs";
|
|
|
2
2
|
export * from "./Lang2FhirAndCreateMultiResponse.mjs";
|
|
3
3
|
export * from "./Lang2FhirAndCreateResponse.mjs";
|
|
4
4
|
export * from "./Lang2FhirAndSearchResponse.mjs";
|
|
5
|
+
export * from "./McpServer.mjs";
|
|
5
6
|
export * from "./McpServerResponse.mjs";
|
|
7
|
+
export * from "./McpServerTool.mjs";
|
|
6
8
|
export * from "./McpServerToolCallResponse.mjs";
|
|
7
9
|
export * from "./McpServerToolResponse.mjs";
|
|
8
10
|
export * from "./SearchConcept.mjs";
|
|
@@ -2,7 +2,9 @@ export * from "./CohortResponse.mjs";
|
|
|
2
2
|
export * from "./Lang2FhirAndCreateMultiResponse.mjs";
|
|
3
3
|
export * from "./Lang2FhirAndCreateResponse.mjs";
|
|
4
4
|
export * from "./Lang2FhirAndSearchResponse.mjs";
|
|
5
|
+
export * from "./McpServer.mjs";
|
|
5
6
|
export * from "./McpServerResponse.mjs";
|
|
7
|
+
export * from "./McpServerTool.mjs";
|
|
6
8
|
export * from "./McpServerToolCallResponse.mjs";
|
|
7
9
|
export * from "./McpServerToolResponse.mjs";
|
|
8
10
|
export * from "./SearchConcept.mjs";
|
|
@@ -42,11 +42,12 @@ export declare class WorkflowsClient {
|
|
|
42
42
|
* await client.workflows.create({
|
|
43
43
|
* verbose: true,
|
|
44
44
|
* name: "Patient Data Mapping Workflow",
|
|
45
|
-
* workflow_instructions: "Given diagnosis data, find the patient and create condition record",
|
|
45
|
+
* workflow_instructions: "Given diagnosis data, find the patient and create a condition record linked to their encounter",
|
|
46
46
|
* sample_data: {
|
|
47
47
|
* "patient_last_name": "Rippin",
|
|
48
48
|
* "patient_first_name": "Clay",
|
|
49
|
-
* "diagnosis_code": "I10"
|
|
49
|
+
* "diagnosis_code": "I10",
|
|
50
|
+
* "encounter_date": "2024-01-15"
|
|
50
51
|
* },
|
|
51
52
|
* fhir_provider_id: "550e8400-e29b-41d4-a716-446655440000"
|
|
52
53
|
* })
|
|
@@ -88,12 +89,13 @@ export declare class WorkflowsClient {
|
|
|
88
89
|
* @example
|
|
89
90
|
* await client.workflows.update("id", {
|
|
90
91
|
* verbose: true,
|
|
91
|
-
* name: "
|
|
92
|
-
* workflow_instructions: "Given diagnosis data, find the patient and create condition record",
|
|
92
|
+
* name: "Patient Data Mapping Workflow (v2)",
|
|
93
|
+
* workflow_instructions: "Given diagnosis data, find the patient and create a condition record linked to their encounter",
|
|
93
94
|
* sample_data: {
|
|
94
|
-
* "patient_last_name": "
|
|
95
|
-
* "patient_first_name": "
|
|
96
|
-
* "diagnosis_code": "
|
|
95
|
+
* "patient_last_name": "Rippin",
|
|
96
|
+
* "patient_first_name": "Clay",
|
|
97
|
+
* "diagnosis_code": "I10",
|
|
98
|
+
* "encounter_date": "2024-01-15"
|
|
97
99
|
* },
|
|
98
100
|
* fhir_provider_id: "550e8400-e29b-41d4-a716-446655440000"
|
|
99
101
|
* })
|
|
@@ -130,14 +132,24 @@ export declare class WorkflowsClient {
|
|
|
130
132
|
* @throws {@link phenoml.workflows.InternalServerError}
|
|
131
133
|
*
|
|
132
134
|
* @example
|
|
133
|
-
* await client.workflows.execute("
|
|
135
|
+
* await client.workflows.execute("7a8b9c0d-1234-5678-abcd-ef9876543210", {
|
|
134
136
|
* input_data: {
|
|
135
137
|
* "patient_last_name": "Johnson",
|
|
136
138
|
* "patient_first_name": "Mary",
|
|
137
139
|
* "diagnosis_code": "M79.3",
|
|
138
|
-
* "encounter_date": "2024-
|
|
140
|
+
* "encounter_date": "2024-03-20"
|
|
139
141
|
* }
|
|
140
142
|
* })
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* await client.workflows.execute("7a8b9c0d-1234-5678-abcd-ef9876543210", {
|
|
146
|
+
* input_data: {
|
|
147
|
+
* "patient_last_name": "Johnson",
|
|
148
|
+
* "patient_first_name": "Mary",
|
|
149
|
+
* "diagnosis_code": "M79.3"
|
|
150
|
+
* },
|
|
151
|
+
* preview: true
|
|
152
|
+
* })
|
|
141
153
|
*/
|
|
142
154
|
execute(id: string, request: phenoml.workflows.ExecuteWorkflowRequest, requestOptions?: WorkflowsClient.RequestOptions): core.HttpResponsePromise<phenoml.workflows.ExecuteWorkflowResponse>;
|
|
143
155
|
private __execute;
|
|
@@ -61,7 +61,11 @@ export class WorkflowsClient {
|
|
|
61
61
|
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"),
|
|
62
62
|
method: "GET",
|
|
63
63
|
headers: _headers,
|
|
64
|
-
|
|
64
|
+
queryString: core.url
|
|
65
|
+
.queryBuilder()
|
|
66
|
+
.addMany(_queryParams)
|
|
67
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
68
|
+
.build(),
|
|
65
69
|
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,
|
|
66
70
|
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,
|
|
67
71
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -108,11 +112,12 @@ export class WorkflowsClient {
|
|
|
108
112
|
* await client.workflows.create({
|
|
109
113
|
* verbose: true,
|
|
110
114
|
* name: "Patient Data Mapping Workflow",
|
|
111
|
-
* workflow_instructions: "Given diagnosis data, find the patient and create condition record",
|
|
115
|
+
* workflow_instructions: "Given diagnosis data, find the patient and create a condition record linked to their encounter",
|
|
112
116
|
* sample_data: {
|
|
113
117
|
* "patient_last_name": "Rippin",
|
|
114
118
|
* "patient_first_name": "Clay",
|
|
115
|
-
* "diagnosis_code": "I10"
|
|
119
|
+
* "diagnosis_code": "I10",
|
|
120
|
+
* "encounter_date": "2024-01-15"
|
|
116
121
|
* },
|
|
117
122
|
* fhir_provider_id: "550e8400-e29b-41d4-a716-446655440000"
|
|
118
123
|
* })
|
|
@@ -134,7 +139,11 @@ export class WorkflowsClient {
|
|
|
134
139
|
method: "POST",
|
|
135
140
|
headers: _headers,
|
|
136
141
|
contentType: "application/json",
|
|
137
|
-
|
|
142
|
+
queryString: core.url
|
|
143
|
+
.queryBuilder()
|
|
144
|
+
.addMany(_queryParams)
|
|
145
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
146
|
+
.build(),
|
|
138
147
|
requestType: "json",
|
|
139
148
|
body: _body,
|
|
140
149
|
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,
|
|
@@ -203,7 +212,11 @@ export class WorkflowsClient {
|
|
|
203
212
|
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)}`),
|
|
204
213
|
method: "GET",
|
|
205
214
|
headers: _headers,
|
|
206
|
-
|
|
215
|
+
queryString: core.url
|
|
216
|
+
.queryBuilder()
|
|
217
|
+
.addMany(_queryParams)
|
|
218
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
219
|
+
.build(),
|
|
207
220
|
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,
|
|
208
221
|
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,
|
|
209
222
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -253,12 +266,13 @@ export class WorkflowsClient {
|
|
|
253
266
|
* @example
|
|
254
267
|
* await client.workflows.update("id", {
|
|
255
268
|
* verbose: true,
|
|
256
|
-
* name: "
|
|
257
|
-
* workflow_instructions: "Given diagnosis data, find the patient and create condition record",
|
|
269
|
+
* name: "Patient Data Mapping Workflow (v2)",
|
|
270
|
+
* workflow_instructions: "Given diagnosis data, find the patient and create a condition record linked to their encounter",
|
|
258
271
|
* sample_data: {
|
|
259
|
-
* "patient_last_name": "
|
|
260
|
-
* "patient_first_name": "
|
|
261
|
-
* "diagnosis_code": "
|
|
272
|
+
* "patient_last_name": "Rippin",
|
|
273
|
+
* "patient_first_name": "Clay",
|
|
274
|
+
* "diagnosis_code": "I10",
|
|
275
|
+
* "encounter_date": "2024-01-15"
|
|
262
276
|
* },
|
|
263
277
|
* fhir_provider_id: "550e8400-e29b-41d4-a716-446655440000"
|
|
264
278
|
* })
|
|
@@ -280,7 +294,11 @@ export class WorkflowsClient {
|
|
|
280
294
|
method: "PUT",
|
|
281
295
|
headers: _headers,
|
|
282
296
|
contentType: "application/json",
|
|
283
|
-
|
|
297
|
+
queryString: core.url
|
|
298
|
+
.queryBuilder()
|
|
299
|
+
.addMany(_queryParams)
|
|
300
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
301
|
+
.build(),
|
|
284
302
|
requestType: "json",
|
|
285
303
|
body: _body,
|
|
286
304
|
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,
|
|
@@ -344,7 +362,7 @@ export class WorkflowsClient {
|
|
|
344
362
|
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)}`),
|
|
345
363
|
method: "DELETE",
|
|
346
364
|
headers: _headers,
|
|
347
|
-
|
|
365
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
348
366
|
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
367
|
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
368
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -392,14 +410,24 @@ export class WorkflowsClient {
|
|
|
392
410
|
* @throws {@link phenoml.workflows.InternalServerError}
|
|
393
411
|
*
|
|
394
412
|
* @example
|
|
395
|
-
* await client.workflows.execute("
|
|
413
|
+
* await client.workflows.execute("7a8b9c0d-1234-5678-abcd-ef9876543210", {
|
|
396
414
|
* input_data: {
|
|
397
415
|
* "patient_last_name": "Johnson",
|
|
398
416
|
* "patient_first_name": "Mary",
|
|
399
417
|
* "diagnosis_code": "M79.3",
|
|
400
|
-
* "encounter_date": "2024-
|
|
418
|
+
* "encounter_date": "2024-03-20"
|
|
401
419
|
* }
|
|
402
420
|
* })
|
|
421
|
+
*
|
|
422
|
+
* @example
|
|
423
|
+
* await client.workflows.execute("7a8b9c0d-1234-5678-abcd-ef9876543210", {
|
|
424
|
+
* input_data: {
|
|
425
|
+
* "patient_last_name": "Johnson",
|
|
426
|
+
* "patient_first_name": "Mary",
|
|
427
|
+
* "diagnosis_code": "M79.3"
|
|
428
|
+
* },
|
|
429
|
+
* preview: true
|
|
430
|
+
* })
|
|
403
431
|
*/
|
|
404
432
|
execute(id, request, requestOptions) {
|
|
405
433
|
return core.HttpResponsePromise.fromPromise(this.__execute(id, request, requestOptions));
|
|
@@ -414,7 +442,7 @@ export class WorkflowsClient {
|
|
|
414
442
|
method: "POST",
|
|
415
443
|
headers: _headers,
|
|
416
444
|
contentType: "application/json",
|
|
417
|
-
|
|
445
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
418
446
|
requestType: "json",
|
|
419
447
|
body: request,
|
|
420
448
|
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,
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* {
|
|
4
4
|
* verbose: true,
|
|
5
5
|
* name: "Patient Data Mapping Workflow",
|
|
6
|
-
* workflow_instructions: "Given diagnosis data, find the patient and create condition record",
|
|
6
|
+
* workflow_instructions: "Given diagnosis data, find the patient and create a condition record linked to their encounter",
|
|
7
7
|
* sample_data: {
|
|
8
8
|
* "patient_last_name": "Rippin",
|
|
9
9
|
* "patient_first_name": "Clay",
|
|
10
|
-
* "diagnosis_code": "I10"
|
|
10
|
+
* "diagnosis_code": "I10",
|
|
11
|
+
* "encounter_date": "2024-01-15"
|
|
11
12
|
* },
|
|
12
13
|
* fhir_provider_id: "550e8400-e29b-41d4-a716-446655440000"
|
|
13
14
|
* }
|
|
@@ -5,9 +5,19 @@
|
|
|
5
5
|
* "patient_last_name": "Johnson",
|
|
6
6
|
* "patient_first_name": "Mary",
|
|
7
7
|
* "diagnosis_code": "M79.3",
|
|
8
|
-
* "encounter_date": "2024-
|
|
8
|
+
* "encounter_date": "2024-03-20"
|
|
9
9
|
* }
|
|
10
10
|
* }
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* {
|
|
14
|
+
* input_data: {
|
|
15
|
+
* "patient_last_name": "Johnson",
|
|
16
|
+
* "patient_first_name": "Mary",
|
|
17
|
+
* "diagnosis_code": "M79.3"
|
|
18
|
+
* },
|
|
19
|
+
* preview: true
|
|
20
|
+
* }
|
|
11
21
|
*/
|
|
12
22
|
export interface ExecuteWorkflowRequest {
|
|
13
23
|
/** Input data for workflow execution */
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* verbose: true,
|
|
5
|
-
* name: "
|
|
6
|
-
* workflow_instructions: "Given diagnosis data, find the patient and create condition record",
|
|
5
|
+
* name: "Patient Data Mapping Workflow (v2)",
|
|
6
|
+
* workflow_instructions: "Given diagnosis data, find the patient and create a condition record linked to their encounter",
|
|
7
7
|
* sample_data: {
|
|
8
|
-
* "patient_last_name": "
|
|
9
|
-
* "patient_first_name": "
|
|
10
|
-
* "diagnosis_code": "
|
|
8
|
+
* "patient_last_name": "Rippin",
|
|
9
|
+
* "patient_first_name": "Clay",
|
|
10
|
+
* "diagnosis_code": "I10",
|
|
11
|
+
* "encounter_date": "2024-01-15"
|
|
11
12
|
* },
|
|
12
13
|
* fhir_provider_id: "550e8400-e29b-41d4-a716-446655440000"
|
|
13
14
|
* }
|
|
@@ -2,10 +2,16 @@ import { base64Decode, base64Encode } from "../base64.mjs";
|
|
|
2
2
|
const BASIC_AUTH_HEADER_PREFIX = /^Basic /i;
|
|
3
3
|
export const BasicAuth = {
|
|
4
4
|
toAuthorizationHeader: (basicAuth) => {
|
|
5
|
+
var _a, _b;
|
|
5
6
|
if (basicAuth == null) {
|
|
6
7
|
return undefined;
|
|
7
8
|
}
|
|
8
|
-
const
|
|
9
|
+
const username = (_a = basicAuth.username) !== null && _a !== void 0 ? _a : "";
|
|
10
|
+
const password = (_b = basicAuth.password) !== null && _b !== void 0 ? _b : "";
|
|
11
|
+
if (username === "" && password === "") {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
const token = base64Encode(`${username}:${password}`);
|
|
9
15
|
return `Basic ${token}`;
|
|
10
16
|
},
|
|
11
17
|
fromAuthorizationHeader: (header) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export { type AuthProvider, isAuthProvider } from "./AuthProvider.mjs";
|
|
2
2
|
export type { AuthRequest } from "./AuthRequest.mjs";
|
|
3
3
|
export { BasicAuth } from "./BasicAuth.mjs";
|
|
4
4
|
export { BearerToken } from "./BearerToken.mjs";
|
|
@@ -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>>;
|
|
@@ -71,16 +71,11 @@ const SENSITIVE_QUERY_PARAMS = new Set([
|
|
|
71
71
|
]);
|
|
72
72
|
function redactQueryParameters(queryParameters) {
|
|
73
73
|
if (queryParameters == null) {
|
|
74
|
-
return
|
|
74
|
+
return undefined;
|
|
75
75
|
}
|
|
76
76
|
const redacted = {};
|
|
77
77
|
for (const [key, value] of Object.entries(queryParameters)) {
|
|
78
|
-
|
|
79
|
-
redacted[key] = "[REDACTED]";
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
redacted[key] = value;
|
|
83
|
-
}
|
|
78
|
+
redacted[key] = SENSITIVE_QUERY_PARAMS.has(key.toLowerCase()) ? "[REDACTED]" : value;
|
|
84
79
|
}
|
|
85
80
|
return redacted;
|
|
86
81
|
}
|
|
@@ -182,7 +177,13 @@ function getHeaders(args) {
|
|
|
182
177
|
export function fetcherImpl(args) {
|
|
183
178
|
return __awaiter(this, void 0, void 0, function* () {
|
|
184
179
|
var _a, _b, _c;
|
|
185
|
-
|
|
180
|
+
let url = args.url;
|
|
181
|
+
if (args.queryString != null && args.queryString.length > 0) {
|
|
182
|
+
url = `${url}?${args.queryString}`;
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
url = createRequestUrl(args.url, args.queryParameters);
|
|
186
|
+
}
|
|
186
187
|
const requestBody = yield getRequestBody({
|
|
187
188
|
body: args.body,
|
|
188
189
|
type: (_a = args.requestType) !== null && _a !== void 0 ? _a : "other",
|
|
@@ -257,6 +258,7 @@ export function fetcherImpl(args) {
|
|
|
257
258
|
error: {
|
|
258
259
|
reason: "unknown",
|
|
259
260
|
errorMessage: "The user aborted a request",
|
|
261
|
+
cause: error,
|
|
260
262
|
},
|
|
261
263
|
rawResponse: abortRawResponse,
|
|
262
264
|
};
|
|
@@ -274,6 +276,7 @@ export function fetcherImpl(args) {
|
|
|
274
276
|
ok: false,
|
|
275
277
|
error: {
|
|
276
278
|
reason: "timeout",
|
|
279
|
+
cause: error,
|
|
277
280
|
},
|
|
278
281
|
rawResponse: abortRawResponse,
|
|
279
282
|
};
|
|
@@ -292,6 +295,7 @@ export function fetcherImpl(args) {
|
|
|
292
295
|
error: {
|
|
293
296
|
reason: "unknown",
|
|
294
297
|
errorMessage: error.message,
|
|
298
|
+
cause: error,
|
|
295
299
|
},
|
|
296
300
|
rawResponse: unknownRawResponse,
|
|
297
301
|
};
|
|
@@ -309,6 +313,7 @@ export function fetcherImpl(args) {
|
|
|
309
313
|
error: {
|
|
310
314
|
reason: "unknown",
|
|
311
315
|
errorMessage: toJson(error),
|
|
316
|
+
cause: error,
|
|
312
317
|
},
|
|
313
318
|
rawResponse: unknownRawResponse,
|
|
314
319
|
};
|
|
@@ -11,6 +11,9 @@ const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
|
11
11
|
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
12
12
|
const DEFAULT_MAX_RETRIES = 2;
|
|
13
13
|
const JITTER_FACTOR = 0.2; // 20% random jitter
|
|
14
|
+
function isRetryableStatusCode(statusCode) {
|
|
15
|
+
return [408, 429].includes(statusCode) || statusCode >= 500;
|
|
16
|
+
}
|
|
14
17
|
function addPositiveJitter(delay) {
|
|
15
18
|
const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR;
|
|
16
19
|
return delay * jitterMultiplier;
|
|
@@ -50,7 +53,7 @@ export function requestWithRetries(requestFn_1) {
|
|
|
50
53
|
return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
51
54
|
let response = yield requestFn();
|
|
52
55
|
for (let i = 0; i < maxRetries; ++i) {
|
|
53
|
-
if (
|
|
56
|
+
if (isRetryableStatusCode(response.status)) {
|
|
54
57
|
const delay = getRetryDelayFromHeaders(response, i);
|
|
55
58
|
yield new Promise((resolve) => setTimeout(resolve, delay));
|
|
56
59
|
response = yield requestFn();
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a fluent builder for constructing URL query strings.
|
|
3
|
+
*
|
|
4
|
+
* Each `.add()` call serializes its value immediately (like C#'s builder),
|
|
5
|
+
* so no format tracking is needed — the style is applied at add-time.
|
|
6
|
+
*
|
|
7
|
+
* Usage (generated code):
|
|
8
|
+
*
|
|
9
|
+
* const qs = core.url.queryBuilder()
|
|
10
|
+
* .add("limit", limit)
|
|
11
|
+
* .add("tags", tags, { style: "comma" }) // explode: false
|
|
12
|
+
* .mergeAdditional(requestOptions?.queryParams)
|
|
13
|
+
* .build();
|
|
14
|
+
*/
|
|
15
|
+
export declare function queryBuilder(): QueryStringBuilder;
|
|
16
|
+
declare class QueryStringBuilder {
|
|
17
|
+
private parts;
|
|
18
|
+
/**
|
|
19
|
+
* Adds a query parameter, serializing it immediately.
|
|
20
|
+
*
|
|
21
|
+
* By default arrays use "repeat" format (`key=a&key=b`).
|
|
22
|
+
* Pass `{ style: "comma" }` for OpenAPI `explode: false` parameters
|
|
23
|
+
* to get comma-separated values (`key=a,b,c`).
|
|
24
|
+
*
|
|
25
|
+
* Null / undefined values are silently skipped.
|
|
26
|
+
*/
|
|
27
|
+
add(key: string, value: unknown, options?: {
|
|
28
|
+
style?: "comma";
|
|
29
|
+
}): this;
|
|
30
|
+
/**
|
|
31
|
+
* Adds multiple query parameters at once from a record.
|
|
32
|
+
* All parameters use the default "repeat" array format.
|
|
33
|
+
* Null / undefined values are silently skipped.
|
|
34
|
+
*/
|
|
35
|
+
addMany(params: Record<string, unknown>): this;
|
|
36
|
+
/**
|
|
37
|
+
* Merges additional query parameters supplied at call-time via
|
|
38
|
+
* `requestOptions.queryParams`. Overrides existing keys (last-write-wins).
|
|
39
|
+
*/
|
|
40
|
+
mergeAdditional(additionalParams?: Record<string, unknown>): this;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the assembled query string (without the leading `?`).
|
|
43
|
+
* Returns an empty string when no parameters were added.
|
|
44
|
+
*/
|
|
45
|
+
build(): string;
|
|
46
|
+
}
|
|
47
|
+
export {};
|