@medplum/core 2.1.20 → 2.1.22

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.
@@ -347,6 +347,8 @@ export declare function createConstraintIssue(expression: string, constraint: Co
347
347
 
348
348
  export declare const created: OperationOutcome;
349
349
 
350
+ export declare function createDeferredPromise(): DeferredPromise;
351
+
350
352
  /**
351
353
  * Creates a serializable JSON payload for the `FHIRcast` protocol
352
354
  *
@@ -427,6 +429,12 @@ export declare const DEFAULT_ACCEPT: string;
427
429
 
428
430
  export declare const DEFAULT_SEARCH_COUNT = 20;
429
431
 
432
+ export declare type DeferredPromise = {
433
+ promise: Promise<void>;
434
+ resolve: () => void;
435
+ reject: (err: Error) => void;
436
+ };
437
+
430
438
  export declare class DotAtom extends InfixOperatorAtom {
431
439
  constructor(left: Atom, right: Atom);
432
440
  eval(context: AtomContext, input: TypedValue[]): TypedValue[];
@@ -2636,10 +2644,11 @@ export declare class MedplumClient extends EventTarget_2 {
2636
2644
  * @param data - The binary data to upload.
2637
2645
  * @param filename - Optional filename for the binary.
2638
2646
  * @param contentType - Content type for the binary.
2639
- * @param onProgress - Optional callback for progress events.
2647
+ * @param onProgress - Optional callback for progress events. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
2648
+ * @param options - Optional fetch options. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
2640
2649
  * @returns The result of the create operation.
2641
2650
  */
2642
- createAttachment(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void): Promise<Attachment>;
2651
+ createAttachment(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?: RequestInit): Promise<Attachment>;
2643
2652
  /**
2644
2653
  * Creates a FHIR `Binary` resource with the provided data content.
2645
2654
  *
@@ -2662,11 +2671,12 @@ export declare class MedplumClient extends EventTarget_2 {
2662
2671
  * @param data - The binary data to upload.
2663
2672
  * @param filename - Optional filename for the binary.
2664
2673
  * @param contentType - Content type for the binary.
2665
- * @param onProgress - Optional callback for progress events.
2674
+ * @param onProgress - Optional callback for progress events. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
2675
+ * @param options - Optional fetch options. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
2666
2676
  * @returns The result of the create operation.
2667
2677
  */
2668
- createBinary(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void): Promise<Binary>;
2669
- uploadwithProgress(url: URL, data: BinarySource, contentType: string, onProgress: (e: ProgressEvent) => void): Promise<any>;
2678
+ createBinary(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?: RequestInit): Promise<Binary>;
2679
+ uploadwithProgress(url: URL, data: BinarySource, contentType: string, onProgress: (e: ProgressEvent) => void, options?: RequestInit): Promise<any>;
2670
2680
  /**
2671
2681
  * Creates a PDF as a FHIR `Binary` resource based on pdfmake document definition.
2672
2682
  *
@@ -347,6 +347,8 @@ export declare function createConstraintIssue(expression: string, constraint: Co
347
347
 
348
348
  export declare const created: OperationOutcome;
349
349
 
350
+ export declare function createDeferredPromise(): DeferredPromise;
351
+
350
352
  /**
351
353
  * Creates a serializable JSON payload for the `FHIRcast` protocol
352
354
  *
@@ -427,6 +429,12 @@ export declare const DEFAULT_ACCEPT: string;
427
429
 
428
430
  export declare const DEFAULT_SEARCH_COUNT = 20;
429
431
 
432
+ export declare type DeferredPromise = {
433
+ promise: Promise<void>;
434
+ resolve: () => void;
435
+ reject: (err: Error) => void;
436
+ };
437
+
430
438
  export declare class DotAtom extends InfixOperatorAtom {
431
439
  constructor(left: Atom, right: Atom);
432
440
  eval(context: AtomContext, input: TypedValue[]): TypedValue[];
@@ -2636,10 +2644,11 @@ export declare class MedplumClient extends EventTarget_2 {
2636
2644
  * @param data - The binary data to upload.
2637
2645
  * @param filename - Optional filename for the binary.
2638
2646
  * @param contentType - Content type for the binary.
2639
- * @param onProgress - Optional callback for progress events.
2647
+ * @param onProgress - Optional callback for progress events. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
2648
+ * @param options - Optional fetch options. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
2640
2649
  * @returns The result of the create operation.
2641
2650
  */
2642
- createAttachment(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void): Promise<Attachment>;
2651
+ createAttachment(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?: RequestInit): Promise<Attachment>;
2643
2652
  /**
2644
2653
  * Creates a FHIR `Binary` resource with the provided data content.
2645
2654
  *
@@ -2662,11 +2671,12 @@ export declare class MedplumClient extends EventTarget_2 {
2662
2671
  * @param data - The binary data to upload.
2663
2672
  * @param filename - Optional filename for the binary.
2664
2673
  * @param contentType - Content type for the binary.
2665
- * @param onProgress - Optional callback for progress events.
2674
+ * @param onProgress - Optional callback for progress events. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
2675
+ * @param options - Optional fetch options. **NOTE:** only `options.signal` is respected when `onProgress` is also provided.
2666
2676
  * @returns The result of the create operation.
2667
2677
  */
2668
- createBinary(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void): Promise<Binary>;
2669
- uploadwithProgress(url: URL, data: BinarySource, contentType: string, onProgress: (e: ProgressEvent) => void): Promise<any>;
2678
+ createBinary(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?: RequestInit): Promise<Binary>;
2679
+ uploadwithProgress(url: URL, data: BinarySource, contentType: string, onProgress: (e: ProgressEvent) => void, options?: RequestInit): Promise<any>;
2670
2680
  /**
2671
2681
  * Creates a PDF as a FHIR `Binary` resource based on pdfmake document definition.
2672
2682
  *