Class ScuteAdminApi

Hierarchy

  • ScuteBaseHttp
    • ScuteAdminApi

Constructors

Properties

secretKey?: string
wretcher: Wretch<unknown, unknown, undefined>

Accessors

Methods

  • Create a user (with optional user metadata).

    Parameters

    • identifier: string

      {ScuteIdentifier}

    • Optional meta: Metadata

      {UserMeta} - User meta

    Returns Promise<{
        data: null;
        error: BaseHttpError;
    } | {
        data: {
            user: ScuteUser;
        };
        error: null;
    }>

  • Generates new access_token with refresh_token

    Parameters

    • refreshToken: string

      JWT refresh_token

    Returns Promise<{
        data: null;
        error: BaseHttpError;
    } | {
        data: any;
        error: null;
    }>

  • Get user's basic information by identifier.

    • Unauthenticated

    Parameters

    • identifier: string

      {ScuteIdentifier}

    Returns Promise<{
        data: null;
        error: BaseHttpError;
    } | {
        data: {
            user: null | ScuteUser;
        };
        error: null;
    }>

  • Create a user with pending status and send invitation. (a pending user will not be able to log in).

    Parameters

    • identifier: string

      {ScuteIdentifier}

    • Optional meta: Metadata

      {UserMeta} - User meta

    Returns Promise<{
        data: null;
        error: BaseHttpError;
    } | {
        data: {
            user: ScuteUserData;
            user_meta_errors?: any;
        };
        error: null;
    }>

  • Get a list of users.

    Parameters

    Returns Promise<{
        data: null;
        error: BaseHttpError;
    } | {
        data: {
            pagination: {
                current_page: number;
                next_page: null | number;
                per_page: number;
                prev_page: null | number;
                total_pages: number;
            };
            users: ScuteUserData[];
        };
        error: null;
    }>

  • Refresh

    Parameters

    • refreshToken: string

      JWT refresh_token

    Returns Promise<{
        data: null;
        error: BaseHttpError;
    } | {
        data: any;
        error: null;
    }>

  • Refresh with access_token

    Parameters

    • accessToken: string

      JWT access_token

    Returns Promise<{
        data: null;
        error: BaseHttpError;
    } | {
        data: any;
        error: null;
    }>

  • Sign out

    Parameters

    • accessToken: string

      JWT access_token

    Returns Promise<{
        data: null;
        error: BaseHttpError;
    } | {
        data: any;
        error: null;
    }>

Generated using TypeDoc