Hierarchy

  • BaseAtlasClass<components["schemas"]["PrivateUser"]>
    • AtlasUser

Constructors

Properties

_attr: undefined | {
    default_organization?: string;
    email: string;
    name: string;
    nickname: string;
    organizations?: {
        access_role: "OWNER" | "ADMIN" | "MEMBER" | "VIEWER" | "EXTERNAL" | "GUEST" | "NONE";
        nickname: string;
        organization_id: string;
        permissions: {
            [key: string]: boolean;
        };
        plan_type: "atlas_demo" | "atlas_enterprise" | "atlas_team" | "atlas_research" | "atlas_starter" | "atlas_startup" | "atlas_pro" | "mock" | "free_test_user" | "pro" | "enterprise" | "free" | "research";
        slug: string;
        user_id: string;
    }[];
    picture?: string;
    stripe_customer_id?: string;
    sub: string;
    updated_at: string;
    waitlisted?: boolean;
}

Type declaration

  • Optional default_organization?: string

    Default Organization Format: uuid

    Description

    The users default organization.

  • email: string

    Email

    Description

    The user email

  • name: string

    Name

    Description

    The users name as registered in auth0

    Example

    nomicai
    
  • nickname: string

    Nickname

    Description

    The users nickname

    Example

    nomicai
    
  • Optional organizations?: {
        access_role: "OWNER" | "ADMIN" | "MEMBER" | "VIEWER" | "EXTERNAL" | "GUEST" | "NONE";
        nickname: string;
        organization_id: string;
        permissions: {
            [key: string]: boolean;
        };
        plan_type: "atlas_demo" | "atlas_enterprise" | "atlas_team" | "atlas_research" | "atlas_starter" | "atlas_startup" | "atlas_pro" | "mock" | "free_test_user" | "pro" | "enterprise" | "free" | "research";
        slug: string;
        user_id: string;
    }[]

    Organizations

    Description

    All of the organizations this user belongs to

    Default

    []
    
  • Optional picture?: string

    Picture

    Description

    The users profile image

  • Optional stripe_customer_id?: string

    Stripe Customer Id

    Description

    The users stripe account.

  • sub: string

    Sub

    Description

    Unique user id

    Example

    auth0|12345678
    
  • updated_at: string

    Updated At Format: date-time

    Description

    The last time user information was updated on Auth0 side.

  • Optional waitlisted?: boolean

    Waitlisted

    Description

    Whether or not the user is wait-listed for Atlas access

    Default

    false
    
attributePromise: undefined | Promise<{
    default_organization?: string;
    email: string;
    name: string;
    nickname: string;
    organizations?: {
        access_role: "OWNER" | "ADMIN" | "MEMBER" | "VIEWER" | "EXTERNAL" | "GUEST" | "NONE";
        nickname: string;
        organization_id: string;
        permissions: {
            [key: string]: boolean;
        };
        plan_type: "atlas_demo" | "atlas_enterprise" | "atlas_team" | "atlas_research" | "atlas_starter" | "atlas_startup" | "atlas_pro" | "mock" | "free_test_user" | "pro" | "enterprise" | "free" | "research";
        slug: string;
        user_id: string;
    }[];
    picture?: string;
    stripe_customer_id?: string;
    sub: string;
    updated_at: string;
    waitlisted?: boolean;
}>
viewer: AtlasViewer

Accessors

  • get attr(): undefined | AttributesType
  • returns the object's information; this may be undefined

    Returns undefined | AttributesType

Methods

  • Parameters

    • endpoint: string
    • method: "GET" | "POST"
    • payload: Payload = null
    • headers: null | Record<string, string> = null

    Returns Promise<null | string | any[] | Record<string, any> | Uint8Array | Table<any>>

  • Returns string

  • Fetches basic information about the object. By default, this caches the call; if you want to bust the cache, pass true as the first argument. This immediately.

    Parameters

    • bustCache: boolean = false

      Whether to refetch the relevant information

    Returns Promise<{
        default_organization?: string;
        email: string;
        name: string;
        nickname: string;
        organizations?: {
            access_role: "OWNER" | "ADMIN" | "MEMBER" | "VIEWER" | "EXTERNAL" | "GUEST" | "NONE";
            nickname: string;
            organization_id: string;
            permissions: {
                [key: string]: boolean;
            };
            plan_type: "atlas_demo" | "atlas_enterprise" | "atlas_team" | "atlas_research" | "atlas_starter" | "atlas_startup" | "atlas_pro" | "mock" | "free_test_user" | "pro" | "enterprise" | "free" | "research";
            slug: string;
            user_id: string;
        }[];
        picture?: string;
        stripe_customer_id?: string;
        sub: string;
        updated_at: string;
        waitlisted?: boolean;
    }>

    A promise that resolves to the organization info.

  • Parameters

    • role: null | "OWNER" | "MEMBER" = null

      return only organizations where the user has this role (default: null, return all organizations)

    Returns Promise<AtlasOrganization[]>

    A list of organizations where the user has the specified role

  • Returns Promise<{
        connector_name?: string;
        created_timestamp: string;
        creator: string;
        creator_nickname: string;
        creator_picture: string;
        description: string;
        id: string;
        is_public: boolean;
        is_public_to_org: boolean;
        modality?: string;
        nickname: string;
        organization_name: string;
        organization_slug: string;
        owner: string;
        project_fields: string[];
        project_name: string;
        slug: string;
        thumbnail: string;
        total_datums_in_project: number;
        unique_id_field: string;
    }[]>

    All projects that the user has access to.

  • Loads the information associated with the class, removing any existing caches.

    Returns Promise<LoadedObject<AtlasUser, {
        default_organization?: string;
        email: string;
        name: string;
        nickname: string;
        organizations?: {
            access_role: "OWNER" | "ADMIN" | "MEMBER" | "VIEWER" | "EXTERNAL" | "GUEST" | "NONE";
            nickname: string;
            organization_id: string;
            permissions: {
                [key: string]: boolean;
            };
            plan_type: "atlas_demo" | "atlas_enterprise" | "atlas_team" | "atlas_research" | "atlas_starter" | "atlas_startup" | "atlas_pro" | "mock" | "free_test_user" | "pro" | "enterprise" | "free" | "research";
            slug: string;
            user_id: string;
        }[];
        picture?: string;
        stripe_customer_id?: string;
        sub: string;
        updated_at: string;
        waitlisted?: boolean;
    }>>

    a LoadedObject instance of the class that is guaranteed to have its attr slot populated with appropriate information.

    Example

    const loadedProject = await (new AtlasProject(projectId)).withLoadedAttributes()

    // OR, in cases where we want to do stuff immediately with the project and ensure
    // that later calls there don't double-fetch information.

    const project = new AtlasProject(projectId)

    // do stuff right away.
    const projection = new AtlasProjection(projectionId, {project: project})
    const loadedProjection = await projection.withLoadedAttributes()
    // do stuff with loadedProjection