@medplum/core 2.1.6 → 2.1.8

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.
@@ -1,4 +1,4 @@
1
- import { AccessPolicy, Agent, Attachment, Binary, BulkDataExport, Bundle, Communication, ExtractResource, Identifier, Media, OperationOutcome, Project, ProjectMembership, ProjectMembershipAccess, ProjectSecret, Reference, Resource, ResourceType, UserConfiguration, ValueSet } from '@medplum/fhirtypes';
1
+ import { AccessPolicy, Agent, Attachment, Binary, BulkDataExport, Bundle, Communication, Device, ExtractResource, Identifier, Media, OperationOutcome, Project, ProjectMembership, ProjectMembershipAccess, ProjectSecret, Reference, Resource, ResourceType, UserConfiguration, ValueSet } from '@medplum/fhirtypes';
2
2
  /** @ts-ignore */
3
3
  import type { CustomTableLayout, TDocumentDefinitions, TFontDictionary } from 'pdfmake/interfaces';
4
4
  import { EventTarget } from './eventtarget';
@@ -8,6 +8,7 @@ import { ReadablePromise } from './readablepromise';
8
8
  import { ClientStorage } from './storage';
9
9
  import { CodeChallengeMethod, ProfileResource } from './utils';
10
10
  export declare const MEDPLUM_VERSION: string;
11
+ export declare const DEFAULT_ACCEPT: string;
11
12
  /**
12
13
  * The MedplumClientOptions interface defines configuration options for MedplumClient.
13
14
  *
@@ -1370,12 +1371,13 @@ export declare class MedplumClient extends EventTarget {
1370
1371
  * Pushes a message to an agent.
1371
1372
  *
1372
1373
  * @param agent The agent to push to.
1374
+ * @param destination The destination device.
1373
1375
  * @param body The message body.
1374
1376
  * @param contentType Optional message content type.
1375
1377
  * @param options Optional fetch options.
1376
1378
  * @returns Promise to the operation outcome.
1377
1379
  */
1378
- pushToAgent(agent: Agent, body: any, contentType?: string, options?: RequestInit): Promise<OperationOutcome>;
1380
+ pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device>, body: any, contentType?: string, options?: RequestInit): Promise<OperationOutcome>;
1379
1381
  /**
1380
1382
  * @category Authentication
1381
1383
  * @returns The Login State
@@ -23,16 +23,16 @@ export type ResourceWithCode = Resource & Code;
23
23
  export declare function createReference<T extends Resource>(resource: T): Reference<T>;
24
24
  /**
25
25
  * Returns a reference string for a resource.
26
- * @param resource The FHIR resource.
26
+ * @param input The FHIR resource or reference.
27
27
  * @returns A reference string of the form resourceType/id.
28
28
  */
29
- export declare function getReferenceString(resource: Resource): string;
29
+ export declare function getReferenceString(input: Reference | Resource): string;
30
30
  /**
31
31
  * Returns the ID portion of a reference.
32
- * @param reference A FHIR reference.
32
+ * @param input A FHIR reference or resource.
33
33
  * @returns The ID portion of a reference.
34
34
  */
35
- export declare function resolveId(reference: Reference | undefined): string | undefined;
35
+ export declare function resolveId(input: Reference | Resource | undefined): string | undefined;
36
36
  /**
37
37
  * Parses a reference and returns a tuple of [ResourceType, ID].
38
38
  * @param reference A reference to a FHIR resource.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/core",
3
- "version": "2.1.6",
3
+ "version": "2.1.8",
4
4
  "description": "Medplum TS/JS Library",
5
5
  "author": "Medplum <hello@medplum.com>",
6
6
  "license": "Apache-2.0",