@medplum/mock 3.0.9 → 3.0.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.
- package/dist/cjs/index.cjs +4 -4
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/index.d.ts +9 -3
- package/dist/esm/index.d.ts +9 -3
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/index.mjs.map +3 -3
- package/package.json +5 -5
package/dist/cjs/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { LoginState } from '@medplum/core';
|
|
|
15
15
|
import { Media } from '@medplum/fhirtypes';
|
|
16
16
|
import { MedplumClient } from '@medplum/core';
|
|
17
17
|
import { MedplumClientOptions } from '@medplum/core';
|
|
18
|
+
import { MedplumRequestOptions } from '@medplum/core';
|
|
18
19
|
import { MemoryRepository } from '@medplum/fhir-router';
|
|
19
20
|
import { Observation } from '@medplum/fhirtypes';
|
|
20
21
|
import { Organization } from '@medplum/fhirtypes';
|
|
@@ -154,17 +155,18 @@ export declare class MockClient extends MedplumClient {
|
|
|
154
155
|
readonly debug: boolean;
|
|
155
156
|
activeLoginOverride?: LoginState;
|
|
156
157
|
private agentAvailable;
|
|
157
|
-
private
|
|
158
|
+
private profile;
|
|
158
159
|
subManager: MockSubscriptionManager | undefined;
|
|
159
160
|
constructor(clientOptions?: MockClientOptions);
|
|
160
161
|
clear(): void;
|
|
161
162
|
getProfile(): ProfileResource | undefined;
|
|
162
163
|
getUserConfiguration(): UserConfiguration | undefined;
|
|
163
164
|
setActiveLoginOverride(activeLoginOverride: LoginState): void;
|
|
165
|
+
setProfile(profile: ProfileResource | undefined): void;
|
|
164
166
|
getActiveLogin(): LoginState | undefined;
|
|
165
167
|
getLogins(): LoginState[];
|
|
166
168
|
createBinary(data: string | File | Blob | Uint8Array, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void): Promise<Binary>;
|
|
167
|
-
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string | undefined, _waitForResponse?: boolean | undefined, _options?:
|
|
169
|
+
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string | undefined, _waitForResponse?: boolean | undefined, _options?: MedplumRequestOptions | undefined): Promise<any>;
|
|
168
170
|
setAgentAvailable(value: boolean): void;
|
|
169
171
|
getSubscriptionManager(): MockSubscriptionManager;
|
|
170
172
|
subscribeToCriteria(criteria: string): SubscriptionEmitter;
|
|
@@ -205,11 +207,15 @@ export declare class MockFetchClient {
|
|
|
205
207
|
private mockFhirHandler;
|
|
206
208
|
}
|
|
207
209
|
|
|
210
|
+
export declare interface MockSubManagerOptions {
|
|
211
|
+
mockRobustWebSocket?: boolean;
|
|
212
|
+
}
|
|
213
|
+
|
|
208
214
|
export declare class MockSubscriptionManager extends SubscriptionManager {
|
|
209
215
|
emitters: Map<string, SubscriptionEmitter>;
|
|
210
216
|
counts: Map<string, number>;
|
|
211
217
|
masterEmitter: SubscriptionEmitter;
|
|
212
|
-
constructor(medplum: MedplumClient,
|
|
218
|
+
constructor(medplum: MedplumClient, _wsUrl: string, options?: MockSubManagerOptions);
|
|
213
219
|
addCriteria(criteria: string): SubscriptionEmitter;
|
|
214
220
|
removeCriteria(criteria: string): void;
|
|
215
221
|
closeWebSocket(): void;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { LoginState } from '@medplum/core';
|
|
|
15
15
|
import { Media } from '@medplum/fhirtypes';
|
|
16
16
|
import { MedplumClient } from '@medplum/core';
|
|
17
17
|
import { MedplumClientOptions } from '@medplum/core';
|
|
18
|
+
import { MedplumRequestOptions } from '@medplum/core';
|
|
18
19
|
import { MemoryRepository } from '@medplum/fhir-router';
|
|
19
20
|
import { Observation } from '@medplum/fhirtypes';
|
|
20
21
|
import { Organization } from '@medplum/fhirtypes';
|
|
@@ -154,17 +155,18 @@ export declare class MockClient extends MedplumClient {
|
|
|
154
155
|
readonly debug: boolean;
|
|
155
156
|
activeLoginOverride?: LoginState;
|
|
156
157
|
private agentAvailable;
|
|
157
|
-
private
|
|
158
|
+
private profile;
|
|
158
159
|
subManager: MockSubscriptionManager | undefined;
|
|
159
160
|
constructor(clientOptions?: MockClientOptions);
|
|
160
161
|
clear(): void;
|
|
161
162
|
getProfile(): ProfileResource | undefined;
|
|
162
163
|
getUserConfiguration(): UserConfiguration | undefined;
|
|
163
164
|
setActiveLoginOverride(activeLoginOverride: LoginState): void;
|
|
165
|
+
setProfile(profile: ProfileResource | undefined): void;
|
|
164
166
|
getActiveLogin(): LoginState | undefined;
|
|
165
167
|
getLogins(): LoginState[];
|
|
166
168
|
createBinary(data: string | File | Blob | Uint8Array, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void): Promise<Binary>;
|
|
167
|
-
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string | undefined, _waitForResponse?: boolean | undefined, _options?:
|
|
169
|
+
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string | undefined, _waitForResponse?: boolean | undefined, _options?: MedplumRequestOptions | undefined): Promise<any>;
|
|
168
170
|
setAgentAvailable(value: boolean): void;
|
|
169
171
|
getSubscriptionManager(): MockSubscriptionManager;
|
|
170
172
|
subscribeToCriteria(criteria: string): SubscriptionEmitter;
|
|
@@ -205,11 +207,15 @@ export declare class MockFetchClient {
|
|
|
205
207
|
private mockFhirHandler;
|
|
206
208
|
}
|
|
207
209
|
|
|
210
|
+
export declare interface MockSubManagerOptions {
|
|
211
|
+
mockRobustWebSocket?: boolean;
|
|
212
|
+
}
|
|
213
|
+
|
|
208
214
|
export declare class MockSubscriptionManager extends SubscriptionManager {
|
|
209
215
|
emitters: Map<string, SubscriptionEmitter>;
|
|
210
216
|
counts: Map<string, number>;
|
|
211
217
|
masterEmitter: SubscriptionEmitter;
|
|
212
|
-
constructor(medplum: MedplumClient,
|
|
218
|
+
constructor(medplum: MedplumClient, _wsUrl: string, options?: MockSubManagerOptions);
|
|
213
219
|
addCriteria(criteria: string): SubscriptionEmitter;
|
|
214
220
|
removeCriteria(criteria: string): void;
|
|
215
221
|
closeWebSocket(): void;
|