@medplum/core 3.0.12 → 3.1.0

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.
@@ -1393,8 +1393,14 @@ export declare function getIdentifier(resource: Resource, system: string): strin
1393
1393
  */
1394
1394
  export declare function getImageSrc(resource: Resource): string | undefined;
1395
1395
 
1396
- export declare function getNestedProperty(value: TypedValue, key: string, options?: {
1396
+ export declare function getNestedProperty(value: TypedValueWithPath | undefined, key: string, options: {
1397
1397
  profileUrl?: string;
1398
+ withPath: true;
1399
+ }): (TypedValueWithPath | TypedValueWithPath[])[];
1400
+
1401
+ export declare function getNestedProperty(value: TypedValue | undefined, key: string, options?: {
1402
+ profileUrl?: string;
1403
+ withPath?: false;
1398
1404
  }): (TypedValue | TypedValue[] | undefined)[];
1399
1405
 
1400
1406
  /**
@@ -4892,11 +4898,11 @@ export declare type ResourceArray<T extends Resource = Resource> = T[] & {
4892
4898
  };
4893
4899
 
4894
4900
  export declare interface ResourceVisitor {
4895
- onEnterObject?: (path: string, value: TypedValue, schema: InternalTypeSchema) => void;
4896
- onExitObject?: (path: string, value: TypedValue, schema: InternalTypeSchema) => void;
4897
- onEnterResource?: (path: string, value: TypedValue, schema: InternalTypeSchema) => void;
4898
- onExitResource?: (path: string, value: TypedValue, schema: InternalTypeSchema) => void;
4899
- visitProperty?: (parent: TypedValue, key: string, path: string, propertyValues: (TypedValue | TypedValue[] | undefined)[], schema: InternalTypeSchema) => void;
4901
+ onEnterObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
4902
+ onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
4903
+ onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
4904
+ onExitResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
4905
+ visitProperty?: (parent: TypedValueWithPath, key: string, path: string, propertyValues: (TypedValueWithPath | TypedValueWithPath[])[], schema: InternalTypeSchema) => void;
4900
4906
  }
4901
4907
 
4902
4908
  export declare type ResourceWithCode = Resource & Code;
@@ -5319,6 +5325,10 @@ export declare interface TypedValue {
5319
5325
  readonly value: any;
5320
5326
  }
5321
5327
 
5328
+ export declare type TypedValueWithPath = TypedValue & {
5329
+ path: string;
5330
+ };
5331
+
5322
5332
  /**
5323
5333
  * An indexed TypeSchema.
5324
5334
  *
@@ -1393,8 +1393,14 @@ export declare function getIdentifier(resource: Resource, system: string): strin
1393
1393
  */
1394
1394
  export declare function getImageSrc(resource: Resource): string | undefined;
1395
1395
 
1396
- export declare function getNestedProperty(value: TypedValue, key: string, options?: {
1396
+ export declare function getNestedProperty(value: TypedValueWithPath | undefined, key: string, options: {
1397
1397
  profileUrl?: string;
1398
+ withPath: true;
1399
+ }): (TypedValueWithPath | TypedValueWithPath[])[];
1400
+
1401
+ export declare function getNestedProperty(value: TypedValue | undefined, key: string, options?: {
1402
+ profileUrl?: string;
1403
+ withPath?: false;
1398
1404
  }): (TypedValue | TypedValue[] | undefined)[];
1399
1405
 
1400
1406
  /**
@@ -4892,11 +4898,11 @@ export declare type ResourceArray<T extends Resource = Resource> = T[] & {
4892
4898
  };
4893
4899
 
4894
4900
  export declare interface ResourceVisitor {
4895
- onEnterObject?: (path: string, value: TypedValue, schema: InternalTypeSchema) => void;
4896
- onExitObject?: (path: string, value: TypedValue, schema: InternalTypeSchema) => void;
4897
- onEnterResource?: (path: string, value: TypedValue, schema: InternalTypeSchema) => void;
4898
- onExitResource?: (path: string, value: TypedValue, schema: InternalTypeSchema) => void;
4899
- visitProperty?: (parent: TypedValue, key: string, path: string, propertyValues: (TypedValue | TypedValue[] | undefined)[], schema: InternalTypeSchema) => void;
4901
+ onEnterObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
4902
+ onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
4903
+ onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
4904
+ onExitResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
4905
+ visitProperty?: (parent: TypedValueWithPath, key: string, path: string, propertyValues: (TypedValueWithPath | TypedValueWithPath[])[], schema: InternalTypeSchema) => void;
4900
4906
  }
4901
4907
 
4902
4908
  export declare type ResourceWithCode = Resource & Code;
@@ -5319,6 +5325,10 @@ export declare interface TypedValue {
5319
5325
  readonly value: any;
5320
5326
  }
5321
5327
 
5328
+ export declare type TypedValueWithPath = TypedValue & {
5329
+ path: string;
5330
+ };
5331
+
5322
5332
  /**
5323
5333
  * An indexed TypeSchema.
5324
5334
  *