Member Junction
    Preparing search index...

    Action to update a user's course progress in LearnWorlds

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    apiCallCount: number = 0

    Tracks the number of actual HTTP requests made since last reset. Useful for callers that need accurate API call counts (e.g., bulk data).

    apiVersion: string = 'v2'

    LearnWorlds API version

    integrationName: string = 'LearnWorlds'

    The integration name to look up in the Integration entity

    lmsProvider: string = 'LearnWorlds'

    The LMS provider this action is designed for (e.g., 'LearnWorlds', 'Moodle', etc.)

    params: ActionParam[] = []

    Current action parameters (set by the framework or by SetCompanyContext)

    ALLOWED_ROLES: readonly string[] = ...

    Allowed user roles in LearnWorlds.

    AuthorizesCaller: boolean

    True when the action authorizes its caller itself, so a public entry point such as the RunAction mutation may run it for an authenticated user without an MJ: Action Authorizations link. Set it only on an action that either checks an authorization the caller must hold, or reads and writes only with the caller's own permissions. Leave it false for an action that acts with more authority than its caller, or that reaches data or sends messages the caller chooses but could not otherwise reach.

    The engine reads the marker only from the class that runs, never from its parent classes. A subclass that overrides a marked action must declare the marker again.

    CONCURRENCY_LIMIT: 5

    Concurrency limit for parallel API calls to avoid overwhelming the API.

    LW_MAX_PAGE_SIZE: 100

    Maximum number of items per page supported by the LearnWorlds API

    MAX_PAGES: 100

    Safety limit for pagination to prevent infinite loops if the API misbehaves.

    Accessors

    Methods

    • Helper to build consistent error messages for LMS operations

      Parameters

      • operation: string
      • details: string
      • OptionalsystemError: string | Error | { message?: string }

      Returns string

    • Gets credentials from environment variables Format: BIZAPPS_{PROVIDER}{COMPANY_ID}{CREDENTIAL_TYPE} Example: BIZAPPS_LEARNWORLDS_12345_API_KEY

      Parameters

      • companyId: string
      • credentialType: string

      Returns string | undefined

    • Makes an authenticated request to LearnWorlds API. The body parameter accepts any object that will be JSON-serialized.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • endpoint: string
      • method: "GET" | "POST" | "PUT" | "DELETE" = 'GET'
      • Optionalbody: object | null
      • OptionalcontextUser: UserInfo

      Returns Promise<T>