Member Junction
    Preparing search index...

    Orchestrates bulk data retrieval from all LearnWorlds retrieval actions into a single LearnWorldsSyncPayload for downstream consumers.

    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.

    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>