import { BundleType } from './schema-types'; import { CompletionItem } from 'vscode-languageserver-types'; import { ProfileId, SdkPredefinedProfile, SdkVariable, SdkValueVariable, SdkDictionaryVariable, SdkVariableType } from './profile-types'; /** * Represents an api category and its items */ interface SdkCategory { /** * The unique ID for the category */ id: string; /** * The title for the category */ title: string; /** * The collection of api items for the category */ items: SdkItem[]; } interface SdkItemBase { /** * The name of the function or constant. */ name: string; /** * The version string when the api item was introduced. If undefined then it was from the origin. */ sinceVersion?: string; /** * The api bundle this item belongs to. */ bundle: BundleType; /** * Markdown description of the item. */ description: string; /** * Markdown containing examples. */ examples: string; /** * Link for additional information about the item. */ link?: string; /** * Completion item directly leveraged by the editor. */ completion: CompletionItem; /** * Indicates if the documentation for this item should be disabled. */ disableDocumentation?: boolean; } /** * Represents a constant in the arcade api. */ interface SdkConstant extends SdkItemBase { type: "constant"; } /** * Represents a function in the arcade api */ interface SdkFunction extends SdkItemBase { type: "function"; /** * Information leveraged by the editor to validate function call. * Indicates the minimum number of expected parameters and the maximum number of parameters expected. */ parametersInfo: { min: number; max: number; }; } /** * Represents an item in the arcade api. */ type SdkItem = SdkConstant | SdkFunction | SdkFunction[]; export type { CompletionItem, ProfileId, BundleType, SdkPredefinedProfile, SdkVariable, SdkValueVariable, SdkDictionaryVariable, SdkVariableType, SdkCategory, SdkItem, SdkItemBase, SdkConstant, SdkFunction, };