default: {
    add: (
        user: { email: string; password: string },
    ) => Promise<IFrontNewUser>;
    check: (
        user: { email: string; password: string },
    ) => Promise<{ valid: boolean }>;
    del: () => Promise<void>;
    delById: (id: string) => Promise<void>;
    update: (data: any[]) => Promise<void>;
    updateById: (id: string, data: any[]) => Promise<void>;
    useUser: () => [
        undefined
        | IFrontUser,
        {
            clearUser: () => Promise<void>;
            errorUser: Error;
            loadingUser: boolean;
            mutateUser: (user: Partial<IFrontMutateUser>) => Promise<void>;
        },
    ];
    useUsers: () => [
        IFrontUsers,
        {
            addOneUser: (user: IFrontNewUser) => Promise<void>;
            delOneUser: (user: IFrontMutateUsersItem) => Promise<void>;
            errorUsers: Error;
            loadingUsers: boolean;
            mutateOneUser: (user: IFrontMutateUsersItem) => Promise<void>;
        },
    ];
} = ...

Type declaration

  • add: (user: { email: string; password: string }) => Promise<IFrontNewUser>
  • check: (user: { email: string; password: string }) => Promise<{ valid: boolean }>
  • del: () => Promise<void>
  • delById: (id: string) => Promise<void>
  • update: (data: any[]) => Promise<void>
  • updateById: (id: string, data: any[]) => Promise<void>
  • useUser: () => [
        undefined
        | IFrontUser,
        {
            clearUser: () => Promise<void>;
            errorUser: Error;
            loadingUser: boolean;
            mutateUser: (user: Partial<IFrontMutateUser>) => Promise<void>;
        },
    ]
  • useUsers: () => [
        IFrontUsers,
        {
            addOneUser: (user: IFrontNewUser) => Promise<void>;
            delOneUser: (user: IFrontMutateUsersItem) => Promise<void>;
            errorUsers: Error;
            loadingUsers: boolean;
            mutateOneUser: (user: IFrontMutateUsersItem) => Promise<void>;
        },
    ]