Variable defaultConst

    default: {
        add: ((user: {
            email: string;
            password: string;
        }) => Promise<INewUser>);
        del: ((user: {
            id: string;
        }) => Promise<void>);
        get: (<T>(id: string, data: T) => Promise<undefined | IUserGet<T>>);
        getAll: (<T>(data: T) => Promise<IUser<T, "id">[]>);
        getBy: (<T, Key>(key: string, data: T, keyName: Key) => Promise<undefined | IUser<T, TUserGetKey>>);
        getWithData: (<T>(id: string, data: T) => Promise<undefined | IUserWithData<T>>);
        login: ((user: {
            email: string;
            password: string;
        }) => Promise<null | IUserCheck & {
            email: string;
        }>);
        update: ((user: {
            id: string;
        }, data: any[]) => Promise<void>);
    } = ...

    Type declaration

    • add: ((user: {
          email: string;
          password: string;
      }) => Promise<INewUser>)
        • (user): Promise<INewUser>
        • Add

          Parameters

          • user: {
                email: string;
                password: string;
            }

            User

            • email: string
            • password: string

          Returns Promise<INewUser>

          New user

    • del: ((user: {
          id: string;
      }) => Promise<void>)
        • (user): Promise<void>
        • Delete user

          Parameters

          • user: {
                id: string;
            }

            User

            • id: string

          Returns Promise<void>

    • get: (<T>(id: string, data: T) => Promise<undefined | IUserGet<T>>)
        • <T>(id, data): Promise<undefined | IUserGet<T>>
        • Get

          Type Parameters

          Parameters

          • id: string

            User id

          • data: T

            Data

          Returns Promise<undefined | IUserGet<T>>

          User

    • getAll: (<T>(data: T) => Promise<IUser<T, "id">[]>)
        • <T>(data): Promise<IUser<T, "id">[]>
        • Get all

          Type Parameters

          Parameters

          • data: T

            Data

          Returns Promise<IUser<T, "id">[]>

          Users

    • getBy: (<T, Key>(key: string, data: T, keyName: Key) => Promise<undefined | IUser<T, TUserGetKey>>)
    • getWithData: (<T>(id: string, data: T) => Promise<undefined | IUserWithData<T>>)
        • <T>(id, data): Promise<undefined | IUserWithData<T>>
        • Get with data (avatar)

          Type Parameters

          Parameters

          • id: string

            User id

          • data: T

            Data

          Returns Promise<undefined | IUserWithData<T>>

          User

    • login: ((user: {
          email: string;
          password: string;
      }) => Promise<null | IUserCheck & {
          email: string;
      }>)
        • (user): Promise<null | IUserCheck & {
              email: string;
          }>
        • Login

          Parameters

          • user: {
                email: string;
                password: string;
            }

            User

            • email: string
            • password: string

          Returns Promise<null | IUserCheck & {
              email: string;
          }>

          Logged user

    • update: ((user: {
          id: string;
      }, data: any[]) => Promise<void>)
        • (user, data): Promise<void>
        • Update

          Parameters

          • user: {
                id: string;
            }

            User

            • id: string
          • data: any[]

            Data

          Returns Promise<void>

    Generated using TypeDoc and TypeDoc Airthium Plugin