import type { PropType } from 'vue'; import type { AxiosError } from 'axios'; import type { KonnectBaseEntityConfig, KongManagerBaseEntityConfig, ConfigurationSchema, PluginConfigurationSchema, RecordItem, SupportedEntityType, PolicyConfigurationSchema } from '../../types'; import { type CodeFormat, type Format } from './ConfigCardDisplay.vue'; import type { HeaderTag } from '@kong/kongponents'; declare var __VLS_9: {}, __VLS_12: {}, __VLS_58: string, __VLS_59: { row: RecordItem; rowValue: any; record: Record; }, __VLS_61: {}; type __VLS_Slots = {} & { [K in NonNullable]?: (props: typeof __VLS_59) => any; } & { title?: (props: typeof __VLS_9) => any; } & { actions?: (props: typeof __VLS_12) => any; } & { 'after-fields'?: (props: typeof __VLS_61) => any; }; declare const __VLS_base: import("vue").DefineComponent; required: true; validator: (config: KonnectBaseEntityConfig | KongManagerBaseEntityConfig) => boolean; }; /** Schema to configure display of fields */ configSchema: { type: PropType; required: false; default: () => {}; }; /** * Entity type, required to generate terraform code */ entityType: { type: PropType; required: true; validator: (val: SupportedEntityType) => boolean; }; /** * Sub Entity type, required to generate terraform code for event gateway entities */ subEntityType: { type: StringConstructor; default: string; }; /** Record key that contains the plugin configuration */ pluginConfigKey: { type: StringConstructor; required: false; default: string; }; /** Configuration schema for the plugin configuration section */ pluginConfigSchema: { type: PropType; required: false; default: () => {}; }; /** Record key that contains the policy configuration */ policyConfigKey: { type: StringConstructor; required: false; default: string; }; /** Configuration schema for the policy configuration section */ policyConfigSchema: { type: PropType; required: false; default: () => {}; }; /** * Fetch url for the item to display configuration for. * We will handle the replacement of {controlPlaneId}, {workspace}, and {id}. * Value should NOT contain config.apiBaseUrl, as we auto include this. Typically this will just an entry from * the endpoints file. * * ex. `/v2/control-planes/{controlPlaneId}/core-entities/snis/{id}` */ fetchUrl: { type: StringConstructor; required: true; }; /** * Optional key to use to access the record from fetched response.data * If not provided, response.data will be used. */ dataKey: { type: StringConstructor; required: false; default: string; }; /** * Function to resolve the record from the fetched response. * This prop only works if dataKey is not provided. */ recordResolver: { type: PropType<(data: any) => any>; required: false; default: (data: any) => any; }; /** * A function to format the entity record before displaying it in the code block. */ codeBlockRecordFormatter: { type: PropType<(entityRecord: Record, format: CodeFormat) => Record>; required: false; default: (entityRecord: Record) => Record; }; /** * Boolean to control card title visibility. */ hideTitle: { type: BooleanConstructor; default: boolean; }; /** * The label text to show for the select Format element */ label: { type: StringConstructor; default: string; required: false; }; /** * External link for documentation */ configCardDoc: { type: StringConstructor; default: string; required: false; }; titleTag: { type: PropType; default: string; }; /** * Hide entries from the Format dropdown (eg. ['yaml']). Structured view is always shown */ formatsToHide: { type: PropType; required: false; default: () => never[]; }; }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & { loading: (isLoading: boolean) => any; "fetch:success": (data: Record) => any; "fetch:error": (error: AxiosError) => any; configFormatChange: (format: Format) => any; }, string, import("vue").PublicProps, Readonly; required: true; validator: (config: KonnectBaseEntityConfig | KongManagerBaseEntityConfig) => boolean; }; /** Schema to configure display of fields */ configSchema: { type: PropType; required: false; default: () => {}; }; /** * Entity type, required to generate terraform code */ entityType: { type: PropType; required: true; validator: (val: SupportedEntityType) => boolean; }; /** * Sub Entity type, required to generate terraform code for event gateway entities */ subEntityType: { type: StringConstructor; default: string; }; /** Record key that contains the plugin configuration */ pluginConfigKey: { type: StringConstructor; required: false; default: string; }; /** Configuration schema for the plugin configuration section */ pluginConfigSchema: { type: PropType; required: false; default: () => {}; }; /** Record key that contains the policy configuration */ policyConfigKey: { type: StringConstructor; required: false; default: string; }; /** Configuration schema for the policy configuration section */ policyConfigSchema: { type: PropType; required: false; default: () => {}; }; /** * Fetch url for the item to display configuration for. * We will handle the replacement of {controlPlaneId}, {workspace}, and {id}. * Value should NOT contain config.apiBaseUrl, as we auto include this. Typically this will just an entry from * the endpoints file. * * ex. `/v2/control-planes/{controlPlaneId}/core-entities/snis/{id}` */ fetchUrl: { type: StringConstructor; required: true; }; /** * Optional key to use to access the record from fetched response.data * If not provided, response.data will be used. */ dataKey: { type: StringConstructor; required: false; default: string; }; /** * Function to resolve the record from the fetched response. * This prop only works if dataKey is not provided. */ recordResolver: { type: PropType<(data: any) => any>; required: false; default: (data: any) => any; }; /** * A function to format the entity record before displaying it in the code block. */ codeBlockRecordFormatter: { type: PropType<(entityRecord: Record, format: CodeFormat) => Record>; required: false; default: (entityRecord: Record) => Record; }; /** * Boolean to control card title visibility. */ hideTitle: { type: BooleanConstructor; default: boolean; }; /** * The label text to show for the select Format element */ label: { type: StringConstructor; default: string; required: false; }; /** * External link for documentation */ configCardDoc: { type: StringConstructor; default: string; required: false; }; titleTag: { type: PropType; default: string; }; /** * Hide entries from the Format dropdown (eg. ['yaml']). Structured view is always shown */ formatsToHide: { type: PropType; required: false; default: () => never[]; }; }>> & Readonly<{ onLoading?: ((isLoading: boolean) => any) | undefined; "onFetch:success"?: ((data: Record) => any) | undefined; "onFetch:error"?: ((error: AxiosError) => any) | undefined; onConfigFormatChange?: ((format: Format) => any) | undefined; }>, { label: string; subEntityType: string; codeBlockRecordFormatter: (entityRecord: Record, format: CodeFormat) => Record; configSchema: ConfigurationSchema; pluginConfigKey: string; pluginConfigSchema: PluginConfigurationSchema; policyConfigKey: string; policyConfigSchema: PolicyConfigurationSchema; dataKey: string; recordResolver: (data: any) => any; hideTitle: boolean; configCardDoc: string; titleTag: HeaderTag; formatsToHide: CodeFormat[]; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; declare const __VLS_export: __VLS_WithSlots; declare const _default: typeof __VLS_export; export default _default; type __VLS_WithSlots = T & { new (): { $slots: S; }; }; //# sourceMappingURL=EntityBaseConfigCard.vue.d.ts.map