/** * Represents a SharePoint site column definition for provisioning. */ export interface ISiteColumn { /** Internal name of the field (no spaces, unique identifier) */ internalName: string; /** Display name of the field */ displayName: string; /** Field type */ type: SiteColumnType; /** Optional description */ description?: string; /** Group name for organizing the field */ group?: string; /** Whether the field is required */ required?: boolean; /** Whether the field should be hidden */ hidden?: boolean; /** Whether the field is read-only */ readOnly?: boolean; /** Whether to enforce unique values */ enforceUniqueValues?: boolean; /** Whether the field is indexed */ indexed?: boolean; /** Default value for the field */ defaultValue?: string; /** Field-type specific settings */ settings?: ISiteColumnSettings; } /** * Supported SharePoint field types */ export declare type SiteColumnType = "Text" | "Note" | "Choice" | "MultiChoice" | "Number" | "Currency" | "DateTime" | "Lookup" | "Boolean" | "User" | "UserMulti" | "URL" | "Calculated" | "Taxonomy" | "TaxonomyMulti" | "Image"; /** * Type-specific settings for site columns */ export interface ISiteColumnSettings { /** Maximum length for text fields (default 255) */ maxLength?: number; /** Number of lines for note fields */ numberOfLines?: number; /** Whether to allow rich text */ richText?: boolean; /** Rich text mode: Compatible, FullHtml, or ThemeHtml */ richTextMode?: "Compatible" | "FullHtml" | "ThemeHtml"; /** Whether to append changes to existing text */ appendOnly?: boolean; /** Available choices */ choices?: string[]; /** How to display choices: Dropdown, RadioButtons, or Checkboxes */ editFormat?: "Dropdown" | "RadioButtons" | "Checkboxes"; /** Whether to allow fill-in choices */ fillInChoice?: boolean; /** Minimum value */ minValue?: number; /** Maximum value */ maxValue?: number; /** Number of decimal places */ decimalPlaces?: number; /** Display format: Automatic, NoDecimal, OneDecimal, TwoDecimals, etc. */ displayFormat?: "Automatic" | "NoDecimal" | "OneDecimal" | "TwoDecimals" | "ThreeDecimals" | "FourDecimals" | "FiveDecimals"; /** Whether to show as percentage */ showAsPercentage?: boolean; /** Currency locale (e.g., 1033 for USD) */ currencyLocaleId?: number; /** Date format: DateOnly or DateTime */ dateFormat?: "DateOnly" | "DateTime"; /** Whether to use friendly display format */ friendlyDisplayFormat?: "Disabled" | "Relative" | "Unspecified"; /** List ID or name to look up */ lookupList?: string; /** Field to show from the lookup list */ lookupField?: string; /** Web ID for cross-site lookups */ lookupWebId?: string; /** Whether to allow multiple values */ allowMultipleValues?: boolean; /** Additional fields to project from lookup */ projectedFields?: string[]; /** Selection mode: PeopleOnly or PeopleAndGroups */ userSelectionMode?: "PeopleOnly" | "PeopleAndGroups"; /** Selection scope (SharePoint group ID to restrict selection) */ userSelectionScope?: number; /** Whether to allow multiple users */ allowMultipleUsers?: boolean; /** User field to show: ID, Title, Email, etc. */ showField?: string; /** URL format: Hyperlink or Image */ urlFormat?: "Hyperlink" | "Image"; /** Formula for calculated fields */ formula?: string; /** Output type for calculated fields */ outputType?: "Text" | "Number" | "Currency" | "DateTime" | "Boolean"; /** Fields referenced in the formula */ fieldRefs?: string[]; /** Term store ID */ termStoreId?: string; /** Term set ID */ termSetId?: string; /** Anchor term ID (to use a subset of terms) */ anchorTermId?: string; /** Whether to allow fill-in terms */ allowFillIn?: boolean; /** Whether to create values in term store */ createValuesInEditForm?: boolean; /** Whether to allow multiple terms */ allowMultipleTerms?: boolean; } /** * Result of a site column provisioning operation */ export interface ISiteColumnProvisioningResult { /** Internal name of the field */ internalName: string; /** Whether the operation was successful */ success: boolean; /** Whether the field was created or updated */ action: "created" | "updated" | "skipped" | "failed"; /** Error message if failed */ error?: string; /** The field ID if successful */ fieldId?: string; }