UNPKG

@fleek-platform/agents-ui

Version:

The Fleek Platform Agents UI provides a simple interface for deploying, monitoring, and configuring your agents––making management straightforward

26 lines (25 loc) 1.35 kB
import type { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form'; import type { Primitive, ZodError } from 'zod'; import type { CharacterDraftFormSchemaV2, CharacterfileSchemaV2, CharacterFormSchemaV2, SettingsSchemaV2 } from '@config/v2/schema'; import type { CharacterV2 } from '@base/types'; type TransformedError = { label: string; message: string; type: string; }; export type FormError = Merge<FieldError, FieldErrorsImpl<CharacterDraftFormSchemaV2['settings']>>; export declare const transformErrorsV2: (errors?: FormError) => TransformedError[]; export type FormattedError = { path: string; message: string; options?: Primitive[]; }; export declare const formatZodErrorV2: (error: ZodError) => FormattedError[]; export declare const transformCharacterToSchemaV2: (data: CharacterfileSchemaV2, avatar?: string, frameworkVersion?: string) => CharacterFormSchemaV2; export declare const transformSchemaToCharacterV2: (data: CharacterFormSchemaV2 | CharacterDraftFormSchemaV2) => CharacterV2; export declare const extractSecretsFromDataV2: (data: CharacterFormSchemaV2, isManaged: boolean) => { TWITTER_USERNAME?: string | undefined; TWITTER_2FA_SECRET?: string | undefined; }; export declare const mergeSecretsV2: ({ secrets, voice, additionalSecrets, }: SettingsSchemaV2) => SettingsSchemaV2; export {};