@medplum/mock 3.1.10 → 3.1.11

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.
@@ -13,7 +13,6 @@ import { DiagnosticReport } from '@medplum/fhirtypes';
13
13
  import { Encounter } from '@medplum/fhirtypes';
14
14
  import { FhirRouter } from '@medplum/fhir-router';
15
15
  import { Group } from '@medplum/fhirtypes';
16
- import { IClientStorage } from '@medplum/core';
17
16
  import { LoginState } from '@medplum/core';
18
17
  import { Media } from '@medplum/fhirtypes';
19
18
  import { MedplumClient } from '@medplum/core';
@@ -284,7 +283,10 @@ export declare interface MockClientOptions extends MedplumClientOptions {
284
283
  * MedplumContext.profile returning undefined as if no one were logged in.
285
284
  */
286
285
  readonly profile?: ReturnType<MedplumClient['getProfile']> | null;
287
- readonly storage?: IClientStorage;
286
+ /**
287
+ * Override the `MockFetchClient` used by this `MockClient`.
288
+ */
289
+ readonly mockFetchOverride?: MockFetchOverrideOptions;
288
290
  }
289
291
 
290
292
  export declare type MockCriteriaEntry = {
@@ -319,6 +321,15 @@ export declare class MockFetchClient {
319
321
  private mockFhirHandler;
320
322
  }
321
323
 
324
+ /**
325
+ * Override must contain all of `router`, `repo`, and `client`.
326
+ */
327
+ export declare type MockFetchOverrideOptions = {
328
+ client: MockFetchClient;
329
+ router: FhirRouter;
330
+ repo: MemoryRepository;
331
+ };
332
+
322
333
  export declare interface MockSubManagerOptions {
323
334
  mockRobustWebSocket?: boolean;
324
335
  }
@@ -13,7 +13,6 @@ import { DiagnosticReport } from '@medplum/fhirtypes';
13
13
  import { Encounter } from '@medplum/fhirtypes';
14
14
  import { FhirRouter } from '@medplum/fhir-router';
15
15
  import { Group } from '@medplum/fhirtypes';
16
- import { IClientStorage } from '@medplum/core';
17
16
  import { LoginState } from '@medplum/core';
18
17
  import { Media } from '@medplum/fhirtypes';
19
18
  import { MedplumClient } from '@medplum/core';
@@ -284,7 +283,10 @@ export declare interface MockClientOptions extends MedplumClientOptions {
284
283
  * MedplumContext.profile returning undefined as if no one were logged in.
285
284
  */
286
285
  readonly profile?: ReturnType<MedplumClient['getProfile']> | null;
287
- readonly storage?: IClientStorage;
286
+ /**
287
+ * Override the `MockFetchClient` used by this `MockClient`.
288
+ */
289
+ readonly mockFetchOverride?: MockFetchOverrideOptions;
288
290
  }
289
291
 
290
292
  export declare type MockCriteriaEntry = {
@@ -319,6 +321,15 @@ export declare class MockFetchClient {
319
321
  private mockFhirHandler;
320
322
  }
321
323
 
324
+ /**
325
+ * Override must contain all of `router`, `repo`, and `client`.
326
+ */
327
+ export declare type MockFetchOverrideOptions = {
328
+ client: MockFetchClient;
329
+ router: FhirRouter;
330
+ repo: MemoryRepository;
331
+ };
332
+
322
333
  export declare interface MockSubManagerOptions {
323
334
  mockRobustWebSocket?: boolean;
324
335
  }