@medplum/core 3.2.23 → 3.2.24

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.
@@ -217,7 +217,7 @@ export declare class ArithemticOperatorAtom extends BooleanInfixOperatorAtom {
217
217
  * @param arrayBuffer - The input array buffer.
218
218
  * @returns The base-64 encoded string.
219
219
  */
220
- export declare function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string;
220
+ export declare function arrayBufferToBase64(arrayBuffer: ArrayBufferLike | ArrayBufferView): string;
221
221
 
222
222
  /**
223
223
  * Converts an ArrayBuffer to hex string.
@@ -225,7 +225,7 @@ export declare function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string;
225
225
  * @param arrayBuffer - The input array buffer.
226
226
  * @returns The resulting hex string.
227
227
  */
228
- export declare function arrayBufferToHex(arrayBuffer: ArrayBuffer): string;
228
+ export declare function arrayBufferToHex(arrayBuffer: ArrayBufferLike | ArrayBufferView): string;
229
229
 
230
230
  export declare function arrayify<T>(value: T | T[] | undefined): T[] | undefined;
231
231
 
@@ -501,7 +501,7 @@ export declare interface ConceptMapTranslateParameters {
501
501
  targetsystem?: string;
502
502
  }
503
503
 
504
- export declare function conflict(details: string): OperationOutcome;
504
+ export declare function conflict(details: string, code?: string): OperationOutcome;
505
505
 
506
506
  export declare interface Constraint {
507
507
  key: string;
@@ -4795,6 +4795,17 @@ export declare interface NewUserRequest {
4795
4795
  readonly clientId?: string;
4796
4796
  }
4797
4797
 
4798
+ /**
4799
+ * Normalizes an `ArrayBufferLike` (eg. an `ArrayBuffer`) to a raw `ArrayBufferLike` (without a view). If the passed buffer is a view, it gives the raw `ArrayBufferLike`.
4800
+ *
4801
+ * This is useful in cases where you need to operate on the raw bytes of an `ArrayBuffer` where a `TypedArray` (eg. `Uint32Array`) might be passed in.
4802
+ * This ensures that you will always operate on the raw bytes rather than accidentally truncating the input by operating on the elements of the view.
4803
+ *
4804
+ * @param typedArrayOrBuffer - The `ArrayBufferLike` (either `TypedArray` or raw `ArrayBuffer`) to normalize to raw `ArrayBuffer`.
4805
+ * @returns The raw `ArrayBuffer` without a view.
4806
+ */
4807
+ export declare function normalizeArrayBufferView(typedArrayOrBuffer: ArrayBufferLike | ArrayBufferView): ArrayBufferLike;
4808
+
4798
4809
  export declare function normalizeCreateBinaryOptions(arg1: BinarySource | CreateBinaryOptions, arg2: string | undefined | MedplumRequestOptions, arg3?: string, arg4?: (e: ProgressEvent) => void): CreateBinaryOptions;
4799
4810
 
4800
4811
  export declare function normalizeCreatePdfOptions(arg1: TDocumentDefinitions | CreatePdfOptions, arg2: string | undefined | MedplumRequestOptions, arg3: Record<string, CustomTableLayout> | undefined, arg4: TFontDictionary | undefined): CreatePdfOptions;
@@ -217,7 +217,7 @@ export declare class ArithemticOperatorAtom extends BooleanInfixOperatorAtom {
217
217
  * @param arrayBuffer - The input array buffer.
218
218
  * @returns The base-64 encoded string.
219
219
  */
220
- export declare function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string;
220
+ export declare function arrayBufferToBase64(arrayBuffer: ArrayBufferLike | ArrayBufferView): string;
221
221
 
222
222
  /**
223
223
  * Converts an ArrayBuffer to hex string.
@@ -225,7 +225,7 @@ export declare function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string;
225
225
  * @param arrayBuffer - The input array buffer.
226
226
  * @returns The resulting hex string.
227
227
  */
228
- export declare function arrayBufferToHex(arrayBuffer: ArrayBuffer): string;
228
+ export declare function arrayBufferToHex(arrayBuffer: ArrayBufferLike | ArrayBufferView): string;
229
229
 
230
230
  export declare function arrayify<T>(value: T | T[] | undefined): T[] | undefined;
231
231
 
@@ -501,7 +501,7 @@ export declare interface ConceptMapTranslateParameters {
501
501
  targetsystem?: string;
502
502
  }
503
503
 
504
- export declare function conflict(details: string): OperationOutcome;
504
+ export declare function conflict(details: string, code?: string): OperationOutcome;
505
505
 
506
506
  export declare interface Constraint {
507
507
  key: string;
@@ -4795,6 +4795,17 @@ export declare interface NewUserRequest {
4795
4795
  readonly clientId?: string;
4796
4796
  }
4797
4797
 
4798
+ /**
4799
+ * Normalizes an `ArrayBufferLike` (eg. an `ArrayBuffer`) to a raw `ArrayBufferLike` (without a view). If the passed buffer is a view, it gives the raw `ArrayBufferLike`.
4800
+ *
4801
+ * This is useful in cases where you need to operate on the raw bytes of an `ArrayBuffer` where a `TypedArray` (eg. `Uint32Array`) might be passed in.
4802
+ * This ensures that you will always operate on the raw bytes rather than accidentally truncating the input by operating on the elements of the view.
4803
+ *
4804
+ * @param typedArrayOrBuffer - The `ArrayBufferLike` (either `TypedArray` or raw `ArrayBuffer`) to normalize to raw `ArrayBuffer`.
4805
+ * @returns The raw `ArrayBuffer` without a view.
4806
+ */
4807
+ export declare function normalizeArrayBufferView(typedArrayOrBuffer: ArrayBufferLike | ArrayBufferView): ArrayBufferLike;
4808
+
4798
4809
  export declare function normalizeCreateBinaryOptions(arg1: BinarySource | CreateBinaryOptions, arg2: string | undefined | MedplumRequestOptions, arg3?: string, arg4?: (e: ProgressEvent) => void): CreateBinaryOptions;
4799
4810
 
4800
4811
  export declare function normalizeCreatePdfOptions(arg1: TDocumentDefinitions | CreatePdfOptions, arg2: string | undefined | MedplumRequestOptions, arg3: Record<string, CustomTableLayout> | undefined, arg4: TFontDictionary | undefined): CreatePdfOptions;