@medplum/core 5.0.12 → 5.0.13

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.
@@ -181,6 +181,7 @@ export declare interface AgentTransmitRequest extends BaseAgentRequestMessage {
181
181
  remote: string;
182
182
  contentType: string;
183
183
  body: string;
184
+ returnAck?: ReturnAckCategory;
184
185
  }
185
186
 
186
187
  export declare interface AgentTransmitResponse extends BaseAgentMessage {
@@ -2786,6 +2787,17 @@ export declare function isDateString(input: unknown): input is string;
2786
2787
  */
2787
2788
  export declare function isDateTimeString(input: unknown): input is string;
2788
2789
 
2790
+ /**
2791
+ * Helper function to narrow a type by excluding undefined/null values.
2792
+ * @param value - The value to refine
2793
+ * @returns boolean
2794
+ *
2795
+ * Example usage:
2796
+ * const arr: Array<number | undefined> = [1,undefined];
2797
+ * const refined: Array<number> = arr.filter(isDefined);
2798
+ */
2799
+ export declare function isDefined<T>(value: T | undefined | null): value is T;
2800
+
2789
2801
  /**
2790
2802
  * Returns true if the value is empty (null, undefined, empty string, or empty object).
2791
2803
  * @param v - Any value.
@@ -5994,9 +6006,10 @@ export declare class ParserBuilder {
5994
6006
  * @see https://hl7.org/fhir/fhir-xquery.html
5995
6007
  * @param query - The X-Fhir-Query string to parse
5996
6008
  * @param variables - Values to pass into embedded FHIRPath expressions
6009
+ * @param context - The context collection to evaluate over
5997
6010
  * @returns The parsed search request
5998
6011
  */
5999
- export declare function parseXFhirQuery(query: string, variables: Record<string, TypedValue>): SearchRequest;
6012
+ export declare function parseXFhirQuery(query: string, variables: Record<string, TypedValue>, context?: TypedValue[]): SearchRequest;
6000
6013
 
6001
6014
  /**
6002
6015
  * JSONPatch patch operation.
@@ -6178,6 +6191,12 @@ export declare class ParserBuilder {
6178
6191
  * Time to wait before request timeout in milliseconds; defaults to `10000` (10 s)
6179
6192
  */
6180
6193
  waitTimeout?: number;
6194
+ /**
6195
+ * The ACK-level that the agent should wait for when sending HL7 messages.
6196
+ * - `'first'`: Return on the first ACK message received (default)
6197
+ * - `'application'`: Wait for application-level ACK (AA), skipping commit ACKs (CA)
6198
+ */
6199
+ returnAck?: ReturnAckCategory;
6181
6200
  }
6182
6201
 
6183
6202
  export declare type QuantityUnit = Pick<Quantity, 'unit' | 'code' | 'system'>;
@@ -6475,6 +6494,15 @@ export declare class ParserBuilder {
6475
6494
 
6476
6495
  export declare type ResourceWithCode = Resource & Code;
6477
6496
 
6497
+ export declare const ReturnAckCategory: {
6498
+ /** The first ACK message received is the one returned */
6499
+ readonly FIRST: "first";
6500
+ /** Only return upon receiving a positive application-level ACK (AA, AE, or AR), or if a commit-level error occurred */
6501
+ readonly APPLICATION: "application";
6502
+ };
6503
+
6504
+ export declare type ReturnAckCategory = (typeof ReturnAckCategory)[keyof typeof ReturnAckCategory];
6505
+
6478
6506
  export declare const RXNORM = "http://www.nlm.nih.gov/research/umls/rxnorm";
6479
6507
 
6480
6508
  export declare type SamplingInfo = Omit<SampledData, 'data'>;
@@ -181,6 +181,7 @@ export declare interface AgentTransmitRequest extends BaseAgentRequestMessage {
181
181
  remote: string;
182
182
  contentType: string;
183
183
  body: string;
184
+ returnAck?: ReturnAckCategory;
184
185
  }
185
186
 
186
187
  export declare interface AgentTransmitResponse extends BaseAgentMessage {
@@ -2786,6 +2787,17 @@ export declare function isDateString(input: unknown): input is string;
2786
2787
  */
2787
2788
  export declare function isDateTimeString(input: unknown): input is string;
2788
2789
 
2790
+ /**
2791
+ * Helper function to narrow a type by excluding undefined/null values.
2792
+ * @param value - The value to refine
2793
+ * @returns boolean
2794
+ *
2795
+ * Example usage:
2796
+ * const arr: Array<number | undefined> = [1,undefined];
2797
+ * const refined: Array<number> = arr.filter(isDefined);
2798
+ */
2799
+ export declare function isDefined<T>(value: T | undefined | null): value is T;
2800
+
2789
2801
  /**
2790
2802
  * Returns true if the value is empty (null, undefined, empty string, or empty object).
2791
2803
  * @param v - Any value.
@@ -5994,9 +6006,10 @@ export declare class ParserBuilder {
5994
6006
  * @see https://hl7.org/fhir/fhir-xquery.html
5995
6007
  * @param query - The X-Fhir-Query string to parse
5996
6008
  * @param variables - Values to pass into embedded FHIRPath expressions
6009
+ * @param context - The context collection to evaluate over
5997
6010
  * @returns The parsed search request
5998
6011
  */
5999
- export declare function parseXFhirQuery(query: string, variables: Record<string, TypedValue>): SearchRequest;
6012
+ export declare function parseXFhirQuery(query: string, variables: Record<string, TypedValue>, context?: TypedValue[]): SearchRequest;
6000
6013
 
6001
6014
  /**
6002
6015
  * JSONPatch patch operation.
@@ -6178,6 +6191,12 @@ export declare class ParserBuilder {
6178
6191
  * Time to wait before request timeout in milliseconds; defaults to `10000` (10 s)
6179
6192
  */
6180
6193
  waitTimeout?: number;
6194
+ /**
6195
+ * The ACK-level that the agent should wait for when sending HL7 messages.
6196
+ * - `'first'`: Return on the first ACK message received (default)
6197
+ * - `'application'`: Wait for application-level ACK (AA), skipping commit ACKs (CA)
6198
+ */
6199
+ returnAck?: ReturnAckCategory;
6181
6200
  }
6182
6201
 
6183
6202
  export declare type QuantityUnit = Pick<Quantity, 'unit' | 'code' | 'system'>;
@@ -6475,6 +6494,15 @@ export declare class ParserBuilder {
6475
6494
 
6476
6495
  export declare type ResourceWithCode = Resource & Code;
6477
6496
 
6497
+ export declare const ReturnAckCategory: {
6498
+ /** The first ACK message received is the one returned */
6499
+ readonly FIRST: "first";
6500
+ /** Only return upon receiving a positive application-level ACK (AA, AE, or AR), or if a commit-level error occurred */
6501
+ readonly APPLICATION: "application";
6502
+ };
6503
+
6504
+ export declare type ReturnAckCategory = (typeof ReturnAckCategory)[keyof typeof ReturnAckCategory];
6505
+
6478
6506
  export declare const RXNORM = "http://www.nlm.nih.gov/research/umls/rxnorm";
6479
6507
 
6480
6508
  export declare type SamplingInfo = Omit<SampledData, 'data'>;