@medplum/core 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 +5 -5
- package/dist/cjs/index.cjs.map +4 -4
- package/dist/cjs/index.d.ts +144 -44
- package/dist/esm/index.d.ts +144 -44
- package/dist/esm/index.mjs +5 -5
- package/dist/esm/index.mjs.map +4 -4
- package/package.json +3 -3
package/dist/esm/index.d.ts
CHANGED
|
@@ -384,6 +384,17 @@ export declare class ConcatAtom extends InfixOperatorAtom {
|
|
|
384
384
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
+
/**
|
|
388
|
+
* Concatenates the given base URL and URL.
|
|
389
|
+
*
|
|
390
|
+
* If the URL is absolute, it is returned as-is.
|
|
391
|
+
*
|
|
392
|
+
* @param baseUrl - The base URL.
|
|
393
|
+
* @param url - The URL to concat. Can be relative or absolute.
|
|
394
|
+
* @returns The concatenated URL.
|
|
395
|
+
*/
|
|
396
|
+
export declare function concatUrls(baseUrl: string, url: string): string;
|
|
397
|
+
|
|
387
398
|
export declare function conceptMapTranslate(map: ConceptMap, params: ConceptMapTranslateParameters): ConceptMapTranslateOutput;
|
|
388
399
|
|
|
389
400
|
export declare interface ConceptMapTranslateMatch {
|
|
@@ -436,6 +447,7 @@ export declare const ContentType: {
|
|
|
436
447
|
readonly JSON: "application/json";
|
|
437
448
|
readonly JSON_PATCH: "application/json-patch+json";
|
|
438
449
|
readonly PNG: "image/png";
|
|
450
|
+
readonly SCIM_JSON: "application/scim+json";
|
|
439
451
|
readonly SVG: "image/svg+xml";
|
|
440
452
|
readonly TEXT: "text/plain";
|
|
441
453
|
readonly TYPESCRIPT: "text/typescript";
|
|
@@ -665,6 +677,7 @@ declare class EventTarget_2 {
|
|
|
665
677
|
addEventListener(type: string, callback: EventListener_2): void;
|
|
666
678
|
removeEventListener(type: string, callback: EventListener_2): void;
|
|
667
679
|
dispatchEvent(event: Event_2): boolean;
|
|
680
|
+
removeAllListeners(): void;
|
|
668
681
|
}
|
|
669
682
|
export { EventTarget_2 as EventTarget }
|
|
670
683
|
|
|
@@ -1857,6 +1870,16 @@ export declare interface InviteRequest {
|
|
|
1857
1870
|
admin?: boolean;
|
|
1858
1871
|
}
|
|
1859
1872
|
|
|
1873
|
+
export declare interface IRobustWebSocket extends TypedEventTarget<RobustWebSocketEventMap> {
|
|
1874
|
+
readyState: number;
|
|
1875
|
+
close(): void;
|
|
1876
|
+
send(message: string): void;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
export declare interface IRobustWebSocketCtor {
|
|
1880
|
+
new (url: string): IRobustWebSocket;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1860
1883
|
export declare function isAccepted(outcome: OperationOutcome): boolean;
|
|
1861
1884
|
|
|
1862
1885
|
export declare class IsAtom extends BooleanInfixOperatorAtom {
|
|
@@ -1864,6 +1887,26 @@ export declare class IsAtom extends BooleanInfixOperatorAtom {
|
|
|
1864
1887
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
1865
1888
|
}
|
|
1866
1889
|
|
|
1890
|
+
/**
|
|
1891
|
+
* Returns true if the input value is a CodeableConcept object.
|
|
1892
|
+
* This is a heuristic check based on the presence of the "coding" property.
|
|
1893
|
+
* @param value - The candidate value.
|
|
1894
|
+
* @returns True if the input value is a CodeableConcept.
|
|
1895
|
+
*/
|
|
1896
|
+
export declare function isCodeableConcept(value: unknown): value is CodeableConcept & {
|
|
1897
|
+
coding: Coding[];
|
|
1898
|
+
};
|
|
1899
|
+
|
|
1900
|
+
/**
|
|
1901
|
+
* Returns true if the input value is a Coding object.
|
|
1902
|
+
* This is a heuristic check based on the presence of the "code" property.
|
|
1903
|
+
* @param value - The candidate value.
|
|
1904
|
+
* @returns True if the input value is a Coding.
|
|
1905
|
+
*/
|
|
1906
|
+
export declare function isCoding(value: unknown): value is Coding & {
|
|
1907
|
+
code: string;
|
|
1908
|
+
};
|
|
1909
|
+
|
|
1867
1910
|
export declare function isCompletedSubscriptionRequest(subscriptionRequest: SubscriptionRequest | PendingSubscriptionRequest): subscriptionRequest is SubscriptionRequest;
|
|
1868
1911
|
|
|
1869
1912
|
export declare function isComplexTypeCode(code: string): boolean;
|
|
@@ -2009,6 +2052,13 @@ export declare function isResourceTypeSchema(typeSchema: InternalTypeSchema): bo
|
|
|
2009
2052
|
|
|
2010
2053
|
export declare function isSliceDefinitionWithTypes(slice: SliceDefinition): slice is SliceDefinitionWithTypes;
|
|
2011
2054
|
|
|
2055
|
+
/**
|
|
2056
|
+
* Returns true if the input value is a string.
|
|
2057
|
+
* @param value - The candidate value.
|
|
2058
|
+
* @returns True if the input value is a string.
|
|
2059
|
+
*/
|
|
2060
|
+
export declare function isString(value: unknown): value is string;
|
|
2061
|
+
|
|
2012
2062
|
/**
|
|
2013
2063
|
* Returns true if the input array is an array of strings.
|
|
2014
2064
|
* @param arr - Input array.
|
|
@@ -2020,6 +2070,16 @@ export declare type IssueSeverity = 'error' | 'fatal' | 'warning' | 'information
|
|
|
2020
2070
|
|
|
2021
2071
|
export declare type IssueType = 'structure' | 'invariant' | 'processing';
|
|
2022
2072
|
|
|
2073
|
+
/**
|
|
2074
|
+
* Returns true if the input value is an object with a string text property.
|
|
2075
|
+
* This is a heuristic check based on the presence of the "text" property.
|
|
2076
|
+
* @param value - The candidate value.
|
|
2077
|
+
* @returns True if the input value is a text object.
|
|
2078
|
+
*/
|
|
2079
|
+
export declare function isTextObject(value: unknown): value is {
|
|
2080
|
+
text: string;
|
|
2081
|
+
};
|
|
2082
|
+
|
|
2023
2083
|
/**
|
|
2024
2084
|
* Returns true if the input string is a UUID.
|
|
2025
2085
|
* @param input - The input string.
|
|
@@ -2401,7 +2461,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2401
2461
|
* @param options - Optional fetch options.
|
|
2402
2462
|
* @returns Promise to the response content.
|
|
2403
2463
|
*/
|
|
2404
|
-
get<T = any>(url: URL | string, options?:
|
|
2464
|
+
get<T = any>(url: URL | string, options?: MedplumRequestOptions): ReadablePromise<T>;
|
|
2405
2465
|
/**
|
|
2406
2466
|
* Makes an HTTP POST request to the specified URL.
|
|
2407
2467
|
*
|
|
@@ -2415,7 +2475,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2415
2475
|
* @param options - Optional fetch options.
|
|
2416
2476
|
* @returns Promise to the response content.
|
|
2417
2477
|
*/
|
|
2418
|
-
post(url: URL | string, body: any, contentType?: string, options?:
|
|
2478
|
+
post(url: URL | string, body: any, contentType?: string, options?: MedplumRequestOptions): Promise<any>;
|
|
2419
2479
|
/**
|
|
2420
2480
|
* Makes an HTTP PUT request to the specified URL.
|
|
2421
2481
|
*
|
|
@@ -2429,7 +2489,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2429
2489
|
* @param options - Optional fetch options.
|
|
2430
2490
|
* @returns Promise to the response content.
|
|
2431
2491
|
*/
|
|
2432
|
-
put(url: URL | string, body: any, contentType?: string, options?:
|
|
2492
|
+
put(url: URL | string, body: any, contentType?: string, options?: MedplumRequestOptions): Promise<any>;
|
|
2433
2493
|
/**
|
|
2434
2494
|
* Makes an HTTP PATCH request to the specified URL.
|
|
2435
2495
|
*
|
|
@@ -2442,7 +2502,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2442
2502
|
* @param options - Optional fetch options.
|
|
2443
2503
|
* @returns Promise to the response content.
|
|
2444
2504
|
*/
|
|
2445
|
-
patch(url: URL | string, operations: PatchOperation[], options?:
|
|
2505
|
+
patch(url: URL | string, operations: PatchOperation[], options?: MedplumRequestOptions): Promise<any>;
|
|
2446
2506
|
/**
|
|
2447
2507
|
* Makes an HTTP DELETE request to the specified URL.
|
|
2448
2508
|
*
|
|
@@ -2455,7 +2515,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2455
2515
|
* @param options - Optional fetch options.
|
|
2456
2516
|
* @returns Promise to the response content.
|
|
2457
2517
|
*/
|
|
2458
|
-
delete(url: URL | string, options?:
|
|
2518
|
+
delete(url: URL | string, options?: MedplumRequestOptions): Promise<any>;
|
|
2459
2519
|
/**
|
|
2460
2520
|
* Initiates a new user flow.
|
|
2461
2521
|
*
|
|
@@ -2467,7 +2527,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2467
2527
|
* @param options - Optional fetch options.
|
|
2468
2528
|
* @returns Promise to the authentication response.
|
|
2469
2529
|
*/
|
|
2470
|
-
startNewUser(newUserRequest: NewUserRequest, options?:
|
|
2530
|
+
startNewUser(newUserRequest: NewUserRequest, options?: MedplumRequestOptions): Promise<LoginAuthenticationResponse>;
|
|
2471
2531
|
/**
|
|
2472
2532
|
* Initiates a new project flow.
|
|
2473
2533
|
*
|
|
@@ -2476,7 +2536,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2476
2536
|
* @param options - Optional fetch options.
|
|
2477
2537
|
* @returns Promise to the authentication response.
|
|
2478
2538
|
*/
|
|
2479
|
-
startNewProject(newProjectRequest: NewProjectRequest, options?:
|
|
2539
|
+
startNewProject(newProjectRequest: NewProjectRequest, options?: MedplumRequestOptions): Promise<LoginAuthenticationResponse>;
|
|
2480
2540
|
/**
|
|
2481
2541
|
* Initiates a new patient flow.
|
|
2482
2542
|
*
|
|
@@ -2485,7 +2545,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2485
2545
|
* @param options - Optional fetch options.
|
|
2486
2546
|
* @returns Promise to the authentication response.
|
|
2487
2547
|
*/
|
|
2488
|
-
startNewPatient(newPatientRequest: NewPatientRequest, options?:
|
|
2548
|
+
startNewPatient(newPatientRequest: NewPatientRequest, options?: MedplumRequestOptions): Promise<LoginAuthenticationResponse>;
|
|
2489
2549
|
/**
|
|
2490
2550
|
* Initiates a user login flow.
|
|
2491
2551
|
* @category Authentication
|
|
@@ -2493,7 +2553,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2493
2553
|
* @param options - Optional fetch options.
|
|
2494
2554
|
* @returns Promise to the authentication response.
|
|
2495
2555
|
*/
|
|
2496
|
-
startLogin(loginRequest: EmailPasswordLoginRequest, options?:
|
|
2556
|
+
startLogin(loginRequest: EmailPasswordLoginRequest, options?: MedplumRequestOptions): Promise<LoginAuthenticationResponse>;
|
|
2497
2557
|
/**
|
|
2498
2558
|
* Tries to sign in with Google authentication.
|
|
2499
2559
|
* The response parameter is the result of a Google authentication.
|
|
@@ -2503,7 +2563,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2503
2563
|
* @param options - Optional fetch options.
|
|
2504
2564
|
* @returns Promise to the authentication response.
|
|
2505
2565
|
*/
|
|
2506
|
-
startGoogleLogin(loginRequest: GoogleLoginRequest, options?:
|
|
2566
|
+
startGoogleLogin(loginRequest: GoogleLoginRequest, options?: MedplumRequestOptions): Promise<LoginAuthenticationResponse>;
|
|
2507
2567
|
/**
|
|
2508
2568
|
* Returns the PKCE code challenge and method.
|
|
2509
2569
|
* If the login request already includes a code challenge, it is returned.
|
|
@@ -2630,7 +2690,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2630
2690
|
* @param options - Optional fetch options.
|
|
2631
2691
|
* @returns Promise to the search result bundle.
|
|
2632
2692
|
*/
|
|
2633
|
-
search<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?:
|
|
2693
|
+
search<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: MedplumRequestOptions): ReadablePromise<Bundle<ExtractResource<K>>>;
|
|
2634
2694
|
/**
|
|
2635
2695
|
* Sends a FHIR search request for a single resource.
|
|
2636
2696
|
*
|
|
@@ -2653,7 +2713,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2653
2713
|
* @param options - Optional fetch options.
|
|
2654
2714
|
* @returns Promise to the first search result.
|
|
2655
2715
|
*/
|
|
2656
|
-
searchOne<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?:
|
|
2716
|
+
searchOne<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: MedplumRequestOptions): ReadablePromise<ExtractResource<K> | undefined>;
|
|
2657
2717
|
/**
|
|
2658
2718
|
* Sends a FHIR search request for an array of resources.
|
|
2659
2719
|
*
|
|
@@ -2676,7 +2736,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2676
2736
|
* @param options - Optional fetch options.
|
|
2677
2737
|
* @returns Promise to the array of search results.
|
|
2678
2738
|
*/
|
|
2679
|
-
searchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?:
|
|
2739
|
+
searchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: MedplumRequestOptions): ReadablePromise<ResourceArray<ExtractResource<K>>>;
|
|
2680
2740
|
/**
|
|
2681
2741
|
* Creates an
|
|
2682
2742
|
* [async generator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)
|
|
@@ -2699,7 +2759,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2699
2759
|
* @param options - Optional fetch options.
|
|
2700
2760
|
* @yields An async generator, where each result is an array of resources for each page.
|
|
2701
2761
|
*/
|
|
2702
|
-
searchResourcePages<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?:
|
|
2762
|
+
searchResourcePages<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: MedplumRequestOptions): AsyncGenerator<ResourceArray<ExtractResource<K>>>;
|
|
2703
2763
|
/**
|
|
2704
2764
|
* Searches a ValueSet resource using the "expand" operation.
|
|
2705
2765
|
* See: https://www.hl7.org/fhir/operation-valueset-expand.html
|
|
@@ -2710,7 +2770,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2710
2770
|
* @returns Promise to expanded ValueSet.
|
|
2711
2771
|
* @deprecated Use `valueSetExpand()` instead.
|
|
2712
2772
|
*/
|
|
2713
|
-
searchValueSet(system: string, filter: string, options?:
|
|
2773
|
+
searchValueSet(system: string, filter: string, options?: MedplumRequestOptions): ReadablePromise<ValueSet>;
|
|
2714
2774
|
/**
|
|
2715
2775
|
* Searches a ValueSet resource using the "expand" operation.
|
|
2716
2776
|
* See: https://www.hl7.org/fhir/operation-valueset-expand.html
|
|
@@ -2719,7 +2779,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2719
2779
|
* @param options - Optional fetch options.
|
|
2720
2780
|
* @returns Promise to expanded ValueSet.
|
|
2721
2781
|
*/
|
|
2722
|
-
valueSetExpand(params: ValueSetExpandParams, options?:
|
|
2782
|
+
valueSetExpand(params: ValueSetExpandParams, options?: MedplumRequestOptions): ReadablePromise<ValueSet>;
|
|
2723
2783
|
/**
|
|
2724
2784
|
* Returns a cached resource if it is available.
|
|
2725
2785
|
* @category Caching
|
|
@@ -2753,7 +2813,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2753
2813
|
* @param options - Optional fetch options.
|
|
2754
2814
|
* @returns The resource if available.
|
|
2755
2815
|
*/
|
|
2756
|
-
readResource<K extends ResourceType>(resourceType: K, id: string, options?:
|
|
2816
|
+
readResource<K extends ResourceType>(resourceType: K, id: string, options?: MedplumRequestOptions): ReadablePromise<ExtractResource<K>>;
|
|
2757
2817
|
/**
|
|
2758
2818
|
* Reads a resource by `Reference`.
|
|
2759
2819
|
*
|
|
@@ -2774,7 +2834,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2774
2834
|
* @param options - Optional fetch options.
|
|
2775
2835
|
* @returns The resource if available.
|
|
2776
2836
|
*/
|
|
2777
|
-
readReference<T extends Resource>(reference: Reference<T>, options?:
|
|
2837
|
+
readReference<T extends Resource>(reference: Reference<T>, options?: MedplumRequestOptions): ReadablePromise<T>;
|
|
2778
2838
|
/**
|
|
2779
2839
|
* Requests the schema for a resource type.
|
|
2780
2840
|
* If the schema is already cached, the promise is resolved immediately.
|
|
@@ -2812,7 +2872,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2812
2872
|
* @param options - Optional fetch options.
|
|
2813
2873
|
* @returns Promise to the resource history.
|
|
2814
2874
|
*/
|
|
2815
|
-
readHistory<K extends ResourceType>(resourceType: K, id: string, options?:
|
|
2875
|
+
readHistory<K extends ResourceType>(resourceType: K, id: string, options?: MedplumRequestOptions): ReadablePromise<Bundle<ExtractResource<K>>>;
|
|
2816
2876
|
/**
|
|
2817
2877
|
* Reads a specific version of a resource by resource type, ID, and version ID.
|
|
2818
2878
|
*
|
|
@@ -2832,7 +2892,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2832
2892
|
* @param options - Optional fetch options.
|
|
2833
2893
|
* @returns The resource if available.
|
|
2834
2894
|
*/
|
|
2835
|
-
readVersion<K extends ResourceType>(resourceType: K, id: string, vid: string, options?:
|
|
2895
|
+
readVersion<K extends ResourceType>(resourceType: K, id: string, vid: string, options?: MedplumRequestOptions): ReadablePromise<ExtractResource<K>>;
|
|
2836
2896
|
/**
|
|
2837
2897
|
* Executes the Patient "everything" operation for a patient.
|
|
2838
2898
|
*
|
|
@@ -2850,7 +2910,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2850
2910
|
* @param options - Optional fetch options.
|
|
2851
2911
|
* @returns A Bundle of all Resources related to the Patient
|
|
2852
2912
|
*/
|
|
2853
|
-
readPatientEverything(id: string, options?:
|
|
2913
|
+
readPatientEverything(id: string, options?: MedplumRequestOptions): ReadablePromise<Bundle>;
|
|
2854
2914
|
/**
|
|
2855
2915
|
* Creates a new FHIR resource.
|
|
2856
2916
|
*
|
|
@@ -2876,7 +2936,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2876
2936
|
* @param options - Optional fetch options.
|
|
2877
2937
|
* @returns The result of the create operation.
|
|
2878
2938
|
*/
|
|
2879
|
-
createResource<T extends Resource>(resource: T, options?:
|
|
2939
|
+
createResource<T extends Resource>(resource: T, options?: MedplumRequestOptions): Promise<T>;
|
|
2880
2940
|
/**
|
|
2881
2941
|
* Conditionally create a new FHIR resource only if some equivalent resource does not already exist on the server.
|
|
2882
2942
|
*
|
|
@@ -2918,7 +2978,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2918
2978
|
* @param options - Optional fetch options.
|
|
2919
2979
|
* @returns The result of the create operation.
|
|
2920
2980
|
*/
|
|
2921
|
-
createResourceIfNoneExist<T extends Resource>(resource: T, query: string, options?:
|
|
2981
|
+
createResourceIfNoneExist<T extends Resource>(resource: T, query: string, options?: MedplumRequestOptions): Promise<T>;
|
|
2922
2982
|
/**
|
|
2923
2983
|
* Creates a FHIR `Attachment` with the provided data content.
|
|
2924
2984
|
*
|
|
@@ -2945,7 +3005,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2945
3005
|
* @param options - Optional fetch options. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
|
|
2946
3006
|
* @returns The result of the create operation.
|
|
2947
3007
|
*/
|
|
2948
|
-
createAttachment(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?:
|
|
3008
|
+
createAttachment(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?: MedplumRequestOptions): Promise<Attachment>;
|
|
2949
3009
|
/**
|
|
2950
3010
|
* Creates a FHIR `Binary` resource with the provided data content.
|
|
2951
3011
|
*
|
|
@@ -2972,8 +3032,8 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2972
3032
|
* @param options - Optional fetch options. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
|
|
2973
3033
|
* @returns The result of the create operation.
|
|
2974
3034
|
*/
|
|
2975
|
-
createBinary(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?:
|
|
2976
|
-
uploadwithProgress(url: URL, data: BinarySource, contentType: string, onProgress: (e: ProgressEvent) => void, options?:
|
|
3035
|
+
createBinary(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?: MedplumRequestOptions): Promise<Binary>;
|
|
3036
|
+
uploadwithProgress(url: URL, data: BinarySource, contentType: string, onProgress: (e: ProgressEvent) => void, options?: MedplumRequestOptions): Promise<any>;
|
|
2977
3037
|
/**
|
|
2978
3038
|
* Creates a PDF as a FHIR `Binary` resource based on pdfmake document definition.
|
|
2979
3039
|
*
|
|
@@ -3010,7 +3070,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3010
3070
|
* @param options - Optional fetch options.
|
|
3011
3071
|
* @returns The result of the create operation.
|
|
3012
3072
|
*/
|
|
3013
|
-
createComment(resource: Resource, text: string, options?:
|
|
3073
|
+
createComment(resource: Resource, text: string, options?: MedplumRequestOptions): Promise<Communication>;
|
|
3014
3074
|
/**
|
|
3015
3075
|
* Updates a FHIR resource.
|
|
3016
3076
|
*
|
|
@@ -3037,7 +3097,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3037
3097
|
* @param options - Optional fetch options.
|
|
3038
3098
|
* @returns The result of the update operation.
|
|
3039
3099
|
*/
|
|
3040
|
-
updateResource<T extends Resource>(resource: T, options?:
|
|
3100
|
+
updateResource<T extends Resource>(resource: T, options?: MedplumRequestOptions): Promise<T>;
|
|
3041
3101
|
/**
|
|
3042
3102
|
* Updates a FHIR resource using JSONPatch operations.
|
|
3043
3103
|
*
|
|
@@ -3063,7 +3123,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3063
3123
|
* @param options - Optional fetch options.
|
|
3064
3124
|
* @returns The result of the patch operations.
|
|
3065
3125
|
*/
|
|
3066
|
-
patchResource<K extends ResourceType>(resourceType: K, id: string, operations: PatchOperation[], options?:
|
|
3126
|
+
patchResource<K extends ResourceType>(resourceType: K, id: string, operations: PatchOperation[], options?: MedplumRequestOptions): Promise<ExtractResource<K>>;
|
|
3067
3127
|
/**
|
|
3068
3128
|
* Deletes a FHIR resource by resource type and ID.
|
|
3069
3129
|
*
|
|
@@ -3081,7 +3141,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3081
3141
|
* @param options - Optional fetch options.
|
|
3082
3142
|
* @returns The result of the delete operation.
|
|
3083
3143
|
*/
|
|
3084
|
-
deleteResource(resourceType: ResourceType, id: string, options?:
|
|
3144
|
+
deleteResource(resourceType: ResourceType, id: string, options?: MedplumRequestOptions): Promise<any>;
|
|
3085
3145
|
/**
|
|
3086
3146
|
* Executes the validate operation with the provided resource.
|
|
3087
3147
|
*
|
|
@@ -3100,7 +3160,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3100
3160
|
* @param options - Optional fetch options.
|
|
3101
3161
|
* @returns The validate operation outcome.
|
|
3102
3162
|
*/
|
|
3103
|
-
validateResource<T extends Resource>(resource: T, options?:
|
|
3163
|
+
validateResource<T extends Resource>(resource: T, options?: MedplumRequestOptions): Promise<OperationOutcome>;
|
|
3104
3164
|
/**
|
|
3105
3165
|
* Executes a bot by ID or Identifier.
|
|
3106
3166
|
* @param idOrIdentifier - The Bot ID or Identifier.
|
|
@@ -3109,7 +3169,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3109
3169
|
* @param options - Optional fetch options.
|
|
3110
3170
|
* @returns The Bot return value.
|
|
3111
3171
|
*/
|
|
3112
|
-
executeBot(idOrIdentifier: string | Identifier, body: any, contentType?: string, options?:
|
|
3172
|
+
executeBot(idOrIdentifier: string | Identifier, body: any, contentType?: string, options?: MedplumRequestOptions): Promise<any>;
|
|
3113
3173
|
/**
|
|
3114
3174
|
* Executes a batch or transaction of FHIR operations.
|
|
3115
3175
|
*
|
|
@@ -3159,7 +3219,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3159
3219
|
* @param options - Optional fetch options.
|
|
3160
3220
|
* @returns The FHIR batch/transaction response bundle.
|
|
3161
3221
|
*/
|
|
3162
|
-
executeBatch(bundle: Bundle, options?:
|
|
3222
|
+
executeBatch(bundle: Bundle, options?: MedplumRequestOptions): Promise<Bundle>;
|
|
3163
3223
|
/**
|
|
3164
3224
|
* Sends an email using the Medplum Email API.
|
|
3165
3225
|
*
|
|
@@ -3200,7 +3260,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3200
3260
|
* @param options - Optional fetch options.
|
|
3201
3261
|
* @returns Promise to the operation outcome.
|
|
3202
3262
|
*/
|
|
3203
|
-
sendEmail(email: MailOptions, options?:
|
|
3263
|
+
sendEmail(email: MailOptions, options?: MedplumRequestOptions): Promise<OperationOutcome>;
|
|
3204
3264
|
/**
|
|
3205
3265
|
* Executes a GraphQL query.
|
|
3206
3266
|
*
|
|
@@ -3250,7 +3310,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3250
3310
|
* @param options - Optional fetch options.
|
|
3251
3311
|
* @returns The GraphQL result.
|
|
3252
3312
|
*/
|
|
3253
|
-
graphql(query: string, operationName?: string | null, variables?: any, options?:
|
|
3313
|
+
graphql(query: string, operationName?: string | null, variables?: any, options?: MedplumRequestOptions): Promise<any>;
|
|
3254
3314
|
/**
|
|
3255
3315
|
* Executes the $graph operation on this resource to fetch a Bundle of resources linked to the target resource
|
|
3256
3316
|
* according to a graph definition
|
|
@@ -3261,7 +3321,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3261
3321
|
* @param options - Optional fetch options.
|
|
3262
3322
|
* @returns A Bundle
|
|
3263
3323
|
*/
|
|
3264
|
-
readResourceGraph<K extends ResourceType>(resourceType: K, id: string, graphName: string, options?:
|
|
3324
|
+
readResourceGraph<K extends ResourceType>(resourceType: K, id: string, graphName: string, options?: MedplumRequestOptions): ReadablePromise<Bundle>;
|
|
3265
3325
|
/**
|
|
3266
3326
|
* Pushes a message to an agent.
|
|
3267
3327
|
*
|
|
@@ -3273,7 +3333,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3273
3333
|
* @param options - Optional fetch options.
|
|
3274
3334
|
* @returns Promise to the result. If waiting for response, the result is the response body. Otherwise, it is an operation outcome.
|
|
3275
3335
|
*/
|
|
3276
|
-
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string, waitForResponse?: boolean, options?:
|
|
3336
|
+
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string, waitForResponse?: boolean, options?: MedplumRequestOptions): Promise<any>;
|
|
3277
3337
|
/**
|
|
3278
3338
|
* @category Authentication
|
|
3279
3339
|
* @returns The Login State
|
|
@@ -3369,7 +3429,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3369
3429
|
* @param options - Optional fetch request init options.
|
|
3370
3430
|
* @returns Promise to the response body as a blob.
|
|
3371
3431
|
*/
|
|
3372
|
-
download(url: URL | string, options?:
|
|
3432
|
+
download(url: URL | string, options?: MedplumRequestOptions): Promise<Blob>;
|
|
3373
3433
|
/**
|
|
3374
3434
|
* Upload media to the server and create a Media instance for the uploaded content.
|
|
3375
3435
|
* @param contents - The contents of the media file, as a string, Uint8Array, File, or Blob.
|
|
@@ -3379,7 +3439,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3379
3439
|
* @param options - Optional fetch options.
|
|
3380
3440
|
* @returns Promise that resolves to the created Media
|
|
3381
3441
|
*/
|
|
3382
|
-
uploadMedia(contents: string | Uint8Array | File | Blob, contentType: string, filename: string | undefined, additionalFields?: Partial<Media>, options?:
|
|
3442
|
+
uploadMedia(contents: string | Uint8Array | File | Blob, contentType: string, filename: string | undefined, additionalFields?: Partial<Media>, options?: MedplumRequestOptions): Promise<Media>;
|
|
3383
3443
|
/**
|
|
3384
3444
|
* Performs Bulk Data Export operation request flow. See The FHIR "Bulk Data Export" for full details: https://build.fhir.org/ig/HL7/bulk-data/export.html#bulk-data-export
|
|
3385
3445
|
* @param exportLevel - Optional export level. Defaults to system level export. 'Group/:id' - Group of Patients, 'Patient' - All Patients.
|
|
@@ -3388,7 +3448,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3388
3448
|
* @param options - Optional fetch options.
|
|
3389
3449
|
* @returns Bulk Data Response containing links to Bulk Data files. See "Response - Complete Status" for full details: https://build.fhir.org/ig/HL7/bulk-data/export.html#response---complete-status
|
|
3390
3450
|
*/
|
|
3391
|
-
bulkExport(exportLevel?: string, resourceTypes?: string, since?: string, options?:
|
|
3451
|
+
bulkExport(exportLevel?: string, resourceTypes?: string, since?: string, options?: MedplumRequestOptions): Promise<Partial<BulkDataExport>>;
|
|
3392
3452
|
/**
|
|
3393
3453
|
* Starts an async request following the FHIR "Asynchronous Request Pattern".
|
|
3394
3454
|
* See: https://hl7.org/fhir/r4/async.html
|
|
@@ -3396,7 +3456,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3396
3456
|
* @param options - Optional fetch options.
|
|
3397
3457
|
* @returns The response body.
|
|
3398
3458
|
*/
|
|
3399
|
-
startAsyncRequest<T>(url: string, options?:
|
|
3459
|
+
startAsyncRequest<T>(url: string, options?: MedplumRequestOptions): Promise<T>;
|
|
3400
3460
|
/**
|
|
3401
3461
|
* Returns the key value client.
|
|
3402
3462
|
* @returns The key value client.
|
|
@@ -3950,10 +4010,17 @@ export declare interface MedplumInfraConfig {
|
|
|
3950
4010
|
snsTopicArn?: string;
|
|
3951
4011
|
snsTopicName?: string;
|
|
3952
4012
|
};
|
|
4013
|
+
fargateAutoScaling?: {
|
|
4014
|
+
minCapacity: number;
|
|
4015
|
+
maxCapacity: number;
|
|
4016
|
+
targetUtilizationPercent: number;
|
|
4017
|
+
scaleInCooldown: number;
|
|
4018
|
+
scaleOutCooldown: number;
|
|
4019
|
+
};
|
|
3953
4020
|
environment?: StringMap;
|
|
3954
4021
|
}
|
|
3955
4022
|
|
|
3956
|
-
declare class MedplumKeyValueClient {
|
|
4023
|
+
export declare class MedplumKeyValueClient {
|
|
3957
4024
|
readonly medplum: MedplumClient;
|
|
3958
4025
|
constructor(medplum: MedplumClient);
|
|
3959
4026
|
/**
|
|
@@ -3975,6 +4042,26 @@ declare class MedplumKeyValueClient {
|
|
|
3975
4042
|
delete(key: string): Promise<void>;
|
|
3976
4043
|
}
|
|
3977
4044
|
|
|
4045
|
+
export declare interface MedplumRequestOptions extends RequestInit {
|
|
4046
|
+
/**
|
|
4047
|
+
* Optional flag to follow "Location" or "Content-Location" URL on successful HTTP 200 "OK" responses.
|
|
4048
|
+
*/
|
|
4049
|
+
followRedirectOnOk?: boolean;
|
|
4050
|
+
/**
|
|
4051
|
+
* Optional flag to follow "Location" or "Content-Location" URL on successful HTTP 201 "Created" responses.
|
|
4052
|
+
*/
|
|
4053
|
+
followRedirectOnCreated?: boolean;
|
|
4054
|
+
/**
|
|
4055
|
+
* Optional flag to poll the status URL on successful HTTP 202 "Accepted" responses.
|
|
4056
|
+
*/
|
|
4057
|
+
pollStatusOnAccepted?: boolean;
|
|
4058
|
+
/**
|
|
4059
|
+
* Optional polling time interval in milliseconds.
|
|
4060
|
+
* Default value is 1000 (1 second).
|
|
4061
|
+
*/
|
|
4062
|
+
pollStatusPeriod?: number;
|
|
4063
|
+
}
|
|
4064
|
+
|
|
3978
4065
|
export declare interface MedplumSourceInfraConfig {
|
|
3979
4066
|
name: ValueOrExternalSecret<string>;
|
|
3980
4067
|
stackName: ValueOrExternalSecret<string>;
|
|
@@ -4035,6 +4122,13 @@ export declare interface MedplumSourceInfraConfig {
|
|
|
4035
4122
|
snsTopicArn?: ValueOrExternalSecret<string>;
|
|
4036
4123
|
snsTopicName?: ValueOrExternalSecret<string>;
|
|
4037
4124
|
};
|
|
4125
|
+
fargateAutoScaling?: {
|
|
4126
|
+
minCapacity: ValueOrExternalSecret<number>;
|
|
4127
|
+
maxCapacity: ValueOrExternalSecret<number>;
|
|
4128
|
+
targetUtilizationPercent: ValueOrExternalSecret<number>;
|
|
4129
|
+
scaleInCooldown: ValueOrExternalSecret<number>;
|
|
4130
|
+
scaleOutCooldown: ValueOrExternalSecret<number>;
|
|
4131
|
+
};
|
|
4038
4132
|
environment?: StringMap;
|
|
4039
4133
|
}
|
|
4040
4134
|
|
|
@@ -4707,7 +4801,7 @@ export declare interface ResourceVisitor {
|
|
|
4707
4801
|
|
|
4708
4802
|
export declare type ResourceWithCode = Resource & Code;
|
|
4709
4803
|
|
|
4710
|
-
export declare class RobustWebSocket extends TypedEventTarget<RobustWebSocketEventMap> {
|
|
4804
|
+
export declare class RobustWebSocket extends TypedEventTarget<RobustWebSocketEventMap> implements IRobustWebSocket {
|
|
4711
4805
|
private ws;
|
|
4712
4806
|
private messageBuffer;
|
|
4713
4807
|
bufferedAmount: number;
|
|
@@ -4908,6 +5002,10 @@ export declare type StringMap = {
|
|
|
4908
5002
|
*/
|
|
4909
5003
|
export declare function structureMapTransform(structureMap: StructureMap, input: TypedValue[], loader?: (url: string) => StructureMap[]): TypedValue[];
|
|
4910
5004
|
|
|
5005
|
+
export declare interface SubManagerOptions {
|
|
5006
|
+
RobustWebSocket: IRobustWebSocketCtor;
|
|
5007
|
+
}
|
|
5008
|
+
|
|
4911
5009
|
/**
|
|
4912
5010
|
* An `EventTarget` that emits events when new subscription notifications come in over WebSockets.
|
|
4913
5011
|
*
|
|
@@ -4975,7 +5073,7 @@ export declare class SubscriptionManager {
|
|
|
4975
5073
|
private criteriaEntries;
|
|
4976
5074
|
private criteriaEntriesBySubscriptionId;
|
|
4977
5075
|
private wsClosed;
|
|
4978
|
-
constructor(medplum: MedplumClient, wsUrl: URL | string);
|
|
5076
|
+
constructor(medplum: MedplumClient, wsUrl: URL | string, options?: SubManagerOptions);
|
|
4979
5077
|
private setupWebSocketListeners;
|
|
4980
5078
|
private emitConnect;
|
|
4981
5079
|
private emitError;
|
|
@@ -5014,6 +5112,7 @@ export declare class SymbolAtom implements Atom {
|
|
|
5014
5112
|
readonly name: string;
|
|
5015
5113
|
constructor(name: string);
|
|
5016
5114
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
5115
|
+
private getVariable;
|
|
5017
5116
|
private evalValue;
|
|
5018
5117
|
toString(): string;
|
|
5019
5118
|
}
|
|
@@ -5112,6 +5211,7 @@ export declare class TypedEventTarget<TEvents extends Record<string, Event_2>> {
|
|
|
5112
5211
|
dispatchEvent<TEventType extends keyof TEvents & string>(event: TEvents[TEventType]): void;
|
|
5113
5212
|
addEventListener<TEventType extends keyof TEvents & string>(type: TEventType, handler: (event: TEvents[TEventType]) => void): void;
|
|
5114
5213
|
removeEventListener<TEventType extends keyof TEvents & string>(type: TEventType, handler: (event: TEvents[TEventType]) => void): void;
|
|
5214
|
+
removeAllListeners(): void;
|
|
5115
5215
|
}
|
|
5116
5216
|
|
|
5117
5217
|
export declare interface TypedValue {
|