@triply/triplydb
    Preparing search index...

    Type Alias Account

    Account: User | Group

    Either kind of account: a User or a Group.

    What App.getAccount resolves to when you do not know which it is. Both kinds expose the same datasets, queries, stories and pipelines, so most code can take an Account and never distinguish them; narrow with User.asUser or User.asGroup when it matters.

    import App from "@triply/triplydb";

    const app = App.get({ token: process.env.TOKEN });
    const account = await app.getAccount("my-account");
    const dataset = await account.getDataset("my-dataset");
    const account = await app.getAccount("my-account");
    if ((await account.getInfo()).type === "user") {
    const group = await (await account.asUser()).ensureGroup("my-group");
    }