Frodo Library - v5.0.0-17
    Preparing search index...

    Type Alias User

    type User = {
        countUsers(filter?: string): Promise<number>;
        createUserExportTemplate(): UserExportInterface;
        createUserGroupExportTemplate(): UserGroupExportInterface;
        exportUser(userId: string): Promise<UserExportInterface>;
        exportUserGroup(groupId: string): Promise<UserGroupExportInterface>;
        exportUserGroups(): Promise<UserGroupExportInterface>;
        exportUsers(): Promise<UserExportInterface>;
        importUserGroups(
            importData: UserGroupExportInterface,
            groupId?: string,
        ): Promise<UserGroupSkeleton[]>;
        importUsers(
            importData: UserExportInterface,
            userId?: string,
        ): Promise<UserExportSkeleton[]>;
        readUser(userId: string): Promise<UserSkeleton>;
        readUserGroup(groupId: string): Promise<UserGroupSkeleton>;
        readUserGroups(): Promise<UserGroupSkeleton[]>;
        readUsers(filter?: string, fields?: string[]): Promise<UserSkeleton[]>;
    }
    Index
    • Count the users of the active realm, all of them or those matching a filter.

      Parameters

      • Optionalfilter: string

        CREST query filter on the AM user attributes, e.g. username sw "a". Default: all users.

      Returns Promise<number>

      exact count when supported by the backing API. AM stops counting at the maximum results of the realm's data store (1000 by default), so a count of exactly that size means "at least".

    • Export a single user by id. The response can be saved to file as is.

      Parameters

      • userId: string

        User id

      Returns Promise<UserExportInterface>

      Promise resolving to a UserExportInterface object.

    • Read the users of the active realm, all of them or those matching a filter.

      Parameters

      • Optionalfilter: string

        CREST query filter on the AM user attributes, e.g. username sw "a" or sn sw "a". Default: all users.

      • Optionalfields: string[]

        attributes to return, e.g. ['username', 'givenName', 'sn', 'mail']. Default: the attributes AM returns by default.

      Returns Promise<UserSkeleton[]>

      a promise that resolves to an array of user objects. AM returns at most the maximum results of the realm's data store (1000 by default), so a list of exactly that size may be cut short: narrow it with a filter.