@medplum/fhir-router 5.2.9 → 5.2.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.
@@ -264,6 +264,8 @@ export declare interface BundlePreprocessInfo {
264
264
  requiresStrongTransaction: boolean;
265
265
  updates: number;
266
266
  resourceTypes: Set<ResourceType>;
267
+ /** True if every entry is a read, search, or history interaction. */
268
+ readOnly: boolean;
267
269
  }
268
270
 
269
271
  export declare function createResourceImpl<T extends Resource>(resourceType: T['resourceType'], resource: T, repo: FhirRepository, options?: CreateResourceOptions): Promise<FhirResponse>;
@@ -392,9 +394,10 @@ export declare abstract class FhirRepository {
392
394
  *
393
395
  * See: https://www.hl7.org/fhir/http.html#search
394
396
  * @param searchRequest - The FHIR search request.
397
+ * @param options - Optional search options.
395
398
  * @returns The search results.
396
399
  */
397
- abstract search<T extends Resource>(searchRequest: SearchRequest<T>): Promise<Bundle<WithId<T>>>;
400
+ abstract search<T extends Resource>(searchRequest: SearchRequest<T>, options?: SearchOptions): Promise<Bundle<WithId<T>>>;
398
401
  /**
399
402
  * Searches for FHIR resources by reference.
400
403
  *
@@ -513,6 +516,7 @@ export declare type FhirRequestConfig = {
513
516
  graphqlBatchedSearchSize?: number;
514
517
  graphqlMaxDepth?: number;
515
518
  graphqlMaxSearches?: number;
519
+ readonlyBatchOnReader?: boolean;
516
520
  searchOnReader?: boolean;
517
521
  transactions?: boolean;
518
522
  };
@@ -719,6 +723,14 @@ export declare type RouteResult<Handler, Metadata> = {
719
723
  data?: Metadata;
720
724
  };
721
725
 
726
+ export declare interface SearchOptions {
727
+ /**
728
+ * When true, only `Bundle.entry` is guaranteed to be populated.
729
+ * Bundle-level metadata such as `link` and `total` may be omitted.
730
+ */
731
+ resourceOnly?: boolean;
732
+ }
733
+
722
734
  export declare interface TransactionOptions {
723
735
  readonly resourceTypes: ResourceTypeInput;
724
736
  readonly serializable?: boolean;
@@ -264,6 +264,8 @@ export declare interface BundlePreprocessInfo {
264
264
  requiresStrongTransaction: boolean;
265
265
  updates: number;
266
266
  resourceTypes: Set<ResourceType>;
267
+ /** True if every entry is a read, search, or history interaction. */
268
+ readOnly: boolean;
267
269
  }
268
270
 
269
271
  export declare function createResourceImpl<T extends Resource>(resourceType: T['resourceType'], resource: T, repo: FhirRepository, options?: CreateResourceOptions): Promise<FhirResponse>;
@@ -392,9 +394,10 @@ export declare abstract class FhirRepository {
392
394
  *
393
395
  * See: https://www.hl7.org/fhir/http.html#search
394
396
  * @param searchRequest - The FHIR search request.
397
+ * @param options - Optional search options.
395
398
  * @returns The search results.
396
399
  */
397
- abstract search<T extends Resource>(searchRequest: SearchRequest<T>): Promise<Bundle<WithId<T>>>;
400
+ abstract search<T extends Resource>(searchRequest: SearchRequest<T>, options?: SearchOptions): Promise<Bundle<WithId<T>>>;
398
401
  /**
399
402
  * Searches for FHIR resources by reference.
400
403
  *
@@ -513,6 +516,7 @@ export declare type FhirRequestConfig = {
513
516
  graphqlBatchedSearchSize?: number;
514
517
  graphqlMaxDepth?: number;
515
518
  graphqlMaxSearches?: number;
519
+ readonlyBatchOnReader?: boolean;
516
520
  searchOnReader?: boolean;
517
521
  transactions?: boolean;
518
522
  };
@@ -719,6 +723,14 @@ export declare type RouteResult<Handler, Metadata> = {
719
723
  data?: Metadata;
720
724
  };
721
725
 
726
+ export declare interface SearchOptions {
727
+ /**
728
+ * When true, only `Bundle.entry` is guaranteed to be populated.
729
+ * Bundle-level metadata such as `link` and `total` may be omitted.
730
+ */
731
+ resourceOnly?: boolean;
732
+ }
733
+
722
734
  export declare interface TransactionOptions {
723
735
  readonly resourceTypes: ResourceTypeInput;
724
736
  readonly serializable?: boolean;