@medplum/mock 3.2.9 → 3.2.10
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 +8 -8
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/index.d.ts +12 -2
- package/dist/esm/index.d.ts +12 -2
- 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
|
@@ -52,6 +52,16 @@ export declare const BartSimpson: Patient;
|
|
|
52
52
|
|
|
53
53
|
export declare const BlinkyTheFish: Patient;
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Creates a fake JWT token with the provided claims for testing.
|
|
57
|
+
*
|
|
58
|
+
* **NOTE: This function does not create a real signed JWT. Attempting to read the header or signature will fail.**
|
|
59
|
+
*
|
|
60
|
+
* @param claims - The claims to encode in the body of the fake JWT.
|
|
61
|
+
* @returns A stringified fake JWT token.
|
|
62
|
+
*/
|
|
63
|
+
export declare function createFakeJwt(claims: Record<string, string | number>): string;
|
|
64
|
+
|
|
55
65
|
export declare const DifferentOrganization: Organization;
|
|
56
66
|
|
|
57
67
|
export declare const DrAliceSmith: Practitioner;
|
|
@@ -271,7 +281,7 @@ export declare class MockClient extends MedplumClient {
|
|
|
271
281
|
getActiveLogin(): LoginState | undefined;
|
|
272
282
|
getLogins(): LoginState[];
|
|
273
283
|
createBinary(arg1: BinarySource | CreateBinaryOptions, arg2: string | undefined | MedplumRequestOptions, arg3?: string, arg4?: (e: ProgressEvent) => void): Promise<Binary>;
|
|
274
|
-
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string
|
|
284
|
+
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string, _waitForResponse?: boolean, _options?: MedplumRequestOptions): Promise<any>;
|
|
275
285
|
setAgentAvailable(value: boolean): void;
|
|
276
286
|
getSubscriptionManager(): MockSubscriptionManager;
|
|
277
287
|
setSubscriptionManager(subManager: MockSubscriptionManager): void;
|
|
@@ -311,7 +321,7 @@ export declare class MockFetchClient {
|
|
|
311
321
|
mockFetch(url: string, options: any): Promise<Partial<Response>>;
|
|
312
322
|
mockCreatePdf(docDefinition: TDocumentDefinitions, tableLayouts?: {
|
|
313
323
|
[name: string]: CustomTableLayout;
|
|
314
|
-
}, fonts?: TFontDictionary
|
|
324
|
+
}, fonts?: TFontDictionary): Promise<any>;
|
|
315
325
|
private mockHandler;
|
|
316
326
|
private mockAdminHandler;
|
|
317
327
|
private mockAuthHandler;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -52,6 +52,16 @@ export declare const BartSimpson: Patient;
|
|
|
52
52
|
|
|
53
53
|
export declare const BlinkyTheFish: Patient;
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Creates a fake JWT token with the provided claims for testing.
|
|
57
|
+
*
|
|
58
|
+
* **NOTE: This function does not create a real signed JWT. Attempting to read the header or signature will fail.**
|
|
59
|
+
*
|
|
60
|
+
* @param claims - The claims to encode in the body of the fake JWT.
|
|
61
|
+
* @returns A stringified fake JWT token.
|
|
62
|
+
*/
|
|
63
|
+
export declare function createFakeJwt(claims: Record<string, string | number>): string;
|
|
64
|
+
|
|
55
65
|
export declare const DifferentOrganization: Organization;
|
|
56
66
|
|
|
57
67
|
export declare const DrAliceSmith: Practitioner;
|
|
@@ -271,7 +281,7 @@ export declare class MockClient extends MedplumClient {
|
|
|
271
281
|
getActiveLogin(): LoginState | undefined;
|
|
272
282
|
getLogins(): LoginState[];
|
|
273
283
|
createBinary(arg1: BinarySource | CreateBinaryOptions, arg2: string | undefined | MedplumRequestOptions, arg3?: string, arg4?: (e: ProgressEvent) => void): Promise<Binary>;
|
|
274
|
-
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string
|
|
284
|
+
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string, _waitForResponse?: boolean, _options?: MedplumRequestOptions): Promise<any>;
|
|
275
285
|
setAgentAvailable(value: boolean): void;
|
|
276
286
|
getSubscriptionManager(): MockSubscriptionManager;
|
|
277
287
|
setSubscriptionManager(subManager: MockSubscriptionManager): void;
|
|
@@ -311,7 +321,7 @@ export declare class MockFetchClient {
|
|
|
311
321
|
mockFetch(url: string, options: any): Promise<Partial<Response>>;
|
|
312
322
|
mockCreatePdf(docDefinition: TDocumentDefinitions, tableLayouts?: {
|
|
313
323
|
[name: string]: CustomTableLayout;
|
|
314
|
-
}, fonts?: TFontDictionary
|
|
324
|
+
}, fonts?: TFontDictionary): Promise<any>;
|
|
315
325
|
private mockHandler;
|
|
316
326
|
private mockAdminHandler;
|
|
317
327
|
private mockAuthHandler;
|