@memberjunction/actions-bizapps-lms
Version:
LMS system integration actions for MemberJunction
48 lines • 1.74 kB
TypeScript
import { LearnWorldsBaseAction } from '../learnworlds-base.action.js';
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
import { UserInfo } from '@memberjunction/core';
import { EnrollUserParams, EnrollUserResult } from '../interfaces/index.js';
/**
* Action to enroll a user in a LearnWorlds course or bundle
*/
export declare class EnrollUserAction extends LearnWorldsBaseAction {
/**
* Typed public method for direct (non-framework) callers.
* Supports both course and bundle enrollment via ProductType.
* Throws on failure.
*/
EnrollUser(params: EnrollUserParams, contextUser: UserInfo): Promise<EnrollUserResult>;
/**
* Framework entry point -- delegates to the typed public method.
*/
protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
/**
* Extract typed params from the generic ActionParam array
*/
private extractEnrollUserParams;
/**
* Build the endpoint and body for enrollment (unified endpoint per LW v2 API).
*/
private buildEnrollmentRequest;
/**
* Map the raw enrollment response data to our typed LearnWorldsEnrollment shape.
*/
private buildEnrollmentDetails;
/**
* Try to fetch the course title for the summary. Falls back to a default.
*/
private fetchCourseTitle;
/**
* Try to fetch the user display name for the summary. Falls back to a default.
*/
private fetchUserName;
/**
* Define the parameters this action expects
*/
get Params(): ActionParam[];
/**
* Metadata about this action
*/
get Description(): string;
}
//# sourceMappingURL=enroll-user.action.d.ts.map