UNPKG

dataverse-react

Version:

⚛️ hooks and components for Dataverse React development

87 lines (86 loc) 2.95 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: { UserLocalizedLabel: { Label: string; }; LocalizedLabel: { Label: string; }; }; 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: { UserLocalizedLabel: { Label: string; }; LocalizedLabel: { Label: string; }; }; }; FalseOption: { Value: number; Color: string; Label: { UserLocalizedLabel: { Label: string; }; LocalizedLabel: { Label: string; }; }; }; }; } export interface ChoiceColumnMetadata extends ColumnMetadata { DefaultFormValue: boolean; OptionSet: { MetadataId: string; Name: string; DefaultFormValue: number; Options: { Value: number; Color: string; Label: { UserLocalizedLabel: { Label: string; }; LocalizedLabel: { Label: string; }; }; }[]; }; } export declare const useTableMetadata: (utils: ComponentFramework.Utility, tableName?: string) => TableMetadata | undefined;