@medplum/core 5.1.6 → 5.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.
@@ -309,7 +309,8 @@ export declare class AsAtom extends InfixOperatorAtom {
309
309
  eval(context: AtomContext, input: TypedValue[]): TypedValue[];
310
310
  }
311
311
 
312
- export declare function assert(condition: unknown, msg?: string): asserts condition;
312
+ declare function assert_2(condition: unknown, msg?: string): asserts condition;
313
+ export { assert_2 as assert }
313
314
 
314
315
  export declare function assertContextVersionOptional(event: string): asserts event is FhircastEventVersionOptional;
315
316
 
@@ -526,7 +527,7 @@ export declare interface CdsCard {
526
527
  readonly uuid?: string;
527
528
  readonly summary: string;
528
529
  readonly detail?: string;
529
- readonly indicator: 'info' | 'warning' | 'hard-stop';
530
+ readonly indicator: 'info' | 'warning' | 'critical';
530
531
  readonly source?: CdsSource;
531
532
  readonly suggestions?: CdsSuggestion[];
532
533
  readonly links?: CdsLink[];
@@ -2814,9 +2815,9 @@ export declare class IsAtom extends BooleanInfixOperatorAtom {
2814
2815
  }
2815
2816
 
2816
2817
  /**
2817
- * Environment detection utilities that can be mocked in tests.
2818
+ * Environment detection utilities that can be mocked in tests (e.g. `vi.mock` in Vitest).
2818
2819
  * These functions replace direct checks of global objects to avoid
2819
- * the need to manipulate non-configurable globalThis.window in Jest/JSDOM 23+.
2820
+ * manipulating non-configurable `globalThis.window` under JSDOM 23+.
2820
2821
  */
2821
2822
  /**
2822
2823
  * Returns true if running in a browser environment with window available.
@@ -3232,8 +3233,8 @@ export declare class LiteralAtom implements Atom {
3232
3233
  export declare function loadDataType(sd: StructureDefinition): void;
3233
3234
 
3234
3235
  /**
3235
- * Location utilities that can be mocked in tests.
3236
- * These functions wrap location calls to avoid JSDOM 23+ restrictions.
3236
+ * Location helpers that can be mocked alongside the rest of this module.
3237
+ * Centralizes `location` access to work around JSDOM 23+ behavior in test environments.
3237
3238
  */
3238
3239
  export declare const locationUtils: {
3239
3240
  assign(url: string): void;
@@ -4702,6 +4703,14 @@ export declare class MedplumClient extends TypedEventTarget<MedplumClientEventMa
4702
4703
  * @returns Promise to the response body as a blob.
4703
4704
  */
4704
4705
  download(url: URL | string, options?: MedplumRequestOptions): Promise<Blob>;
4706
+ /**
4707
+ * Downloads the URL as a Response. Can accept binary URLs in the form of `Binary/{id}` as well.
4708
+ * @category Read
4709
+ * @param url - The URL to request. Can be a standard URL or one in the form of `Binary/{id}`.
4710
+ * @param options - Optional fetch request init options.
4711
+ * @returns Promise to the response body as a Response.
4712
+ */
4713
+ downloadResponse(url: URL | string, options?: MedplumRequestOptions): Promise<Response>;
4705
4714
  /**
4706
4715
  * Creates a FHIR Media resource with the provided data content.
4707
4716
  *
@@ -5474,6 +5483,10 @@ export declare interface MedplumInfraConfig {
5474
5483
  storageWafIpSetArn?: string;
5475
5484
  storageLoggingBucket?: string;
5476
5485
  storageLoggingPrefix?: string;
5486
+ mtlsDomainName?: string;
5487
+ mtlsSslCertArn?: string;
5488
+ mtlsInternetFacing?: boolean;
5489
+ mtlsWafIpSetArn?: string;
5477
5490
  baseUrl: string;
5478
5491
  maxAzs: number;
5479
5492
  rdsInstances: number;
@@ -5686,6 +5699,10 @@ export declare interface MedplumSourceInfraConfig {
5686
5699
  storageBucketName: ValueOrExternalSecret<string>;
5687
5700
  storageDomainName: ValueOrExternalSecret<string>;
5688
5701
  storageSslCertArn: ValueOrExternalSecret<string>;
5702
+ mtlsDomainName?: ValueOrExternalSecret<string>;
5703
+ mtlsSslCertArn?: ValueOrExternalSecret<string>;
5704
+ mtlsInternetFacing?: ValueOrExternalSecret<boolean>;
5705
+ mtlsWafIpSetArn?: ValueOrExternalSecret<string>;
5689
5706
  signingKeyId: ValueOrExternalSecret<string>;
5690
5707
  storagePublicKey: ValueOrExternalSecret<string>;
5691
5708
  storageWafIpSetArn: ValueOrExternalSecret<string>;
@@ -5909,6 +5926,9 @@ export declare interface NewUserRequest {
5909
5926
  readonly clientId?: string;
5910
5927
  }
5911
5928
 
5929
+ /** No operation function. */
5930
+ export declare const NOOP: () => void;
5931
+
5912
5932
  /**
5913
5933
  * Normalizes an `ArrayBufferLike` (eg. an `ArrayBuffer`) to a raw `ArrayBufferLike` (without a view). If the passed buffer is a view, it gives the raw `ArrayBufferLike`.
5914
5934
  *
@@ -6196,7 +6216,7 @@ export declare function parseLogLevel(level: string): LogLevel;
6196
6216
  */
6197
6217
  export declare function parseMappingLanguage(input: string): StructureMap;
6198
6218
 
6199
- export declare function parseParameter(searchParam: SearchParameter, modifier: string, value: string): Filter;
6219
+ export declare function parseParameter(searchParam: SearchParameter, operator: Operator, modifier: string, value: string): Filter;
6200
6220
 
6201
6221
  export declare class Parser {
6202
6222
  private tokens;
@@ -7456,7 +7476,7 @@ export declare class ParserBuilder {
7456
7476
 
7457
7477
  export declare function validateTypedValue(typedValue: TypedValue, options?: ValidatorOptions): OperationOutcomeIssue[];
7458
7478
 
7459
- export declare function validationError(details: string): OperationOutcome;
7479
+ export declare function validationError(details: string, expressions?: string[], code?: IssueType, diagnostics?: string): OperationOutcome;
7460
7480
 
7461
7481
  export declare const validationRegexes: Record<string, RegExp>;
7462
7482
 
@@ -309,7 +309,8 @@ export declare class AsAtom extends InfixOperatorAtom {
309
309
  eval(context: AtomContext, input: TypedValue[]): TypedValue[];
310
310
  }
311
311
 
312
- export declare function assert(condition: unknown, msg?: string): asserts condition;
312
+ declare function assert_2(condition: unknown, msg?: string): asserts condition;
313
+ export { assert_2 as assert }
313
314
 
314
315
  export declare function assertContextVersionOptional(event: string): asserts event is FhircastEventVersionOptional;
315
316
 
@@ -526,7 +527,7 @@ export declare interface CdsCard {
526
527
  readonly uuid?: string;
527
528
  readonly summary: string;
528
529
  readonly detail?: string;
529
- readonly indicator: 'info' | 'warning' | 'hard-stop';
530
+ readonly indicator: 'info' | 'warning' | 'critical';
530
531
  readonly source?: CdsSource;
531
532
  readonly suggestions?: CdsSuggestion[];
532
533
  readonly links?: CdsLink[];
@@ -2814,9 +2815,9 @@ export declare class IsAtom extends BooleanInfixOperatorAtom {
2814
2815
  }
2815
2816
 
2816
2817
  /**
2817
- * Environment detection utilities that can be mocked in tests.
2818
+ * Environment detection utilities that can be mocked in tests (e.g. `vi.mock` in Vitest).
2818
2819
  * These functions replace direct checks of global objects to avoid
2819
- * the need to manipulate non-configurable globalThis.window in Jest/JSDOM 23+.
2820
+ * manipulating non-configurable `globalThis.window` under JSDOM 23+.
2820
2821
  */
2821
2822
  /**
2822
2823
  * Returns true if running in a browser environment with window available.
@@ -3232,8 +3233,8 @@ export declare class LiteralAtom implements Atom {
3232
3233
  export declare function loadDataType(sd: StructureDefinition): void;
3233
3234
 
3234
3235
  /**
3235
- * Location utilities that can be mocked in tests.
3236
- * These functions wrap location calls to avoid JSDOM 23+ restrictions.
3236
+ * Location helpers that can be mocked alongside the rest of this module.
3237
+ * Centralizes `location` access to work around JSDOM 23+ behavior in test environments.
3237
3238
  */
3238
3239
  export declare const locationUtils: {
3239
3240
  assign(url: string): void;
@@ -4702,6 +4703,14 @@ export declare class MedplumClient extends TypedEventTarget<MedplumClientEventMa
4702
4703
  * @returns Promise to the response body as a blob.
4703
4704
  */
4704
4705
  download(url: URL | string, options?: MedplumRequestOptions): Promise<Blob>;
4706
+ /**
4707
+ * Downloads the URL as a Response. Can accept binary URLs in the form of `Binary/{id}` as well.
4708
+ * @category Read
4709
+ * @param url - The URL to request. Can be a standard URL or one in the form of `Binary/{id}`.
4710
+ * @param options - Optional fetch request init options.
4711
+ * @returns Promise to the response body as a Response.
4712
+ */
4713
+ downloadResponse(url: URL | string, options?: MedplumRequestOptions): Promise<Response>;
4705
4714
  /**
4706
4715
  * Creates a FHIR Media resource with the provided data content.
4707
4716
  *
@@ -5474,6 +5483,10 @@ export declare interface MedplumInfraConfig {
5474
5483
  storageWafIpSetArn?: string;
5475
5484
  storageLoggingBucket?: string;
5476
5485
  storageLoggingPrefix?: string;
5486
+ mtlsDomainName?: string;
5487
+ mtlsSslCertArn?: string;
5488
+ mtlsInternetFacing?: boolean;
5489
+ mtlsWafIpSetArn?: string;
5477
5490
  baseUrl: string;
5478
5491
  maxAzs: number;
5479
5492
  rdsInstances: number;
@@ -5686,6 +5699,10 @@ export declare interface MedplumSourceInfraConfig {
5686
5699
  storageBucketName: ValueOrExternalSecret<string>;
5687
5700
  storageDomainName: ValueOrExternalSecret<string>;
5688
5701
  storageSslCertArn: ValueOrExternalSecret<string>;
5702
+ mtlsDomainName?: ValueOrExternalSecret<string>;
5703
+ mtlsSslCertArn?: ValueOrExternalSecret<string>;
5704
+ mtlsInternetFacing?: ValueOrExternalSecret<boolean>;
5705
+ mtlsWafIpSetArn?: ValueOrExternalSecret<string>;
5689
5706
  signingKeyId: ValueOrExternalSecret<string>;
5690
5707
  storagePublicKey: ValueOrExternalSecret<string>;
5691
5708
  storageWafIpSetArn: ValueOrExternalSecret<string>;
@@ -5909,6 +5926,9 @@ export declare interface NewUserRequest {
5909
5926
  readonly clientId?: string;
5910
5927
  }
5911
5928
 
5929
+ /** No operation function. */
5930
+ export declare const NOOP: () => void;
5931
+
5912
5932
  /**
5913
5933
  * Normalizes an `ArrayBufferLike` (eg. an `ArrayBuffer`) to a raw `ArrayBufferLike` (without a view). If the passed buffer is a view, it gives the raw `ArrayBufferLike`.
5914
5934
  *
@@ -6196,7 +6216,7 @@ export declare function parseLogLevel(level: string): LogLevel;
6196
6216
  */
6197
6217
  export declare function parseMappingLanguage(input: string): StructureMap;
6198
6218
 
6199
- export declare function parseParameter(searchParam: SearchParameter, modifier: string, value: string): Filter;
6219
+ export declare function parseParameter(searchParam: SearchParameter, operator: Operator, modifier: string, value: string): Filter;
6200
6220
 
6201
6221
  export declare class Parser {
6202
6222
  private tokens;
@@ -7456,7 +7476,7 @@ export declare class ParserBuilder {
7456
7476
 
7457
7477
  export declare function validateTypedValue(typedValue: TypedValue, options?: ValidatorOptions): OperationOutcomeIssue[];
7458
7478
 
7459
- export declare function validationError(details: string): OperationOutcome;
7479
+ export declare function validationError(details: string, expressions?: string[], code?: IssueType, diagnostics?: string): OperationOutcome;
7460
7480
 
7461
7481
  export declare const validationRegexes: Record<string, RegExp>;
7462
7482