phenoml 0.0.20 → 0.0.22
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/Client.js +2 -2
- package/dist/cjs/api/resources/agent/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/agent/client/Client.js +1 -1
- package/dist/cjs/api/resources/agent/client/requests/AgentGetChatMessagesRequest.d.ts +12 -3
- package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestRole.d.ts +7 -0
- package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestRole.js +10 -0
- package/dist/cjs/api/resources/agent/types/ChatMessageTemplate.d.ts +24 -2
- package/dist/cjs/api/resources/agent/types/ChatMessageTemplate.js +17 -0
- package/dist/cjs/api/resources/agent/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/agent/types/index.js +1 -0
- package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +30 -9
- package/dist/cjs/api/resources/fhirProvider/client/Client.js +29 -10
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.ts +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderListResponse.d.ts +16 -1
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderResponse.d.ts +11 -1
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.ts +15 -0
- package/dist/cjs/api/resources/fhirProvider/types/Provider.d.ts +7 -1
- package/dist/cjs/api/resources/fhirProvider/types/Provider.js +7 -1
- package/dist/cjs/api/resources/fhirProvider/types/ServiceAccountMetadata.d.ts +13 -0
- package/dist/cjs/api/resources/fhirProvider/types/ServiceAccountMetadata.js +3 -0
- package/dist/cjs/api/resources/fhirProvider/types/index.d.ts +2 -1
- package/dist/cjs/api/resources/fhirProvider/types/index.js +2 -1
- package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +8 -1
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +8 -1
- package/dist/cjs/api/resources/lang2Fhir/client/requests/SearchRequest.d.ts +11 -1
- package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.d.ts +42 -2
- package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.js +37 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/agent/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/agent/client/Client.mjs +1 -1
- package/dist/esm/api/resources/agent/client/requests/AgentGetChatMessagesRequest.d.mts +12 -3
- package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestRole.d.mts +7 -0
- package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestRole.mjs +7 -0
- package/dist/esm/api/resources/agent/types/ChatMessageTemplate.d.mts +24 -2
- package/dist/esm/api/resources/agent/types/ChatMessageTemplate.mjs +16 -1
- package/dist/esm/api/resources/agent/types/index.d.mts +1 -0
- package/dist/esm/api/resources/agent/types/index.mjs +1 -0
- package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +30 -9
- package/dist/esm/api/resources/fhirProvider/client/Client.mjs +29 -10
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.mts +5 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderListResponse.d.mts +16 -1
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderResponse.d.mts +11 -1
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.mts +15 -0
- package/dist/esm/api/resources/fhirProvider/types/Provider.d.mts +7 -1
- package/dist/esm/api/resources/fhirProvider/types/Provider.mjs +7 -1
- package/dist/esm/api/resources/fhirProvider/types/ServiceAccountMetadata.d.mts +13 -0
- package/dist/esm/api/resources/fhirProvider/types/ServiceAccountMetadata.mjs +2 -0
- package/dist/esm/api/resources/fhirProvider/types/index.d.mts +2 -1
- package/dist/esm/api/resources/fhirProvider/types/index.mjs +2 -1
- package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +8 -1
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +8 -1
- package/dist/esm/api/resources/lang2Fhir/client/requests/SearchRequest.d.mts +11 -1
- package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.d.mts +42 -2
- package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.mjs +36 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +40 -11
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.d.ts +0 -6
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.d.mts +0 -6
- /package/dist/cjs/api/resources/fhirProvider/types/{FhirProviderSetActiveAuthConfigResponse.js → FhirProviderSandboxInfo.js} +0 -0
- /package/dist/esm/api/resources/fhirProvider/types/{FhirProviderSetActiveAuthConfigResponse.mjs → FhirProviderSandboxInfo.mjs} +0 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -52,8 +52,8 @@ class phenomlClient {
|
|
|
52
52
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
53
53
|
"X-Fern-Language": "JavaScript",
|
|
54
54
|
"X-Fern-SDK-Name": "phenoml",
|
|
55
|
-
"X-Fern-SDK-Version": "0.0.
|
|
56
|
-
"User-Agent": "phenoml/0.0.
|
|
55
|
+
"X-Fern-SDK-Version": "0.0.22",
|
|
56
|
+
"User-Agent": "phenoml/0.0.22",
|
|
57
57
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
58
58
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
59
59
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -4,7 +4,7 @@ import type * as phenoml from "../../../../index.js";
|
|
|
4
4
|
* {
|
|
5
5
|
* chat_session_id: "chat_session_id",
|
|
6
6
|
* num_messages: 1,
|
|
7
|
-
* role: "
|
|
7
|
+
* role: "user",
|
|
8
8
|
* order: "asc"
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
@@ -13,8 +13,17 @@ export interface AgentGetChatMessagesRequest {
|
|
|
13
13
|
chat_session_id: string;
|
|
14
14
|
/** Number of messages to return */
|
|
15
15
|
num_messages?: number;
|
|
16
|
-
/**
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Filter by one or more message roles. Multiple roles can be specified as a comma-separated string.
|
|
18
|
+
* If not specified, messages with all roles are returned.
|
|
19
|
+
*
|
|
20
|
+
* **Available roles:**
|
|
21
|
+
* - `user` - Messages from the user
|
|
22
|
+
* - `assistant` - Text responses from the AI assistant
|
|
23
|
+
* - `model` - Function/tool call requests from the model
|
|
24
|
+
* - `function` - Function/tool call results
|
|
25
|
+
*/
|
|
26
|
+
role?: phenoml.agent.AgentGetChatMessagesRequestRole;
|
|
18
27
|
/** Order of messages */
|
|
19
28
|
order?: phenoml.agent.AgentGetChatMessagesRequestOrder;
|
|
20
29
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const AgentGetChatMessagesRequestRole: {
|
|
2
|
+
readonly User: "user";
|
|
3
|
+
readonly Assistant: "assistant";
|
|
4
|
+
readonly Model: "model";
|
|
5
|
+
readonly Function: "function";
|
|
6
|
+
};
|
|
7
|
+
export type AgentGetChatMessagesRequestRole = (typeof AgentGetChatMessagesRequestRole)[keyof typeof AgentGetChatMessagesRequestRole];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AgentGetChatMessagesRequestRole = void 0;
|
|
5
|
+
exports.AgentGetChatMessagesRequestRole = {
|
|
6
|
+
User: "user",
|
|
7
|
+
Assistant: "assistant",
|
|
8
|
+
Model: "model",
|
|
9
|
+
Function: "function",
|
|
10
|
+
};
|
|
@@ -3,8 +3,14 @@ export interface ChatMessageTemplate {
|
|
|
3
3
|
id?: string;
|
|
4
4
|
/** Chat session ID */
|
|
5
5
|
session_id?: string;
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Message role indicating the source/type of the message:
|
|
8
|
+
* - `user` - Messages from the user
|
|
9
|
+
* - `assistant` - Text responses from the AI assistant
|
|
10
|
+
* - `model` - Function/tool call requests to the model
|
|
11
|
+
* - `function` - Function/tool call results
|
|
12
|
+
*/
|
|
13
|
+
role?: ChatMessageTemplate.Role;
|
|
8
14
|
/** Message content */
|
|
9
15
|
content?: string;
|
|
10
16
|
/** Message created time */
|
|
@@ -22,3 +28,19 @@ export interface ChatMessageTemplate {
|
|
|
22
28
|
/** Message order */
|
|
23
29
|
message_order?: number;
|
|
24
30
|
}
|
|
31
|
+
export declare namespace ChatMessageTemplate {
|
|
32
|
+
/**
|
|
33
|
+
* Message role indicating the source/type of the message:
|
|
34
|
+
* - `user` - Messages from the user
|
|
35
|
+
* - `assistant` - Text responses from the AI assistant
|
|
36
|
+
* - `model` - Function/tool call requests to the model
|
|
37
|
+
* - `function` - Function/tool call results
|
|
38
|
+
*/
|
|
39
|
+
const Role: {
|
|
40
|
+
readonly User: "user";
|
|
41
|
+
readonly Assistant: "assistant";
|
|
42
|
+
readonly Model: "model";
|
|
43
|
+
readonly Function: "function";
|
|
44
|
+
};
|
|
45
|
+
type Role = (typeof Role)[keyof typeof Role];
|
|
46
|
+
}
|
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ChatMessageTemplate = void 0;
|
|
5
|
+
var ChatMessageTemplate;
|
|
6
|
+
(function (ChatMessageTemplate) {
|
|
7
|
+
/**
|
|
8
|
+
* Message role indicating the source/type of the message:
|
|
9
|
+
* - `user` - Messages from the user
|
|
10
|
+
* - `assistant` - Text responses from the AI assistant
|
|
11
|
+
* - `model` - Function/tool call requests to the model
|
|
12
|
+
* - `function` - Function/tool call results
|
|
13
|
+
*/
|
|
14
|
+
ChatMessageTemplate.Role = {
|
|
15
|
+
User: "user",
|
|
16
|
+
Assistant: "assistant",
|
|
17
|
+
Model: "model",
|
|
18
|
+
Function: "function",
|
|
19
|
+
};
|
|
20
|
+
})(ChatMessageTemplate || (exports.ChatMessageTemplate = ChatMessageTemplate = {}));
|
|
@@ -2,6 +2,7 @@ export * from "./AgentChatResponse.js";
|
|
|
2
2
|
export * from "./AgentCreateRequest.js";
|
|
3
3
|
export * from "./AgentDeleteResponse.js";
|
|
4
4
|
export * from "./AgentGetChatMessagesRequestOrder.js";
|
|
5
|
+
export * from "./AgentGetChatMessagesRequestRole.js";
|
|
5
6
|
export * from "./AgentGetChatMessagesResponse.js";
|
|
6
7
|
export * from "./AgentListResponse.js";
|
|
7
8
|
export * from "./AgentPromptsResponse.js";
|
|
@@ -18,6 +18,7 @@ __exportStar(require("./AgentChatResponse.js"), exports);
|
|
|
18
18
|
__exportStar(require("./AgentCreateRequest.js"), exports);
|
|
19
19
|
__exportStar(require("./AgentDeleteResponse.js"), exports);
|
|
20
20
|
__exportStar(require("./AgentGetChatMessagesRequestOrder.js"), exports);
|
|
21
|
+
__exportStar(require("./AgentGetChatMessagesRequestRole.js"), exports);
|
|
21
22
|
__exportStar(require("./AgentGetChatMessagesResponse.js"), exports);
|
|
22
23
|
__exportStar(require("./AgentListResponse.js"), exports);
|
|
23
24
|
__exportStar(require("./AgentPromptsResponse.js"), exports);
|
|
@@ -11,7 +11,9 @@ export declare class FhirProvider {
|
|
|
11
11
|
protected readonly _options: FhirProvider.Options;
|
|
12
12
|
constructor(_options: FhirProvider.Options);
|
|
13
13
|
/**
|
|
14
|
-
* Creates a new FHIR provider configuration with authentication credentials
|
|
14
|
+
* Creates a new FHIR provider configuration with authentication credentials.
|
|
15
|
+
*
|
|
16
|
+
* Note: The "sandbox" provider type cannot be created via this API - it is managed internally.
|
|
15
17
|
*
|
|
16
18
|
* @param {phenoml.fhirProvider.FhirProviderCreateRequest} request
|
|
17
19
|
* @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -32,12 +34,14 @@ export declare class FhirProvider {
|
|
|
32
34
|
create(request: phenoml.fhirProvider.FhirProviderCreateRequest, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
|
|
33
35
|
private __create;
|
|
34
36
|
/**
|
|
35
|
-
* Retrieves a list of all active FHIR providers for the authenticated user
|
|
37
|
+
* Retrieves a list of all active FHIR providers for the authenticated user.
|
|
38
|
+
*
|
|
39
|
+
* On shared instances, only sandbox providers are returned.
|
|
40
|
+
* Sandbox providers return FhirProviderSandboxInfo.
|
|
36
41
|
*
|
|
37
42
|
* @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
43
|
*
|
|
39
44
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
40
|
-
* @throws {@link phenoml.fhirProvider.ForbiddenError}
|
|
41
45
|
* @throws {@link phenoml.fhirProvider.InternalServerError}
|
|
42
46
|
*
|
|
43
47
|
* @example
|
|
@@ -46,7 +50,10 @@ export declare class FhirProvider {
|
|
|
46
50
|
list(requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderListResponse>;
|
|
47
51
|
private __list;
|
|
48
52
|
/**
|
|
49
|
-
* Retrieves a specific FHIR provider configuration by its ID
|
|
53
|
+
* Retrieves a specific FHIR provider configuration by its ID.
|
|
54
|
+
*
|
|
55
|
+
* Sandbox providers return FhirProviderSandboxInfo.
|
|
56
|
+
* On shared instances, only sandbox providers can be accessed.
|
|
50
57
|
*
|
|
51
58
|
* @param {string} fhirProviderId - ID of the FHIR provider to retrieve
|
|
52
59
|
* @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -62,7 +69,9 @@ export declare class FhirProvider {
|
|
|
62
69
|
get(fhirProviderId: string, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
|
|
63
70
|
private __get;
|
|
64
71
|
/**
|
|
65
|
-
* Soft deletes a FHIR provider by setting is_active to false
|
|
72
|
+
* Soft deletes a FHIR provider by setting is_active to false.
|
|
73
|
+
*
|
|
74
|
+
* Note: Sandbox providers cannot be deleted.
|
|
66
75
|
*
|
|
67
76
|
* @param {string} fhirProviderId - ID of the FHIR provider to delete
|
|
68
77
|
* @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -78,7 +87,10 @@ export declare class FhirProvider {
|
|
|
78
87
|
delete(fhirProviderId: string, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderDeleteResponse>;
|
|
79
88
|
private __delete;
|
|
80
89
|
/**
|
|
81
|
-
* Adds a new authentication configuration to an existing FHIR provider.
|
|
90
|
+
* Adds a new authentication configuration to an existing FHIR provider.
|
|
91
|
+
* This enables key rotation and multiple auth configurations per provider.
|
|
92
|
+
*
|
|
93
|
+
* Note: Sandbox providers cannot be modified.
|
|
82
94
|
*
|
|
83
95
|
* @param {string} fhirProviderId - ID of the FHIR provider to add auth config to
|
|
84
96
|
* @param {phenoml.fhirProvider.FhirProviderAddAuthConfigRequest} request
|
|
@@ -98,7 +110,13 @@ export declare class FhirProvider {
|
|
|
98
110
|
addAuthConfig(fhirProviderId: string, request: phenoml.fhirProvider.FhirProviderAddAuthConfigRequest, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
|
|
99
111
|
private __addAuthConfig;
|
|
100
112
|
/**
|
|
101
|
-
* Sets which authentication configuration should be active for a FHIR provider.
|
|
113
|
+
* Sets which authentication configuration should be active for a FHIR provider.
|
|
114
|
+
* Only one auth config can be active at a time.
|
|
115
|
+
*
|
|
116
|
+
* If the specified auth config is already active, the request succeeds without
|
|
117
|
+
* making any changes and returns a message indicating the config is already active.
|
|
118
|
+
*
|
|
119
|
+
* Note: Sandbox providers cannot be modified.
|
|
102
120
|
*
|
|
103
121
|
* @param {string} fhirProviderId - ID of the FHIR provider
|
|
104
122
|
* @param {phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest} request
|
|
@@ -115,10 +133,13 @@ export declare class FhirProvider {
|
|
|
115
133
|
* auth_config_id: "auth-config-123"
|
|
116
134
|
* })
|
|
117
135
|
*/
|
|
118
|
-
setActiveAuthConfig(fhirProviderId: string, request: phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.
|
|
136
|
+
setActiveAuthConfig(fhirProviderId: string, request: phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
|
|
119
137
|
private __setActiveAuthConfig;
|
|
120
138
|
/**
|
|
121
|
-
* Removes an authentication configuration from a FHIR provider.
|
|
139
|
+
* Removes an authentication configuration from a FHIR provider.
|
|
140
|
+
* Cannot remove the currently active auth configuration.
|
|
141
|
+
*
|
|
142
|
+
* Note: Sandbox providers cannot be modified.
|
|
122
143
|
*
|
|
123
144
|
* @param {string} fhirProviderId - ID of the FHIR provider
|
|
124
145
|
* @param {phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest} request
|
|
@@ -54,7 +54,9 @@ class FhirProvider {
|
|
|
54
54
|
this._options = _options;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
|
-
* Creates a new FHIR provider configuration with authentication credentials
|
|
57
|
+
* Creates a new FHIR provider configuration with authentication credentials.
|
|
58
|
+
*
|
|
59
|
+
* Note: The "sandbox" provider type cannot be created via this API - it is managed internally.
|
|
58
60
|
*
|
|
59
61
|
* @param {phenoml.fhirProvider.FhirProviderCreateRequest} request
|
|
60
62
|
* @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -133,12 +135,14 @@ class FhirProvider {
|
|
|
133
135
|
});
|
|
134
136
|
}
|
|
135
137
|
/**
|
|
136
|
-
* Retrieves a list of all active FHIR providers for the authenticated user
|
|
138
|
+
* Retrieves a list of all active FHIR providers for the authenticated user.
|
|
139
|
+
*
|
|
140
|
+
* On shared instances, only sandbox providers are returned.
|
|
141
|
+
* Sandbox providers return FhirProviderSandboxInfo.
|
|
137
142
|
*
|
|
138
143
|
* @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
|
|
139
144
|
*
|
|
140
145
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
141
|
-
* @throws {@link phenoml.fhirProvider.ForbiddenError}
|
|
142
146
|
* @throws {@link phenoml.fhirProvider.InternalServerError}
|
|
143
147
|
*
|
|
144
148
|
* @example
|
|
@@ -170,8 +174,6 @@ class FhirProvider {
|
|
|
170
174
|
switch (_response.error.statusCode) {
|
|
171
175
|
case 401:
|
|
172
176
|
throw new phenoml.fhirProvider.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
173
|
-
case 403:
|
|
174
|
-
throw new phenoml.fhirProvider.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
175
177
|
case 500:
|
|
176
178
|
throw new phenoml.fhirProvider.InternalServerError(_response.error.body, _response.rawResponse);
|
|
177
179
|
default:
|
|
@@ -200,7 +202,10 @@ class FhirProvider {
|
|
|
200
202
|
});
|
|
201
203
|
}
|
|
202
204
|
/**
|
|
203
|
-
* Retrieves a specific FHIR provider configuration by its ID
|
|
205
|
+
* Retrieves a specific FHIR provider configuration by its ID.
|
|
206
|
+
*
|
|
207
|
+
* Sandbox providers return FhirProviderSandboxInfo.
|
|
208
|
+
* On shared instances, only sandbox providers can be accessed.
|
|
204
209
|
*
|
|
205
210
|
* @param {string} fhirProviderId - ID of the FHIR provider to retrieve
|
|
206
211
|
* @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -271,7 +276,9 @@ class FhirProvider {
|
|
|
271
276
|
});
|
|
272
277
|
}
|
|
273
278
|
/**
|
|
274
|
-
* Soft deletes a FHIR provider by setting is_active to false
|
|
279
|
+
* Soft deletes a FHIR provider by setting is_active to false.
|
|
280
|
+
*
|
|
281
|
+
* Note: Sandbox providers cannot be deleted.
|
|
275
282
|
*
|
|
276
283
|
* @param {string} fhirProviderId - ID of the FHIR provider to delete
|
|
277
284
|
* @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -342,7 +349,10 @@ class FhirProvider {
|
|
|
342
349
|
});
|
|
343
350
|
}
|
|
344
351
|
/**
|
|
345
|
-
* Adds a new authentication configuration to an existing FHIR provider.
|
|
352
|
+
* Adds a new authentication configuration to an existing FHIR provider.
|
|
353
|
+
* This enables key rotation and multiple auth configurations per provider.
|
|
354
|
+
*
|
|
355
|
+
* Note: Sandbox providers cannot be modified.
|
|
346
356
|
*
|
|
347
357
|
* @param {string} fhirProviderId - ID of the FHIR provider to add auth config to
|
|
348
358
|
* @param {phenoml.fhirProvider.FhirProviderAddAuthConfigRequest} request
|
|
@@ -422,7 +432,13 @@ class FhirProvider {
|
|
|
422
432
|
});
|
|
423
433
|
}
|
|
424
434
|
/**
|
|
425
|
-
* Sets which authentication configuration should be active for a FHIR provider.
|
|
435
|
+
* Sets which authentication configuration should be active for a FHIR provider.
|
|
436
|
+
* Only one auth config can be active at a time.
|
|
437
|
+
*
|
|
438
|
+
* If the specified auth config is already active, the request succeeds without
|
|
439
|
+
* making any changes and returns a message indicating the config is already active.
|
|
440
|
+
*
|
|
441
|
+
* Note: Sandbox providers cannot be modified.
|
|
426
442
|
*
|
|
427
443
|
* @param {string} fhirProviderId - ID of the FHIR provider
|
|
428
444
|
* @param {phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest} request
|
|
@@ -502,7 +518,10 @@ class FhirProvider {
|
|
|
502
518
|
});
|
|
503
519
|
}
|
|
504
520
|
/**
|
|
505
|
-
* Removes an authentication configuration from a FHIR provider.
|
|
521
|
+
* Removes an authentication configuration from a FHIR provider.
|
|
522
|
+
* Cannot remove the currently active auth configuration.
|
|
523
|
+
*
|
|
524
|
+
* Note: Sandbox providers cannot be modified.
|
|
506
525
|
*
|
|
507
526
|
* @param {string} fhirProviderId - ID of the FHIR provider
|
|
508
527
|
* @param {phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest} request
|
|
@@ -8,12 +8,17 @@ export interface FhirProviderAuthConfig {
|
|
|
8
8
|
auth_method?: phenoml.fhirProvider.AuthMethod;
|
|
9
9
|
/** Whether this auth configuration is currently active */
|
|
10
10
|
is_active_auth_config?: boolean;
|
|
11
|
+
/** Timestamp when this auth configuration was created */
|
|
12
|
+
created_at?: string;
|
|
13
|
+
/** Timestamp when this auth configuration was last updated */
|
|
14
|
+
updated_at?: string;
|
|
11
15
|
/** Public key certificate in PEM format (visible for JWT auth) */
|
|
12
16
|
public_key_cert_pem?: string;
|
|
13
17
|
json_web_key?: phenoml.fhirProvider.JsonWebKey;
|
|
14
18
|
/** Expiry time for credentials (JWT auth only) */
|
|
15
19
|
credential_expiry?: string;
|
|
16
20
|
smart_configuration?: phenoml.fhirProvider.SmartConfiguration;
|
|
21
|
+
service_account_metadata?: phenoml.fhirProvider.ServiceAccountMetadata;
|
|
17
22
|
/** OAuth scopes */
|
|
18
23
|
scopes?: string;
|
|
19
24
|
}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import type * as phenoml from "../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Response payload for listing FHIR Providers.
|
|
4
|
+
* On shared instances, only sandbox providers are returned (as FhirProviderSandboxInfo).
|
|
5
|
+
* On dedicated instances, full provider details are returned (as FhirProviderTemplate).
|
|
6
|
+
*/
|
|
2
7
|
export interface FhirProviderListResponse {
|
|
3
8
|
success?: boolean;
|
|
4
9
|
message?: string;
|
|
5
|
-
|
|
10
|
+
/**
|
|
11
|
+
* List of FHIR providers. Sandbox providers return FhirProviderSandboxInfo,
|
|
12
|
+
* other providers return FhirProviderTemplate.
|
|
13
|
+
*/
|
|
14
|
+
fhir_providers?: FhirProviderListResponse.FhirProviders.Item[];
|
|
15
|
+
}
|
|
16
|
+
export declare namespace FhirProviderListResponse {
|
|
17
|
+
type FhirProviders = FhirProviders.Item[];
|
|
18
|
+
namespace FhirProviders {
|
|
19
|
+
type Item = phenoml.fhirProvider.FhirProviderTemplate | phenoml.fhirProvider.FhirProviderSandboxInfo;
|
|
20
|
+
}
|
|
6
21
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import type * as phenoml from "../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Response payload for a single FHIR Provider operation.
|
|
4
|
+
*/
|
|
2
5
|
export interface FhirProviderResponse {
|
|
3
6
|
success?: boolean;
|
|
4
7
|
message?: string;
|
|
5
|
-
|
|
8
|
+
/** Provider details. Sandbox providers return FhirProviderSandboxInfo. */
|
|
9
|
+
data?: FhirProviderResponse.Data;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace FhirProviderResponse {
|
|
12
|
+
/**
|
|
13
|
+
* Provider details. Sandbox providers return FhirProviderSandboxInfo.
|
|
14
|
+
*/
|
|
15
|
+
type Data = phenoml.fhirProvider.FhirProviderTemplate | phenoml.fhirProvider.FhirProviderSandboxInfo;
|
|
6
16
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Information returned for sandbox FHIR providers.
|
|
3
|
+
*/
|
|
4
|
+
export interface FhirProviderSandboxInfo {
|
|
5
|
+
/** Unique identifier for the FHIR provider */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Display name for the FHIR provider */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** Optional description of the FHIR provider */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** Provider type (always "sandbox" for this schema) */
|
|
12
|
+
provider?: "sandbox";
|
|
13
|
+
/** Whether the FHIR provider is active */
|
|
14
|
+
is_active?: boolean;
|
|
15
|
+
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Type of FHIR server provider.
|
|
3
|
+
*
|
|
4
|
+
* The "sandbox" provider type is managed internally and cannot be created via API.
|
|
5
|
+
* It is used on shared instances.
|
|
6
|
+
*/
|
|
2
7
|
export declare const Provider: {
|
|
3
8
|
readonly Athenahealth: "athenahealth";
|
|
4
9
|
readonly Canvas: "canvas";
|
|
@@ -8,5 +13,6 @@ export declare const Provider: {
|
|
|
8
13
|
readonly GoogleHealthcare: "google_healthcare";
|
|
9
14
|
readonly Hapi: "hapi";
|
|
10
15
|
readonly Medplum: "medplum";
|
|
16
|
+
readonly Sandbox: "sandbox";
|
|
11
17
|
};
|
|
12
18
|
export type Provider = (typeof Provider)[keyof typeof Provider];
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Provider = void 0;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Type of FHIR server provider.
|
|
7
|
+
*
|
|
8
|
+
* The "sandbox" provider type is managed internally and cannot be created via API.
|
|
9
|
+
* It is used on shared instances.
|
|
10
|
+
*/
|
|
6
11
|
exports.Provider = {
|
|
7
12
|
Athenahealth: "athenahealth",
|
|
8
13
|
Canvas: "canvas",
|
|
@@ -12,4 +17,5 @@ exports.Provider = {
|
|
|
12
17
|
GoogleHealthcare: "google_healthcare",
|
|
13
18
|
Hapi: "hapi",
|
|
14
19
|
Medplum: "medplum",
|
|
20
|
+
Sandbox: "sandbox",
|
|
15
21
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Non-sensitive metadata from a Google Cloud Service Account, exposed in API responses to help identify auth configurations without revealing sensitive credentials.
|
|
3
|
+
*/
|
|
4
|
+
export interface ServiceAccountMetadata {
|
|
5
|
+
/** Account type (always "service_account") */
|
|
6
|
+
type?: string;
|
|
7
|
+
/** Google Cloud project ID */
|
|
8
|
+
project_id?: string;
|
|
9
|
+
/** Service account email address */
|
|
10
|
+
client_email?: string;
|
|
11
|
+
/** Service account client ID */
|
|
12
|
+
client_id?: string;
|
|
13
|
+
}
|
|
@@ -4,11 +4,12 @@ export * from "./FhirProviderDeleteResponse.js";
|
|
|
4
4
|
export * from "./FhirProviderListResponse.js";
|
|
5
5
|
export * from "./FhirProviderRemoveAuthConfigResponse.js";
|
|
6
6
|
export * from "./FhirProviderResponse.js";
|
|
7
|
-
export * from "./
|
|
7
|
+
export * from "./FhirProviderSandboxInfo.js";
|
|
8
8
|
export * from "./FhirProviderTemplate.js";
|
|
9
9
|
export * from "./FhirQueryResponse.js";
|
|
10
10
|
export * from "./JsonWebKey.js";
|
|
11
11
|
export * from "./Provider.js";
|
|
12
12
|
export * from "./Role.js";
|
|
13
13
|
export * from "./ServiceAccountKey.js";
|
|
14
|
+
export * from "./ServiceAccountMetadata.js";
|
|
14
15
|
export * from "./SmartConfiguration.js";
|
|
@@ -20,11 +20,12 @@ __exportStar(require("./FhirProviderDeleteResponse.js"), exports);
|
|
|
20
20
|
__exportStar(require("./FhirProviderListResponse.js"), exports);
|
|
21
21
|
__exportStar(require("./FhirProviderRemoveAuthConfigResponse.js"), exports);
|
|
22
22
|
__exportStar(require("./FhirProviderResponse.js"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
23
|
+
__exportStar(require("./FhirProviderSandboxInfo.js"), exports);
|
|
24
24
|
__exportStar(require("./FhirProviderTemplate.js"), exports);
|
|
25
25
|
__exportStar(require("./FhirQueryResponse.js"), exports);
|
|
26
26
|
__exportStar(require("./JsonWebKey.js"), exports);
|
|
27
27
|
__exportStar(require("./Provider.js"), exports);
|
|
28
28
|
__exportStar(require("./Role.js"), exports);
|
|
29
29
|
__exportStar(require("./ServiceAccountKey.js"), exports);
|
|
30
|
+
__exportStar(require("./ServiceAccountMetadata.js"), exports);
|
|
30
31
|
__exportStar(require("./SmartConfiguration.js"), exports);
|
|
@@ -49,7 +49,14 @@ export declare class Lang2Fhir {
|
|
|
49
49
|
createMulti(request: phenoml.lang2Fhir.CreateMultiRequest, requestOptions?: Lang2Fhir.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.CreateMultiResponse>;
|
|
50
50
|
private __createMulti;
|
|
51
51
|
/**
|
|
52
|
-
* Converts natural language text into FHIR search parameters
|
|
52
|
+
* Converts natural language text into FHIR search parameters.
|
|
53
|
+
* Automatically identifies the appropriate FHIR resource type and generates valid search query parameters.
|
|
54
|
+
*
|
|
55
|
+
* Supported resource types include: AllergyIntolerance, Appointment, CarePlan, CareTeam, Condition,
|
|
56
|
+
* Coverage, Device, DiagnosticReport, DocumentReference, Encounter, Goal, Immunization, Location,
|
|
57
|
+
* Medication, MedicationRequest, Observation, Organization, Patient, PlanDefinition, Practitioner,
|
|
58
|
+
* PractitionerRole, Procedure, Provenance, Questionnaire, QuestionnaireResponse, RelatedPerson,
|
|
59
|
+
* Schedule, ServiceRequest, Slot, and Specimen.
|
|
53
60
|
*
|
|
54
61
|
* @param {phenoml.lang2Fhir.SearchRequest} request
|
|
55
62
|
* @param {Lang2Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -201,7 +201,14 @@ class Lang2Fhir {
|
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
204
|
-
* Converts natural language text into FHIR search parameters
|
|
204
|
+
* Converts natural language text into FHIR search parameters.
|
|
205
|
+
* Automatically identifies the appropriate FHIR resource type and generates valid search query parameters.
|
|
206
|
+
*
|
|
207
|
+
* Supported resource types include: AllergyIntolerance, Appointment, CarePlan, CareTeam, Condition,
|
|
208
|
+
* Coverage, Device, DiagnosticReport, DocumentReference, Encounter, Goal, Immunization, Location,
|
|
209
|
+
* Medication, MedicationRequest, Observation, Organization, Patient, PlanDefinition, Practitioner,
|
|
210
|
+
* PractitionerRole, Procedure, Provenance, Questionnaire, QuestionnaireResponse, RelatedPerson,
|
|
211
|
+
* Schedule, ServiceRequest, Slot, and Specimen.
|
|
205
212
|
*
|
|
206
213
|
* @param {phenoml.lang2Fhir.SearchRequest} request
|
|
207
214
|
* @param {Lang2Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -5,6 +5,16 @@
|
|
|
5
5
|
* }
|
|
6
6
|
*/
|
|
7
7
|
export interface SearchRequest {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Natural language text to convert into FHIR search parameters.
|
|
10
|
+
* The system will automatically identify the appropriate resource type and generate valid search parameters.
|
|
11
|
+
*
|
|
12
|
+
* Examples:
|
|
13
|
+
* - "Appointments between March 2-9, 2025" → Appointment search with date range
|
|
14
|
+
* - "Patients with diabetes" → Condition search with code parameter
|
|
15
|
+
* - "Active medication requests for metformin" → MedicationRequest search
|
|
16
|
+
* - "Lab results for creatinine" → DiagnosticReport search
|
|
17
|
+
* - "Dr. Smith's schedule" → Practitioner or Schedule search
|
|
18
|
+
*/
|
|
9
19
|
text: string;
|
|
10
20
|
}
|
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
export interface SearchResponse {
|
|
2
2
|
/** The FHIR resource type identified for the search */
|
|
3
|
-
resourceType?:
|
|
4
|
-
/**
|
|
3
|
+
resourceType?: SearchResponse.ResourceType;
|
|
4
|
+
/**
|
|
5
|
+
* FHIR search parameters in standard query string format.
|
|
6
|
+
* Parameters are formatted according to the FHIR specification with appropriate operators.
|
|
7
|
+
* Code parameters are resolved to standard terminology codes (SNOMED CT, LOINC, RxNorm, ICD-10-CM).
|
|
8
|
+
*/
|
|
5
9
|
searchParams?: string;
|
|
6
10
|
}
|
|
11
|
+
export declare namespace SearchResponse {
|
|
12
|
+
/** The FHIR resource type identified for the search */
|
|
13
|
+
const ResourceType: {
|
|
14
|
+
readonly AllergyIntolerance: "AllergyIntolerance";
|
|
15
|
+
readonly Appointment: "Appointment";
|
|
16
|
+
readonly CarePlan: "CarePlan";
|
|
17
|
+
readonly CareTeam: "CareTeam";
|
|
18
|
+
readonly Condition: "Condition";
|
|
19
|
+
readonly Coverage: "Coverage";
|
|
20
|
+
readonly Device: "Device";
|
|
21
|
+
readonly DiagnosticReport: "DiagnosticReport";
|
|
22
|
+
readonly DocumentReference: "DocumentReference";
|
|
23
|
+
readonly Encounter: "Encounter";
|
|
24
|
+
readonly Goal: "Goal";
|
|
25
|
+
readonly Immunization: "Immunization";
|
|
26
|
+
readonly Location: "Location";
|
|
27
|
+
readonly Medication: "Medication";
|
|
28
|
+
readonly MedicationRequest: "MedicationRequest";
|
|
29
|
+
readonly Observation: "Observation";
|
|
30
|
+
readonly Organization: "Organization";
|
|
31
|
+
readonly Patient: "Patient";
|
|
32
|
+
readonly PlanDefinition: "PlanDefinition";
|
|
33
|
+
readonly Practitioner: "Practitioner";
|
|
34
|
+
readonly PractitionerRole: "PractitionerRole";
|
|
35
|
+
readonly Procedure: "Procedure";
|
|
36
|
+
readonly Provenance: "Provenance";
|
|
37
|
+
readonly Questionnaire: "Questionnaire";
|
|
38
|
+
readonly QuestionnaireResponse: "QuestionnaireResponse";
|
|
39
|
+
readonly RelatedPerson: "RelatedPerson";
|
|
40
|
+
readonly Schedule: "Schedule";
|
|
41
|
+
readonly ServiceRequest: "ServiceRequest";
|
|
42
|
+
readonly Slot: "Slot";
|
|
43
|
+
readonly Specimen: "Specimen";
|
|
44
|
+
};
|
|
45
|
+
type ResourceType = (typeof ResourceType)[keyof typeof ResourceType];
|
|
46
|
+
}
|