UNPKG

strapi-plugin-navigation

Version:
370 lines (369 loc) 11.4 kB
import { z } from 'zod'; export declare const useConfig: () => import("@tanstack/react-query").UseQueryResult<{ contentTypes: string[]; additionalFields: ("audience" | { name: string; type: "string" | "boolean"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; } | { name: string; type: "media"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; } | { name: string; type: "select"; label: string; options: string[]; multi: boolean; required?: boolean | undefined; enabled?: boolean | undefined; })[]; allowedLevels: number; availableAudience: { id: number; name: string; key: string; documentId: string; }[]; contentTypesNameFields: Record<string, string[]>; contentTypesPopulate: Record<string, string[]>; gql: { navigationItemRelated: string[]; }; pathDefaultFields: Record<string, string[]>; cascadeMenuAttached: boolean; preferCustomContentTypes: boolean; allowedContentTypes: string[]; restrictedContentTypes: string[]; isCacheEnabled?: boolean | undefined; isCachePluginEnabled?: boolean | undefined; }, Error>; export declare const useRestart: () => import("@tanstack/react-query").UseMutationResult<import("@tanstack/react-query").QueryObserverResult<import("@strapi/strapi/admin").FetchResponse<any>, Error>, Error, void, unknown>; export declare const useRestoreConfig: () => import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>; export declare const useContentTypes: () => import("@tanstack/react-query").UseQueryResult<{ kind: "collectionType" | "singleType"; uid: string; info: { displayName: string; singularName: string; pluralName: string; description?: string | undefined; }; attributes: Record<string, unknown>; isDisplayed: boolean; apiID: string; }[], Error>; export declare const useSaveConfig: () => import("@tanstack/react-query").UseMutationResult<void, Error, { additionalFields: ("audience" | { name: string; type: "select"; label: string; options: string[]; multi: boolean; required?: boolean | undefined; enabled?: boolean | undefined; } | { name: string; type: "string" | "boolean"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; } | { name: string; type: "media"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; })[]; allowedLevels: number; availableAudience: { id: number; name: string; key: string; documentId: string; }[]; contentTypes: string[]; contentTypesNameFields: { key: string; fields: string[]; }[]; contentTypesPopulate: { key: string; fields: string[]; }[]; gql: { navigationItemRelated: string[]; }; pathDefaultFields: { key: string; fields: string[]; }[]; cascadeMenuAttached: boolean; preferCustomContentTypes: boolean; audienceFieldChecked: boolean; isCacheEnabled?: boolean | undefined; isCachePluginEnabled?: boolean | undefined; }, unknown>; export type UiFormSchema = z.infer<typeof uiFormSchema>; export declare const uiFormSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{ additionalFields: z.ZodArray<z.ZodUnion<[z.ZodLiteral<"audience">, z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{ name: z.ZodEffects<z.ZodString, string, string>; label: z.ZodString; required: z.ZodOptional<z.ZodBoolean>; enabled: z.ZodOptional<z.ZodBoolean>; }, { type: z.ZodEnum<["boolean", "string"]>; multi: z.ZodOptional<z.ZodLiteral<false>>; options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }>, "strip", z.ZodTypeAny, { name: string; type: "string" | "boolean"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; }, { name: string; type: "string" | "boolean"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; }>, z.ZodObject<z.objectUtil.extendShape<{ name: z.ZodEffects<z.ZodString, string, string>; label: z.ZodString; required: z.ZodOptional<z.ZodBoolean>; enabled: z.ZodOptional<z.ZodBoolean>; }, { type: z.ZodLiteral<"media">; multi: z.ZodOptional<z.ZodLiteral<false>>; options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }>, "strip", z.ZodTypeAny, { name: string; type: "media"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; }, { name: string; type: "media"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; }>, z.ZodObject<z.objectUtil.extendShape<{ name: z.ZodEffects<z.ZodString, string, string>; label: z.ZodString; required: z.ZodOptional<z.ZodBoolean>; enabled: z.ZodOptional<z.ZodBoolean>; }, { type: z.ZodLiteral<"select">; multi: z.ZodBoolean; options: z.ZodArray<z.ZodString, "many">; }>, "strip", z.ZodTypeAny, { name: string; type: "select"; label: string; options: string[]; multi: boolean; required?: boolean | undefined; enabled?: boolean | undefined; }, { name: string; type: "select"; label: string; options: string[]; multi: boolean; required?: boolean | undefined; enabled?: boolean | undefined; }>]>]>, "many">; allowedLevels: z.ZodNumber; availableAudience: z.ZodArray<z.ZodObject<{ id: z.ZodNumber; documentId: z.ZodString; name: z.ZodString; key: z.ZodString; }, "strip", z.ZodTypeAny, { id: number; name: string; key: string; documentId: string; }, { id: number; name: string; key: string; documentId: string; }>, "many">; contentTypes: z.ZodArray<z.ZodString, "many">; contentTypesNameFields: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>; contentTypesPopulate: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>; gql: z.ZodObject<{ navigationItemRelated: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { navigationItemRelated: string[]; }, { navigationItemRelated: string[]; }>; pathDefaultFields: z.ZodRecord<z.ZodString, z.ZodAny>; cascadeMenuAttached: z.ZodBoolean; preferCustomContentTypes: z.ZodBoolean; isCacheEnabled: z.ZodOptional<z.ZodBoolean>; isCachePluginEnabled: z.ZodOptional<z.ZodBoolean>; }, "contentTypesNameFields">, { audienceFieldChecked: z.ZodBoolean; contentTypesNameFields: z.ZodArray<z.ZodObject<{ key: z.ZodString; fields: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { key: string; fields: string[]; }, { key: string; fields: string[]; }>, "many">; contentTypesPopulate: z.ZodArray<z.ZodObject<{ key: z.ZodString; fields: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { key: string; fields: string[]; }, { key: string; fields: string[]; }>, "many">; pathDefaultFields: z.ZodArray<z.ZodObject<{ key: z.ZodString; fields: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { key: string; fields: string[]; }, { key: string; fields: string[]; }>, "many">; }>, "strip", z.ZodTypeAny, { additionalFields: ("audience" | { name: string; type: "select"; label: string; options: string[]; multi: boolean; required?: boolean | undefined; enabled?: boolean | undefined; } | { name: string; type: "string" | "boolean"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; } | { name: string; type: "media"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; })[]; allowedLevels: number; availableAudience: { id: number; name: string; key: string; documentId: string; }[]; contentTypes: string[]; contentTypesNameFields: { key: string; fields: string[]; }[]; contentTypesPopulate: { key: string; fields: string[]; }[]; gql: { navigationItemRelated: string[]; }; pathDefaultFields: { key: string; fields: string[]; }[]; cascadeMenuAttached: boolean; preferCustomContentTypes: boolean; audienceFieldChecked: boolean; isCacheEnabled?: boolean | undefined; isCachePluginEnabled?: boolean | undefined; }, { additionalFields: ("audience" | { name: string; type: "select"; label: string; options: string[]; multi: boolean; required?: boolean | undefined; enabled?: boolean | undefined; } | { name: string; type: "string" | "boolean"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; } | { name: string; type: "media"; label: string; required?: boolean | undefined; options?: string[] | undefined; enabled?: boolean | undefined; multi?: false | undefined; })[]; allowedLevels: number; availableAudience: { id: number; name: string; key: string; documentId: string; }[]; contentTypes: string[]; contentTypesNameFields: { key: string; fields: string[]; }[]; contentTypesPopulate: { key: string; fields: string[]; }[]; gql: { navigationItemRelated: string[]; }; pathDefaultFields: { key: string; fields: string[]; }[]; cascadeMenuAttached: boolean; preferCustomContentTypes: boolean; audienceFieldChecked: boolean; isCacheEnabled?: boolean | undefined; isCachePluginEnabled?: boolean | undefined; }>;