@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.28 kB
TypeScript
import type { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';
import type { Character } from '../types';
import type { Primitive, ZodError } from 'zod';
import type { CharacterDraftFormSchema, CharacterfileSchema, CharacterFormSchema, SettingsSchema } from '@config/schema';
type TransformedError = {
label: string;
message: string;
type: string;
};
export type FormError = Merge<FieldError, FieldErrorsImpl<CharacterFormSchema['settings']>>;
export declare const transformErrors: (errors?: FormError) => TransformedError[];
export type FormattedError = {
path: string;
message: string;
options?: Primitive[];
};
export declare const formatZodError: (error: ZodError) => FormattedError[];
export declare const transformCharacterToSchema: (data: CharacterfileSchema, avatar?: string, frameworkVersion?: string) => CharacterFormSchema;
export declare const transformSchemaToCharacter: (data: CharacterFormSchema | CharacterDraftFormSchema) => Character;
export declare const extractSecretsFromData: (data: CharacterFormSchema) => {
TWITTER_USERNAME?: string | undefined;
TWITTER_2FA_SECRET?: string | undefined;
};
export declare const mergeSecrets: ({ secrets, voice, additionalSecrets, }: SettingsSchema) => SettingsSchema;
export {};