default: {
    add: (
        parent: { id: string },
        type: string,
        file: { data: string; name: string; uid: string },
    ) => Promise<INewAvatar>;
    archive: (avatar: { id: string }, to: string) => Promise<void>;
    del: (parent: { id: string }, type: string, id: string) => Promise<void>;
    get: <T extends TAvatarGet>(
        id: string,
        data: T,
    ) => Promise<undefined | IAvatar<T>>;
    read: (id: string) => Promise<Buffer>;
} = ...

Type declaration

  • add: (
        parent: { id: string },
        type: string,
        file: { data: string; name: string; uid: string },
    ) => Promise<INewAvatar>
  • archive: (avatar: { id: string }, to: string) => Promise<void>
  • del: (parent: { id: string }, type: string, id: string) => Promise<void>
  • get: <T extends TAvatarGet>(id: string, data: T) => Promise<undefined | IAvatar<T>>
  • read: (id: string) => Promise<Buffer>