@medplum/core 2.2.4 → 2.2.5
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.
- package/dist/cjs/index.cjs +4 -4
- package/dist/cjs/index.cjs.map +4 -4
- package/dist/cjs/index.d.ts +41 -11
- package/dist/esm/index.d.ts +41 -11
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/index.mjs.map +4 -4
- package/package.json +2 -2
package/dist/cjs/index.d.ts
CHANGED
|
@@ -100,7 +100,15 @@ export declare interface AgentError extends BaseAgentMessage {
|
|
|
100
100
|
body: string;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
export declare
|
|
103
|
+
export declare interface AgentHeartbeatRequest extends BaseAgentRequestMessage {
|
|
104
|
+
type: 'agent:heartbeat:request';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export declare interface AgentHeartbeatResponse extends BaseAgentMessage {
|
|
108
|
+
type: 'agent:heartbeat:response';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export declare type AgentMessage = AgentError | AgentConnectRequest | AgentConnectResponse | AgentHeartbeatRequest | AgentHeartbeatResponse | AgentTransmitRequest | AgentTransmitResponse;
|
|
104
112
|
|
|
105
113
|
export declare interface AgentTransmitRequest extends BaseAgentRequestMessage {
|
|
106
114
|
type: 'agent:transmit:request';
|
|
@@ -253,6 +261,10 @@ export declare function calculateAge(birthDateStr: string, endDateStr?: string):
|
|
|
253
261
|
*/
|
|
254
262
|
export declare function calculateAgeString(birthDateStr: string, endDateStr?: string): string | undefined;
|
|
255
263
|
|
|
264
|
+
declare type CanBePopulated = {
|
|
265
|
+
length: number;
|
|
266
|
+
} | object;
|
|
267
|
+
|
|
256
268
|
/**
|
|
257
269
|
* Determines if the current user can read the specified resource type.
|
|
258
270
|
* @param accessPolicy - The access policy.
|
|
@@ -389,8 +401,6 @@ export declare function createConstraintIssue(expression: string, constraint: Co
|
|
|
389
401
|
|
|
390
402
|
export declare const created: OperationOutcome;
|
|
391
403
|
|
|
392
|
-
export declare function createDeferredPromise(): DeferredPromise;
|
|
393
|
-
|
|
394
404
|
/**
|
|
395
405
|
* Creates a serializable JSON payload for the `FHIRcast` protocol
|
|
396
406
|
*
|
|
@@ -475,12 +485,6 @@ export declare const DEFAULT_ACCEPT: string;
|
|
|
475
485
|
|
|
476
486
|
export declare const DEFAULT_SEARCH_COUNT = 20;
|
|
477
487
|
|
|
478
|
-
export declare type DeferredPromise = {
|
|
479
|
-
promise: Promise<void>;
|
|
480
|
-
resolve: () => void;
|
|
481
|
-
reject: (err: Error) => void;
|
|
482
|
-
};
|
|
483
|
-
|
|
484
488
|
export declare class DotAtom extends InfixOperatorAtom {
|
|
485
489
|
constructor(left: Atom, right: Atom);
|
|
486
490
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
@@ -1233,7 +1237,7 @@ export declare function getNestedProperty(value: TypedValue, key: string): (Type
|
|
|
1233
1237
|
export declare function getPathDisplayName(path: string): string;
|
|
1234
1238
|
|
|
1235
1239
|
/**
|
|
1236
|
-
*
|
|
1240
|
+
* Returns a human friendly display name for a FHIR element property or slice name
|
|
1237
1241
|
* @param propertyName - The FHIR element property or slice name
|
|
1238
1242
|
* @returns The best guess of the display name.
|
|
1239
1243
|
*/
|
|
@@ -1720,6 +1724,7 @@ export declare interface InviteRequest {
|
|
|
1720
1724
|
password?: string;
|
|
1721
1725
|
sendEmail?: boolean;
|
|
1722
1726
|
membership?: Partial<ProjectMembership>;
|
|
1727
|
+
upsert?: boolean;
|
|
1723
1728
|
/** @deprecated Use membership.accessPolicy instead. */
|
|
1724
1729
|
accessPolicy?: Reference<AccessPolicy>;
|
|
1725
1730
|
/** @deprecated Use membership.access instead. */
|
|
@@ -1748,7 +1753,7 @@ export declare function isDataTypeLoaded(type: string): boolean;
|
|
|
1748
1753
|
* @param v - Any value.
|
|
1749
1754
|
* @returns True if the value is an empty string or an empty object.
|
|
1750
1755
|
*/
|
|
1751
|
-
export declare function isEmpty(v:
|
|
1756
|
+
export declare function isEmpty(v: unknown): boolean;
|
|
1752
1757
|
|
|
1753
1758
|
/**
|
|
1754
1759
|
* Checks if a `ResourceType` can be used in a `FHIRcast` context.
|
|
@@ -1797,6 +1802,15 @@ export declare function isOperationOutcome(value: unknown): value is OperationOu
|
|
|
1797
1802
|
*/
|
|
1798
1803
|
export declare function isPeriod(input: unknown): input is Period;
|
|
1799
1804
|
|
|
1805
|
+
/**
|
|
1806
|
+
* Returns true if the value is a non-empty string, an object with a length property greater than zero, or a non-empty object
|
|
1807
|
+
* @param arg - Any value
|
|
1808
|
+
* @returns True if the value is a non-empty string, an object with a length property greater than zero, or a non-empty object
|
|
1809
|
+
*/
|
|
1810
|
+
export declare function isPopulated<T extends {
|
|
1811
|
+
length: number;
|
|
1812
|
+
} | object>(arg: CanBePopulated | undefined | null): arg is T;
|
|
1813
|
+
|
|
1800
1814
|
export declare function isProfileLoaded(profileUrl: string): boolean;
|
|
1801
1815
|
|
|
1802
1816
|
/**
|
|
@@ -3767,6 +3781,20 @@ export declare class MemoryStorage implements Storage {
|
|
|
3767
3781
|
key(index: number): string | null;
|
|
3768
3782
|
}
|
|
3769
3783
|
|
|
3784
|
+
/**
|
|
3785
|
+
* The MockAsyncClientStorage class is a mock implementation of the ClientStorage class.
|
|
3786
|
+
* This can be used for testing async initialization of the MedplumClient.
|
|
3787
|
+
*/
|
|
3788
|
+
export declare class MockAsyncClientStorage extends ClientStorage implements IClientStorage {
|
|
3789
|
+
private initialized;
|
|
3790
|
+
private initPromise;
|
|
3791
|
+
private initResolve;
|
|
3792
|
+
constructor();
|
|
3793
|
+
setInitialized(): void;
|
|
3794
|
+
getInitPromise(): Promise<void>;
|
|
3795
|
+
get isInitialized(): boolean;
|
|
3796
|
+
}
|
|
3797
|
+
|
|
3770
3798
|
export declare interface NewPatientRequest {
|
|
3771
3799
|
readonly login: string;
|
|
3772
3800
|
readonly projectId: string;
|
|
@@ -4519,6 +4547,8 @@ export declare function stringify(value: any, pretty?: boolean): string;
|
|
|
4519
4547
|
*/
|
|
4520
4548
|
export declare function stringifyTypedValue(v: TypedValue): string;
|
|
4521
4549
|
|
|
4550
|
+
export declare function structureMapTransform(structureMap: StructureMap, input: TypedValue[], loader?: (url: string) => StructureMap[]): TypedValue[];
|
|
4551
|
+
|
|
4522
4552
|
/**
|
|
4523
4553
|
* A `FHIRcast` subscription request.
|
|
4524
4554
|
*
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -100,7 +100,15 @@ export declare interface AgentError extends BaseAgentMessage {
|
|
|
100
100
|
body: string;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
export declare
|
|
103
|
+
export declare interface AgentHeartbeatRequest extends BaseAgentRequestMessage {
|
|
104
|
+
type: 'agent:heartbeat:request';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export declare interface AgentHeartbeatResponse extends BaseAgentMessage {
|
|
108
|
+
type: 'agent:heartbeat:response';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export declare type AgentMessage = AgentError | AgentConnectRequest | AgentConnectResponse | AgentHeartbeatRequest | AgentHeartbeatResponse | AgentTransmitRequest | AgentTransmitResponse;
|
|
104
112
|
|
|
105
113
|
export declare interface AgentTransmitRequest extends BaseAgentRequestMessage {
|
|
106
114
|
type: 'agent:transmit:request';
|
|
@@ -253,6 +261,10 @@ export declare function calculateAge(birthDateStr: string, endDateStr?: string):
|
|
|
253
261
|
*/
|
|
254
262
|
export declare function calculateAgeString(birthDateStr: string, endDateStr?: string): string | undefined;
|
|
255
263
|
|
|
264
|
+
declare type CanBePopulated = {
|
|
265
|
+
length: number;
|
|
266
|
+
} | object;
|
|
267
|
+
|
|
256
268
|
/**
|
|
257
269
|
* Determines if the current user can read the specified resource type.
|
|
258
270
|
* @param accessPolicy - The access policy.
|
|
@@ -389,8 +401,6 @@ export declare function createConstraintIssue(expression: string, constraint: Co
|
|
|
389
401
|
|
|
390
402
|
export declare const created: OperationOutcome;
|
|
391
403
|
|
|
392
|
-
export declare function createDeferredPromise(): DeferredPromise;
|
|
393
|
-
|
|
394
404
|
/**
|
|
395
405
|
* Creates a serializable JSON payload for the `FHIRcast` protocol
|
|
396
406
|
*
|
|
@@ -475,12 +485,6 @@ export declare const DEFAULT_ACCEPT: string;
|
|
|
475
485
|
|
|
476
486
|
export declare const DEFAULT_SEARCH_COUNT = 20;
|
|
477
487
|
|
|
478
|
-
export declare type DeferredPromise = {
|
|
479
|
-
promise: Promise<void>;
|
|
480
|
-
resolve: () => void;
|
|
481
|
-
reject: (err: Error) => void;
|
|
482
|
-
};
|
|
483
|
-
|
|
484
488
|
export declare class DotAtom extends InfixOperatorAtom {
|
|
485
489
|
constructor(left: Atom, right: Atom);
|
|
486
490
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
@@ -1233,7 +1237,7 @@ export declare function getNestedProperty(value: TypedValue, key: string): (Type
|
|
|
1233
1237
|
export declare function getPathDisplayName(path: string): string;
|
|
1234
1238
|
|
|
1235
1239
|
/**
|
|
1236
|
-
*
|
|
1240
|
+
* Returns a human friendly display name for a FHIR element property or slice name
|
|
1237
1241
|
* @param propertyName - The FHIR element property or slice name
|
|
1238
1242
|
* @returns The best guess of the display name.
|
|
1239
1243
|
*/
|
|
@@ -1720,6 +1724,7 @@ export declare interface InviteRequest {
|
|
|
1720
1724
|
password?: string;
|
|
1721
1725
|
sendEmail?: boolean;
|
|
1722
1726
|
membership?: Partial<ProjectMembership>;
|
|
1727
|
+
upsert?: boolean;
|
|
1723
1728
|
/** @deprecated Use membership.accessPolicy instead. */
|
|
1724
1729
|
accessPolicy?: Reference<AccessPolicy>;
|
|
1725
1730
|
/** @deprecated Use membership.access instead. */
|
|
@@ -1748,7 +1753,7 @@ export declare function isDataTypeLoaded(type: string): boolean;
|
|
|
1748
1753
|
* @param v - Any value.
|
|
1749
1754
|
* @returns True if the value is an empty string or an empty object.
|
|
1750
1755
|
*/
|
|
1751
|
-
export declare function isEmpty(v:
|
|
1756
|
+
export declare function isEmpty(v: unknown): boolean;
|
|
1752
1757
|
|
|
1753
1758
|
/**
|
|
1754
1759
|
* Checks if a `ResourceType` can be used in a `FHIRcast` context.
|
|
@@ -1797,6 +1802,15 @@ export declare function isOperationOutcome(value: unknown): value is OperationOu
|
|
|
1797
1802
|
*/
|
|
1798
1803
|
export declare function isPeriod(input: unknown): input is Period;
|
|
1799
1804
|
|
|
1805
|
+
/**
|
|
1806
|
+
* Returns true if the value is a non-empty string, an object with a length property greater than zero, or a non-empty object
|
|
1807
|
+
* @param arg - Any value
|
|
1808
|
+
* @returns True if the value is a non-empty string, an object with a length property greater than zero, or a non-empty object
|
|
1809
|
+
*/
|
|
1810
|
+
export declare function isPopulated<T extends {
|
|
1811
|
+
length: number;
|
|
1812
|
+
} | object>(arg: CanBePopulated | undefined | null): arg is T;
|
|
1813
|
+
|
|
1800
1814
|
export declare function isProfileLoaded(profileUrl: string): boolean;
|
|
1801
1815
|
|
|
1802
1816
|
/**
|
|
@@ -3767,6 +3781,20 @@ export declare class MemoryStorage implements Storage {
|
|
|
3767
3781
|
key(index: number): string | null;
|
|
3768
3782
|
}
|
|
3769
3783
|
|
|
3784
|
+
/**
|
|
3785
|
+
* The MockAsyncClientStorage class is a mock implementation of the ClientStorage class.
|
|
3786
|
+
* This can be used for testing async initialization of the MedplumClient.
|
|
3787
|
+
*/
|
|
3788
|
+
export declare class MockAsyncClientStorage extends ClientStorage implements IClientStorage {
|
|
3789
|
+
private initialized;
|
|
3790
|
+
private initPromise;
|
|
3791
|
+
private initResolve;
|
|
3792
|
+
constructor();
|
|
3793
|
+
setInitialized(): void;
|
|
3794
|
+
getInitPromise(): Promise<void>;
|
|
3795
|
+
get isInitialized(): boolean;
|
|
3796
|
+
}
|
|
3797
|
+
|
|
3770
3798
|
export declare interface NewPatientRequest {
|
|
3771
3799
|
readonly login: string;
|
|
3772
3800
|
readonly projectId: string;
|
|
@@ -4519,6 +4547,8 @@ export declare function stringify(value: any, pretty?: boolean): string;
|
|
|
4519
4547
|
*/
|
|
4520
4548
|
export declare function stringifyTypedValue(v: TypedValue): string;
|
|
4521
4549
|
|
|
4550
|
+
export declare function structureMapTransform(structureMap: StructureMap, input: TypedValue[], loader?: (url: string) => StructureMap[]): TypedValue[];
|
|
4551
|
+
|
|
4522
4552
|
/**
|
|
4523
4553
|
* A `FHIRcast` subscription request.
|
|
4524
4554
|
*
|