@memberjunction/actions-bizapps-lms
Version:
LMS system integration actions for MemberJunction
58 lines • 2.18 kB
TypeScript
import { LearnWorldsBaseAction } from '../learnworlds-base.action.js';
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
import { UserInfo } from '@memberjunction/core';
import { GetUserEnrollmentsParams, GetUserEnrollmentsResult } from '../interfaces/index.js';
/**
* Action to retrieve all course enrollments for a specific user
*/
export declare class GetUserEnrollmentsAction extends LearnWorldsBaseAction {
/**
* Metadata about this action
*/
get Description(): string;
/**
* Typed public method for direct (non-framework) callers.
* Sets company context, fetches enrollments, and returns a strongly-typed result.
* Throws on error.
*/
GetUserEnrollments(params: GetUserEnrollmentsParams, contextUser: UserInfo): Promise<GetUserEnrollmentsResult>;
/**
* Framework entry-point – thin wrapper around the typed public method.
*/
protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
/**
* Extract typed params from framework ActionParam[]
*/
private extractGetUserEnrollmentsParams;
/**
* Build query parameters for the enrollments API request
*/
private buildEnrollmentQueryParams;
/**
* Format all raw enrollments into typed FormattedEnrollment[].
* When course details are requested, fetches all unique courses in parallel
* and attaches results from a lookup map.
*/
private formatEnrollments;
/**
* Fetch course details for all unique course IDs with controlled concurrency and return a lookup map.
*/
private fetchCourseDetailsBatch;
/**
* Format a single raw enrollment to a FormattedEnrollment
*/
private formatSingleEnrollment;
/**
* Fetch course details for a given enrollment's course ID
*/
private fetchCourseDetailsForEnrollment;
/**
* Calculate summary statistics from formatted enrollments
*/
private calculateEnrollmentSummary;
/**
* Define the parameters this action expects
*/
get Params(): ActionParam[];
}
//# sourceMappingURL=get-user-enrollments.action.d.ts.map