@medplum/core 3.0.0 → 3.0.2
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 +5 -4
- package/dist/cjs/index.cjs.map +4 -4
- package/dist/cjs/index.d.ts +59 -1
- package/dist/esm/index.d.ts +59 -1
- package/dist/esm/index.mjs +5 -4
- package/dist/esm/index.mjs.map +4 -4
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -363,6 +363,8 @@ export declare interface ConceptMapTranslateParameters {
|
|
|
363
363
|
targetsystem?: string;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
export declare function conflict(details: string): OperationOutcome;
|
|
367
|
+
|
|
366
368
|
export declare interface Constraint {
|
|
367
369
|
key: string;
|
|
368
370
|
severity: 'error' | 'warning';
|
|
@@ -1776,6 +1778,20 @@ export declare function isCreated(outcome: OperationOutcome): boolean;
|
|
|
1776
1778
|
|
|
1777
1779
|
export declare function isDataTypeLoaded(type: string): boolean;
|
|
1778
1780
|
|
|
1781
|
+
/**
|
|
1782
|
+
* Returns true if the input value is a YYYY-MM-DD date string.
|
|
1783
|
+
* @param input - Unknown input value.
|
|
1784
|
+
* @returns True if the input is a date string.
|
|
1785
|
+
*/
|
|
1786
|
+
export declare function isDateString(input: unknown): input is string;
|
|
1787
|
+
|
|
1788
|
+
/**
|
|
1789
|
+
* Returns true if the input value is a YYYY-MM-DDThh:mm:ss.sssZ date/time string.
|
|
1790
|
+
* @param input - Unknown input value.
|
|
1791
|
+
* @returns True if the input is a date/time string.
|
|
1792
|
+
*/
|
|
1793
|
+
export declare function isDateTimeString(input: unknown): input is string;
|
|
1794
|
+
|
|
1779
1795
|
/**
|
|
1780
1796
|
* Returns true if the value is empty (null, undefined, empty string, or empty object).
|
|
1781
1797
|
* @param v - Any value.
|
|
@@ -1933,6 +1949,18 @@ export declare class LiteralAtom implements Atom {
|
|
|
1933
1949
|
|
|
1934
1950
|
export declare function loadDataType(sd: StructureDefinition, profileUrl?: string | undefined): void;
|
|
1935
1951
|
|
|
1952
|
+
export declare class Logger {
|
|
1953
|
+
readonly write: (msg: string) => void;
|
|
1954
|
+
readonly metadata: Record<string, any>;
|
|
1955
|
+
level: LogLevel;
|
|
1956
|
+
constructor(write: (msg: string) => void, metadata?: Record<string, any>, level?: LogLevel);
|
|
1957
|
+
error(msg: string, data?: Record<string, any>): void;
|
|
1958
|
+
warn(msg: string, data?: Record<string, any>): void;
|
|
1959
|
+
info(msg: string, data?: Record<string, any>): void;
|
|
1960
|
+
debug(msg: string, data?: Record<string, any>): void;
|
|
1961
|
+
log(level: LogLevel, msg: string, data?: Record<string, any>): void;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1936
1964
|
export declare interface LoginAuthenticationResponse {
|
|
1937
1965
|
readonly login: string;
|
|
1938
1966
|
readonly mfaRequired?: boolean;
|
|
@@ -1957,6 +1985,19 @@ export declare interface LoginState {
|
|
|
1957
1985
|
readonly refreshToken: string;
|
|
1958
1986
|
}
|
|
1959
1987
|
|
|
1988
|
+
/**
|
|
1989
|
+
* Logging level, with greater values representing more detailed logs emitted.
|
|
1990
|
+
*
|
|
1991
|
+
* The zero value means no server logs will be emitted.
|
|
1992
|
+
*/
|
|
1993
|
+
export declare enum LogLevel {
|
|
1994
|
+
NONE = 0,
|
|
1995
|
+
ERROR = 1,
|
|
1996
|
+
WARN = 2,
|
|
1997
|
+
INFO = 3,
|
|
1998
|
+
DEBUG = 4
|
|
1999
|
+
}
|
|
2000
|
+
|
|
1960
2001
|
export declare const LOINC = "http://loinc.org";
|
|
1961
2002
|
|
|
1962
2003
|
/**
|
|
@@ -2103,6 +2144,8 @@ export declare const MEDPLUM_VERSION: any;
|
|
|
2103
2144
|
* 6. Searching
|
|
2104
2145
|
* 7. Making GraphQL queries
|
|
2105
2146
|
*
|
|
2147
|
+
* The client can also be used to integrate with other FHIR servers. For an example, see the Epic Connection Demo Bot [here](https://github.com/medplum/medplum/tree/main/examples/medplum-demo-bots/src/epic).
|
|
2148
|
+
*
|
|
2106
2149
|
* @example
|
|
2107
2150
|
* Here is a quick example of how to use the client:
|
|
2108
2151
|
*
|
|
@@ -3701,6 +3744,8 @@ export declare interface MedplumInfraConfig {
|
|
|
3701
3744
|
rdsInstanceType: string;
|
|
3702
3745
|
rdsInstanceVersion?: string;
|
|
3703
3746
|
rdsSecretsArn?: string;
|
|
3747
|
+
rdsReaderInstanceType?: string;
|
|
3748
|
+
rdsProxyEnabled?: boolean;
|
|
3704
3749
|
cacheNodeType?: string;
|
|
3705
3750
|
desiredServerCount: number;
|
|
3706
3751
|
serverImage: string;
|
|
@@ -3760,8 +3805,10 @@ export declare interface MedplumSourceInfraConfig {
|
|
|
3760
3805
|
maxAzs: ValueOrExternalSecret<number>;
|
|
3761
3806
|
rdsInstances: ValueOrExternalSecret<number>;
|
|
3762
3807
|
rdsInstanceType: ValueOrExternalSecret<string>;
|
|
3763
|
-
rdsInstanceVersion
|
|
3808
|
+
rdsInstanceVersion?: ValueOrExternalSecret<string>;
|
|
3764
3809
|
rdsSecretsArn?: ValueOrExternalSecret<string>;
|
|
3810
|
+
rdsReaderInstanceType?: ValueOrExternalSecret<string>;
|
|
3811
|
+
rdsProxyEnabled?: ValueOrExternalSecret<boolean>;
|
|
3765
3812
|
cacheNodeType?: ValueOrExternalSecret<string>;
|
|
3766
3813
|
desiredServerCount: ValueOrExternalSecret<number>;
|
|
3767
3814
|
serverImage: ValueOrExternalSecret<string>;
|
|
@@ -4093,6 +4140,8 @@ export declare function parseHl7DateTime(hl7DateTime: string | undefined, option
|
|
|
4093
4140
|
*/
|
|
4094
4141
|
export declare function parseJWTPayload(token: string): Record<string, number | string>;
|
|
4095
4142
|
|
|
4143
|
+
export declare function parseLogLevel(level: string): LogLevel;
|
|
4144
|
+
|
|
4096
4145
|
/**
|
|
4097
4146
|
* Parses a FHIR Mapping Language document into an AST.
|
|
4098
4147
|
* @param input - The FHIR Mapping Language document to parse.
|
|
@@ -4709,6 +4758,13 @@ export declare interface TokenResponse {
|
|
|
4709
4758
|
|
|
4710
4759
|
export declare const tooManyRequests: OperationOutcome;
|
|
4711
4760
|
|
|
4761
|
+
/**
|
|
4762
|
+
* Tries to convert an unknown input value to a Period object.
|
|
4763
|
+
* @param input - Unknown input value.
|
|
4764
|
+
* @returns A Period object or undefined.
|
|
4765
|
+
*/
|
|
4766
|
+
export declare function toPeriod(input: unknown): Period | undefined;
|
|
4767
|
+
|
|
4712
4768
|
/**
|
|
4713
4769
|
* Returns a "best guess" TypedValue for a given value.
|
|
4714
4770
|
* @param value - The unknown value to check.
|
|
@@ -4822,6 +4878,8 @@ export declare function validateResourceType(resourceType: string): void;
|
|
|
4822
4878
|
|
|
4823
4879
|
export declare function validationError(details: string): OperationOutcome;
|
|
4824
4880
|
|
|
4881
|
+
export declare const validationRegexes: Record<string, RegExp>;
|
|
4882
|
+
|
|
4825
4883
|
export declare type ValueOrExternalSecret<T extends ExternalSecretPrimitive> = T | ExternalSecret<T>;
|
|
4826
4884
|
|
|
4827
4885
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -363,6 +363,8 @@ export declare interface ConceptMapTranslateParameters {
|
|
|
363
363
|
targetsystem?: string;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
export declare function conflict(details: string): OperationOutcome;
|
|
367
|
+
|
|
366
368
|
export declare interface Constraint {
|
|
367
369
|
key: string;
|
|
368
370
|
severity: 'error' | 'warning';
|
|
@@ -1776,6 +1778,20 @@ export declare function isCreated(outcome: OperationOutcome): boolean;
|
|
|
1776
1778
|
|
|
1777
1779
|
export declare function isDataTypeLoaded(type: string): boolean;
|
|
1778
1780
|
|
|
1781
|
+
/**
|
|
1782
|
+
* Returns true if the input value is a YYYY-MM-DD date string.
|
|
1783
|
+
* @param input - Unknown input value.
|
|
1784
|
+
* @returns True if the input is a date string.
|
|
1785
|
+
*/
|
|
1786
|
+
export declare function isDateString(input: unknown): input is string;
|
|
1787
|
+
|
|
1788
|
+
/**
|
|
1789
|
+
* Returns true if the input value is a YYYY-MM-DDThh:mm:ss.sssZ date/time string.
|
|
1790
|
+
* @param input - Unknown input value.
|
|
1791
|
+
* @returns True if the input is a date/time string.
|
|
1792
|
+
*/
|
|
1793
|
+
export declare function isDateTimeString(input: unknown): input is string;
|
|
1794
|
+
|
|
1779
1795
|
/**
|
|
1780
1796
|
* Returns true if the value is empty (null, undefined, empty string, or empty object).
|
|
1781
1797
|
* @param v - Any value.
|
|
@@ -1933,6 +1949,18 @@ export declare class LiteralAtom implements Atom {
|
|
|
1933
1949
|
|
|
1934
1950
|
export declare function loadDataType(sd: StructureDefinition, profileUrl?: string | undefined): void;
|
|
1935
1951
|
|
|
1952
|
+
export declare class Logger {
|
|
1953
|
+
readonly write: (msg: string) => void;
|
|
1954
|
+
readonly metadata: Record<string, any>;
|
|
1955
|
+
level: LogLevel;
|
|
1956
|
+
constructor(write: (msg: string) => void, metadata?: Record<string, any>, level?: LogLevel);
|
|
1957
|
+
error(msg: string, data?: Record<string, any>): void;
|
|
1958
|
+
warn(msg: string, data?: Record<string, any>): void;
|
|
1959
|
+
info(msg: string, data?: Record<string, any>): void;
|
|
1960
|
+
debug(msg: string, data?: Record<string, any>): void;
|
|
1961
|
+
log(level: LogLevel, msg: string, data?: Record<string, any>): void;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1936
1964
|
export declare interface LoginAuthenticationResponse {
|
|
1937
1965
|
readonly login: string;
|
|
1938
1966
|
readonly mfaRequired?: boolean;
|
|
@@ -1957,6 +1985,19 @@ export declare interface LoginState {
|
|
|
1957
1985
|
readonly refreshToken: string;
|
|
1958
1986
|
}
|
|
1959
1987
|
|
|
1988
|
+
/**
|
|
1989
|
+
* Logging level, with greater values representing more detailed logs emitted.
|
|
1990
|
+
*
|
|
1991
|
+
* The zero value means no server logs will be emitted.
|
|
1992
|
+
*/
|
|
1993
|
+
export declare enum LogLevel {
|
|
1994
|
+
NONE = 0,
|
|
1995
|
+
ERROR = 1,
|
|
1996
|
+
WARN = 2,
|
|
1997
|
+
INFO = 3,
|
|
1998
|
+
DEBUG = 4
|
|
1999
|
+
}
|
|
2000
|
+
|
|
1960
2001
|
export declare const LOINC = "http://loinc.org";
|
|
1961
2002
|
|
|
1962
2003
|
/**
|
|
@@ -2103,6 +2144,8 @@ export declare const MEDPLUM_VERSION: any;
|
|
|
2103
2144
|
* 6. Searching
|
|
2104
2145
|
* 7. Making GraphQL queries
|
|
2105
2146
|
*
|
|
2147
|
+
* The client can also be used to integrate with other FHIR servers. For an example, see the Epic Connection Demo Bot [here](https://github.com/medplum/medplum/tree/main/examples/medplum-demo-bots/src/epic).
|
|
2148
|
+
*
|
|
2106
2149
|
* @example
|
|
2107
2150
|
* Here is a quick example of how to use the client:
|
|
2108
2151
|
*
|
|
@@ -3701,6 +3744,8 @@ export declare interface MedplumInfraConfig {
|
|
|
3701
3744
|
rdsInstanceType: string;
|
|
3702
3745
|
rdsInstanceVersion?: string;
|
|
3703
3746
|
rdsSecretsArn?: string;
|
|
3747
|
+
rdsReaderInstanceType?: string;
|
|
3748
|
+
rdsProxyEnabled?: boolean;
|
|
3704
3749
|
cacheNodeType?: string;
|
|
3705
3750
|
desiredServerCount: number;
|
|
3706
3751
|
serverImage: string;
|
|
@@ -3760,8 +3805,10 @@ export declare interface MedplumSourceInfraConfig {
|
|
|
3760
3805
|
maxAzs: ValueOrExternalSecret<number>;
|
|
3761
3806
|
rdsInstances: ValueOrExternalSecret<number>;
|
|
3762
3807
|
rdsInstanceType: ValueOrExternalSecret<string>;
|
|
3763
|
-
rdsInstanceVersion
|
|
3808
|
+
rdsInstanceVersion?: ValueOrExternalSecret<string>;
|
|
3764
3809
|
rdsSecretsArn?: ValueOrExternalSecret<string>;
|
|
3810
|
+
rdsReaderInstanceType?: ValueOrExternalSecret<string>;
|
|
3811
|
+
rdsProxyEnabled?: ValueOrExternalSecret<boolean>;
|
|
3765
3812
|
cacheNodeType?: ValueOrExternalSecret<string>;
|
|
3766
3813
|
desiredServerCount: ValueOrExternalSecret<number>;
|
|
3767
3814
|
serverImage: ValueOrExternalSecret<string>;
|
|
@@ -4093,6 +4140,8 @@ export declare function parseHl7DateTime(hl7DateTime: string | undefined, option
|
|
|
4093
4140
|
*/
|
|
4094
4141
|
export declare function parseJWTPayload(token: string): Record<string, number | string>;
|
|
4095
4142
|
|
|
4143
|
+
export declare function parseLogLevel(level: string): LogLevel;
|
|
4144
|
+
|
|
4096
4145
|
/**
|
|
4097
4146
|
* Parses a FHIR Mapping Language document into an AST.
|
|
4098
4147
|
* @param input - The FHIR Mapping Language document to parse.
|
|
@@ -4709,6 +4758,13 @@ export declare interface TokenResponse {
|
|
|
4709
4758
|
|
|
4710
4759
|
export declare const tooManyRequests: OperationOutcome;
|
|
4711
4760
|
|
|
4761
|
+
/**
|
|
4762
|
+
* Tries to convert an unknown input value to a Period object.
|
|
4763
|
+
* @param input - Unknown input value.
|
|
4764
|
+
* @returns A Period object or undefined.
|
|
4765
|
+
*/
|
|
4766
|
+
export declare function toPeriod(input: unknown): Period | undefined;
|
|
4767
|
+
|
|
4712
4768
|
/**
|
|
4713
4769
|
* Returns a "best guess" TypedValue for a given value.
|
|
4714
4770
|
* @param value - The unknown value to check.
|
|
@@ -4822,6 +4878,8 @@ export declare function validateResourceType(resourceType: string): void;
|
|
|
4822
4878
|
|
|
4823
4879
|
export declare function validationError(details: string): OperationOutcome;
|
|
4824
4880
|
|
|
4881
|
+
export declare const validationRegexes: Record<string, RegExp>;
|
|
4882
|
+
|
|
4825
4883
|
export declare type ValueOrExternalSecret<T extends ExternalSecretPrimitive> = T | ExternalSecret<T>;
|
|
4826
4884
|
|
|
4827
4885
|
/**
|