@medplum/mock 2.0.4 → 2.0.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.
@@ -1,46 +0,0 @@
1
- import { LoginState, MedplumClient, ProfileResource } from '@medplum/core';
2
- import { FhirRouter, MemoryRepository } from '@medplum/fhir-router';
3
- import { Binary, UserConfiguration } from '@medplum/fhirtypes';
4
- /** @ts-ignore */
5
- import type { CustomTableLayout, TDocumentDefinitions, TFontDictionary } from 'pdfmake/interfaces';
6
- export interface MockClientOptions {
7
- readonly debug?: boolean;
8
- }
9
- export declare class MockClient extends MedplumClient {
10
- readonly router: FhirRouter;
11
- readonly repo: MemoryRepository;
12
- readonly client: MockFetchClient;
13
- readonly debug: boolean;
14
- activeLoginOverride?: LoginState;
15
- constructor(clientOptions?: MockClientOptions);
16
- clear(): void;
17
- getProfile(): ProfileResource;
18
- getUserConfiguration(): UserConfiguration | undefined;
19
- setActiveLoginOverride(activeLoginOverride: LoginState): void;
20
- getActiveLogin(): LoginState | undefined;
21
- createBinary(data: string | File | Blob | Uint8Array, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void): Promise<Binary>;
22
- }
23
- declare class MockFetchClient {
24
- readonly debug: boolean;
25
- readonly router: FhirRouter;
26
- readonly repo: MemoryRepository;
27
- initialized: boolean;
28
- initPromise?: Promise<void>;
29
- constructor(router: FhirRouter, repo: MemoryRepository, debug?: boolean);
30
- mockFetch(url: string, options: any): Promise<any>;
31
- mockCreatePdf(docDefinition: TDocumentDefinitions, tableLayouts?: {
32
- [name: string]: CustomTableLayout;
33
- }, fonts?: TFontDictionary | undefined): Promise<any>;
34
- private mockHandler;
35
- private mockAdminHandler;
36
- private mockAuthHandler;
37
- private mockChangePasswordHandler;
38
- private mockLoginHandler;
39
- private mockSetPasswordHandler;
40
- private mockNewUserHandler;
41
- private mockResetPasswordHandler;
42
- private mockOAuthHandler;
43
- private initMockRepo;
44
- private mockFhirHandler;
45
- }
46
- export {};
@@ -1,2 +0,0 @@
1
- export * from './client';
2
- export * from './mocks';
@@ -1,4 +0,0 @@
1
- import { AccessPolicy, UserConfiguration, ValueSet } from '@medplum/fhirtypes';
2
- export declare const ExampleAccessPolicy: AccessPolicy;
3
- export declare const ExampleStatusValueSet: ValueSet;
4
- export declare const ExampleUserConfiguration: UserConfiguration;
@@ -1,7 +0,0 @@
1
- import { Organization, Practitioner, Schedule, Slot } from '@medplum/fhirtypes';
2
- export declare const TestOrganization: Organization;
3
- export declare const DifferentOrganization: Organization;
4
- export declare const DrAliceSmith: Practitioner;
5
- export declare const DrAliceSmithPreviousVersion: Practitioner;
6
- export declare const DrAliceSmithSchedule: Schedule;
7
- export declare const DrAliceSmithSlots: Slot[];
@@ -1,3 +0,0 @@
1
- import { Bot, ClientApplication } from '@medplum/fhirtypes';
2
- export declare const ExampleBot: Bot;
3
- export declare const ExampleClient: ClientApplication;
@@ -1,8 +0,0 @@
1
- export * from './accesspolicy';
2
- export * from './alice';
3
- export * from './bot';
4
- export * from './questionnaire';
5
- export * from './simpsons';
6
- export * from './subscription';
7
- export * from './valueset';
8
- export * from './workflow';
@@ -1,3 +0,0 @@
1
- import { Questionnaire, QuestionnaireResponse } from '@medplum/fhirtypes';
2
- export declare const ExampleQuestionnaire: Questionnaire;
3
- export declare const ExampleQuestionnaireResponse: QuestionnaireResponse;
@@ -1,23 +0,0 @@
1
- import { Communication, DiagnosticReport, Encounter, Group, Media, Observation, Patient, RelatedPerson, ServiceRequest, Specimen } from '@medplum/fhirtypes';
2
- export declare const LisaSimpson: Patient;
3
- export declare const BartSimpson: Patient;
4
- export declare const HomerLisaRelatedPerson: RelatedPerson;
5
- export declare const HomerBartRelatedPerson: RelatedPerson;
6
- export declare const HomerSimpson: Patient;
7
- export declare const MargeSimpson: Patient;
8
- export declare const HomerSimpsonPreviousVersion: Patient;
9
- export declare const HomerEncounter: Encounter;
10
- export declare const HomerCommunication: Communication;
11
- export declare const HomerMedia: Media;
12
- export declare const HomerObservation1: Observation;
13
- export declare const HomerObservation2: Observation;
14
- export declare const HomerObservation3: Observation;
15
- export declare const HomerObservation4: Observation;
16
- export declare const HomerObservation5: Observation;
17
- export declare const HomerObservation6: Observation;
18
- export declare const HomerObservation7: Observation;
19
- export declare const HomerObservation8: Observation;
20
- export declare const HomerSimpsonSpecimen: Specimen;
21
- export declare const HomerServiceRequest: ServiceRequest;
22
- export declare const HomerDiagnosticReport: DiagnosticReport;
23
- export declare const SimpsonsFamily: Group;
@@ -1,2 +0,0 @@
1
- import { ClientApplication } from '@medplum/fhirtypes';
2
- export declare const ExampleSmartClientApplication: ClientApplication;
@@ -1,3 +0,0 @@
1
- import { AuditEvent, Subscription } from '@medplum/fhirtypes';
2
- export declare const ExampleSubscription: Subscription;
3
- export declare const ExampleAuditEvent: AuditEvent;
@@ -1,2 +0,0 @@
1
- import { ValueSet } from '@medplum/fhirtypes';
2
- export declare const exampleValueSet: ValueSet;
@@ -1,10 +0,0 @@
1
- import { PlanDefinition, Questionnaire, QuestionnaireResponse, RequestGroup, Task } from '@medplum/fhirtypes';
2
- export declare const ExampleWorkflowQuestionnaire1: Questionnaire;
3
- export declare const ExampleWorkflowQuestionnaire2: Questionnaire;
4
- export declare const ExampleWorkflowQuestionnaire3: Questionnaire;
5
- export declare const ExampleWorkflowPlanDefinition: PlanDefinition;
6
- export declare const ExampleWorkflowQuestionnaireResponse1: QuestionnaireResponse;
7
- export declare const ExampleWorkflowTask1: Task;
8
- export declare const ExampleWorkflowTask2: Task;
9
- export declare const ExampleWorkflowTask3: Task;
10
- export declare const ExampleWorkflowRequestGroup: RequestGroup;