import type { IDynamicDataPropertyMetadata } from './IDynamicDataPropertyDefinition'; /** * Describes the value and the structure of a property value. * It contains sample value of the property and the metadata * describing the structure of that value. * @public */ export interface IDynamicDataAnnotatedPropertyValue { /** * Sample value of a property */ sampleValue: any; /** * Metadata describing the sample value of the property. */ metadata?: IDynamicDataPropertyValueMetadataCollection; } /** * A collection of key value pairs, where * 'key' is one of the keys from the property value object and * 'value' is the metadata describing the 'key' and its value. * * @remarks * Important note: * * 1. Key in the metadata should match the key in the sample value object. * * 2. For arrays, metadataCollection would be same as describing the element * of the array, only once. See below example for more details. * * For example: * * ``` * case 1: With simple values * Sample Property Id value - { * firstName: 'Bob', * lastName: 'Smith', * age: 30 * } * * MetadataCollection for the above object would be - * metadataCollection: { * 'firstName': { title: 'First Name' }, * 'lastName': { title: 'Last Name' }, * 'age': { title: 'Age' } * } * * Case 2: With complex values * Sample Property Id value - { * person: { * firstName: 'Bob', * lastName: 'Smith', * age: 30 * }, * visitedLocations: [ * { * city: 'Redmond', * state: 'WA' * }, * { * city: 'New York City', * state: 'NY' * } * ] * } * * MetadataCollection for the above object would be - * metadataCollection: { * 'person': { * title: 'Person', * metadataCollection: { * 'firstName': { title: 'First Name' }, * 'lastName': { title: 'Last Name' }, * 'age': { title: 'Age' } * } * }, * 'vistedLocations': { * title: 'Visted Locations', * metadataCollection: { * 'city': { title: 'City' }, * 'state': { title: 'State' } * } * } * } * ``` * * @public */ export interface IDynamicDataPropertyValueMetadataCollection { /** * Key-Value pair where * 'key' is one of the keys from the property value object and * 'value' is the metadata describing the 'key' and its value. */ [key: string]: IDynamicDataPropertyValueMetadata; } /** * Metadata describing the sample value of the property. * @public */ export interface IDynamicDataPropertyValueMetadata extends IDynamicDataPropertyMetadata { /** * Metadata describing the sample value of the property. */ metadata?: IDynamicDataPropertyValueMetadataCollection; } //# sourceMappingURL=IDynamicDataAnnotatedPropertyValue.d.ts.map