@medplum/fhir-router 5.2.7 → 5.2.9

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.
@@ -51,6 +51,10 @@ export declare interface BatchInitialState {
51
51
  bundle: Bundle;
52
52
  bundleInfo: BundlePreprocessInfo;
53
53
  resolvedIdentities: Record<string, string>;
54
+ /**
55
+ * The resource IDs assigned during preprocessing, keyed by their entry index in the original bundle.
56
+ */
57
+ assignedIds: Record<number, string>;
54
58
  /**
55
59
  * Result entries produced during preprocessing itself (i.e. error responses for malformed
56
60
  * entries in a non-transaction bundle), keyed by their index in the original bundle. These
@@ -81,6 +85,7 @@ export declare class BatchProcessor {
81
85
  private readonly bundle;
82
86
  private readonly req;
83
87
  private resolvedIdentities;
88
+ private assignedIds;
84
89
  private bundleInfo;
85
90
  /** The state mutated through processing (and preprocessing) */
86
91
  private state;
@@ -194,6 +199,7 @@ export declare class BatchProcessor {
194
199
  private resolveIdentity;
195
200
  private getRouteForEntry;
196
201
  private resolveCreateIdentity;
202
+ private assignId;
197
203
  private resolveModificationIdentity;
198
204
  /**
199
205
  * Processes the next entry in the bundle ordering (the entry at the current progress marker),
@@ -222,6 +228,7 @@ export declare class BatchProcessor {
222
228
  /**
223
229
  * Processes a single entry from a FHIR batch request.
224
230
  * @param entry - The bundle entry.
231
+ * @param entryIndex - The index of the entry in the original bundle.
225
232
  * @returns The bundle entry response.
226
233
  */
227
234
  private processBatchEntry;
@@ -502,6 +509,7 @@ export declare type FhirRequest = {
502
509
  };
503
510
 
504
511
  export declare type FhirRequestConfig = {
512
+ chainedSearchOnReader?: boolean;
505
513
  graphqlBatchedSearchSize?: number;
506
514
  graphqlMaxDepth?: number;
507
515
  graphqlMaxSearches?: number;
@@ -526,6 +534,8 @@ export declare type FhirRouteMetadata = {
526
534
 
527
535
  export declare type FhirRouteOptions = {
528
536
  batch?: boolean;
537
+ /** True if the ID in the request body was generated by the server, and should be used when creating the resource */
538
+ assignedId?: boolean;
529
539
  };
530
540
 
531
541
  export declare class FhirRouter extends EventTarget_2 {
@@ -51,6 +51,10 @@ export declare interface BatchInitialState {
51
51
  bundle: Bundle;
52
52
  bundleInfo: BundlePreprocessInfo;
53
53
  resolvedIdentities: Record<string, string>;
54
+ /**
55
+ * The resource IDs assigned during preprocessing, keyed by their entry index in the original bundle.
56
+ */
57
+ assignedIds: Record<number, string>;
54
58
  /**
55
59
  * Result entries produced during preprocessing itself (i.e. error responses for malformed
56
60
  * entries in a non-transaction bundle), keyed by their index in the original bundle. These
@@ -81,6 +85,7 @@ export declare class BatchProcessor {
81
85
  private readonly bundle;
82
86
  private readonly req;
83
87
  private resolvedIdentities;
88
+ private assignedIds;
84
89
  private bundleInfo;
85
90
  /** The state mutated through processing (and preprocessing) */
86
91
  private state;
@@ -194,6 +199,7 @@ export declare class BatchProcessor {
194
199
  private resolveIdentity;
195
200
  private getRouteForEntry;
196
201
  private resolveCreateIdentity;
202
+ private assignId;
197
203
  private resolveModificationIdentity;
198
204
  /**
199
205
  * Processes the next entry in the bundle ordering (the entry at the current progress marker),
@@ -222,6 +228,7 @@ export declare class BatchProcessor {
222
228
  /**
223
229
  * Processes a single entry from a FHIR batch request.
224
230
  * @param entry - The bundle entry.
231
+ * @param entryIndex - The index of the entry in the original bundle.
225
232
  * @returns The bundle entry response.
226
233
  */
227
234
  private processBatchEntry;
@@ -502,6 +509,7 @@ export declare type FhirRequest = {
502
509
  };
503
510
 
504
511
  export declare type FhirRequestConfig = {
512
+ chainedSearchOnReader?: boolean;
505
513
  graphqlBatchedSearchSize?: number;
506
514
  graphqlMaxDepth?: number;
507
515
  graphqlMaxSearches?: number;
@@ -526,6 +534,8 @@ export declare type FhirRouteMetadata = {
526
534
 
527
535
  export declare type FhirRouteOptions = {
528
536
  batch?: boolean;
537
+ /** True if the ID in the request body was generated by the server, and should be used when creating the resource */
538
+ assignedId?: boolean;
529
539
  };
530
540
 
531
541
  export declare class FhirRouter extends EventTarget_2 {