@medplum/core 2.0.25 → 2.0.26
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/esm/index.mjs +4 -4
- package/dist/esm/index.mjs.map +4 -4
- package/dist/types/client.d.ts +42 -10
- package/dist/types/fhirpath/atoms.d.ts +25 -11
- package/dist/types/fhirpath/parse.d.ts +33 -33
- package/dist/types/index.d.ts +1 -1
- package/dist/types/jwt.d.ts +6 -0
- package/dist/types/schema.d.ts +1 -0
- package/dist/types/search/details.d.ts +3 -1
- package/dist/types/types.d.ts +2 -2
- package/dist/types/typeschema/validation.d.ts +1 -1
- package/dist/types/utils.d.ts +1 -0
- package/package.json +4 -1
package/dist/types/client.d.ts
CHANGED
|
@@ -142,7 +142,7 @@ export interface MedplumClientOptions {
|
|
|
142
142
|
* fonts?: TFontDictionary
|
|
143
143
|
* ): Promise<Buffer> {
|
|
144
144
|
* return new Promise((resolve, reject) => {
|
|
145
|
-
* const printer = new PdfPrinter(fonts
|
|
145
|
+
* const printer = new PdfPrinter(fonts ?? {});
|
|
146
146
|
* const pdfDoc = printer.createPdfKitDocument(docDefinition, { tableLayouts });
|
|
147
147
|
* const chunks: Uint8Array[] = [];
|
|
148
148
|
* pdfDoc.on('data', (chunk: Uint8Array) => chunks.push(chunk));
|
|
@@ -177,6 +177,14 @@ export interface FetchLike {
|
|
|
177
177
|
* See: https://github.com/microsoft/TypeScript/issues/32951
|
|
178
178
|
*/
|
|
179
179
|
export type QueryTypes = URLSearchParams | string[][] | Record<string, any> | string | undefined;
|
|
180
|
+
/**
|
|
181
|
+
* ResourceArray is an array of resources with a bundle property.
|
|
182
|
+
* The bundle property is a FHIR Bundle containing the search results.
|
|
183
|
+
* This is useful for retrieving bundle metadata such as total, offset, and next link.
|
|
184
|
+
*/
|
|
185
|
+
export type ResourceArray<T extends Resource = Resource> = T[] & {
|
|
186
|
+
bundle: Bundle<T>;
|
|
187
|
+
};
|
|
180
188
|
export interface CreatePdfFunction {
|
|
181
189
|
(docDefinition: TDocumentDefinitions, tableLayouts?: Record<string, CustomTableLayout> | undefined, fonts?: TFontDictionary | undefined): Promise<any>;
|
|
182
190
|
}
|
|
@@ -207,6 +215,7 @@ export interface NewUserRequest {
|
|
|
207
215
|
readonly recaptchaSiteKey?: string;
|
|
208
216
|
readonly remember?: boolean;
|
|
209
217
|
readonly projectId?: string;
|
|
218
|
+
readonly clientId?: string;
|
|
210
219
|
}
|
|
211
220
|
export interface NewProjectRequest {
|
|
212
221
|
readonly login: string;
|
|
@@ -285,6 +294,10 @@ export interface MailAddress {
|
|
|
285
294
|
readonly name: string;
|
|
286
295
|
readonly address: string;
|
|
287
296
|
}
|
|
297
|
+
/**
|
|
298
|
+
* Email destination definition.
|
|
299
|
+
*/
|
|
300
|
+
export type MailDestination = string | MailAddress | string[] | MailAddress[];
|
|
288
301
|
/**
|
|
289
302
|
* Email attachment definition.
|
|
290
303
|
* Compatible with nodemailer Mail.Options.
|
|
@@ -309,11 +322,11 @@ export interface MailOptions {
|
|
|
309
322
|
/** An e-mail address that will appear on the Sender: field */
|
|
310
323
|
readonly sender?: string | MailAddress;
|
|
311
324
|
/** Comma separated list or an array of recipients e-mail addresses that will appear on the To: field */
|
|
312
|
-
readonly to?:
|
|
325
|
+
readonly to?: MailDestination;
|
|
313
326
|
/** Comma separated list or an array of recipients e-mail addresses that will appear on the Cc: field */
|
|
314
|
-
readonly cc?:
|
|
327
|
+
readonly cc?: MailDestination;
|
|
315
328
|
/** Comma separated list or an array of recipients e-mail addresses that will appear on the Bcc: field */
|
|
316
|
-
readonly bcc?:
|
|
329
|
+
readonly bcc?: MailDestination;
|
|
317
330
|
/** An e-mail address that will appear on the Reply-To: field */
|
|
318
331
|
readonly replyTo?: string | MailAddress;
|
|
319
332
|
/** The subject of the e-mail */
|
|
@@ -327,13 +340,15 @@ export interface MailOptions {
|
|
|
327
340
|
}
|
|
328
341
|
/**
|
|
329
342
|
* OAuth 2.0 Grant Type Identifiers
|
|
330
|
-
* Standard identifiers
|
|
331
|
-
*
|
|
343
|
+
* Standard identifiers: https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#name-grant-types
|
|
344
|
+
* JWT bearer extension: https://datatracker.ietf.org/doc/html/rfc7523
|
|
345
|
+
* Token exchange extension: https://datatracker.ietf.org/doc/html/rfc8693
|
|
332
346
|
*/
|
|
333
347
|
export declare enum OAuthGrantType {
|
|
334
348
|
ClientCredentials = "client_credentials",
|
|
335
349
|
AuthorizationCode = "authorization_code",
|
|
336
350
|
RefreshToken = "refresh_token",
|
|
351
|
+
JwtBearer = "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
|
337
352
|
TokenExchange = "urn:ietf:params:oauth:grant-type:token-exchange"
|
|
338
353
|
}
|
|
339
354
|
/**
|
|
@@ -417,6 +432,7 @@ export declare class MedplumClient extends EventTarget {
|
|
|
417
432
|
private readonly onUnauthenticated?;
|
|
418
433
|
private readonly autoBatchTime;
|
|
419
434
|
private readonly autoBatchQueue;
|
|
435
|
+
private medplumServer?;
|
|
420
436
|
private clientId?;
|
|
421
437
|
private clientSecret?;
|
|
422
438
|
private autoBatchTimerId?;
|
|
@@ -750,7 +766,7 @@ export declare class MedplumClient extends EventTarget {
|
|
|
750
766
|
* @param options Optional fetch options.
|
|
751
767
|
* @returns Promise to the array of search results.
|
|
752
768
|
*/
|
|
753
|
-
searchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: RequestInit): ReadablePromise<ExtractResource<K
|
|
769
|
+
searchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: RequestInit): ReadablePromise<ResourceArray<ExtractResource<K>>>;
|
|
754
770
|
/**
|
|
755
771
|
* Creates an
|
|
756
772
|
* [async generator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)
|
|
@@ -771,7 +787,7 @@ export declare class MedplumClient extends EventTarget {
|
|
|
771
787
|
* @param options Optional fetch options.
|
|
772
788
|
* @yields An async generator, where each result is an array of resources for each page.
|
|
773
789
|
*/
|
|
774
|
-
searchResourcePages<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: RequestInit): AsyncGenerator<ExtractResource<K
|
|
790
|
+
searchResourcePages<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: RequestInit): AsyncGenerator<ResourceArray<ExtractResource<K>>>;
|
|
775
791
|
/**
|
|
776
792
|
* Searches a ValueSet resource using the "expand" operation.
|
|
777
793
|
* See: https://www.hl7.org/fhir/operation-valueset-expand.html
|
|
@@ -1299,9 +1315,10 @@ export declare class MedplumClient extends EventTarget {
|
|
|
1299
1315
|
/**
|
|
1300
1316
|
* Sets the current access token.
|
|
1301
1317
|
* @param accessToken The new access token.
|
|
1318
|
+
* @param refreshToken Optional refresh token.
|
|
1302
1319
|
* @category Authentication
|
|
1303
1320
|
*/
|
|
1304
|
-
setAccessToken(accessToken: string): void;
|
|
1321
|
+
setAccessToken(accessToken: string, refreshToken?: string): void;
|
|
1305
1322
|
/**
|
|
1306
1323
|
* Returns the list of available logins.
|
|
1307
1324
|
* @returns The list of available logins.
|
|
@@ -1509,7 +1526,6 @@ export declare class MedplumClient extends EventTarget {
|
|
|
1509
1526
|
* await medplum.searchResources('Patient')
|
|
1510
1527
|
* ```
|
|
1511
1528
|
*
|
|
1512
|
-
*
|
|
1513
1529
|
* See: https://datatracker.ietf.org/doc/html/rfc6749#section-4.4
|
|
1514
1530
|
* @category Authentication
|
|
1515
1531
|
* @param clientId The client ID.
|
|
@@ -1517,6 +1533,22 @@ export declare class MedplumClient extends EventTarget {
|
|
|
1517
1533
|
* @returns Promise that resolves to the client profile.
|
|
1518
1534
|
*/
|
|
1519
1535
|
startClientLogin(clientId: string, clientSecret: string): Promise<ProfileResource>;
|
|
1536
|
+
/**
|
|
1537
|
+
* Starts a new OAuth2 JWT bearer flow.
|
|
1538
|
+
*
|
|
1539
|
+
* ```typescript
|
|
1540
|
+
* await medplum.startJwtBearerLogin(process.env.MEDPLUM_CLIENT_ID, process.env.MEDPLUM_JWT_BEARER_ASSERTION, 'openid profile');
|
|
1541
|
+
* // Example Search
|
|
1542
|
+
* await medplum.searchResources('Patient')
|
|
1543
|
+
* ```
|
|
1544
|
+
*
|
|
1545
|
+
* See: https://datatracker.ietf.org/doc/html/rfc7523#section-2.1
|
|
1546
|
+
* @param clientId The client ID.
|
|
1547
|
+
* @param assertion The JWT assertion.
|
|
1548
|
+
* @param scope The OAuth scope.
|
|
1549
|
+
* @returns Promise that resolves to the client profile.
|
|
1550
|
+
*/
|
|
1551
|
+
startJwtBearerLogin(clientId: string, assertion: string, scope: string): Promise<ProfileResource>;
|
|
1520
1552
|
/**
|
|
1521
1553
|
* Sets the client ID and secret for basic auth.
|
|
1522
1554
|
*
|
|
@@ -34,7 +34,10 @@ export declare class AsAtom extends InfixOperatorAtom {
|
|
|
34
34
|
constructor(left: Atom, right: Atom);
|
|
35
35
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
36
36
|
}
|
|
37
|
-
export declare class
|
|
37
|
+
export declare abstract class BooleanInfixOperatorAtom extends InfixOperatorAtom {
|
|
38
|
+
abstract eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
39
|
+
}
|
|
40
|
+
export declare class ArithemticOperatorAtom extends BooleanInfixOperatorAtom {
|
|
38
41
|
readonly impl: (x: number, y: number) => number | boolean;
|
|
39
42
|
constructor(operator: string, left: Atom, right: Atom, impl: (x: number, y: number) => number | boolean);
|
|
40
43
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
@@ -43,11 +46,11 @@ export declare class ConcatAtom extends InfixOperatorAtom {
|
|
|
43
46
|
constructor(left: Atom, right: Atom);
|
|
44
47
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
45
48
|
}
|
|
46
|
-
export declare class ContainsAtom extends
|
|
49
|
+
export declare class ContainsAtom extends BooleanInfixOperatorAtom {
|
|
47
50
|
constructor(left: Atom, right: Atom);
|
|
48
51
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
49
52
|
}
|
|
50
|
-
export declare class InAtom extends
|
|
53
|
+
export declare class InAtom extends BooleanInfixOperatorAtom {
|
|
51
54
|
constructor(left: Atom, right: Atom);
|
|
52
55
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
53
56
|
}
|
|
@@ -60,23 +63,23 @@ export declare class UnionAtom extends InfixOperatorAtom {
|
|
|
60
63
|
constructor(left: Atom, right: Atom);
|
|
61
64
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
62
65
|
}
|
|
63
|
-
export declare class EqualsAtom extends
|
|
66
|
+
export declare class EqualsAtom extends BooleanInfixOperatorAtom {
|
|
64
67
|
constructor(left: Atom, right: Atom);
|
|
65
68
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
66
69
|
}
|
|
67
|
-
export declare class NotEqualsAtom extends
|
|
70
|
+
export declare class NotEqualsAtom extends BooleanInfixOperatorAtom {
|
|
68
71
|
constructor(left: Atom, right: Atom);
|
|
69
72
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
70
73
|
}
|
|
71
|
-
export declare class EquivalentAtom extends
|
|
74
|
+
export declare class EquivalentAtom extends BooleanInfixOperatorAtom {
|
|
72
75
|
constructor(left: Atom, right: Atom);
|
|
73
76
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
74
77
|
}
|
|
75
|
-
export declare class NotEquivalentAtom extends
|
|
78
|
+
export declare class NotEquivalentAtom extends BooleanInfixOperatorAtom {
|
|
76
79
|
constructor(left: Atom, right: Atom);
|
|
77
80
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
78
81
|
}
|
|
79
|
-
export declare class IsAtom extends
|
|
82
|
+
export declare class IsAtom extends BooleanInfixOperatorAtom {
|
|
80
83
|
constructor(left: Atom, right: Atom);
|
|
81
84
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
82
85
|
}
|
|
@@ -86,11 +89,11 @@ export declare class IsAtom extends InfixOperatorAtom {
|
|
|
86
89
|
* false if either operand evaluates to false,
|
|
87
90
|
* and the empty collection otherwise.
|
|
88
91
|
*/
|
|
89
|
-
export declare class AndAtom extends
|
|
92
|
+
export declare class AndAtom extends BooleanInfixOperatorAtom {
|
|
90
93
|
constructor(left: Atom, right: Atom);
|
|
91
94
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
92
95
|
}
|
|
93
|
-
export declare class OrAtom extends
|
|
96
|
+
export declare class OrAtom extends BooleanInfixOperatorAtom {
|
|
94
97
|
constructor(left: Atom, right: Atom);
|
|
95
98
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
96
99
|
}
|
|
@@ -100,9 +103,20 @@ export declare class OrAtom extends InfixOperatorAtom {
|
|
|
100
103
|
* false if either both operands evaluate to true or both operands evaluate to false,
|
|
101
104
|
* and the empty collection otherwise.
|
|
102
105
|
*/
|
|
103
|
-
export declare class XorAtom extends
|
|
106
|
+
export declare class XorAtom extends BooleanInfixOperatorAtom {
|
|
107
|
+
constructor(left: Atom, right: Atom);
|
|
108
|
+
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* 6.5.5. implies
|
|
112
|
+
* Returns true if left is true and right is true,
|
|
113
|
+
* true left is false and right true, false or empty
|
|
114
|
+
* true left is empty
|
|
115
|
+
*/
|
|
116
|
+
export declare class ImpliesAtom extends BooleanInfixOperatorAtom {
|
|
104
117
|
constructor(left: Atom, right: Atom);
|
|
105
118
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
119
|
+
private isValidCollectionLength;
|
|
106
120
|
}
|
|
107
121
|
export declare class FunctionAtom implements Atom {
|
|
108
122
|
readonly name: string;
|
|
@@ -5,39 +5,39 @@ import { FhirPathAtom } from './atoms';
|
|
|
5
5
|
* Operator precedence
|
|
6
6
|
* See: https://hl7.org/fhirpath/#operator-precedence
|
|
7
7
|
*/
|
|
8
|
-
export declare const
|
|
9
|
-
FunctionCall
|
|
10
|
-
Dot
|
|
11
|
-
Indexer
|
|
12
|
-
UnaryAdd
|
|
13
|
-
UnarySubtract
|
|
14
|
-
Multiply
|
|
15
|
-
Divide
|
|
16
|
-
IntegerDivide
|
|
17
|
-
Modulo
|
|
18
|
-
Add
|
|
19
|
-
Subtract
|
|
20
|
-
Ampersand
|
|
21
|
-
Is
|
|
22
|
-
As
|
|
23
|
-
Union
|
|
24
|
-
GreaterThan
|
|
25
|
-
GreaterThanOrEquals
|
|
26
|
-
LessThan
|
|
27
|
-
LessThanOrEquals
|
|
28
|
-
Equals
|
|
29
|
-
Equivalent
|
|
30
|
-
NotEquals
|
|
31
|
-
NotEquivalent
|
|
32
|
-
In
|
|
33
|
-
Contains
|
|
34
|
-
And
|
|
35
|
-
Xor
|
|
36
|
-
Or
|
|
37
|
-
Implies
|
|
38
|
-
Arrow
|
|
39
|
-
Semicolon
|
|
40
|
-
}
|
|
8
|
+
export declare const OperatorPrecedence: {
|
|
9
|
+
FunctionCall: number;
|
|
10
|
+
Dot: number;
|
|
11
|
+
Indexer: number;
|
|
12
|
+
UnaryAdd: number;
|
|
13
|
+
UnarySubtract: number;
|
|
14
|
+
Multiply: number;
|
|
15
|
+
Divide: number;
|
|
16
|
+
IntegerDivide: number;
|
|
17
|
+
Modulo: number;
|
|
18
|
+
Add: number;
|
|
19
|
+
Subtract: number;
|
|
20
|
+
Ampersand: number;
|
|
21
|
+
Is: number;
|
|
22
|
+
As: number;
|
|
23
|
+
Union: number;
|
|
24
|
+
GreaterThan: number;
|
|
25
|
+
GreaterThanOrEquals: number;
|
|
26
|
+
LessThan: number;
|
|
27
|
+
LessThanOrEquals: number;
|
|
28
|
+
Equals: number;
|
|
29
|
+
Equivalent: number;
|
|
30
|
+
NotEquals: number;
|
|
31
|
+
NotEquivalent: number;
|
|
32
|
+
In: number;
|
|
33
|
+
Contains: number;
|
|
34
|
+
And: number;
|
|
35
|
+
Xor: number;
|
|
36
|
+
Or: number;
|
|
37
|
+
Implies: number;
|
|
38
|
+
Arrow: number;
|
|
39
|
+
Semicolon: number;
|
|
40
|
+
};
|
|
41
41
|
export declare function initFhirPathParserBuilder(): ParserBuilder;
|
|
42
42
|
/**
|
|
43
43
|
* Parses a FHIRPath expression into an AST.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -22,4 +22,4 @@ export * from './storage';
|
|
|
22
22
|
export * from './types';
|
|
23
23
|
export * from './utils';
|
|
24
24
|
export { loadDataTypes } from './typeschema/types';
|
|
25
|
-
export {
|
|
25
|
+
export { validate } from './typeschema/validation';
|
package/dist/types/jwt.d.ts
CHANGED
|
@@ -4,3 +4,9 @@
|
|
|
4
4
|
* @returns Collection of key value claims in the JWT payload.
|
|
5
5
|
*/
|
|
6
6
|
export declare function parseJWTPayload(token: string): Record<string, number | string>;
|
|
7
|
+
/**
|
|
8
|
+
* Returns true if the access token was issued by a Medplum server.
|
|
9
|
+
* @param accessToken An access token of unknown origin.
|
|
10
|
+
* @returns True if the access token was issued by a Medplum server.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isMedplumAccessToken(accessToken: string): boolean;
|
package/dist/types/schema.d.ts
CHANGED
|
@@ -95,6 +95,7 @@ export declare function validateResourceType(resourceType: string): void;
|
|
|
95
95
|
* await medplum.requestSchema('Patient');
|
|
96
96
|
* ```
|
|
97
97
|
* @param resource The candidate resource.
|
|
98
|
+
* @deprecated use validate() instead
|
|
98
99
|
*/
|
|
99
100
|
export declare function validateResource<T extends Resource>(resource: T): void;
|
|
100
101
|
export declare class FhirSchemaValidator<T extends Resource> {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementDefinition, SearchParameter } from '@medplum/fhirtypes';
|
|
2
|
+
import { Atom } from '../fhirlexer';
|
|
2
3
|
export declare enum SearchParameterType {
|
|
3
4
|
BOOLEAN = "BOOLEAN",
|
|
4
5
|
NUMBER = "NUMBER",
|
|
@@ -14,7 +15,7 @@ export declare enum SearchParameterType {
|
|
|
14
15
|
export interface SearchParameterDetails {
|
|
15
16
|
readonly columnName: string;
|
|
16
17
|
readonly type: SearchParameterType;
|
|
17
|
-
readonly
|
|
18
|
+
readonly elementDefinitions?: ElementDefinition[];
|
|
18
19
|
readonly array?: boolean;
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
@@ -31,4 +32,5 @@ export interface SearchParameterDetails {
|
|
|
31
32
|
* @returns The search parameter type details.
|
|
32
33
|
*/
|
|
33
34
|
export declare function getSearchParameterDetails(resourceType: string, searchParam: SearchParameter): SearchParameterDetails;
|
|
35
|
+
export declare function getExpressionsForResourceType(resourceType: string, expression: string): Atom[];
|
|
34
36
|
export declare function getExpressionForResourceType(resourceType: string, expression: string): string | undefined;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -199,13 +199,13 @@ export declare function getElementDefinition(typeName: string, propertyName: str
|
|
|
199
199
|
* @param value The object to check
|
|
200
200
|
* @returns True if the input is of type 'object' and contains property 'resourceType'
|
|
201
201
|
*/
|
|
202
|
-
export declare function isResource
|
|
202
|
+
export declare function isResource(value: unknown): value is Resource;
|
|
203
203
|
/**
|
|
204
204
|
* Typeguard to validate that an object is a FHIR resource
|
|
205
205
|
* @param value The object to check
|
|
206
206
|
* @returns True if the input is of type 'object' and contains property 'reference'
|
|
207
207
|
*/
|
|
208
|
-
export declare function isReference
|
|
208
|
+
export declare function isReference(value: unknown): value is Reference & {
|
|
209
209
|
reference: string;
|
|
210
210
|
};
|
|
211
211
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Resource, StructureDefinition } from '@medplum/fhirtypes';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function validate(resource: Resource, profile?: StructureDefinition): void;
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -280,6 +280,7 @@ export declare function preciseGreaterThanOrEquals(a: number, b: number, precisi
|
|
|
280
280
|
* @returns The first resource in the input array that matches the specified code and system, or undefined if no such resource is found.
|
|
281
281
|
*/
|
|
282
282
|
export declare function findResourceByCode(resources: ResourceWithCode[], code: CodeableConcept | string, system: string): ResourceWithCode | undefined;
|
|
283
|
+
export declare function arrayify<T>(value: T | T[] | undefined): T[] | undefined;
|
|
283
284
|
/**
|
|
284
285
|
* Sleeps for the specified number of milliseconds.
|
|
285
286
|
* @param ms Time delay in milliseconds
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medplum/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26",
|
|
4
4
|
"description": "Medplum TS/JS Library",
|
|
5
5
|
"author": "Medplum <hello@medplum.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"url": "https://github.com/medplum/medplum.git",
|
|
11
11
|
"directory": "packages/core"
|
|
12
12
|
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=18.0.0"
|
|
15
|
+
},
|
|
13
16
|
"scripts": {
|
|
14
17
|
"clean": "rimraf dist",
|
|
15
18
|
"build": "npm run clean && tsc --project tsconfig.build.json && node esbuild.mjs",
|