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,6 +1,46 @@
1
1
  export interface SearchResponse {
2
2
  /** The FHIR resource type identified for the search */
3
- resourceType?: string;
4
- /** FHIR search parameters in standard format */
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
+ }
@@ -1,2 +1,37 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var SearchResponse;
3
+ (function (SearchResponse) {
4
+ /** The FHIR resource type identified for the search */
5
+ SearchResponse.ResourceType = {
6
+ AllergyIntolerance: "AllergyIntolerance",
7
+ Appointment: "Appointment",
8
+ CarePlan: "CarePlan",
9
+ CareTeam: "CareTeam",
10
+ Condition: "Condition",
11
+ Coverage: "Coverage",
12
+ Device: "Device",
13
+ DiagnosticReport: "DiagnosticReport",
14
+ DocumentReference: "DocumentReference",
15
+ Encounter: "Encounter",
16
+ Goal: "Goal",
17
+ Immunization: "Immunization",
18
+ Location: "Location",
19
+ Medication: "Medication",
20
+ MedicationRequest: "MedicationRequest",
21
+ Observation: "Observation",
22
+ Organization: "Organization",
23
+ Patient: "Patient",
24
+ PlanDefinition: "PlanDefinition",
25
+ Practitioner: "Practitioner",
26
+ PractitionerRole: "PractitionerRole",
27
+ Procedure: "Procedure",
28
+ Provenance: "Provenance",
29
+ Questionnaire: "Questionnaire",
30
+ QuestionnaireResponse: "QuestionnaireResponse",
31
+ RelatedPerson: "RelatedPerson",
32
+ Schedule: "Schedule",
33
+ ServiceRequest: "ServiceRequest",
34
+ Slot: "Slot",
35
+ Specimen: "Specimen",
36
+ };
37
+ })(SearchResponse || (SearchResponse = {}));
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.20";
1
+ export declare const SDK_VERSION = "0.0.22";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.0.20";
1
+ export const SDK_VERSION = "0.0.22";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phenoml",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "private": false,
5
5
  "repository": "github:PhenoML/phenoml-ts-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -514,7 +514,7 @@ Retrieves a list of chat messages for a given chat session
514
514
  await client.agent.getChatMessages({
515
515
  chat_session_id: "chat_session_id",
516
516
  num_messages: 1,
517
- role: "role",
517
+ role: "user",
518
518
  order: "asc"
519
519
  });
520
520
 
@@ -1589,7 +1589,7 @@ Examples:
1589
1589
  </dl>
1590
1590
  </details>
1591
1591
 
1592
- <details><summary><code>client.fhir.<a href="/src/api/resources/fhir/client/Client.ts">delete</a>(fhirProviderId, fhirPath, { ...params }) -> Record<string, unknown></code></summary>
1592
+ <details><summary><code>client.fhir.<a href="/src/api/resources/fhir/client/Client.ts">delete</a>(fhirProviderId, fhirPath, { ...params }) -> Record&lt;string, unknown&gt;</code></summary>
1593
1593
  <dl>
1594
1594
  <dd>
1595
1595
 
@@ -1914,7 +1914,9 @@ The ID of the FHIR provider to use. Can be either:
1914
1914
  <dl>
1915
1915
  <dd>
1916
1916
 
1917
- Creates a new FHIR provider configuration with authentication credentials
1917
+ Creates a new FHIR provider configuration with authentication credentials.
1918
+
1919
+ Note: The "sandbox" provider type cannot be created via this API - it is managed internally.
1918
1920
  </dd>
1919
1921
  </dl>
1920
1922
  </dd>
@@ -1982,7 +1984,10 @@ await client.fhirProvider.create({
1982
1984
  <dl>
1983
1985
  <dd>
1984
1986
 
1985
- Retrieves a list of all active FHIR providers for the authenticated user
1987
+ Retrieves a list of all active FHIR providers for the authenticated user.
1988
+
1989
+ On shared instances, only sandbox providers are returned.
1990
+ Sandbox providers return FhirProviderSandboxInfo.
1986
1991
  </dd>
1987
1992
  </dl>
1988
1993
  </dd>
@@ -2037,7 +2042,10 @@ await client.fhirProvider.list();
2037
2042
  <dl>
2038
2043
  <dd>
2039
2044
 
2040
- Retrieves a specific FHIR provider configuration by its ID
2045
+ Retrieves a specific FHIR provider configuration by its ID.
2046
+
2047
+ Sandbox providers return FhirProviderSandboxInfo.
2048
+ On shared instances, only sandbox providers can be accessed.
2041
2049
  </dd>
2042
2050
  </dl>
2043
2051
  </dd>
@@ -2100,7 +2108,9 @@ await client.fhirProvider.get("fhir_provider_id");
2100
2108
  <dl>
2101
2109
  <dd>
2102
2110
 
2103
- Soft deletes a FHIR provider by setting is_active to false
2111
+ Soft deletes a FHIR provider by setting is_active to false.
2112
+
2113
+ Note: Sandbox providers cannot be deleted.
2104
2114
  </dd>
2105
2115
  </dl>
2106
2116
  </dd>
@@ -2163,7 +2173,10 @@ await client.fhirProvider.delete("fhir_provider_id");
2163
2173
  <dl>
2164
2174
  <dd>
2165
2175
 
2166
- Adds a new authentication configuration to an existing FHIR provider. This enables key rotation and multiple auth configurations per provider.
2176
+ Adds a new authentication configuration to an existing FHIR provider.
2177
+ This enables key rotation and multiple auth configurations per provider.
2178
+
2179
+ Note: Sandbox providers cannot be modified.
2167
2180
  </dd>
2168
2181
  </dl>
2169
2182
  </dd>
@@ -2224,7 +2237,7 @@ await client.fhirProvider.addAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad",
2224
2237
  </dl>
2225
2238
  </details>
2226
2239
 
2227
- <details><summary><code>client.fhirProvider.<a href="/src/api/resources/fhirProvider/client/Client.ts">setActiveAuthConfig</a>(fhirProviderId, { ...params }) -> phenoml.FhirProviderSetActiveAuthConfigResponse</code></summary>
2240
+ <details><summary><code>client.fhirProvider.<a href="/src/api/resources/fhirProvider/client/Client.ts">setActiveAuthConfig</a>(fhirProviderId, { ...params }) -> phenoml.FhirProviderResponse</code></summary>
2228
2241
  <dl>
2229
2242
  <dd>
2230
2243
 
@@ -2236,7 +2249,13 @@ await client.fhirProvider.addAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad",
2236
2249
  <dl>
2237
2250
  <dd>
2238
2251
 
2239
- Sets which authentication configuration should be active for a FHIR provider. Only one auth config can be active at a time.
2252
+ Sets which authentication configuration should be active for a FHIR provider.
2253
+ Only one auth config can be active at a time.
2254
+
2255
+ If the specified auth config is already active, the request succeeds without
2256
+ making any changes and returns a message indicating the config is already active.
2257
+
2258
+ Note: Sandbox providers cannot be modified.
2240
2259
  </dd>
2241
2260
  </dl>
2242
2261
  </dd>
@@ -2309,7 +2328,10 @@ await client.fhirProvider.setActiveAuthConfig("1716d214-de93-43a4-aa6b-a878d864e
2309
2328
  <dl>
2310
2329
  <dd>
2311
2330
 
2312
- Removes an authentication configuration from a FHIR provider. Cannot remove the currently active auth configuration.
2331
+ Removes an authentication configuration from a FHIR provider.
2332
+ Cannot remove the currently active auth configuration.
2333
+
2334
+ Note: Sandbox providers cannot be modified.
2313
2335
  </dd>
2314
2336
  </dl>
2315
2337
  </dd>
@@ -2517,7 +2539,14 @@ await client.lang2Fhir.createMulti({
2517
2539
  <dl>
2518
2540
  <dd>
2519
2541
 
2520
- Converts natural language text into FHIR search parameters
2542
+ Converts natural language text into FHIR search parameters.
2543
+ Automatically identifies the appropriate FHIR resource type and generates valid search query parameters.
2544
+
2545
+ Supported resource types include: AllergyIntolerance, Appointment, CarePlan, CareTeam, Condition,
2546
+ Coverage, Device, DiagnosticReport, DocumentReference, Encounter, Goal, Immunization, Location,
2547
+ Medication, MedicationRequest, Observation, Organization, Patient, PlanDefinition, Practitioner,
2548
+ PractitionerRole, Procedure, Provenance, Questionnaire, QuestionnaireResponse, RelatedPerson,
2549
+ Schedule, ServiceRequest, Slot, and Specimen.
2521
2550
  </dd>
2522
2551
  </dl>
2523
2552
  </dd>
@@ -1,6 +0,0 @@
1
- import type * as phenoml from "../../../index.js";
2
- export interface FhirProviderSetActiveAuthConfigResponse {
3
- success?: boolean;
4
- message?: string;
5
- data?: phenoml.fhirProvider.FhirProviderTemplate;
6
- }
@@ -1,6 +0,0 @@
1
- import type * as phenoml from "../../../index.mjs";
2
- export interface FhirProviderSetActiveAuthConfigResponse {
3
- success?: boolean;
4
- message?: string;
5
- data?: phenoml.fhirProvider.FhirProviderTemplate;
6
- }