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.
Files changed (64) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/agent/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/agent/client/Client.js +1 -1
  4. package/dist/cjs/api/resources/agent/client/requests/AgentGetChatMessagesRequest.d.ts +12 -3
  5. package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestRole.d.ts +7 -0
  6. package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestRole.js +10 -0
  7. package/dist/cjs/api/resources/agent/types/ChatMessageTemplate.d.ts +24 -2
  8. package/dist/cjs/api/resources/agent/types/ChatMessageTemplate.js +17 -0
  9. package/dist/cjs/api/resources/agent/types/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/agent/types/index.js +1 -0
  11. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +30 -9
  12. package/dist/cjs/api/resources/fhirProvider/client/Client.js +29 -10
  13. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.ts +5 -0
  14. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderListResponse.d.ts +16 -1
  15. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderResponse.d.ts +11 -1
  16. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.ts +15 -0
  17. package/dist/cjs/api/resources/fhirProvider/types/Provider.d.ts +7 -1
  18. package/dist/cjs/api/resources/fhirProvider/types/Provider.js +7 -1
  19. package/dist/cjs/api/resources/fhirProvider/types/ServiceAccountMetadata.d.ts +13 -0
  20. package/dist/cjs/api/resources/fhirProvider/types/ServiceAccountMetadata.js +3 -0
  21. package/dist/cjs/api/resources/fhirProvider/types/index.d.ts +2 -1
  22. package/dist/cjs/api/resources/fhirProvider/types/index.js +2 -1
  23. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +8 -1
  24. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +8 -1
  25. package/dist/cjs/api/resources/lang2Fhir/client/requests/SearchRequest.d.ts +11 -1
  26. package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.d.ts +42 -2
  27. package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.js +37 -0
  28. package/dist/cjs/version.d.ts +1 -1
  29. package/dist/cjs/version.js +1 -1
  30. package/dist/esm/Client.mjs +2 -2
  31. package/dist/esm/api/resources/agent/client/Client.d.mts +1 -1
  32. package/dist/esm/api/resources/agent/client/Client.mjs +1 -1
  33. package/dist/esm/api/resources/agent/client/requests/AgentGetChatMessagesRequest.d.mts +12 -3
  34. package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestRole.d.mts +7 -0
  35. package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestRole.mjs +7 -0
  36. package/dist/esm/api/resources/agent/types/ChatMessageTemplate.d.mts +24 -2
  37. package/dist/esm/api/resources/agent/types/ChatMessageTemplate.mjs +16 -1
  38. package/dist/esm/api/resources/agent/types/index.d.mts +1 -0
  39. package/dist/esm/api/resources/agent/types/index.mjs +1 -0
  40. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +30 -9
  41. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +29 -10
  42. package/dist/esm/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.mts +5 -0
  43. package/dist/esm/api/resources/fhirProvider/types/FhirProviderListResponse.d.mts +16 -1
  44. package/dist/esm/api/resources/fhirProvider/types/FhirProviderResponse.d.mts +11 -1
  45. package/dist/esm/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.mts +15 -0
  46. package/dist/esm/api/resources/fhirProvider/types/Provider.d.mts +7 -1
  47. package/dist/esm/api/resources/fhirProvider/types/Provider.mjs +7 -1
  48. package/dist/esm/api/resources/fhirProvider/types/ServiceAccountMetadata.d.mts +13 -0
  49. package/dist/esm/api/resources/fhirProvider/types/ServiceAccountMetadata.mjs +2 -0
  50. package/dist/esm/api/resources/fhirProvider/types/index.d.mts +2 -1
  51. package/dist/esm/api/resources/fhirProvider/types/index.mjs +2 -1
  52. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +8 -1
  53. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +8 -1
  54. package/dist/esm/api/resources/lang2Fhir/client/requests/SearchRequest.d.mts +11 -1
  55. package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.d.mts +42 -2
  56. package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.mjs +36 -1
  57. package/dist/esm/version.d.mts +1 -1
  58. package/dist/esm/version.mjs +1 -1
  59. package/package.json +1 -1
  60. package/reference.md +40 -11
  61. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.d.ts +0 -6
  62. package/dist/esm/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.d.mts +0 -6
  63. /package/dist/cjs/api/resources/fhirProvider/types/{FhirProviderSetActiveAuthConfigResponse.js → FhirProviderSandboxInfo.js} +0 -0
  64. /package/dist/esm/api/resources/fhirProvider/types/{FhirProviderSetActiveAuthConfigResponse.mjs → FhirProviderSandboxInfo.mjs} +0 -0
@@ -1,3 +1,40 @@
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.SearchResponse = void 0;
5
+ var SearchResponse;
6
+ (function (SearchResponse) {
7
+ /** The FHIR resource type identified for the search */
8
+ SearchResponse.ResourceType = {
9
+ AllergyIntolerance: "AllergyIntolerance",
10
+ Appointment: "Appointment",
11
+ CarePlan: "CarePlan",
12
+ CareTeam: "CareTeam",
13
+ Condition: "Condition",
14
+ Coverage: "Coverage",
15
+ Device: "Device",
16
+ DiagnosticReport: "DiagnosticReport",
17
+ DocumentReference: "DocumentReference",
18
+ Encounter: "Encounter",
19
+ Goal: "Goal",
20
+ Immunization: "Immunization",
21
+ Location: "Location",
22
+ Medication: "Medication",
23
+ MedicationRequest: "MedicationRequest",
24
+ Observation: "Observation",
25
+ Organization: "Organization",
26
+ Patient: "Patient",
27
+ PlanDefinition: "PlanDefinition",
28
+ Practitioner: "Practitioner",
29
+ PractitionerRole: "PractitionerRole",
30
+ Procedure: "Procedure",
31
+ Provenance: "Provenance",
32
+ Questionnaire: "Questionnaire",
33
+ QuestionnaireResponse: "QuestionnaireResponse",
34
+ RelatedPerson: "RelatedPerson",
35
+ Schedule: "Schedule",
36
+ ServiceRequest: "ServiceRequest",
37
+ Slot: "Slot",
38
+ Specimen: "Specimen",
39
+ };
40
+ })(SearchResponse || (exports.SearchResponse = SearchResponse = {}));
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.20";
1
+ export declare const SDK_VERSION = "0.0.22";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.20";
4
+ exports.SDK_VERSION = "0.0.22";
@@ -16,8 +16,8 @@ export class phenomlClient {
16
16
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
17
17
  "X-Fern-Language": "JavaScript",
18
18
  "X-Fern-SDK-Name": "phenoml",
19
- "X-Fern-SDK-Version": "0.0.20",
20
- "User-Agent": "phenoml/0.0.20",
19
+ "X-Fern-SDK-Version": "0.0.22",
20
+ "User-Agent": "phenoml/0.0.22",
21
21
  "X-Fern-Runtime": core.RUNTIME.type,
22
22
  "X-Fern-Runtime-Version": core.RUNTIME.version,
23
23
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -169,7 +169,7 @@ export declare class Agent {
169
169
  * await client.agent.getChatMessages({
170
170
  * chat_session_id: "chat_session_id",
171
171
  * num_messages: 1,
172
- * role: "role",
172
+ * role: "user",
173
173
  * order: "asc"
174
174
  * })
175
175
  */
@@ -580,7 +580,7 @@ export class Agent {
580
580
  * await client.agent.getChatMessages({
581
581
  * chat_session_id: "chat_session_id",
582
582
  * num_messages: 1,
583
- * role: "role",
583
+ * role: "user",
584
584
  * order: "asc"
585
585
  * })
586
586
  */
@@ -4,7 +4,7 @@ import type * as phenoml from "../../../../index.mjs";
4
4
  * {
5
5
  * chat_session_id: "chat_session_id",
6
6
  * num_messages: 1,
7
- * role: "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
- /** Filter by role */
17
- role?: string;
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,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const AgentGetChatMessagesRequestRole = {
3
+ User: "user",
4
+ Assistant: "assistant",
5
+ Model: "model",
6
+ Function: "function",
7
+ };
@@ -3,8 +3,14 @@ export interface ChatMessageTemplate {
3
3
  id?: string;
4
4
  /** Chat session ID */
5
5
  session_id?: string;
6
- /** Message role */
7
- role?: string;
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,2 +1,17 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var ChatMessageTemplate;
3
+ (function (ChatMessageTemplate) {
4
+ /**
5
+ * Message role indicating the source/type of the message:
6
+ * - `user` - Messages from the user
7
+ * - `assistant` - Text responses from the AI assistant
8
+ * - `model` - Function/tool call requests to the model
9
+ * - `function` - Function/tool call results
10
+ */
11
+ ChatMessageTemplate.Role = {
12
+ User: "user",
13
+ Assistant: "assistant",
14
+ Model: "model",
15
+ Function: "function",
16
+ };
17
+ })(ChatMessageTemplate || (ChatMessageTemplate = {}));
@@ -2,6 +2,7 @@ export * from "./AgentChatResponse.mjs";
2
2
  export * from "./AgentCreateRequest.mjs";
3
3
  export * from "./AgentDeleteResponse.mjs";
4
4
  export * from "./AgentGetChatMessagesRequestOrder.mjs";
5
+ export * from "./AgentGetChatMessagesRequestRole.mjs";
5
6
  export * from "./AgentGetChatMessagesResponse.mjs";
6
7
  export * from "./AgentListResponse.mjs";
7
8
  export * from "./AgentPromptsResponse.mjs";
@@ -2,6 +2,7 @@ export * from "./AgentChatResponse.mjs";
2
2
  export * from "./AgentCreateRequest.mjs";
3
3
  export * from "./AgentDeleteResponse.mjs";
4
4
  export * from "./AgentGetChatMessagesRequestOrder.mjs";
5
+ export * from "./AgentGetChatMessagesRequestRole.mjs";
5
6
  export * from "./AgentGetChatMessagesResponse.mjs";
6
7
  export * from "./AgentListResponse.mjs";
7
8
  export * from "./AgentPromptsResponse.mjs";
@@ -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. This enables key rotation and multiple auth configurations per 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. Only one auth config can be active at a time.
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.FhirProviderSetActiveAuthConfigResponse>;
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. Cannot remove the currently active auth configuration.
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
@@ -18,7 +18,9 @@ export class FhirProvider {
18
18
  this._options = _options;
19
19
  }
20
20
  /**
21
- * Creates a new FHIR provider configuration with authentication credentials
21
+ * Creates a new FHIR provider configuration with authentication credentials.
22
+ *
23
+ * Note: The "sandbox" provider type cannot be created via this API - it is managed internally.
22
24
  *
23
25
  * @param {phenoml.fhirProvider.FhirProviderCreateRequest} request
24
26
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
@@ -97,12 +99,14 @@ export class FhirProvider {
97
99
  });
98
100
  }
99
101
  /**
100
- * Retrieves a list of all active FHIR providers for the authenticated user
102
+ * Retrieves a list of all active FHIR providers for the authenticated user.
103
+ *
104
+ * On shared instances, only sandbox providers are returned.
105
+ * Sandbox providers return FhirProviderSandboxInfo.
101
106
  *
102
107
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
103
108
  *
104
109
  * @throws {@link phenoml.fhirProvider.UnauthorizedError}
105
- * @throws {@link phenoml.fhirProvider.ForbiddenError}
106
110
  * @throws {@link phenoml.fhirProvider.InternalServerError}
107
111
  *
108
112
  * @example
@@ -134,8 +138,6 @@ export class FhirProvider {
134
138
  switch (_response.error.statusCode) {
135
139
  case 401:
136
140
  throw new phenoml.fhirProvider.UnauthorizedError(_response.error.body, _response.rawResponse);
137
- case 403:
138
- throw new phenoml.fhirProvider.ForbiddenError(_response.error.body, _response.rawResponse);
139
141
  case 500:
140
142
  throw new phenoml.fhirProvider.InternalServerError(_response.error.body, _response.rawResponse);
141
143
  default:
@@ -164,7 +166,10 @@ export class FhirProvider {
164
166
  });
165
167
  }
166
168
  /**
167
- * Retrieves a specific FHIR provider configuration by its ID
169
+ * Retrieves a specific FHIR provider configuration by its ID.
170
+ *
171
+ * Sandbox providers return FhirProviderSandboxInfo.
172
+ * On shared instances, only sandbox providers can be accessed.
168
173
  *
169
174
  * @param {string} fhirProviderId - ID of the FHIR provider to retrieve
170
175
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
@@ -235,7 +240,9 @@ export class FhirProvider {
235
240
  });
236
241
  }
237
242
  /**
238
- * Soft deletes a FHIR provider by setting is_active to false
243
+ * Soft deletes a FHIR provider by setting is_active to false.
244
+ *
245
+ * Note: Sandbox providers cannot be deleted.
239
246
  *
240
247
  * @param {string} fhirProviderId - ID of the FHIR provider to delete
241
248
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
@@ -306,7 +313,10 @@ export class FhirProvider {
306
313
  });
307
314
  }
308
315
  /**
309
- * Adds a new authentication configuration to an existing FHIR provider. This enables key rotation and multiple auth configurations per provider.
316
+ * Adds a new authentication configuration to an existing FHIR provider.
317
+ * This enables key rotation and multiple auth configurations per provider.
318
+ *
319
+ * Note: Sandbox providers cannot be modified.
310
320
  *
311
321
  * @param {string} fhirProviderId - ID of the FHIR provider to add auth config to
312
322
  * @param {phenoml.fhirProvider.FhirProviderAddAuthConfigRequest} request
@@ -386,7 +396,13 @@ export class FhirProvider {
386
396
  });
387
397
  }
388
398
  /**
389
- * Sets which authentication configuration should be active for a FHIR provider. Only one auth config can be active at a time.
399
+ * Sets which authentication configuration should be active for a FHIR provider.
400
+ * Only one auth config can be active at a time.
401
+ *
402
+ * If the specified auth config is already active, the request succeeds without
403
+ * making any changes and returns a message indicating the config is already active.
404
+ *
405
+ * Note: Sandbox providers cannot be modified.
390
406
  *
391
407
  * @param {string} fhirProviderId - ID of the FHIR provider
392
408
  * @param {phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest} request
@@ -466,7 +482,10 @@ export class FhirProvider {
466
482
  });
467
483
  }
468
484
  /**
469
- * Removes an authentication configuration from a FHIR provider. Cannot remove the currently active auth configuration.
485
+ * Removes an authentication configuration from a FHIR provider.
486
+ * Cannot remove the currently active auth configuration.
487
+ *
488
+ * Note: Sandbox providers cannot be modified.
470
489
  *
471
490
  * @param {string} fhirProviderId - ID of the FHIR provider
472
491
  * @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.mjs";
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
- fhir_providers?: phenoml.fhirProvider.FhirProviderTemplate[];
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.mjs";
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
- data?: phenoml.fhirProvider.FhirProviderTemplate;
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
- /** Type of FHIR server provider */
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];
@@ -1,5 +1,10 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- /** Type of FHIR server provider */
2
+ /**
3
+ * Type of FHIR server provider.
4
+ *
5
+ * The "sandbox" provider type is managed internally and cannot be created via API.
6
+ * It is used on shared instances.
7
+ */
3
8
  export const Provider = {
4
9
  Athenahealth: "athenahealth",
5
10
  Canvas: "canvas",
@@ -9,4 +14,5 @@ export const Provider = {
9
14
  GoogleHealthcare: "google_healthcare",
10
15
  Hapi: "hapi",
11
16
  Medplum: "medplum",
17
+ Sandbox: "sandbox",
12
18
  };
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -4,11 +4,12 @@ export * from "./FhirProviderDeleteResponse.mjs";
4
4
  export * from "./FhirProviderListResponse.mjs";
5
5
  export * from "./FhirProviderRemoveAuthConfigResponse.mjs";
6
6
  export * from "./FhirProviderResponse.mjs";
7
- export * from "./FhirProviderSetActiveAuthConfigResponse.mjs";
7
+ export * from "./FhirProviderSandboxInfo.mjs";
8
8
  export * from "./FhirProviderTemplate.mjs";
9
9
  export * from "./FhirQueryResponse.mjs";
10
10
  export * from "./JsonWebKey.mjs";
11
11
  export * from "./Provider.mjs";
12
12
  export * from "./Role.mjs";
13
13
  export * from "./ServiceAccountKey.mjs";
14
+ export * from "./ServiceAccountMetadata.mjs";
14
15
  export * from "./SmartConfiguration.mjs";
@@ -4,11 +4,12 @@ export * from "./FhirProviderDeleteResponse.mjs";
4
4
  export * from "./FhirProviderListResponse.mjs";
5
5
  export * from "./FhirProviderRemoveAuthConfigResponse.mjs";
6
6
  export * from "./FhirProviderResponse.mjs";
7
- export * from "./FhirProviderSetActiveAuthConfigResponse.mjs";
7
+ export * from "./FhirProviderSandboxInfo.mjs";
8
8
  export * from "./FhirProviderTemplate.mjs";
9
9
  export * from "./FhirQueryResponse.mjs";
10
10
  export * from "./JsonWebKey.mjs";
11
11
  export * from "./Provider.mjs";
12
12
  export * from "./Role.mjs";
13
13
  export * from "./ServiceAccountKey.mjs";
14
+ export * from "./ServiceAccountMetadata.mjs";
14
15
  export * from "./SmartConfiguration.mjs";
@@ -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.
@@ -165,7 +165,14 @@ export class Lang2Fhir {
165
165
  });
166
166
  }
167
167
  /**
168
- * Converts natural language text into FHIR search parameters
168
+ * Converts natural language text into FHIR search parameters.
169
+ * Automatically identifies the appropriate FHIR resource type and generates valid search query parameters.
170
+ *
171
+ * Supported resource types include: AllergyIntolerance, Appointment, CarePlan, CareTeam, Condition,
172
+ * Coverage, Device, DiagnosticReport, DocumentReference, Encounter, Goal, Immunization, Location,
173
+ * Medication, MedicationRequest, Observation, Organization, Patient, PlanDefinition, Practitioner,
174
+ * PractitionerRole, Procedure, Provenance, Questionnaire, QuestionnaireResponse, RelatedPerson,
175
+ * Schedule, ServiceRequest, Slot, and Specimen.
169
176
  *
170
177
  * @param {phenoml.lang2Fhir.SearchRequest} request
171
178
  * @param {Lang2Fhir.RequestOptions} requestOptions - Request-specific configuration.
@@ -5,6 +5,16 @@
5
5
  * }
6
6
  */
7
7
  export interface SearchRequest {
8
- /** Natural language text to convert into FHIR search parameters */
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
  }