phenoml 6.4.0 → 7.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.
Files changed (36) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/fhirProvider/client/Client.js +1 -1
  4. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.d.ts +2 -2
  5. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.ts +4 -2
  6. package/dist/cjs/api/resources/fhirProvider/types/AuthMethod.d.ts +22 -1
  7. package/dist/cjs/api/resources/fhirProvider/types/AuthMethod.js +22 -1
  8. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.ts +0 -2
  9. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +0 -2
  10. package/dist/cjs/api/resources/fhirProvider/types/Role.d.ts +20 -19
  11. package/dist/cjs/api/resources/fhirProvider/types/Role.js +20 -19
  12. package/dist/cjs/api/resources/tools/types/McpServerResponse.d.ts +0 -2
  13. package/dist/cjs/api/resources/tools/types/McpServerToolResponse.d.ts +0 -2
  14. package/dist/cjs/core/fetcher/Fetcher.js +1 -5
  15. package/dist/cjs/core/stream/Stream.js +1 -4
  16. package/dist/cjs/version.d.ts +1 -1
  17. package/dist/cjs/version.js +1 -1
  18. package/dist/esm/Client.mjs +2 -2
  19. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +1 -1
  20. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +1 -1
  21. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.d.mts +2 -2
  22. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.mts +4 -2
  23. package/dist/esm/api/resources/fhirProvider/types/AuthMethod.d.mts +22 -1
  24. package/dist/esm/api/resources/fhirProvider/types/AuthMethod.mjs +22 -1
  25. package/dist/esm/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.mts +0 -2
  26. package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +0 -2
  27. package/dist/esm/api/resources/fhirProvider/types/Role.d.mts +20 -19
  28. package/dist/esm/api/resources/fhirProvider/types/Role.mjs +20 -19
  29. package/dist/esm/api/resources/tools/types/McpServerResponse.d.mts +0 -2
  30. package/dist/esm/api/resources/tools/types/McpServerToolResponse.d.mts +0 -2
  31. package/dist/esm/core/fetcher/Fetcher.mjs +1 -5
  32. package/dist/esm/core/stream/Stream.mjs +1 -4
  33. package/dist/esm/version.d.mts +1 -1
  34. package/dist/esm/version.mjs +1 -1
  35. package/package.json +1 -1
  36. package/reference.md +1 -1
@@ -52,8 +52,8 @@ class phenomlClient {
52
52
  this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: (0, headers_js_1.mergeHeaders)({
53
53
  "X-Fern-Language": "JavaScript",
54
54
  "X-Fern-SDK-Name": "phenoml",
55
- "X-Fern-SDK-Version": "6.4.0",
56
- "User-Agent": "phenoml/6.4.0",
55
+ "X-Fern-SDK-Version": "7.0.0",
56
+ "User-Agent": "phenoml/7.0.0",
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) });
@@ -68,7 +68,7 @@ export declare class FhirProvider {
68
68
  get(fhir_provider_id: string, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
69
69
  private __get;
70
70
  /**
71
- * Soft deletes a FHIR provider by setting is_active to false.
71
+ * Deletes a FHIR provider.
72
72
  *
73
73
  * Note: Sandbox providers cannot be deleted.
74
74
  *
@@ -279,7 +279,7 @@ class FhirProvider {
279
279
  });
280
280
  }
281
281
  /**
282
- * Soft deletes a FHIR provider by setting is_active to false.
282
+ * Deletes a FHIR provider.
283
283
  *
284
284
  * Note: Sandbox providers cannot be deleted.
285
285
  *
@@ -10,9 +10,9 @@ export interface FhirProviderAddAuthConfigRequest {
10
10
  /** OAuth client secret (required for client_secret and on_behalf_of auth methods) */
11
11
  client_secret?: string;
12
12
  service_account_key?: phenoml.fhirProvider.ServiceAccountKey;
13
- /** Expiry time for JWT credentials (only applicable for JWT auth method) */
13
+ /** Expiry time for JWT credentials (only applicable for JWT auth method). If omitted, a default expiry is used. */
14
14
  credential_expiry?: string;
15
15
  role?: phenoml.fhirProvider.Role;
16
- /** OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated. */
16
+ /** OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. Only applicable to `client_secret`, `jwt`, and `on_behalf_of` auth methods; specifying scopes for other auth methods will return an error. Make sure the scopes you specify are appropriate for the auth config and provider you are using. */
17
17
  scopes?: string;
18
18
  }
@@ -17,12 +17,14 @@ export interface FhirProviderCreateRequest {
17
17
  auth_method: phenoml.fhirProvider.AuthMethod;
18
18
  /** Base URL of the FHIR server */
19
19
  base_url: string;
20
- /** OAuth client ID (required for most auth methods) */
20
+ /** OAuth client ID (required for jwt, client_secret, and on_behalf_of auth methods) */
21
21
  client_id?: string;
22
22
  /** OAuth client secret (required for client_secret and on_behalf_of auth methods) */
23
23
  client_secret?: string;
24
24
  service_account_key?: phenoml.fhirProvider.ServiceAccountKey;
25
+ /** Expiry time for JWT credentials (only applicable for JWT auth method). If omitted, a default expiry is used. */
26
+ credential_expiry?: string;
25
27
  role?: phenoml.fhirProvider.Role;
26
- /** OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated. */
28
+ /** OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. Only applicable to `client_secret`, `jwt`, and `on_behalf_of` auth methods; specifying scopes for other auth methods will return an error. Make sure the scopes you specify are appropriate for the auth config and provider you are using. */
27
29
  scopes?: string;
28
30
  }
@@ -1,4 +1,25 @@
1
- /** Authentication method for the FHIR provider. Only one authentication method can be used at a time, but these can be rotated on the FHIR Provider as needed. For the 'token_passthrough' authentication method, you must provide the token in the X-Phenoml-Fhir-Provider header in the format {fhir_provider_id}:{oauth2_token}. For the 'on_behalf_of' authentication method, you must provide the Patient or Practitioner reference in the X-Phenoml-On-Behalf-Of header in the format Patient/{uuid} or Practitioner/{uuid}. This only works for the medplum provider currently. More on the authentication headers and how to structure them can be found in the FHIR Proxy, Tools and Agent documentation. */
1
+ /**
2
+ * Authentication method for the FHIR provider. Only one authentication method can be used at a time,
3
+ * but these can be rotated on the FHIR Provider as needed.
4
+ *
5
+ * **Scope behavior by auth method:**
6
+ * - `client_secret`, `jwt`, `on_behalf_of`: Scopes are included in the OAuth token request.
7
+ * They can be configured using the `role` or `scopes` field. If neither is specified, provider-specific
8
+ * default scopes derived from a default role are used.
9
+ * - `google_healthcare`: Uses a fixed Google Cloud Healthcare scope. Specifying `role` or `scopes` will
10
+ * return an error.
11
+ * - `token_passthrough`: The caller provides their own bearer token via the X-Phenoml-Fhir-Provider header
12
+ * as one or more comma-separated {fhir_provider_id}:{oauth2_token} pairs. Specifying `role` or `scopes`
13
+ * will return an error.
14
+ * - `none`: No authentication is performed. Specifying `role` or `scopes` will return an error.
15
+ *
16
+ * For the `on_behalf_of` authentication method, you must also provide the Patient or Practitioner reference
17
+ * in the X-Phenoml-On-Behalf-Of header in the format Patient/{uuid} or Practitioner/{uuid}. This only works
18
+ * for the medplum provider currently.
19
+ *
20
+ * More on the authentication headers and how to structure them can be found in the FHIR Proxy, Tools and
21
+ * Agent documentation.
22
+ */
2
23
  export declare const AuthMethod: {
3
24
  readonly ClientSecret: "client_secret";
4
25
  readonly GoogleHealthcare: "google_healthcare";
@@ -2,7 +2,28 @@
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.AuthMethod = void 0;
5
- /** Authentication method for the FHIR provider. Only one authentication method can be used at a time, but these can be rotated on the FHIR Provider as needed. For the 'token_passthrough' authentication method, you must provide the token in the X-Phenoml-Fhir-Provider header in the format {fhir_provider_id}:{oauth2_token}. For the 'on_behalf_of' authentication method, you must provide the Patient or Practitioner reference in the X-Phenoml-On-Behalf-Of header in the format Patient/{uuid} or Practitioner/{uuid}. This only works for the medplum provider currently. More on the authentication headers and how to structure them can be found in the FHIR Proxy, Tools and Agent documentation. */
5
+ /**
6
+ * Authentication method for the FHIR provider. Only one authentication method can be used at a time,
7
+ * but these can be rotated on the FHIR Provider as needed.
8
+ *
9
+ * **Scope behavior by auth method:**
10
+ * - `client_secret`, `jwt`, `on_behalf_of`: Scopes are included in the OAuth token request.
11
+ * They can be configured using the `role` or `scopes` field. If neither is specified, provider-specific
12
+ * default scopes derived from a default role are used.
13
+ * - `google_healthcare`: Uses a fixed Google Cloud Healthcare scope. Specifying `role` or `scopes` will
14
+ * return an error.
15
+ * - `token_passthrough`: The caller provides their own bearer token via the X-Phenoml-Fhir-Provider header
16
+ * as one or more comma-separated {fhir_provider_id}:{oauth2_token} pairs. Specifying `role` or `scopes`
17
+ * will return an error.
18
+ * - `none`: No authentication is performed. Specifying `role` or `scopes` will return an error.
19
+ *
20
+ * For the `on_behalf_of` authentication method, you must also provide the Patient or Practitioner reference
21
+ * in the X-Phenoml-On-Behalf-Of header in the format Patient/{uuid} or Practitioner/{uuid}. This only works
22
+ * for the medplum provider currently.
23
+ *
24
+ * More on the authentication headers and how to structure them can be found in the FHIR Proxy, Tools and
25
+ * Agent documentation.
26
+ */
6
27
  exports.AuthMethod = {
7
28
  ClientSecret: "client_secret",
8
29
  GoogleHealthcare: "google_healthcare",
@@ -10,6 +10,4 @@ export interface FhirProviderSandboxInfo {
10
10
  description?: string;
11
11
  /** Provider type (always "sandbox" for this schema) */
12
12
  provider?: "sandbox";
13
- /** Whether the FHIR provider is active */
14
- is_active?: boolean;
15
13
  }
@@ -13,8 +13,6 @@ export interface FhirProviderTemplate {
13
13
  client_id?: string;
14
14
  /** Map of authentication configurations (key is auth_config_id) */
15
15
  auth_configs?: Record<string, phenoml.fhirProvider.FhirProviderAuthConfig>;
16
- /** Whether the FHIR provider is active */
17
- is_active?: boolean;
18
16
  /** Timestamp when the provider was last updated */
19
17
  last_updated?: string;
20
18
  }
@@ -1,22 +1,23 @@
1
- /** Predefined role that specifies OAuth scopes. Cannot be specified with scopes. Available roles depend on the provider being created or updated. */
1
+ /**
2
+ * Predefined access level that maps to provider-specific OAuth scopes.
3
+ * Cannot be specified together with `scopes`. Only applicable to
4
+ * `client_secret`, `jwt`, and `on_behalf_of` auth methods.
5
+ *
6
+ * The server resolves each role to the appropriate scopes for the provider:
7
+ * - `admin`: Full CRUD access (create, read, update, delete, search)
8
+ * - `read`: Read and search access only
9
+ * - `write`: Create, update, and delete access (no read)
10
+ *
11
+ * If neither `role` nor `scopes` is specified, the provider-specific default
12
+ * role is used (typically `read`; `admin` for Medplum/sandbox).
13
+ *
14
+ * Canvas does not support system-level roles — use `scopes` directly.
15
+ * Google Healthcare, HAPI, and `none`/`token_passthrough` auth methods
16
+ * do not use scopes at all.
17
+ */
2
18
  export declare const Role: {
3
- readonly SmartV1Admin: "SmartV1Admin";
4
- readonly SmartV1Read: "SmartV1Read";
5
- readonly SmartV1Write: "SmartV1Write";
6
- readonly SmartV2Admin: "SmartV2Admin";
7
- readonly SmartV2Read: "SmartV2Read";
8
- readonly SmartV2Write: "SmartV2Write";
9
- readonly UscdiSmartV1Admin: "USCDISmartV1Admin";
10
- readonly UscdiSmartV1Read: "USCDISmartV1Read";
11
- readonly UscdiSmartV1Write: "USCDISmartV1Write";
12
- readonly UscdiSmartV2Admin: "USCDISmartV2Admin";
13
- readonly UscdiSmartV2Read: "USCDISmartV2Read";
14
- readonly UscdiSmartV2Write: "USCDISmartV2Write";
15
- readonly CernerSmartV1Admin: "CernerSmartV1Admin";
16
- readonly CernerSmartV1Read: "CernerSmartV1Read";
17
- readonly CernerSmartV1Write: "CernerSmartV1Write";
18
- readonly CernerSmartV2Admin: "CernerSmartV2Admin";
19
- readonly CernerSmartV2Read: "CernerSmartV2Read";
20
- readonly CernerSmartV2Write: "CernerSmartV2Write";
19
+ readonly Admin: "admin";
20
+ readonly Read: "read";
21
+ readonly Write: "write";
21
22
  };
22
23
  export type Role = (typeof Role)[keyof typeof Role];
@@ -2,24 +2,25 @@
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Role = void 0;
5
- /** Predefined role that specifies OAuth scopes. Cannot be specified with scopes. Available roles depend on the provider being created or updated. */
5
+ /**
6
+ * Predefined access level that maps to provider-specific OAuth scopes.
7
+ * Cannot be specified together with `scopes`. Only applicable to
8
+ * `client_secret`, `jwt`, and `on_behalf_of` auth methods.
9
+ *
10
+ * The server resolves each role to the appropriate scopes for the provider:
11
+ * - `admin`: Full CRUD access (create, read, update, delete, search)
12
+ * - `read`: Read and search access only
13
+ * - `write`: Create, update, and delete access (no read)
14
+ *
15
+ * If neither `role` nor `scopes` is specified, the provider-specific default
16
+ * role is used (typically `read`; `admin` for Medplum/sandbox).
17
+ *
18
+ * Canvas does not support system-level roles — use `scopes` directly.
19
+ * Google Healthcare, HAPI, and `none`/`token_passthrough` auth methods
20
+ * do not use scopes at all.
21
+ */
6
22
  exports.Role = {
7
- SmartV1Admin: "SmartV1Admin",
8
- SmartV1Read: "SmartV1Read",
9
- SmartV1Write: "SmartV1Write",
10
- SmartV2Admin: "SmartV2Admin",
11
- SmartV2Read: "SmartV2Read",
12
- SmartV2Write: "SmartV2Write",
13
- UscdiSmartV1Admin: "USCDISmartV1Admin",
14
- UscdiSmartV1Read: "USCDISmartV1Read",
15
- UscdiSmartV1Write: "USCDISmartV1Write",
16
- UscdiSmartV2Admin: "USCDISmartV2Admin",
17
- UscdiSmartV2Read: "USCDISmartV2Read",
18
- UscdiSmartV2Write: "USCDISmartV2Write",
19
- CernerSmartV1Admin: "CernerSmartV1Admin",
20
- CernerSmartV1Read: "CernerSmartV1Read",
21
- CernerSmartV1Write: "CernerSmartV1Write",
22
- CernerSmartV2Admin: "CernerSmartV2Admin",
23
- CernerSmartV2Read: "CernerSmartV2Read",
24
- CernerSmartV2Write: "CernerSmartV2Write",
23
+ Admin: "admin",
24
+ Read: "read",
25
+ Write: "write",
25
26
  };
@@ -19,7 +19,5 @@ export declare namespace McpServerResponse {
19
19
  description?: string;
20
20
  /** URL of the MCP server */
21
21
  mcp_server_url?: string;
22
- /** Whether the MCP server is active */
23
- is_active?: boolean;
24
22
  }
25
23
  }
@@ -23,7 +23,5 @@ export declare namespace McpServerToolResponse {
23
23
  mcp_server_id?: string;
24
24
  /** URL of the MCP server */
25
25
  mcp_server_url?: string;
26
- /** Whether the MCP server tool is active */
27
- is_active?: boolean;
28
26
  }
29
27
  }
@@ -156,11 +156,7 @@ function getHeaders(args) {
156
156
  return __awaiter(this, void 0, void 0, function* () {
157
157
  var _a;
158
158
  const newHeaders = new Headers_js_1.Headers();
159
- newHeaders.set("Accept", args.responseType === "json" || args.responseType == null
160
- ? "application/json"
161
- : args.responseType === "text"
162
- ? "text/plain"
163
- : "*/*");
159
+ newHeaders.set("Accept", args.responseType === "json" ? "application/json" : args.responseType === "text" ? "text/plain" : "*/*");
164
160
  if (args.body !== undefined && args.contentType != null) {
165
161
  newHeaders.set("Content-Type", args.contentType);
166
162
  }
@@ -55,7 +55,7 @@ class Stream {
55
55
  iterMessages() {
56
56
  return __asyncGenerator(this, arguments, function* iterMessages_1() {
57
57
  var _a, e_1, _b, _c;
58
- const signal = this.controller.signal;
58
+ this.controller.signal;
59
59
  const stream = readableStreamAsyncIterable(this.stream);
60
60
  let buf = "";
61
61
  let prefixSeen = false;
@@ -64,9 +64,6 @@ class Stream {
64
64
  _c = stream_1_1.value;
65
65
  _d = false;
66
66
  const chunk = _c;
67
- if (signal.aborted) {
68
- break;
69
- }
70
67
  buf += this.decodeChunk(chunk);
71
68
  let terminatorIndex;
72
69
  while ((terminatorIndex = buf.indexOf(this.messageTerminator)) >= 0) {
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "6.4.0";
1
+ export declare const SDK_VERSION = "7.0.0";
@@ -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 = "6.4.0";
4
+ exports.SDK_VERSION = "7.0.0";
@@ -16,8 +16,8 @@ export class phenomlClient {
16
16
  this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: mergeHeaders({
17
17
  "X-Fern-Language": "JavaScript",
18
18
  "X-Fern-SDK-Name": "phenoml",
19
- "X-Fern-SDK-Version": "6.4.0",
20
- "User-Agent": "phenoml/6.4.0",
19
+ "X-Fern-SDK-Version": "7.0.0",
20
+ "User-Agent": "phenoml/7.0.0",
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) });
@@ -68,7 +68,7 @@ export declare class FhirProvider {
68
68
  get(fhir_provider_id: string, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
69
69
  private __get;
70
70
  /**
71
- * Soft deletes a FHIR provider by setting is_active to false.
71
+ * Deletes a FHIR provider.
72
72
  *
73
73
  * Note: Sandbox providers cannot be deleted.
74
74
  *
@@ -243,7 +243,7 @@ export class FhirProvider {
243
243
  });
244
244
  }
245
245
  /**
246
- * Soft deletes a FHIR provider by setting is_active to false.
246
+ * Deletes a FHIR provider.
247
247
  *
248
248
  * Note: Sandbox providers cannot be deleted.
249
249
  *
@@ -10,9 +10,9 @@ export interface FhirProviderAddAuthConfigRequest {
10
10
  /** OAuth client secret (required for client_secret and on_behalf_of auth methods) */
11
11
  client_secret?: string;
12
12
  service_account_key?: phenoml.fhirProvider.ServiceAccountKey;
13
- /** Expiry time for JWT credentials (only applicable for JWT auth method) */
13
+ /** Expiry time for JWT credentials (only applicable for JWT auth method). If omitted, a default expiry is used. */
14
14
  credential_expiry?: string;
15
15
  role?: phenoml.fhirProvider.Role;
16
- /** OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated. */
16
+ /** OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. Only applicable to `client_secret`, `jwt`, and `on_behalf_of` auth methods; specifying scopes for other auth methods will return an error. Make sure the scopes you specify are appropriate for the auth config and provider you are using. */
17
17
  scopes?: string;
18
18
  }
@@ -17,12 +17,14 @@ export interface FhirProviderCreateRequest {
17
17
  auth_method: phenoml.fhirProvider.AuthMethod;
18
18
  /** Base URL of the FHIR server */
19
19
  base_url: string;
20
- /** OAuth client ID (required for most auth methods) */
20
+ /** OAuth client ID (required for jwt, client_secret, and on_behalf_of auth methods) */
21
21
  client_id?: string;
22
22
  /** OAuth client secret (required for client_secret and on_behalf_of auth methods) */
23
23
  client_secret?: string;
24
24
  service_account_key?: phenoml.fhirProvider.ServiceAccountKey;
25
+ /** Expiry time for JWT credentials (only applicable for JWT auth method). If omitted, a default expiry is used. */
26
+ credential_expiry?: string;
25
27
  role?: phenoml.fhirProvider.Role;
26
- /** OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated. */
28
+ /** OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. Only applicable to `client_secret`, `jwt`, and `on_behalf_of` auth methods; specifying scopes for other auth methods will return an error. Make sure the scopes you specify are appropriate for the auth config and provider you are using. */
27
29
  scopes?: string;
28
30
  }
@@ -1,4 +1,25 @@
1
- /** Authentication method for the FHIR provider. Only one authentication method can be used at a time, but these can be rotated on the FHIR Provider as needed. For the 'token_passthrough' authentication method, you must provide the token in the X-Phenoml-Fhir-Provider header in the format {fhir_provider_id}:{oauth2_token}. For the 'on_behalf_of' authentication method, you must provide the Patient or Practitioner reference in the X-Phenoml-On-Behalf-Of header in the format Patient/{uuid} or Practitioner/{uuid}. This only works for the medplum provider currently. More on the authentication headers and how to structure them can be found in the FHIR Proxy, Tools and Agent documentation. */
1
+ /**
2
+ * Authentication method for the FHIR provider. Only one authentication method can be used at a time,
3
+ * but these can be rotated on the FHIR Provider as needed.
4
+ *
5
+ * **Scope behavior by auth method:**
6
+ * - `client_secret`, `jwt`, `on_behalf_of`: Scopes are included in the OAuth token request.
7
+ * They can be configured using the `role` or `scopes` field. If neither is specified, provider-specific
8
+ * default scopes derived from a default role are used.
9
+ * - `google_healthcare`: Uses a fixed Google Cloud Healthcare scope. Specifying `role` or `scopes` will
10
+ * return an error.
11
+ * - `token_passthrough`: The caller provides their own bearer token via the X-Phenoml-Fhir-Provider header
12
+ * as one or more comma-separated {fhir_provider_id}:{oauth2_token} pairs. Specifying `role` or `scopes`
13
+ * will return an error.
14
+ * - `none`: No authentication is performed. Specifying `role` or `scopes` will return an error.
15
+ *
16
+ * For the `on_behalf_of` authentication method, you must also provide the Patient or Practitioner reference
17
+ * in the X-Phenoml-On-Behalf-Of header in the format Patient/{uuid} or Practitioner/{uuid}. This only works
18
+ * for the medplum provider currently.
19
+ *
20
+ * More on the authentication headers and how to structure them can be found in the FHIR Proxy, Tools and
21
+ * Agent documentation.
22
+ */
2
23
  export declare const AuthMethod: {
3
24
  readonly ClientSecret: "client_secret";
4
25
  readonly GoogleHealthcare: "google_healthcare";
@@ -1,5 +1,26 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- /** Authentication method for the FHIR provider. Only one authentication method can be used at a time, but these can be rotated on the FHIR Provider as needed. For the 'token_passthrough' authentication method, you must provide the token in the X-Phenoml-Fhir-Provider header in the format {fhir_provider_id}:{oauth2_token}. For the 'on_behalf_of' authentication method, you must provide the Patient or Practitioner reference in the X-Phenoml-On-Behalf-Of header in the format Patient/{uuid} or Practitioner/{uuid}. This only works for the medplum provider currently. More on the authentication headers and how to structure them can be found in the FHIR Proxy, Tools and Agent documentation. */
2
+ /**
3
+ * Authentication method for the FHIR provider. Only one authentication method can be used at a time,
4
+ * but these can be rotated on the FHIR Provider as needed.
5
+ *
6
+ * **Scope behavior by auth method:**
7
+ * - `client_secret`, `jwt`, `on_behalf_of`: Scopes are included in the OAuth token request.
8
+ * They can be configured using the `role` or `scopes` field. If neither is specified, provider-specific
9
+ * default scopes derived from a default role are used.
10
+ * - `google_healthcare`: Uses a fixed Google Cloud Healthcare scope. Specifying `role` or `scopes` will
11
+ * return an error.
12
+ * - `token_passthrough`: The caller provides their own bearer token via the X-Phenoml-Fhir-Provider header
13
+ * as one or more comma-separated {fhir_provider_id}:{oauth2_token} pairs. Specifying `role` or `scopes`
14
+ * will return an error.
15
+ * - `none`: No authentication is performed. Specifying `role` or `scopes` will return an error.
16
+ *
17
+ * For the `on_behalf_of` authentication method, you must also provide the Patient or Practitioner reference
18
+ * in the X-Phenoml-On-Behalf-Of header in the format Patient/{uuid} or Practitioner/{uuid}. This only works
19
+ * for the medplum provider currently.
20
+ *
21
+ * More on the authentication headers and how to structure them can be found in the FHIR Proxy, Tools and
22
+ * Agent documentation.
23
+ */
3
24
  export const AuthMethod = {
4
25
  ClientSecret: "client_secret",
5
26
  GoogleHealthcare: "google_healthcare",
@@ -10,6 +10,4 @@ export interface FhirProviderSandboxInfo {
10
10
  description?: string;
11
11
  /** Provider type (always "sandbox" for this schema) */
12
12
  provider?: "sandbox";
13
- /** Whether the FHIR provider is active */
14
- is_active?: boolean;
15
13
  }
@@ -13,8 +13,6 @@ export interface FhirProviderTemplate {
13
13
  client_id?: string;
14
14
  /** Map of authentication configurations (key is auth_config_id) */
15
15
  auth_configs?: Record<string, phenoml.fhirProvider.FhirProviderAuthConfig>;
16
- /** Whether the FHIR provider is active */
17
- is_active?: boolean;
18
16
  /** Timestamp when the provider was last updated */
19
17
  last_updated?: string;
20
18
  }
@@ -1,22 +1,23 @@
1
- /** Predefined role that specifies OAuth scopes. Cannot be specified with scopes. Available roles depend on the provider being created or updated. */
1
+ /**
2
+ * Predefined access level that maps to provider-specific OAuth scopes.
3
+ * Cannot be specified together with `scopes`. Only applicable to
4
+ * `client_secret`, `jwt`, and `on_behalf_of` auth methods.
5
+ *
6
+ * The server resolves each role to the appropriate scopes for the provider:
7
+ * - `admin`: Full CRUD access (create, read, update, delete, search)
8
+ * - `read`: Read and search access only
9
+ * - `write`: Create, update, and delete access (no read)
10
+ *
11
+ * If neither `role` nor `scopes` is specified, the provider-specific default
12
+ * role is used (typically `read`; `admin` for Medplum/sandbox).
13
+ *
14
+ * Canvas does not support system-level roles — use `scopes` directly.
15
+ * Google Healthcare, HAPI, and `none`/`token_passthrough` auth methods
16
+ * do not use scopes at all.
17
+ */
2
18
  export declare const Role: {
3
- readonly SmartV1Admin: "SmartV1Admin";
4
- readonly SmartV1Read: "SmartV1Read";
5
- readonly SmartV1Write: "SmartV1Write";
6
- readonly SmartV2Admin: "SmartV2Admin";
7
- readonly SmartV2Read: "SmartV2Read";
8
- readonly SmartV2Write: "SmartV2Write";
9
- readonly UscdiSmartV1Admin: "USCDISmartV1Admin";
10
- readonly UscdiSmartV1Read: "USCDISmartV1Read";
11
- readonly UscdiSmartV1Write: "USCDISmartV1Write";
12
- readonly UscdiSmartV2Admin: "USCDISmartV2Admin";
13
- readonly UscdiSmartV2Read: "USCDISmartV2Read";
14
- readonly UscdiSmartV2Write: "USCDISmartV2Write";
15
- readonly CernerSmartV1Admin: "CernerSmartV1Admin";
16
- readonly CernerSmartV1Read: "CernerSmartV1Read";
17
- readonly CernerSmartV1Write: "CernerSmartV1Write";
18
- readonly CernerSmartV2Admin: "CernerSmartV2Admin";
19
- readonly CernerSmartV2Read: "CernerSmartV2Read";
20
- readonly CernerSmartV2Write: "CernerSmartV2Write";
19
+ readonly Admin: "admin";
20
+ readonly Read: "read";
21
+ readonly Write: "write";
21
22
  };
22
23
  export type Role = (typeof Role)[keyof typeof Role];
@@ -1,22 +1,23 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- /** Predefined role that specifies OAuth scopes. Cannot be specified with scopes. Available roles depend on the provider being created or updated. */
2
+ /**
3
+ * Predefined access level that maps to provider-specific OAuth scopes.
4
+ * Cannot be specified together with `scopes`. Only applicable to
5
+ * `client_secret`, `jwt`, and `on_behalf_of` auth methods.
6
+ *
7
+ * The server resolves each role to the appropriate scopes for the provider:
8
+ * - `admin`: Full CRUD access (create, read, update, delete, search)
9
+ * - `read`: Read and search access only
10
+ * - `write`: Create, update, and delete access (no read)
11
+ *
12
+ * If neither `role` nor `scopes` is specified, the provider-specific default
13
+ * role is used (typically `read`; `admin` for Medplum/sandbox).
14
+ *
15
+ * Canvas does not support system-level roles — use `scopes` directly.
16
+ * Google Healthcare, HAPI, and `none`/`token_passthrough` auth methods
17
+ * do not use scopes at all.
18
+ */
3
19
  export const Role = {
4
- SmartV1Admin: "SmartV1Admin",
5
- SmartV1Read: "SmartV1Read",
6
- SmartV1Write: "SmartV1Write",
7
- SmartV2Admin: "SmartV2Admin",
8
- SmartV2Read: "SmartV2Read",
9
- SmartV2Write: "SmartV2Write",
10
- UscdiSmartV1Admin: "USCDISmartV1Admin",
11
- UscdiSmartV1Read: "USCDISmartV1Read",
12
- UscdiSmartV1Write: "USCDISmartV1Write",
13
- UscdiSmartV2Admin: "USCDISmartV2Admin",
14
- UscdiSmartV2Read: "USCDISmartV2Read",
15
- UscdiSmartV2Write: "USCDISmartV2Write",
16
- CernerSmartV1Admin: "CernerSmartV1Admin",
17
- CernerSmartV1Read: "CernerSmartV1Read",
18
- CernerSmartV1Write: "CernerSmartV1Write",
19
- CernerSmartV2Admin: "CernerSmartV2Admin",
20
- CernerSmartV2Read: "CernerSmartV2Read",
21
- CernerSmartV2Write: "CernerSmartV2Write",
20
+ Admin: "admin",
21
+ Read: "read",
22
+ Write: "write",
22
23
  };
@@ -19,7 +19,5 @@ export declare namespace McpServerResponse {
19
19
  description?: string;
20
20
  /** URL of the MCP server */
21
21
  mcp_server_url?: string;
22
- /** Whether the MCP server is active */
23
- is_active?: boolean;
24
22
  }
25
23
  }
@@ -23,7 +23,5 @@ export declare namespace McpServerToolResponse {
23
23
  mcp_server_id?: string;
24
24
  /** URL of the MCP server */
25
25
  mcp_server_url?: string;
26
- /** Whether the MCP server tool is active */
27
- is_active?: boolean;
28
26
  }
29
27
  }
@@ -152,11 +152,7 @@ function getHeaders(args) {
152
152
  return __awaiter(this, void 0, void 0, function* () {
153
153
  var _a;
154
154
  const newHeaders = new Headers();
155
- newHeaders.set("Accept", args.responseType === "json" || args.responseType == null
156
- ? "application/json"
157
- : args.responseType === "text"
158
- ? "text/plain"
159
- : "*/*");
155
+ newHeaders.set("Accept", args.responseType === "json" ? "application/json" : args.responseType === "text" ? "text/plain" : "*/*");
160
156
  if (args.body !== undefined && args.contentType != null) {
161
157
  newHeaders.set("Content-Type", args.contentType);
162
158
  }
@@ -51,7 +51,7 @@ export class Stream {
51
51
  iterMessages() {
52
52
  return __asyncGenerator(this, arguments, function* iterMessages_1() {
53
53
  var _a, e_1, _b, _c;
54
- const signal = this.controller.signal;
54
+ this.controller.signal;
55
55
  const stream = readableStreamAsyncIterable(this.stream);
56
56
  let buf = "";
57
57
  let prefixSeen = false;
@@ -60,9 +60,6 @@ export class Stream {
60
60
  _c = stream_1_1.value;
61
61
  _d = false;
62
62
  const chunk = _c;
63
- if (signal.aborted) {
64
- break;
65
- }
66
63
  buf += this.decodeChunk(chunk);
67
64
  let terminatorIndex;
68
65
  while ((terminatorIndex = buf.indexOf(this.messageTerminator)) >= 0) {
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "6.4.0";
1
+ export declare const SDK_VERSION = "7.0.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "6.4.0";
1
+ export const SDK_VERSION = "7.0.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phenoml",
3
- "version": "6.4.0",
3
+ "version": "7.0.0",
4
4
  "private": false,
5
5
  "repository": "github:PhenoML/phenoml-ts-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -2809,7 +2809,7 @@ await client.fhirProvider.get("fhir_provider_id");
2809
2809
  <dl>
2810
2810
  <dd>
2811
2811
 
2812
- Soft deletes a FHIR provider by setting is_active to false.
2812
+ Deletes a FHIR provider.
2813
2813
 
2814
2814
  Note: Sandbox providers cannot be deleted.
2815
2815
  </dd>