export type UITemplate = | CardFormTemplate | CardDetailTemplate | CardCollectionListTemplateV1 | CardCollectionListTemplateV2 | CardCollectionAgendaTemplate | CardCollectionKanbanTemplateV2 | CardChatPersistentMenuTemplate | CardFragment | TagOptions; export type FieldExpressionOp = '=' | '<' | '>' | '<=' | '>=' | '!=' | 'in' | '!in' | 'includes' | '!includes'; export type FieldExpressionValue = string | number | boolean | (string | number)[] | Token; export type LogicalExpressionOp = 'and' | 'or'; export type LogicalExpressions = (FieldExpression | LogicalExpression)[]; export type Selector = (FieldExpression | LogicalExpression)[]; export type CardBlock = | SequenceNumberBlock | FieldBlock | TagsBlock | CardsBlock | InCardsBlock | ImageBlock | InputBlock | AssigneeInputBlock | DateInputBlock | NumberInputBlock | TagsInputBlock | CardsInputBlock | SubformsInputBlock | TodoInputBlock | RecurrenceInputBlock | ReminderInputBlock | DateRangeInputBlock | FileInputBlock | SeenByBlock | ChatThreadBlock | ChatThreadInputBlock | DateRangeBlock | ButtonBlock | NoCodeComponentBlock; export type Icon = | 'add-reactions' | 'address-book' | 'airplane' | 'app-circles' | 'apple' | 'archive-box' | 'arm-strong' | 'arrow-circle-down' | 'arrow-circle-up' | 'arrow-exit' | 'arrow-full-down' | 'arrow-full-left' | 'arrow-full-right' | 'arrow-full-up' | 'arrow-full-up-filled' | 'arrow-link-out' | 'arrow-link-out-small-2' | 'arrow-link-out-small-3' | 'arrow-move-down' | 'arrow-move-left' | 'arrow-move-right' | 'arrow-move-up' | 'arrow-outline-left' | 'arrow-outline-right' | 'arrow-point-down' | 'arrow-point-down-heavy' | 'arrow-point-left' | 'arrow-point-left-heavy' | 'arrow-point-right' | 'arrow-point-right-heavy' | 'arrow-point-up' | 'arrow-point-up-heavy' | 'arrow-refresh' | 'arrow-repeat' | 'arrow-shuffle' | 'arrows-collapse' | 'arrows-expand' | 'arrows-swap' | 'arrows-up-down' | 'arrows-up-down-heavy' | 'arrows-up-down-in' | 'arrows-up-down-out' | 'at-symbol' | 'avatar' | 'avatar-add-group' | 'avatar-empty' | 'avatar-group' | 'avatar-invite' | 'avatar-location' | 'avatar-multi' | 'avatar-pin' | 'avatar-search' | 'award' | 'bag-shopping' | 'basketball' | 'bed' | 'bell' | 'bell-hotel' | 'bell-muted' | 'bell-snoozed' | 'billboard' | 'board' | 'bold-light' | 'book-open' | 'bookmarks' | 'box-cube' | 'briefcase' | 'building-capitol' | 'building-city' | 'building-hotel' | 'bullhorn' | 'bullhorn-quiet' | 'button-press' | 'cake-birthday' | 'calculator' | 'calendar' | 'calendar-small' | 'camera' | 'car' | 'card' | 'chat' | 'chat-bubbles-square' | 'chat-filled-small' | 'chat-small' | 'chat-urgent' | 'check' | 'check-filled' | 'check-shield' | 'check-small' | 'check-task' | 'check-todo' | 'church-cross' | 'circle' | 'circle-aim' | 'clipboard-list' | 'clock' | 'clock-in' | 'clock-no-padding' | 'clock-out' | 'coast-symbol' | 'coffee' | 'construction-crane' | 'construction-paintbrush' | 'construction-sign' | 'contrast' | 'credit-card' | 'cutlery-fork-knife' | 'delivery-cart' | 'departments' | 'dots' | 'dots-tall' | 'dots-wide' | 'doughnut' | 'dumbbell' | 'duplicate-squares' | 'envelope' | 'event-create' | 'exclamation-filled' | 'exclamation-outline' | 'exit' | 'exit-small' | 'eye-hide' | 'eye-show' | 'face-cat' | 'face-robot' | 'face-sad' | 'face-skull' | 'face-smile' | 'face-smile-filled' | 'face-wink' | 'file' | 'file-resume' | 'file-small' | 'filter-funnel' | 'filter-knobs' | 'fire-flame' | 'flag' | 'flag-wave' | 'flower-daisy' | 'flower-lotus' | 'flower-tulip' | 'gear' | 'gif' | 'glasses-toast' | 'global' | 'grain' | 'graph-analytics' | 'group' | 'hamburger' | 'hand' | 'hand-heart' | 'handshake' | 'hashtag' | 'hat-baseball' | 'hat-chef' | 'hat-crown' | 'hat-graduation' | 'headset' | 'heart' | 'heart-broken' | 'heartbeat' | 'house-line' | 'id-badge' | 'id-symbol' | 'image-filled' | 'image-portrait' | 'image-small' | 'imagestack' | 'info' | 'info-outline' | 'invite' | 'italic' | 'key' | 'layout' | 'leaf' | 'light-bulb' | 'lightning-bolt' | 'link' | 'link-add' | 'list' | 'lock' | 'logo' | 'magic-wand' | 'magnifying-glass' | 'math' | 'medal' | 'meter' | 'microphone' | 'microphone-mute' | 'microphone-off' | 'minus' | 'mobile-add' | 'mobile-chat' | 'money-bag' | 'money-coins' | 'money-dollar-circle' | 'money-receipt' | 'money-refund' | 'moon' | 'multi-line' | 'music-notes' | 'new-group' | 'no_entry' | 'notebook' | 'pacman' | 'palette' | 'paperclip' | 'party-celebrate' | 'pen' | 'pen-filled' | 'pencil' | 'pencil-paper' | 'people' | 'percent' | 'person' | 'person-chef' | 'person-concierge' | 'person-man' | 'person-officer' | 'person-tiny-heavy' | 'person-woman' | 'phone' | 'pie' | 'pin-location' | 'pin-world' | 'plug' | 'plus' | 'plus-circle' | 'plus-circle-filled' | 'plus-small-heavy' | 'potion' | 'present' | 'push-pin' | 'question-mark' | 'radio-button' | 'receipt-long' | 'remove' | 'remove-filled' | 'remove-filled-small' | 'remove-x' | 'repeat' | 'road-sign' | 'scale-justice' | 'screenshare' | 'search-look-up' | 'send-circle' | 'send-filled' | 'send-outline' | 'sign-board' | 'signature-ballpoint-pen' | 'single-select-list' | 'smile' | 'snowman' | 'sparkle' | 'squares-stacked' | 'stack-cards' | 'star' | 'star-outline' | 'star-rate' | 'stethoscope' | 'store-location' | 'store-shop' | 'storefront' | 'storefront-square' | 'sun' | 'sunset' | 'support-gray' | 'swap' | 'swap-small' | 'syringe' | 'tab' | 'tag' | 'tag-shopping' | 'target' | 'task' | 'task-filled' | 'thumb-down' | 'thumb-up' | 'ticket' | 'time-alarm' | 'time-clock' | 'time-hourglass' | 'time-repeat' | 'time-stopwatch' | 'time-urgent' | 'time-watch' | 'title-t' | 'trash' | 'tree-evergreen' | 'trophy' | 'truck-delivery' | 'truck-front' | 'umbrella' | 'underline-light' | 'unfilled-circle' | 'urgent' | 'video-recorder' | 'water-drop' | 'water-faucet' | 'waves' | 'wrench' | 'wrench-tools' | 'zzzs'; export type TextStyle = | 'h1' | 'h2' | 'h3' | 'h4' | 'subtitle' | 'body1' | 'body1inactive' | 'body1bold' | 'body2' | 'body2bold' | 'overline' | 'overlinebold' | 'caption1' | 'caption1bold' | 'caption2' | 'caption2bold'; export type StickyPosition = 'top' | 'bottom'; export type FieldType = | 'text' | 'textarea' | 'noCode' | 'date' | 'time' | 'geolocation' | 'address' | 'relativeTime' | 'datetime' | 'float' | 'percent' | 'currency' | 'image' | 'file' | 'toggle' | 'assignee' | 'recurrence' | 'reminder' | 'todo' | 'tags' | 'channel' | 'cards' | 'subforms' | 'questionTextArea' | 'questionCheckbox' | 'questionSingleSelect' | 'signature'; export type ImageSize = 'full' | 'thumb'; export type DateMode = 'date' | 'time' | 'datetime'; export type NumberMode = 'float' | 'percent' | 'currency'; export type ButtonStyle = 'primary' | 'secondary'; export type ButtonSize = 'normal' | 'small'; export type Action = | ActionExternalURL | ActionNavTemplate | ActionNavContext | ActionSetValues | ActionSubmitForm | ActionToast | ActionSheet; export type FieldValues = FieldValue[]; export type ActionSheetOptionConfirmStyle = 'default' | 'cancel' | 'destructive'; export type ActionSheetOptionActions = ( | ActionExternalURL | ActionNavTemplate | ActionNavContext | ActionSetValues | ActionSubmitForm | ActionToast )[]; export type ActionSheetOptions = ActionSheetOption[]; export type Actions = Action[]; export type ButtonRow = Button[]; export type CardBlocks = CardBlock[]; export type CardTheme = 'stale'; export type CardStatus = 'ACTIVE' | 'PENDING'; export type GroupBy = GroupByCard | GroupByTag | GroupByAssignees; export type FragmentItem = FragmentField; export interface CardFormTemplate { version: 'v1'; slug?: string; default?: boolean; title: string; context: 'create' | 'edit' | 'create-external' | 'nocode-public-create' | 'nocode-public-readonly'; selector?: Selector; submitButtonTitle?: string; cardBlocks: CardBlocks; fieldOverrides?: {}; } export interface FieldExpression { field: string; op: FieldExpressionOp; value: FieldExpressionValue; } export interface LogicalExpression { op?: LogicalExpressionOp; expressions: LogicalExpressions; } export interface SequenceNumberBlock { type: 'sequenceNumber'; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface Theme { backgroundColor?: Color; } export interface FieldBlock { type: 'field'; label?: string; placeholder?: string; fieldType?: FieldType; name: string; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface TagsBlock { type: 'tags'; names: string[]; label?: string; placeholder?: string; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface CardsBlock { type: 'cards'; names: string[]; placeholder?: string; mode?: 'quantity'; label?: string; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface InCardsBlock { type: 'in-cards'; placeholder?: string; mode: 'count'; label?: string; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface ImageBlock { type: 'image'; name: string; size?: ImageSize; selector?: Selector; sticky?: StickyPosition; } export interface InputBlock { type: 'input'; name: string; fieldType?: FieldType; label?: string; placeholder?: string; required?: boolean; autoFocus?: boolean; validation?: InputValidation; defaultValue?: string | number | boolean | (string | number)[]; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface InputValidation { message?: string; regex?: string; min?: number; max?: number; } export interface AssigneeInputBlock { fieldType: 'assignee'; batchTagFieldName?: string; batchLabel?: string; allowBatch?: boolean; type: 'input'; name: string; label?: string; placeholder?: string; required?: boolean; autoFocus?: boolean; validation?: InputValidation; defaultValue?: string | number | boolean | (string | number)[]; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface DateInputBlock { fieldType: DateMode; defaultTime?: string; type: 'input'; name: string; label?: string; placeholder?: string; required?: boolean; autoFocus?: boolean; validation?: InputValidation; defaultValue?: string | number | boolean | (string | number)[]; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface NumberInputBlock { fieldType: NumberMode; type: 'input'; name: string; label?: string; placeholder?: string; required?: boolean; autoFocus?: boolean; validation?: InputValidation; defaultValue?: string | number | boolean | (string | number)[]; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface TagsInputBlock { fieldType: 'tags'; readOnly?: boolean; appearance?: 'button'; type: 'input'; name: string; label?: string; placeholder?: string; required?: boolean; autoFocus?: boolean; validation?: InputValidation; defaultValue?: string | number | boolean | (string | number)[]; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface CardsInputBlock { fieldType: 'cards'; readOnly?: boolean; mode?: 'quantity'; type: 'input'; name: string; label?: string; placeholder?: string; required?: boolean; autoFocus?: boolean; validation?: InputValidation; defaultValue?: string | number | boolean | (string | number)[]; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface SubformsInputBlock { fieldType: 'subforms'; readOnly?: boolean; type: 'input'; name: string; label?: string; placeholder?: string; required?: boolean; autoFocus?: boolean; validation?: InputValidation; defaultValue?: string | number | boolean | (string | number)[]; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface TodoInputBlock { fieldType: 'todo'; mode?: 'creation' | 'completion'; type: 'input'; name: string; label?: string; placeholder?: string; required?: boolean; autoFocus?: boolean; validation?: InputValidation; defaultValue?: string | number | boolean | (string | number)[]; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface RecurrenceInputBlock { fieldType: 'recurrence'; name: 'recurrence'; dateFieldName: string; type: 'input'; label?: string; placeholder?: string; required?: boolean; autoFocus?: boolean; validation?: InputValidation; defaultValue?: string | number | boolean | (string | number)[]; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface ReminderInputBlock { fieldType: 'reminder'; name: 'reminder'; mode?: DateMode; delta?: DateTimeOffset; deltaOptions?: DateTimeOffset[]; dateFieldName: 'startDate' | 'endDate'; recipientFieldName: string; shouldSendSelector?: Selector; type: 'input'; label?: string; placeholder?: string; required?: boolean; autoFocus?: boolean; validation?: InputValidation; defaultValue?: string | number | boolean | (string | number)[]; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface DateTimeOffset { count?: number; unit?: 'week' | 'day' | 'hour' | 'minute' | 'second'; } export interface DateRangeInputBlock { type: 'date-range-input'; mode?: DateMode; delta?: DateTimeOffset; defaultTime?: string; startDateFieldName?: string; startDateFieldLabel?: string; endDateFieldName?: string; endDateFieldLabel?: string; selector?: Selector; sticky?: StickyPosition; } export interface FileInputBlock { fieldType: 'file'; acceptedContentTypes?: string[]; type: 'input'; name: string; label?: string; placeholder?: string; required?: boolean; autoFocus?: boolean; validation?: InputValidation; defaultValue?: string | number | boolean | (string | number)[]; icon?: Icon; textStyle?: TextStyle; theme?: Theme; selector?: Selector; sticky?: StickyPosition; width?: string | number; tableHeader?: string; } export interface SeenByBlock { type: 'seen-by'; selector?: Selector; sticky?: StickyPosition; } export interface ChatThreadBlock { type: 'chat-thread'; selector?: Selector; sticky?: StickyPosition; } export interface ChatThreadInputBlock { type: 'chat-thread-input'; selector?: Selector; sticky?: StickyPosition; } export interface DateRangeBlock { type: 'date-range'; mode?: DateMode; label?: string; startDateFieldName?: string; endDateFieldName?: string; icon?: Icon; textStyle?: TextStyle; selector?: Selector; sticky?: StickyPosition; } export interface ButtonBlock { type: 'button'; buttons: ButtonRow; selector?: Selector; sticky?: StickyPosition; } export interface Button { label?: string; icon?: Icon; style?: ButtonStyle; size?: ButtonSize; actions: Actions; selector?: Selector; } export interface ActionExternalURL { type: 'actionUrl'; url?: string; name?: string; } export interface ActionNavTemplate { type: 'actionNavTemplate'; templateSlug: string; fieldOverrides?: {}; } export interface ActionNavContext { type: 'actionNavContext'; context: 'edit' | 'create' | 'detail' | 'list' | 'agenda' | 'kanban'; fieldOverrides?: {}; } export interface ActionSetValues { type: 'actionSetValues'; values: FieldValues; } export interface FieldValue { name: string; value: any; } export interface ActionSubmitForm { type: 'actionSubmitForm'; } export interface ActionToast { type: 'actionToast'; toastOptions?: ToastOptions; } export interface ToastOptions { message: string; style?: 'confirmation' | 'warning' | 'default'; icon?: Icon; buttons?: ToastButton[]; } export interface ToastButton { label: string; actions?: Actions; } export interface ActionSheet { type: 'actionSheet'; options?: ActionSheetOptions; } export interface ActionSheetOption { label: string; confirmStyle?: ActionSheetOptionConfirmStyle; selector?: Selector; actions: ActionSheetOptionActions; } export interface NoCodeComponentBlock { type: 'no-code'; componentId: string; selector?: Selector; } export interface CardDetailTemplate { version: 'v1'; slug?: string; title?: string; context: 'detail'; selector?: Selector; cardBlocks: CardBlocks; } export interface CardCollectionListTemplateV1 { version: 'v1'; slug?: string; title?: string; context: 'list'; createButton?: CreateButton; emptyState?: EmptyState; taskOptions?: TaskListOptionsV1; sections: ListSection[]; } export interface CreateButton { title?: string; position?: 'top'; } export interface EmptyState { title?: string; message?: string; imageUri?: string; } export interface TaskListOptionsV1 { completedSelector: Selector; onCompleteActions?: Actions; onIncompleteActions?: Actions; } export interface ListSection { selector?: Selector; sortBy?: SortBy; title?: string; collapsible?: boolean; initiallyCollapsed?: boolean; cardBlocks: CardBlocks; emptyState?: EmptyState; quickCreate?: QuickCreate; cardTheme?: CardTheme; } export interface SortBy { field: string; direction?: 'ASC' | 'DESC'; } export interface QuickCreate { label?: string; fieldOverrides?: FieldOverrides; } export interface FieldOverrides {} export interface CardCollectionListTemplateV2 { version: 'v2'; slug?: string; title: string; context: 'list'; statuses?: CardStatus[]; emptyState?: EmptyState; cardBlocks: CardBlocks; sortBy?: SortBy[]; selector?: Selector; groupBy?: GroupBy; quickCreate?: QuickCreate; taskOptions?: TaskListOptionsV2; } export interface GroupByCard { type: 'card'; cardName: string; noCardSection?: NoCardSection; } export interface NoCardSection { enabled: boolean; title?: string; } export interface GroupByTag { type: 'tag'; tagName: string; noTagSection?: NoTagSection; } export interface NoTagSection { enabled: boolean; title?: string; } export interface GroupByAssignees { type: 'assignees'; } export interface TaskListOptionsV2 { tagName: string; completedTagSlug: string; openTagSlug: string; } export interface CardCollectionAgendaTemplate { version: 'v1'; slug?: string; title: string; context: 'agenda'; selector?: Selector; cards: AgendaCard[]; } export interface AgendaCard { selector?: Selector; cardBlocks: CardBlocks; cardTheme?: CardTheme; } export interface CardCollectionKanbanTemplateV2 { version: 'v2'; slug?: string; title: string; context: 'kanban'; statuses?: CardStatus[]; emptyState?: EmptyState; cardBlocks: CardBlocks; quickCreate?: QuickCreate; selector?: Selector; groupBy?: GroupBy; } export interface CardChatPersistentMenuTemplate { version: 'v1'; context: 'persistent-menu'; buttons: ChatInputPersistentMenuButton[]; } export interface ChatInputPersistentMenuButton { title: string; onPressActions: Actions; } export interface CardFragment { version: 'v1'; compose?: FragmentCompose; items: FragmentItem[]; } export interface FragmentCompose { fieldName?: string; blockType?: string; position?: 'prepend' | 'append'; } export interface FragmentField { name: string; type: 'field'; fieldType: FieldType; label: string; icon?: Icon; required?: boolean; placeholder?: string; settings?: FragmentFieldSettings; } export interface FragmentFieldSettings { validation?: { max?: number; }; readOnly?: boolean; options?: TagOption[]; } export interface TagOption { name: string; value: string; label?: string; theme?: Theme; } export interface TagOptions { options?: TagOption[]; } export declare enum Token { ME = '{me}', NULL = '{null}', NOW = '{now}', TODAY = '{today}', } export declare enum Color { tagPink = 'tagPink', tagYellow = 'tagYellow', tagDewGreen = 'tagDewGreen', tagCoastGreen = 'tagCoastGreen', tagCoolBlue = 'tagCoolBlue', tagPurple = 'tagPurple', tagGray = 'tagGray', }