UNPKG

dataverse-react

Version:

⚛️ hooks and components for Dataverse React development

69 lines (68 loc) 2.42 kB
export interface TableMetadata { table: ComponentFramework.PropertyHelper.EntityMetadata; columns: ColumnMetadata[]; choices: ChoiceColumnMetadata[]; booleans: BooleanColumnMetadata[]; states: ChoiceColumnMetadata[]; statuses: ChoiceColumnMetadata[]; } export interface ColumnMetadata { Targets?: string[]; AttributeType: 'Boolean' | 'Customer' | 'DateTime' | 'Decimal' | 'Double' | 'Integer' | 'Lookup' | 'Memo' | 'Money' | 'Owner' | 'PartyList' | 'Picklist' | 'State' | 'Status' | 'String' | 'Uniqueidentifier' | 'CalendarRules' | 'Virtual' | 'BigInt' | 'ManagedProperty' | 'EntityName'; AttributeTypeName: { Value: 'BigIntType' | 'BooleanType' | 'CalendarRulesType' | 'CustomerType' | 'CustomType' | 'DateTimeType' | 'DecimalType' | 'DoubleType' | 'EntityNameType' | 'FileType' | 'ImageType' | 'IntegerType' | 'LookupType' | 'ManagedPropertyType' | 'MemoType' | 'MoneyType' | 'MultiSelectPicklistType' | 'OwnerType' | 'PartyListType' | 'PicklistType' | 'StateType' | 'StatusType' | 'StringType' | 'UniqueidentifierType' | 'VirtualType'; }; DisplayName: Label; EntityLogicalName: string; LogicalName: string; MaxValue?: number; MinValue?: number; MaxLength?: number; IsValidForUpdate: boolean; IsValidForCreate: boolean; IsPrimaryId: boolean; IsCustomAttribute: boolean; SchemaName: string; Precision?: number; } export interface BooleanColumnMetadata extends ColumnMetadata { DefaultValue: boolean; OptionSet: { MetadataId: string; Name: string; TrueOption: { Value: number; Color: string; Label: Label; }; FalseOption: { Value: number; Color: string; Label: Label; }; }; } export interface ChoiceColumnMetadata extends ColumnMetadata { DefaultFormValue: boolean; OptionSet: { MetadataId: string; Name: string; DefaultFormValue: number; Options: OptionMetadata[]; }; } export interface OptionMetadata { Value: number; Color: string; State?: number; Label: Label; } export interface Label { UserLocalizedLabel: { Label: string; }; LocalizedLabel: { Label: string; }; } export declare const useTableMetadata: (utils: ComponentFramework.Utility, tableName?: string) => TableMetadata | undefined;