@ptkl/sdk - v1.3.4
    Preparing search index...

    Base client for the platform API Classes that extend PlatformBaseClient have intentins of only working in platform context

    PlatformBaseClient

    The axios instance to use for the client

    // if sdk is used in the forge app that is running in the platform context
    const utils = new ComponentUtils()
    // this won't work outside of platform context because client needs authtorization to communicate with the API.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • Optionaloptions: { env?: string; host?: string; token?: string }

      Returns default

    Properties

    client: AxiosInstance
    env: null | string = null
    host: null | string = null
    token: null | string = null

    Methods

    • Parameters

      • username: string
      • password: string
      • project: string

      Returns Promise<AxiosResponse<any, any>>

    • Create a new role

      Parameters

      Returns Promise<AxiosResponse<Role, any>>

    • Delete a role

      Parameters

      • uuid: string

        Role UUID

      Returns Promise<AxiosResponse<{ status: boolean }, any>>

    • Edit user profile

      Parameters

      • data: any

        Profile update data

      Returns Promise<AxiosResponse<any, any>>

    • Edit a role

      Parameters

      • uuid: string

        Role UUID

      • data: EditRoleRequest

        Role update data including permissions, workspaces, and level

      Returns Promise<AxiosResponse<Role, any>>

    • Get current user's claims

      Returns Promise<AxiosResponse<UserClaims, any>>

    • Get user permissions

      Returns Promise<AxiosResponse<Permission[], any>>

    • Get role details by UUID

      Parameters

      • uuid: string

        Role UUID

      Returns Promise<AxiosResponse<RoleModel, any>>

    • Get current user's model

      Returns Promise<AxiosResponse<UserModel, any>>

    • Get list of available permissions

      Returns Promise<AxiosResponse<Permission[], any>>

    • List all roles

      Returns Promise<AxiosResponse<Role[], any>>

    • Returns Promise<AxiosResponse<any, any>>

      Use getPermissions() instead

    • Request password reset email This only sends an email with a reset link, does not expose or change passwords

      Parameters

      • email: string

        User email

      Returns Promise<AxiosResponse<any, any>>

    • Resend confirmation email

      Parameters

      • email: string

        User email

      Returns Promise<AxiosResponse<any, any>>

    • Parameters

      • client: AxiosInstance

      Returns default