@medplum/core 3.1.0 → 3.1.1

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.
@@ -390,10 +390,10 @@ export declare class ConcatAtom extends InfixOperatorAtom {
390
390
  * If the URL is absolute, it is returned as-is.
391
391
  *
392
392
  * @param baseUrl - The base URL.
393
- * @param url - The URL to concat. Can be relative or absolute.
393
+ * @param path - The URL to concat. Can be relative or absolute.
394
394
  * @returns The concatenated URL.
395
395
  */
396
- export declare function concatUrls(baseUrl: string, url: string): string;
396
+ export declare function concatUrls(baseUrl: string | URL, path: string): string;
397
397
 
398
398
  export declare function conceptMapTranslate(map: ConceptMap, params: ConceptMapTranslateParameters): ConceptMapTranslateOutput;
399
399
 
@@ -686,6 +686,20 @@ export declare function encodeBase64(data: string): string;
686
686
  */
687
687
  export declare function encryptSHA256(str: string): Promise<ArrayBuffer>;
688
688
 
689
+ /**
690
+ * Ensures the given URL has no leading slash.
691
+ * @param url - The URL to ensure has no leading slash.
692
+ * @returns The URL string with no slash.
693
+ */
694
+ export declare function ensureNoLeadingSlash(url: string): string;
695
+
696
+ /**
697
+ * Ensures the given URL has a trailing slash.
698
+ * @param url - The URL to ensure has a trailing slash.
699
+ * @returns The URL with a trailing slash.
700
+ */
701
+ export declare function ensureTrailingSlash(url: string): string;
702
+
689
703
  export declare class EqualsAtom extends BooleanInfixOperatorAtom {
690
704
  constructor(left: Atom, right: Atom);
691
705
  eval(context: AtomContext, input: TypedValue[]): TypedValue[];
@@ -1513,7 +1527,7 @@ export declare function getTypedPropertyValueWithSchema(typedValue: TypedValue,
1513
1527
 
1514
1528
  export declare function getValueSliceName(value: any, slices: SliceDefinitionWithTypes[], discriminators: SliceDiscriminator[], profileUrl: string | undefined): string | undefined;
1515
1529
 
1516
- export declare function getWebSocketUrl(path: string, baseUrl: URL | string): string;
1530
+ export declare function getWebSocketUrl(baseUrl: URL | string, path: string): string;
1517
1531
 
1518
1532
  /**
1519
1533
  * Global schema singleton.
@@ -5056,6 +5070,16 @@ export declare interface SortRule {
5056
5070
  descending?: boolean;
5057
5071
  }
5058
5072
 
5073
+ /**
5074
+ * Sorts an array of strings in place using the localeCompare method.
5075
+ *
5076
+ * This method will mutate the input array.
5077
+ *
5078
+ * @param array - The array of strings to sort.
5079
+ * @returns The sorted array of strings.
5080
+ */
5081
+ export declare function sortStringArray(array: string[]): string[];
5082
+
5059
5083
  /**
5060
5084
  * Splits a string into an array of strings using the specified delimiter.
5061
5085
  * Unlike the built-in split function, this function will split the string into a maximum of exactly n parts.
@@ -5123,6 +5147,7 @@ export declare interface SubManagerOptions {
5123
5147
  * - `disconnect` - The specified subscription is no longer being monitored by the `SubscriptionManager`.
5124
5148
  * - `error` - An error has occurred.
5125
5149
  * - `message` - A message containing a notification `Bundle` has been received.
5150
+ * - `open` - The WebSocket has been opened.
5126
5151
  * - `close` - The WebSocket has been closed.
5127
5152
  * - `heartbeat` - A `heartbeat` message has been received.
5128
5153
  */
@@ -5163,6 +5188,9 @@ export declare type SubscriptionEventMap = {
5163
5188
  type: 'message';
5164
5189
  payload: Bundle;
5165
5190
  };
5191
+ open: {
5192
+ type: 'open';
5193
+ };
5166
5194
  close: {
5167
5195
  type: 'close';
5168
5196
  };
@@ -390,10 +390,10 @@ export declare class ConcatAtom extends InfixOperatorAtom {
390
390
  * If the URL is absolute, it is returned as-is.
391
391
  *
392
392
  * @param baseUrl - The base URL.
393
- * @param url - The URL to concat. Can be relative or absolute.
393
+ * @param path - The URL to concat. Can be relative or absolute.
394
394
  * @returns The concatenated URL.
395
395
  */
396
- export declare function concatUrls(baseUrl: string, url: string): string;
396
+ export declare function concatUrls(baseUrl: string | URL, path: string): string;
397
397
 
398
398
  export declare function conceptMapTranslate(map: ConceptMap, params: ConceptMapTranslateParameters): ConceptMapTranslateOutput;
399
399
 
@@ -686,6 +686,20 @@ export declare function encodeBase64(data: string): string;
686
686
  */
687
687
  export declare function encryptSHA256(str: string): Promise<ArrayBuffer>;
688
688
 
689
+ /**
690
+ * Ensures the given URL has no leading slash.
691
+ * @param url - The URL to ensure has no leading slash.
692
+ * @returns The URL string with no slash.
693
+ */
694
+ export declare function ensureNoLeadingSlash(url: string): string;
695
+
696
+ /**
697
+ * Ensures the given URL has a trailing slash.
698
+ * @param url - The URL to ensure has a trailing slash.
699
+ * @returns The URL with a trailing slash.
700
+ */
701
+ export declare function ensureTrailingSlash(url: string): string;
702
+
689
703
  export declare class EqualsAtom extends BooleanInfixOperatorAtom {
690
704
  constructor(left: Atom, right: Atom);
691
705
  eval(context: AtomContext, input: TypedValue[]): TypedValue[];
@@ -1513,7 +1527,7 @@ export declare function getTypedPropertyValueWithSchema(typedValue: TypedValue,
1513
1527
 
1514
1528
  export declare function getValueSliceName(value: any, slices: SliceDefinitionWithTypes[], discriminators: SliceDiscriminator[], profileUrl: string | undefined): string | undefined;
1515
1529
 
1516
- export declare function getWebSocketUrl(path: string, baseUrl: URL | string): string;
1530
+ export declare function getWebSocketUrl(baseUrl: URL | string, path: string): string;
1517
1531
 
1518
1532
  /**
1519
1533
  * Global schema singleton.
@@ -5056,6 +5070,16 @@ export declare interface SortRule {
5056
5070
  descending?: boolean;
5057
5071
  }
5058
5072
 
5073
+ /**
5074
+ * Sorts an array of strings in place using the localeCompare method.
5075
+ *
5076
+ * This method will mutate the input array.
5077
+ *
5078
+ * @param array - The array of strings to sort.
5079
+ * @returns The sorted array of strings.
5080
+ */
5081
+ export declare function sortStringArray(array: string[]): string[];
5082
+
5059
5083
  /**
5060
5084
  * Splits a string into an array of strings using the specified delimiter.
5061
5085
  * Unlike the built-in split function, this function will split the string into a maximum of exactly n parts.
@@ -5123,6 +5147,7 @@ export declare interface SubManagerOptions {
5123
5147
  * - `disconnect` - The specified subscription is no longer being monitored by the `SubscriptionManager`.
5124
5148
  * - `error` - An error has occurred.
5125
5149
  * - `message` - A message containing a notification `Bundle` has been received.
5150
+ * - `open` - The WebSocket has been opened.
5126
5151
  * - `close` - The WebSocket has been closed.
5127
5152
  * - `heartbeat` - A `heartbeat` message has been received.
5128
5153
  */
@@ -5163,6 +5188,9 @@ export declare type SubscriptionEventMap = {
5163
5188
  type: 'message';
5164
5189
  payload: Bundle;
5165
5190
  };
5191
+ open: {
5192
+ type: 'open';
5193
+ };
5166
5194
  close: {
5167
5195
  type: 'close';
5168
5196
  };