UNPKG

strapi-plugin-generic-custom-fields

Version:
109 lines (108 loc) 7.8 kB
import type { Context } from 'koa'; import type { Core } from '@strapi/strapi'; import { type Config, type ItemsResponse, type ItemResponse } from '../config'; declare const controller: ({ strapi }: { strapi: Core.Strapi; }) => { getConfigCustomFields(): { name: string; fetchItems: (args_0: { query?: string | undefined; }, ...args_1: unknown[]) => { items: { value: string; label: string; icon?: { src: string; colorMask?: boolean | undefined; } | undefined; }[]; } | Promise<{ items: { value: string; label: string; icon?: { src: string; colorMask?: boolean | undefined; } | undefined; }[]; }>; fetchItem: (args_0: { value: string; }, ...args_1: unknown[]) => { value: string; label: string; icon?: { src: string; colorMask?: boolean | undefined; } | undefined; } | Promise<{ value: string; label: string; icon?: { src: string; colorMask?: boolean | undefined; } | undefined; }>; icon?: "Alien" | "Archive" | "ArrowClockwise" | "ArrowDown" | "ArrowLeft" | "ArrowLineLeft" | "ArrowLineRight" | "ArrowRight" | "ArrowUp" | "ArrowsCounterClockwise" | "ArrowsOut" | "Bell" | "Bold" | "Book" | "Briefcase" | "BulletList" | "Calendar" | "Car" | "CaretDown" | "CaretUp" | "Cast" | "CastleTurret" | "ChartBubble" | "ChartCircle" | "ChartPie" | "Check" | "CheckCircle" | "CheckCircleEmpty" | "ChevronDown" | "ChevronLeft" | "ChevronRight" | "ChevronUp" | "Clock" | "ClockCounterClockwise" | "Cloud" | "CloudUpload" | "Code" | "CodeBlock" | "Coffee" | "Cog" | "Collapse" | "Command" | "Crop" | "Cross" | "CrossCircle" | "Crown" | "Cursor" | "Database" | "Discuss" | "Download" | "Drag" | "Duplicate" | "Earth" | "EarthStriked" | "EmotionHappy" | "EmotionUnhappy" | "Expand" | "ExternalLink" | "Eye" | "EyeStriked" | "Faders" | "Feather" | "File" | "FileCsv" | "FileError" | "FilePdf" | "FileXls" | "FileZip" | "Filter" | "Folder" | "Gift" | "Globe" | "GraphQl" | "GridFour" | "GridNine" | "HandHeart" | "Hashtag" | "HeadingFive" | "HeadingFour" | "HeadingOne" | "HeadingSix" | "HeadingThree" | "HeadingTwo" | "Headphones" | "Heart" | "House" | "Image" | "Images" | "IndentDecrease" | "IndentIncrease" | "Information" | "Italic" | "Key" | "Layout" | "Lightbulb" | "Lightning" | "Link" | "List" | "ListPlus" | "ListSearch" | "Loader" | "Lock" | "Magic" | "Mail" | "ManyToMany" | "ManyToOne" | "ManyWays" | "Message" | "Microphone" | "Minus" | "MinusCircle" | "Monitor" | "Moon" | "More" | "Move" | "MusicNotes" | "NumberList" | "OneToMany" | "OneToOne" | "OneWay" | "PaintBrush" | "PaintRoller" | "Palette" | "PaperPlane" | "Paperclip" | "Paragraph" | "Pencil" | "Phone" | "Pin" | "PinMap" | "Plane" | "Plant" | "Play" | "Plus" | "PlusCircle" | "PresentationChart" | "PriceTag" | "PuzzlePiece" | "Question" | "Quotes" | "Restaurant" | "Rocket" | "Scissors" | "SealCheck" | "Search" | "Server" | "Shield" | "Shirt" | "ShoppingCart" | "SignOut" | "SlidersHorizontal" | "Sparkle" | "SquaresFour" | "Stack" | "Star" | "Stethoscope" | "Stop" | "Store" | "StrikeThrough" | "Sun" | "Television" | "ThumbDown" | "ThumbUp" | "Train" | "Trash" | "Typhoon" | "Underline" | "Upload" | "User" | "VolumeMute" | "VolumeUp" | "Walk" | "WarningCircle" | "Wheelchair" | undefined; description?: string | undefined; inputSize?: { default: 4 | 6 | 8 | 12; isResizable: boolean; } | undefined; searchable?: boolean | undefined; }[]; getCustomFieldUID(name: string): string; configCustomFields(): { name: string; fetchItems: (args_0: { query?: string | undefined; }, ...args_1: unknown[]) => { items: { value: string; label: string; icon?: { src: string; colorMask?: boolean | undefined; } | undefined; }[]; } | Promise<{ items: { value: string; label: string; icon?: { src: string; colorMask?: boolean | undefined; } | undefined; }[]; }>; fetchItem: (args_0: { value: string; }, ...args_1: unknown[]) => { value: string; label: string; icon?: { src: string; colorMask?: boolean | undefined; } | undefined; } | Promise<{ value: string; label: string; icon?: { src: string; colorMask?: boolean | undefined; } | undefined; }>; icon?: "Alien" | "Archive" | "ArrowClockwise" | "ArrowDown" | "ArrowLeft" | "ArrowLineLeft" | "ArrowLineRight" | "ArrowRight" | "ArrowUp" | "ArrowsCounterClockwise" | "ArrowsOut" | "Bell" | "Bold" | "Book" | "Briefcase" | "BulletList" | "Calendar" | "Car" | "CaretDown" | "CaretUp" | "Cast" | "CastleTurret" | "ChartBubble" | "ChartCircle" | "ChartPie" | "Check" | "CheckCircle" | "CheckCircleEmpty" | "ChevronDown" | "ChevronLeft" | "ChevronRight" | "ChevronUp" | "Clock" | "ClockCounterClockwise" | "Cloud" | "CloudUpload" | "Code" | "CodeBlock" | "Coffee" | "Cog" | "Collapse" | "Command" | "Crop" | "Cross" | "CrossCircle" | "Crown" | "Cursor" | "Database" | "Discuss" | "Download" | "Drag" | "Duplicate" | "Earth" | "EarthStriked" | "EmotionHappy" | "EmotionUnhappy" | "Expand" | "ExternalLink" | "Eye" | "EyeStriked" | "Faders" | "Feather" | "File" | "FileCsv" | "FileError" | "FilePdf" | "FileXls" | "FileZip" | "Filter" | "Folder" | "Gift" | "Globe" | "GraphQl" | "GridFour" | "GridNine" | "HandHeart" | "Hashtag" | "HeadingFive" | "HeadingFour" | "HeadingOne" | "HeadingSix" | "HeadingThree" | "HeadingTwo" | "Headphones" | "Heart" | "House" | "Image" | "Images" | "IndentDecrease" | "IndentIncrease" | "Information" | "Italic" | "Key" | "Layout" | "Lightbulb" | "Lightning" | "Link" | "List" | "ListPlus" | "ListSearch" | "Loader" | "Lock" | "Magic" | "Mail" | "ManyToMany" | "ManyToOne" | "ManyWays" | "Message" | "Microphone" | "Minus" | "MinusCircle" | "Monitor" | "Moon" | "More" | "Move" | "MusicNotes" | "NumberList" | "OneToMany" | "OneToOne" | "OneWay" | "PaintBrush" | "PaintRoller" | "Palette" | "PaperPlane" | "Paperclip" | "Paragraph" | "Pencil" | "Phone" | "Pin" | "PinMap" | "Plane" | "Plant" | "Play" | "Plus" | "PlusCircle" | "PresentationChart" | "PriceTag" | "PuzzlePiece" | "Question" | "Quotes" | "Restaurant" | "Rocket" | "Scissors" | "SealCheck" | "Search" | "Server" | "Shield" | "Shirt" | "ShoppingCart" | "SignOut" | "SlidersHorizontal" | "Sparkle" | "SquaresFour" | "Stack" | "Star" | "Stethoscope" | "Stop" | "Store" | "StrikeThrough" | "Sun" | "Television" | "ThumbDown" | "ThumbUp" | "Train" | "Trash" | "Typhoon" | "Underline" | "Upload" | "User" | "VolumeMute" | "VolumeUp" | "Walk" | "WarningCircle" | "Wheelchair" | undefined; description?: string | undefined; inputSize?: { default: 4 | 6 | 8 | 12; isResizable: boolean; } | undefined; searchable?: boolean | undefined; }[]; configCustomField(ctx: Context): Config['customFields'][number]; customFieldItems(ctx: Context): Promise<ItemsResponse>; customFieldItem(ctx: Context): Promise<ItemResponse>; }; export default controller;