@hungr/types
    Preparing search index...

    Type Alias User

    User: {
        id: string;
        createdAt: string;
        updatedAt: string;
        displayName: string;
        isStudent: boolean;
        isAdmin: boolean;
        verifiedEmails: string[];
        disabledAt: string | null;
    }

    A Hungr account. The same account works in the mobile app and the vendor portal.

    Type Declaration

    • id: string

      Unique identifier of the resource. For users, this is their Firebase UID.

    • createdAt: string

      When the resource was created, as an ISO 8601 timestamp. Set by the server.

    • updatedAt: string

      When the resource was last changed, as an ISO 8601 timestamp. Set by the server.

    • displayName: string

      Name shown to other users, e.g. on reviews and replies.

    • isStudent: boolean

      Whether the user gets student discounts. Set by the server when the user is created, from their verified email domains, or later through student verification.

    • isAdmin: boolean

      Whether the user is a server admin who can use the admin portal. Set by hand in the database.

    • verifiedEmails: string[]

      The user's verified email addresses, taken from Firebase when the user is created and refreshed each time they fetch GET /users/me.

    • disabledAt: string | null

      When the user deleted their account, or null if the account is active. A disabled user's name is shown as "deletedUser".