core.medplumclientoptions
Home > @medplum/core > MedplumClientOptions
MedplumClientOptions interface
The MedplumClientOptions interface defines configuration options for MedplumClient.
All configuration settings are optional.
Signature:
export interface MedplumClientOptions
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
string | (Optional) The OAuth Access Token. Access Token used to connect to make request to FHIR servers | ||
string | (Optional) OAuth2 authorize URL. Default value is baseUrl + "/oauth2/authorize". Can be specified as absolute URL or relative to baseUrl. Use this if you want to use a separate OAuth server. | ||
number | (Optional) The length of time in milliseconds to delay requests for auto batching. Auto batching attempts to group multiple requests together into a single batch request. Default value is 0, which disables auto batching. | ||
string | (Optional) Base server URL. Default value is https://api.medplum.com/ Use this to point to a custom Medplum deployment. | ||
number | (Optional) The length of time in milliseconds to cache resources. Default value is 60000 (60 seconds). Cache time of zero disables all caching. For any individual request, the cache behavior can be overridden by setting the cache property on request options. See: https://developer.mozilla.org/en-US/docs/Web/API/Request/cache | ||
string | (Optional) The client ID. Client ID can be used for SMART-on-FHIR customization. | ||
string | (Optional) The client secret. Client secret can be used for FHIR Oauth Client Credential flows | ||
(Optional) Create PDF implementation. Default is none, and PDF generation is disabled. | |||
(Optional) Fetch implementation. Default is window.fetch (if available). For Node.js applications, consider the 'node-fetch' package. | |||
string | (Optional) FHIR URL path. Default value is "fhir/R4/". Can be specified as absolute URL or relative to baseUrl. Use this if you want to use a different path when connecting to a FHIR server. | ||
string | (Optional) OAuth2 logout URL. Default value is baseUrl + "/oauth2/logout". Can be specified as absolute URL or relative to baseUrl. Use this if you want to use a separate OAuth server. | ||
() => void | (Optional) Callback for when the client is unauthenticated. Default is do nothing. For client side applications, consider redirecting to a sign in page. | ||
RequestRedirect | (Optional) The default redirect behavior. The default behavior is to not follow redirects. Use "follow" to automatically follow redirects. | ||
number | (Optional) The refresh grace period in milliseconds. This is the amount of time before the access token expires that the client will attempt to refresh the token. Default value is 300000 (5 minutes). | ||
number | (Optional) Number of resources to store in the cache. Default value is 1000. Consider using this for performance of displaying Patient or Practitioner resources. | ||
(Optional) Storage implementation. Default is window.localStorage (if available), this is the common implementation for use in the browser, or an in-memory storage implementation. If using Medplum on a server it may be useful to provide a custom storage implementation, for example using redis, a database or a file based storage. Medplum CLI is an an example of | |||
string | (Optional) OAuth2 token URL. Default value is baseUrl + "/oauth2/token". Can be specified as absolute URL or relative to baseUrl. Use this if you want to use a separate OAuth server. | ||
boolean | (Optional) When the verbose flag is set, the client will log all requests and responses to the console. |