@medplum/fhir-router 5.2.3 → 5.2.5

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.
@@ -265,6 +265,10 @@ export declare type CreateResourceOptions = {
265
265
  assignedId?: boolean;
266
266
  };
267
267
 
268
+ export declare type DeleteResourceOptions = {
269
+ ifMatch?: string;
270
+ };
271
+
268
272
  export declare interface FhirOptions {
269
273
  introspectionEnabled?: boolean;
270
274
  }
@@ -363,8 +367,9 @@ export declare abstract class FhirRepository {
363
367
  * See: https://www.hl7.org/fhir/http.html#delete
364
368
  * @param resourceType - The FHIR resource type.
365
369
  * @param id - The FHIR resource ID.
370
+ * @param options - Optional delete options.
366
371
  */
367
- abstract deleteResource(resourceType: string, id: string): Promise<void>;
372
+ abstract deleteResource(resourceType: string, id: string, options?: DeleteResourceOptions): Promise<void>;
368
373
  /**
369
374
  * Patches a FHIR resource.
370
375
  *
@@ -642,7 +647,7 @@ export declare class MemoryRepository extends FhirRepository {
642
647
  outcome: OperationOutcome;
643
648
  }>;
644
649
  searchByReference<T extends Resource>(searchRequest: SearchRequest<T>, referenceField: string, references: string[]): Promise<Record<string, WithId<T>[]>>;
645
- deleteResource(resourceType: string, id: string): Promise<void>;
650
+ deleteResource(resourceType: string, id: string, options?: DeleteResourceOptions): Promise<void>;
646
651
  expungeResource(resourceType: string, id: string): Promise<void>;
647
652
  expungeResources(resourceType: string, ids: string[]): Promise<void>;
648
653
  withTransaction<TResult>(callback: (repo: this) => Promise<TResult>): Promise<TResult>;
@@ -265,6 +265,10 @@ export declare type CreateResourceOptions = {
265
265
  assignedId?: boolean;
266
266
  };
267
267
 
268
+ export declare type DeleteResourceOptions = {
269
+ ifMatch?: string;
270
+ };
271
+
268
272
  export declare interface FhirOptions {
269
273
  introspectionEnabled?: boolean;
270
274
  }
@@ -363,8 +367,9 @@ export declare abstract class FhirRepository {
363
367
  * See: https://www.hl7.org/fhir/http.html#delete
364
368
  * @param resourceType - The FHIR resource type.
365
369
  * @param id - The FHIR resource ID.
370
+ * @param options - Optional delete options.
366
371
  */
367
- abstract deleteResource(resourceType: string, id: string): Promise<void>;
372
+ abstract deleteResource(resourceType: string, id: string, options?: DeleteResourceOptions): Promise<void>;
368
373
  /**
369
374
  * Patches a FHIR resource.
370
375
  *
@@ -642,7 +647,7 @@ export declare class MemoryRepository extends FhirRepository {
642
647
  outcome: OperationOutcome;
643
648
  }>;
644
649
  searchByReference<T extends Resource>(searchRequest: SearchRequest<T>, referenceField: string, references: string[]): Promise<Record<string, WithId<T>[]>>;
645
- deleteResource(resourceType: string, id: string): Promise<void>;
650
+ deleteResource(resourceType: string, id: string, options?: DeleteResourceOptions): Promise<void>;
646
651
  expungeResource(resourceType: string, id: string): Promise<void>;
647
652
  expungeResources(resourceType: string, ids: string[]): Promise<void>;
648
653
  withTransaction<TResult>(callback: (repo: this) => Promise<TResult>): Promise<TResult>;