UNPKG

@memberjunction/actions-bizapps-lms

Version:

LMS system integration actions for MemberJunction

53 lines 1.99 kB
import { LearnWorldsBaseAction } from '../learnworlds-base.action.js'; import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base'; import { UserInfo } from '@memberjunction/core'; import { OnboardLearnerParams, OnboardLearnerResult } from '../interfaces/index.js'; /** * Action that orchestrates full learner onboarding: * create user, enroll in courses/bundles, and generate SSO URL. */ export declare class OnboardLearnerAction extends LearnWorldsBaseAction { /** * Orchestrates the full onboarding flow for a new or existing learner: * 1. Find or create user * 2. Enroll in courses and bundles * 3. Generate SSO login URL */ OnboardLearner(params: OnboardLearnerParams, contextUser: UserInfo): Promise<OnboardLearnerResult>; /** * Finds an existing user by email or creates a new one. * Returns the user ID, whether they are new, and a fallback login URL from creation. */ private resolveUser; /** * Creates a new user via the CreateUserAction typed public method. * Returns the user's ID and login URL. */ private createNewUser; /** * Enrolls the user in all specified courses and bundles in parallel, * collecting results and errors. */ private enrollInProducts; /** * Enrolls a user in a single course or bundle, catching errors for partial success. */ private enrollInSingleProduct; /** * Generates an SSO login URL, falling back to the user creation login URL on failure. */ private generateLoginUrl; /** * Framework entry point that delegates to the typed public method */ protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>; /** * Define the parameters this action expects */ get Params(): ActionParam[]; /** * Metadata about this action */ get Description(): string; } //# sourceMappingURL=onboard-learner.action.d.ts.map