@medplum/core 3.0.9 → 3.0.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 +5 -5
- package/dist/cjs/index.cjs.map +4 -4
- package/dist/cjs/index.d.ts +125 -42
- package/dist/esm/index.d.ts +125 -42
- 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";
|
|
@@ -1864,6 +1876,26 @@ export declare class IsAtom extends BooleanInfixOperatorAtom {
|
|
|
1864
1876
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
1865
1877
|
}
|
|
1866
1878
|
|
|
1879
|
+
/**
|
|
1880
|
+
* Returns true if the input value is a CodeableConcept object.
|
|
1881
|
+
* This is a heuristic check based on the presence of the "coding" property.
|
|
1882
|
+
* @param value - The candidate value.
|
|
1883
|
+
* @returns True if the input value is a CodeableConcept.
|
|
1884
|
+
*/
|
|
1885
|
+
export declare function isCodeableConcept(value: unknown): value is CodeableConcept & {
|
|
1886
|
+
coding: Coding[];
|
|
1887
|
+
};
|
|
1888
|
+
|
|
1889
|
+
/**
|
|
1890
|
+
* Returns true if the input value is a Coding object.
|
|
1891
|
+
* This is a heuristic check based on the presence of the "code" property.
|
|
1892
|
+
* @param value - The candidate value.
|
|
1893
|
+
* @returns True if the input value is a Coding.
|
|
1894
|
+
*/
|
|
1895
|
+
export declare function isCoding(value: unknown): value is Coding & {
|
|
1896
|
+
code: string;
|
|
1897
|
+
};
|
|
1898
|
+
|
|
1867
1899
|
export declare function isCompletedSubscriptionRequest(subscriptionRequest: SubscriptionRequest | PendingSubscriptionRequest): subscriptionRequest is SubscriptionRequest;
|
|
1868
1900
|
|
|
1869
1901
|
export declare function isComplexTypeCode(code: string): boolean;
|
|
@@ -2009,6 +2041,13 @@ export declare function isResourceTypeSchema(typeSchema: InternalTypeSchema): bo
|
|
|
2009
2041
|
|
|
2010
2042
|
export declare function isSliceDefinitionWithTypes(slice: SliceDefinition): slice is SliceDefinitionWithTypes;
|
|
2011
2043
|
|
|
2044
|
+
/**
|
|
2045
|
+
* Returns true if the input value is a string.
|
|
2046
|
+
* @param value - The candidate value.
|
|
2047
|
+
* @returns True if the input value is a string.
|
|
2048
|
+
*/
|
|
2049
|
+
export declare function isString(value: unknown): value is string;
|
|
2050
|
+
|
|
2012
2051
|
/**
|
|
2013
2052
|
* Returns true if the input array is an array of strings.
|
|
2014
2053
|
* @param arr - Input array.
|
|
@@ -2020,6 +2059,16 @@ export declare type IssueSeverity = 'error' | 'fatal' | 'warning' | 'information
|
|
|
2020
2059
|
|
|
2021
2060
|
export declare type IssueType = 'structure' | 'invariant' | 'processing';
|
|
2022
2061
|
|
|
2062
|
+
/**
|
|
2063
|
+
* Returns true if the input value is an object with a string text property.
|
|
2064
|
+
* This is a heuristic check based on the presence of the "text" property.
|
|
2065
|
+
* @param value - The candidate value.
|
|
2066
|
+
* @returns True if the input value is a text object.
|
|
2067
|
+
*/
|
|
2068
|
+
export declare function isTextObject(value: unknown): value is {
|
|
2069
|
+
text: string;
|
|
2070
|
+
};
|
|
2071
|
+
|
|
2023
2072
|
/**
|
|
2024
2073
|
* Returns true if the input string is a UUID.
|
|
2025
2074
|
* @param input - The input string.
|
|
@@ -2401,7 +2450,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2401
2450
|
* @param options - Optional fetch options.
|
|
2402
2451
|
* @returns Promise to the response content.
|
|
2403
2452
|
*/
|
|
2404
|
-
get<T = any>(url: URL | string, options?:
|
|
2453
|
+
get<T = any>(url: URL | string, options?: MedplumRequestOptions): ReadablePromise<T>;
|
|
2405
2454
|
/**
|
|
2406
2455
|
* Makes an HTTP POST request to the specified URL.
|
|
2407
2456
|
*
|
|
@@ -2415,7 +2464,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2415
2464
|
* @param options - Optional fetch options.
|
|
2416
2465
|
* @returns Promise to the response content.
|
|
2417
2466
|
*/
|
|
2418
|
-
post(url: URL | string, body: any, contentType?: string, options?:
|
|
2467
|
+
post(url: URL | string, body: any, contentType?: string, options?: MedplumRequestOptions): Promise<any>;
|
|
2419
2468
|
/**
|
|
2420
2469
|
* Makes an HTTP PUT request to the specified URL.
|
|
2421
2470
|
*
|
|
@@ -2429,7 +2478,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2429
2478
|
* @param options - Optional fetch options.
|
|
2430
2479
|
* @returns Promise to the response content.
|
|
2431
2480
|
*/
|
|
2432
|
-
put(url: URL | string, body: any, contentType?: string, options?:
|
|
2481
|
+
put(url: URL | string, body: any, contentType?: string, options?: MedplumRequestOptions): Promise<any>;
|
|
2433
2482
|
/**
|
|
2434
2483
|
* Makes an HTTP PATCH request to the specified URL.
|
|
2435
2484
|
*
|
|
@@ -2442,7 +2491,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2442
2491
|
* @param options - Optional fetch options.
|
|
2443
2492
|
* @returns Promise to the response content.
|
|
2444
2493
|
*/
|
|
2445
|
-
patch(url: URL | string, operations: PatchOperation[], options?:
|
|
2494
|
+
patch(url: URL | string, operations: PatchOperation[], options?: MedplumRequestOptions): Promise<any>;
|
|
2446
2495
|
/**
|
|
2447
2496
|
* Makes an HTTP DELETE request to the specified URL.
|
|
2448
2497
|
*
|
|
@@ -2455,7 +2504,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2455
2504
|
* @param options - Optional fetch options.
|
|
2456
2505
|
* @returns Promise to the response content.
|
|
2457
2506
|
*/
|
|
2458
|
-
delete(url: URL | string, options?:
|
|
2507
|
+
delete(url: URL | string, options?: MedplumRequestOptions): Promise<any>;
|
|
2459
2508
|
/**
|
|
2460
2509
|
* Initiates a new user flow.
|
|
2461
2510
|
*
|
|
@@ -2467,7 +2516,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2467
2516
|
* @param options - Optional fetch options.
|
|
2468
2517
|
* @returns Promise to the authentication response.
|
|
2469
2518
|
*/
|
|
2470
|
-
startNewUser(newUserRequest: NewUserRequest, options?:
|
|
2519
|
+
startNewUser(newUserRequest: NewUserRequest, options?: MedplumRequestOptions): Promise<LoginAuthenticationResponse>;
|
|
2471
2520
|
/**
|
|
2472
2521
|
* Initiates a new project flow.
|
|
2473
2522
|
*
|
|
@@ -2476,7 +2525,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2476
2525
|
* @param options - Optional fetch options.
|
|
2477
2526
|
* @returns Promise to the authentication response.
|
|
2478
2527
|
*/
|
|
2479
|
-
startNewProject(newProjectRequest: NewProjectRequest, options?:
|
|
2528
|
+
startNewProject(newProjectRequest: NewProjectRequest, options?: MedplumRequestOptions): Promise<LoginAuthenticationResponse>;
|
|
2480
2529
|
/**
|
|
2481
2530
|
* Initiates a new patient flow.
|
|
2482
2531
|
*
|
|
@@ -2485,7 +2534,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2485
2534
|
* @param options - Optional fetch options.
|
|
2486
2535
|
* @returns Promise to the authentication response.
|
|
2487
2536
|
*/
|
|
2488
|
-
startNewPatient(newPatientRequest: NewPatientRequest, options?:
|
|
2537
|
+
startNewPatient(newPatientRequest: NewPatientRequest, options?: MedplumRequestOptions): Promise<LoginAuthenticationResponse>;
|
|
2489
2538
|
/**
|
|
2490
2539
|
* Initiates a user login flow.
|
|
2491
2540
|
* @category Authentication
|
|
@@ -2493,7 +2542,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2493
2542
|
* @param options - Optional fetch options.
|
|
2494
2543
|
* @returns Promise to the authentication response.
|
|
2495
2544
|
*/
|
|
2496
|
-
startLogin(loginRequest: EmailPasswordLoginRequest, options?:
|
|
2545
|
+
startLogin(loginRequest: EmailPasswordLoginRequest, options?: MedplumRequestOptions): Promise<LoginAuthenticationResponse>;
|
|
2497
2546
|
/**
|
|
2498
2547
|
* Tries to sign in with Google authentication.
|
|
2499
2548
|
* The response parameter is the result of a Google authentication.
|
|
@@ -2503,7 +2552,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2503
2552
|
* @param options - Optional fetch options.
|
|
2504
2553
|
* @returns Promise to the authentication response.
|
|
2505
2554
|
*/
|
|
2506
|
-
startGoogleLogin(loginRequest: GoogleLoginRequest, options?:
|
|
2555
|
+
startGoogleLogin(loginRequest: GoogleLoginRequest, options?: MedplumRequestOptions): Promise<LoginAuthenticationResponse>;
|
|
2507
2556
|
/**
|
|
2508
2557
|
* Returns the PKCE code challenge and method.
|
|
2509
2558
|
* If the login request already includes a code challenge, it is returned.
|
|
@@ -2630,7 +2679,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2630
2679
|
* @param options - Optional fetch options.
|
|
2631
2680
|
* @returns Promise to the search result bundle.
|
|
2632
2681
|
*/
|
|
2633
|
-
search<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?:
|
|
2682
|
+
search<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: MedplumRequestOptions): ReadablePromise<Bundle<ExtractResource<K>>>;
|
|
2634
2683
|
/**
|
|
2635
2684
|
* Sends a FHIR search request for a single resource.
|
|
2636
2685
|
*
|
|
@@ -2653,7 +2702,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2653
2702
|
* @param options - Optional fetch options.
|
|
2654
2703
|
* @returns Promise to the first search result.
|
|
2655
2704
|
*/
|
|
2656
|
-
searchOne<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?:
|
|
2705
|
+
searchOne<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: MedplumRequestOptions): ReadablePromise<ExtractResource<K> | undefined>;
|
|
2657
2706
|
/**
|
|
2658
2707
|
* Sends a FHIR search request for an array of resources.
|
|
2659
2708
|
*
|
|
@@ -2676,7 +2725,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2676
2725
|
* @param options - Optional fetch options.
|
|
2677
2726
|
* @returns Promise to the array of search results.
|
|
2678
2727
|
*/
|
|
2679
|
-
searchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?:
|
|
2728
|
+
searchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: MedplumRequestOptions): ReadablePromise<ResourceArray<ExtractResource<K>>>;
|
|
2680
2729
|
/**
|
|
2681
2730
|
* Creates an
|
|
2682
2731
|
* [async generator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)
|
|
@@ -2699,7 +2748,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2699
2748
|
* @param options - Optional fetch options.
|
|
2700
2749
|
* @yields An async generator, where each result is an array of resources for each page.
|
|
2701
2750
|
*/
|
|
2702
|
-
searchResourcePages<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?:
|
|
2751
|
+
searchResourcePages<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: MedplumRequestOptions): AsyncGenerator<ResourceArray<ExtractResource<K>>>;
|
|
2703
2752
|
/**
|
|
2704
2753
|
* Searches a ValueSet resource using the "expand" operation.
|
|
2705
2754
|
* See: https://www.hl7.org/fhir/operation-valueset-expand.html
|
|
@@ -2710,7 +2759,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2710
2759
|
* @returns Promise to expanded ValueSet.
|
|
2711
2760
|
* @deprecated Use `valueSetExpand()` instead.
|
|
2712
2761
|
*/
|
|
2713
|
-
searchValueSet(system: string, filter: string, options?:
|
|
2762
|
+
searchValueSet(system: string, filter: string, options?: MedplumRequestOptions): ReadablePromise<ValueSet>;
|
|
2714
2763
|
/**
|
|
2715
2764
|
* Searches a ValueSet resource using the "expand" operation.
|
|
2716
2765
|
* See: https://www.hl7.org/fhir/operation-valueset-expand.html
|
|
@@ -2719,7 +2768,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2719
2768
|
* @param options - Optional fetch options.
|
|
2720
2769
|
* @returns Promise to expanded ValueSet.
|
|
2721
2770
|
*/
|
|
2722
|
-
valueSetExpand(params: ValueSetExpandParams, options?:
|
|
2771
|
+
valueSetExpand(params: ValueSetExpandParams, options?: MedplumRequestOptions): ReadablePromise<ValueSet>;
|
|
2723
2772
|
/**
|
|
2724
2773
|
* Returns a cached resource if it is available.
|
|
2725
2774
|
* @category Caching
|
|
@@ -2753,7 +2802,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2753
2802
|
* @param options - Optional fetch options.
|
|
2754
2803
|
* @returns The resource if available.
|
|
2755
2804
|
*/
|
|
2756
|
-
readResource<K extends ResourceType>(resourceType: K, id: string, options?:
|
|
2805
|
+
readResource<K extends ResourceType>(resourceType: K, id: string, options?: MedplumRequestOptions): ReadablePromise<ExtractResource<K>>;
|
|
2757
2806
|
/**
|
|
2758
2807
|
* Reads a resource by `Reference`.
|
|
2759
2808
|
*
|
|
@@ -2774,7 +2823,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2774
2823
|
* @param options - Optional fetch options.
|
|
2775
2824
|
* @returns The resource if available.
|
|
2776
2825
|
*/
|
|
2777
|
-
readReference<T extends Resource>(reference: Reference<T>, options?:
|
|
2826
|
+
readReference<T extends Resource>(reference: Reference<T>, options?: MedplumRequestOptions): ReadablePromise<T>;
|
|
2778
2827
|
/**
|
|
2779
2828
|
* Requests the schema for a resource type.
|
|
2780
2829
|
* If the schema is already cached, the promise is resolved immediately.
|
|
@@ -2812,7 +2861,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2812
2861
|
* @param options - Optional fetch options.
|
|
2813
2862
|
* @returns Promise to the resource history.
|
|
2814
2863
|
*/
|
|
2815
|
-
readHistory<K extends ResourceType>(resourceType: K, id: string, options?:
|
|
2864
|
+
readHistory<K extends ResourceType>(resourceType: K, id: string, options?: MedplumRequestOptions): ReadablePromise<Bundle<ExtractResource<K>>>;
|
|
2816
2865
|
/**
|
|
2817
2866
|
* Reads a specific version of a resource by resource type, ID, and version ID.
|
|
2818
2867
|
*
|
|
@@ -2832,7 +2881,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2832
2881
|
* @param options - Optional fetch options.
|
|
2833
2882
|
* @returns The resource if available.
|
|
2834
2883
|
*/
|
|
2835
|
-
readVersion<K extends ResourceType>(resourceType: K, id: string, vid: string, options?:
|
|
2884
|
+
readVersion<K extends ResourceType>(resourceType: K, id: string, vid: string, options?: MedplumRequestOptions): ReadablePromise<ExtractResource<K>>;
|
|
2836
2885
|
/**
|
|
2837
2886
|
* Executes the Patient "everything" operation for a patient.
|
|
2838
2887
|
*
|
|
@@ -2850,7 +2899,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2850
2899
|
* @param options - Optional fetch options.
|
|
2851
2900
|
* @returns A Bundle of all Resources related to the Patient
|
|
2852
2901
|
*/
|
|
2853
|
-
readPatientEverything(id: string, options?:
|
|
2902
|
+
readPatientEverything(id: string, options?: MedplumRequestOptions): ReadablePromise<Bundle>;
|
|
2854
2903
|
/**
|
|
2855
2904
|
* Creates a new FHIR resource.
|
|
2856
2905
|
*
|
|
@@ -2876,7 +2925,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2876
2925
|
* @param options - Optional fetch options.
|
|
2877
2926
|
* @returns The result of the create operation.
|
|
2878
2927
|
*/
|
|
2879
|
-
createResource<T extends Resource>(resource: T, options?:
|
|
2928
|
+
createResource<T extends Resource>(resource: T, options?: MedplumRequestOptions): Promise<T>;
|
|
2880
2929
|
/**
|
|
2881
2930
|
* Conditionally create a new FHIR resource only if some equivalent resource does not already exist on the server.
|
|
2882
2931
|
*
|
|
@@ -2918,7 +2967,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2918
2967
|
* @param options - Optional fetch options.
|
|
2919
2968
|
* @returns The result of the create operation.
|
|
2920
2969
|
*/
|
|
2921
|
-
createResourceIfNoneExist<T extends Resource>(resource: T, query: string, options?:
|
|
2970
|
+
createResourceIfNoneExist<T extends Resource>(resource: T, query: string, options?: MedplumRequestOptions): Promise<T>;
|
|
2922
2971
|
/**
|
|
2923
2972
|
* Creates a FHIR `Attachment` with the provided data content.
|
|
2924
2973
|
*
|
|
@@ -2945,7 +2994,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2945
2994
|
* @param options - Optional fetch options. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
|
|
2946
2995
|
* @returns The result of the create operation.
|
|
2947
2996
|
*/
|
|
2948
|
-
createAttachment(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?:
|
|
2997
|
+
createAttachment(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?: MedplumRequestOptions): Promise<Attachment>;
|
|
2949
2998
|
/**
|
|
2950
2999
|
* Creates a FHIR `Binary` resource with the provided data content.
|
|
2951
3000
|
*
|
|
@@ -2972,8 +3021,8 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
2972
3021
|
* @param options - Optional fetch options. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
|
|
2973
3022
|
* @returns The result of the create operation.
|
|
2974
3023
|
*/
|
|
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?:
|
|
3024
|
+
createBinary(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?: MedplumRequestOptions): Promise<Binary>;
|
|
3025
|
+
uploadwithProgress(url: URL, data: BinarySource, contentType: string, onProgress: (e: ProgressEvent) => void, options?: MedplumRequestOptions): Promise<any>;
|
|
2977
3026
|
/**
|
|
2978
3027
|
* Creates a PDF as a FHIR `Binary` resource based on pdfmake document definition.
|
|
2979
3028
|
*
|
|
@@ -3010,7 +3059,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3010
3059
|
* @param options - Optional fetch options.
|
|
3011
3060
|
* @returns The result of the create operation.
|
|
3012
3061
|
*/
|
|
3013
|
-
createComment(resource: Resource, text: string, options?:
|
|
3062
|
+
createComment(resource: Resource, text: string, options?: MedplumRequestOptions): Promise<Communication>;
|
|
3014
3063
|
/**
|
|
3015
3064
|
* Updates a FHIR resource.
|
|
3016
3065
|
*
|
|
@@ -3037,7 +3086,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3037
3086
|
* @param options - Optional fetch options.
|
|
3038
3087
|
* @returns The result of the update operation.
|
|
3039
3088
|
*/
|
|
3040
|
-
updateResource<T extends Resource>(resource: T, options?:
|
|
3089
|
+
updateResource<T extends Resource>(resource: T, options?: MedplumRequestOptions): Promise<T>;
|
|
3041
3090
|
/**
|
|
3042
3091
|
* Updates a FHIR resource using JSONPatch operations.
|
|
3043
3092
|
*
|
|
@@ -3063,7 +3112,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3063
3112
|
* @param options - Optional fetch options.
|
|
3064
3113
|
* @returns The result of the patch operations.
|
|
3065
3114
|
*/
|
|
3066
|
-
patchResource<K extends ResourceType>(resourceType: K, id: string, operations: PatchOperation[], options?:
|
|
3115
|
+
patchResource<K extends ResourceType>(resourceType: K, id: string, operations: PatchOperation[], options?: MedplumRequestOptions): Promise<ExtractResource<K>>;
|
|
3067
3116
|
/**
|
|
3068
3117
|
* Deletes a FHIR resource by resource type and ID.
|
|
3069
3118
|
*
|
|
@@ -3081,7 +3130,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3081
3130
|
* @param options - Optional fetch options.
|
|
3082
3131
|
* @returns The result of the delete operation.
|
|
3083
3132
|
*/
|
|
3084
|
-
deleteResource(resourceType: ResourceType, id: string, options?:
|
|
3133
|
+
deleteResource(resourceType: ResourceType, id: string, options?: MedplumRequestOptions): Promise<any>;
|
|
3085
3134
|
/**
|
|
3086
3135
|
* Executes the validate operation with the provided resource.
|
|
3087
3136
|
*
|
|
@@ -3100,7 +3149,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3100
3149
|
* @param options - Optional fetch options.
|
|
3101
3150
|
* @returns The validate operation outcome.
|
|
3102
3151
|
*/
|
|
3103
|
-
validateResource<T extends Resource>(resource: T, options?:
|
|
3152
|
+
validateResource<T extends Resource>(resource: T, options?: MedplumRequestOptions): Promise<OperationOutcome>;
|
|
3104
3153
|
/**
|
|
3105
3154
|
* Executes a bot by ID or Identifier.
|
|
3106
3155
|
* @param idOrIdentifier - The Bot ID or Identifier.
|
|
@@ -3109,7 +3158,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3109
3158
|
* @param options - Optional fetch options.
|
|
3110
3159
|
* @returns The Bot return value.
|
|
3111
3160
|
*/
|
|
3112
|
-
executeBot(idOrIdentifier: string | Identifier, body: any, contentType?: string, options?:
|
|
3161
|
+
executeBot(idOrIdentifier: string | Identifier, body: any, contentType?: string, options?: MedplumRequestOptions): Promise<any>;
|
|
3113
3162
|
/**
|
|
3114
3163
|
* Executes a batch or transaction of FHIR operations.
|
|
3115
3164
|
*
|
|
@@ -3159,7 +3208,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3159
3208
|
* @param options - Optional fetch options.
|
|
3160
3209
|
* @returns The FHIR batch/transaction response bundle.
|
|
3161
3210
|
*/
|
|
3162
|
-
executeBatch(bundle: Bundle, options?:
|
|
3211
|
+
executeBatch(bundle: Bundle, options?: MedplumRequestOptions): Promise<Bundle>;
|
|
3163
3212
|
/**
|
|
3164
3213
|
* Sends an email using the Medplum Email API.
|
|
3165
3214
|
*
|
|
@@ -3200,7 +3249,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3200
3249
|
* @param options - Optional fetch options.
|
|
3201
3250
|
* @returns Promise to the operation outcome.
|
|
3202
3251
|
*/
|
|
3203
|
-
sendEmail(email: MailOptions, options?:
|
|
3252
|
+
sendEmail(email: MailOptions, options?: MedplumRequestOptions): Promise<OperationOutcome>;
|
|
3204
3253
|
/**
|
|
3205
3254
|
* Executes a GraphQL query.
|
|
3206
3255
|
*
|
|
@@ -3250,7 +3299,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3250
3299
|
* @param options - Optional fetch options.
|
|
3251
3300
|
* @returns The GraphQL result.
|
|
3252
3301
|
*/
|
|
3253
|
-
graphql(query: string, operationName?: string | null, variables?: any, options?:
|
|
3302
|
+
graphql(query: string, operationName?: string | null, variables?: any, options?: MedplumRequestOptions): Promise<any>;
|
|
3254
3303
|
/**
|
|
3255
3304
|
* Executes the $graph operation on this resource to fetch a Bundle of resources linked to the target resource
|
|
3256
3305
|
* according to a graph definition
|
|
@@ -3261,7 +3310,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3261
3310
|
* @param options - Optional fetch options.
|
|
3262
3311
|
* @returns A Bundle
|
|
3263
3312
|
*/
|
|
3264
|
-
readResourceGraph<K extends ResourceType>(resourceType: K, id: string, graphName: string, options?:
|
|
3313
|
+
readResourceGraph<K extends ResourceType>(resourceType: K, id: string, graphName: string, options?: MedplumRequestOptions): ReadablePromise<Bundle>;
|
|
3265
3314
|
/**
|
|
3266
3315
|
* Pushes a message to an agent.
|
|
3267
3316
|
*
|
|
@@ -3273,7 +3322,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3273
3322
|
* @param options - Optional fetch options.
|
|
3274
3323
|
* @returns Promise to the result. If waiting for response, the result is the response body. Otherwise, it is an operation outcome.
|
|
3275
3324
|
*/
|
|
3276
|
-
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string, waitForResponse?: boolean, options?:
|
|
3325
|
+
pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device> | string, body: any, contentType?: string, waitForResponse?: boolean, options?: MedplumRequestOptions): Promise<any>;
|
|
3277
3326
|
/**
|
|
3278
3327
|
* @category Authentication
|
|
3279
3328
|
* @returns The Login State
|
|
@@ -3369,7 +3418,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3369
3418
|
* @param options - Optional fetch request init options.
|
|
3370
3419
|
* @returns Promise to the response body as a blob.
|
|
3371
3420
|
*/
|
|
3372
|
-
download(url: URL | string, options?:
|
|
3421
|
+
download(url: URL | string, options?: MedplumRequestOptions): Promise<Blob>;
|
|
3373
3422
|
/**
|
|
3374
3423
|
* Upload media to the server and create a Media instance for the uploaded content.
|
|
3375
3424
|
* @param contents - The contents of the media file, as a string, Uint8Array, File, or Blob.
|
|
@@ -3379,7 +3428,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3379
3428
|
* @param options - Optional fetch options.
|
|
3380
3429
|
* @returns Promise that resolves to the created Media
|
|
3381
3430
|
*/
|
|
3382
|
-
uploadMedia(contents: string | Uint8Array | File | Blob, contentType: string, filename: string | undefined, additionalFields?: Partial<Media>, options?:
|
|
3431
|
+
uploadMedia(contents: string | Uint8Array | File | Blob, contentType: string, filename: string | undefined, additionalFields?: Partial<Media>, options?: MedplumRequestOptions): Promise<Media>;
|
|
3383
3432
|
/**
|
|
3384
3433
|
* 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
3434
|
* @param exportLevel - Optional export level. Defaults to system level export. 'Group/:id' - Group of Patients, 'Patient' - All Patients.
|
|
@@ -3388,7 +3437,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3388
3437
|
* @param options - Optional fetch options.
|
|
3389
3438
|
* @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
3439
|
*/
|
|
3391
|
-
bulkExport(exportLevel?: string, resourceTypes?: string, since?: string, options?:
|
|
3440
|
+
bulkExport(exportLevel?: string, resourceTypes?: string, since?: string, options?: MedplumRequestOptions): Promise<Partial<BulkDataExport>>;
|
|
3392
3441
|
/**
|
|
3393
3442
|
* Starts an async request following the FHIR "Asynchronous Request Pattern".
|
|
3394
3443
|
* See: https://hl7.org/fhir/r4/async.html
|
|
@@ -3396,7 +3445,7 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3396
3445
|
* @param options - Optional fetch options.
|
|
3397
3446
|
* @returns The response body.
|
|
3398
3447
|
*/
|
|
3399
|
-
startAsyncRequest<T>(url: string, options?:
|
|
3448
|
+
startAsyncRequest<T>(url: string, options?: MedplumRequestOptions): Promise<T>;
|
|
3400
3449
|
/**
|
|
3401
3450
|
* Returns the key value client.
|
|
3402
3451
|
* @returns The key value client.
|
|
@@ -3950,10 +3999,17 @@ export declare interface MedplumInfraConfig {
|
|
|
3950
3999
|
snsTopicArn?: string;
|
|
3951
4000
|
snsTopicName?: string;
|
|
3952
4001
|
};
|
|
4002
|
+
fargateAutoScaling?: {
|
|
4003
|
+
minCapacity: number;
|
|
4004
|
+
maxCapacity: number;
|
|
4005
|
+
targetUtilizationPercent: number;
|
|
4006
|
+
scaleInCooldown: number;
|
|
4007
|
+
scaleOutCooldown: number;
|
|
4008
|
+
};
|
|
3953
4009
|
environment?: StringMap;
|
|
3954
4010
|
}
|
|
3955
4011
|
|
|
3956
|
-
declare class MedplumKeyValueClient {
|
|
4012
|
+
export declare class MedplumKeyValueClient {
|
|
3957
4013
|
readonly medplum: MedplumClient;
|
|
3958
4014
|
constructor(medplum: MedplumClient);
|
|
3959
4015
|
/**
|
|
@@ -3975,6 +4031,26 @@ declare class MedplumKeyValueClient {
|
|
|
3975
4031
|
delete(key: string): Promise<void>;
|
|
3976
4032
|
}
|
|
3977
4033
|
|
|
4034
|
+
export declare interface MedplumRequestOptions extends RequestInit {
|
|
4035
|
+
/**
|
|
4036
|
+
* Optional flag to follow "Location" or "Content-Location" URL on successful HTTP 200 "OK" responses.
|
|
4037
|
+
*/
|
|
4038
|
+
followRedirectOnOk?: boolean;
|
|
4039
|
+
/**
|
|
4040
|
+
* Optional flag to follow "Location" or "Content-Location" URL on successful HTTP 201 "Created" responses.
|
|
4041
|
+
*/
|
|
4042
|
+
followRedirectOnCreated?: boolean;
|
|
4043
|
+
/**
|
|
4044
|
+
* Optional flag to poll the status URL on successful HTTP 202 "Accepted" responses.
|
|
4045
|
+
*/
|
|
4046
|
+
pollStatusOnAccepted?: boolean;
|
|
4047
|
+
/**
|
|
4048
|
+
* Optional polling time interval in milliseconds.
|
|
4049
|
+
* Default value is 1000 (1 second).
|
|
4050
|
+
*/
|
|
4051
|
+
pollStatusPeriod?: number;
|
|
4052
|
+
}
|
|
4053
|
+
|
|
3978
4054
|
export declare interface MedplumSourceInfraConfig {
|
|
3979
4055
|
name: ValueOrExternalSecret<string>;
|
|
3980
4056
|
stackName: ValueOrExternalSecret<string>;
|
|
@@ -4035,6 +4111,13 @@ export declare interface MedplumSourceInfraConfig {
|
|
|
4035
4111
|
snsTopicArn?: ValueOrExternalSecret<string>;
|
|
4036
4112
|
snsTopicName?: ValueOrExternalSecret<string>;
|
|
4037
4113
|
};
|
|
4114
|
+
fargateAutoScaling?: {
|
|
4115
|
+
minCapacity: ValueOrExternalSecret<number>;
|
|
4116
|
+
maxCapacity: ValueOrExternalSecret<number>;
|
|
4117
|
+
targetUtilizationPercent: ValueOrExternalSecret<number>;
|
|
4118
|
+
scaleInCooldown: ValueOrExternalSecret<number>;
|
|
4119
|
+
scaleOutCooldown: ValueOrExternalSecret<number>;
|
|
4120
|
+
};
|
|
4038
4121
|
environment?: StringMap;
|
|
4039
4122
|
}
|
|
4040
4123
|
|