Variable defaultConst

    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>(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>)
        • (parent, type, file): Promise<INewAvatar>
        • Add

          Parameters

          • parent: {
                id: string;
            }

            Parent

            • id: string
          • type: string

            Type

          • file: {
                data: string;
                name: string;
                uid: string;
            }

            File

            • data: string
            • name: string
            • uid: string

          Returns Promise<INewAvatar>

          New avatar

    • archive: ((avatar: {
          id: string;
      }, to: string) => Promise<void>)
        • (avatar, to): Promise<void>
        • Archive

          Parameters

          • avatar: {
                id: string;
            }

            Avatar

            • id: string
          • to: string

            Target

          Returns Promise<void>

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

          Parameters

          • parent: {
                id: string;
            }

            Parent

            • id: string
          • type: string

            Type (project or user)

          • id: string

            Avatar id

          Returns Promise<void>

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

          Type Parameters

          Parameters

          • id: string

            Id

          • data: T

            Data

          Returns Promise<undefined | IAvatar<T>>

          Avatar

    • read: ((id: string) => Promise<Buffer>)
        • (id): Promise<Buffer>
        • Read

          Parameters

          • id: string

            Avatar id

          Returns Promise<Buffer>

          Content

    Generated using TypeDoc and TypeDoc Airthium Plugin