@churchapps/helpers
Version:
Library of helper functions not specific to any one ChurchApps project or framework.
66 lines • 3.17 kB
TypeScript
import type { PlanInterface, PlanItemInterface, PlanItemContentInterface, ExternalVenueRefInterface } from "../interfaces/index.js";
import type { VenuePlanItemsResponseInterface, VenueActionResponseInterface, LessonTreeInterface, LessonActionTreeInterface } from "../interfaces/Lessons.js";
import type { ContentProviderInterface } from "./ContentProvider.js";
export declare class LessonsContentProvider implements ContentProviderInterface {
readonly providerId = "lessons";
private lessonsUrl;
constructor(lessonsUrl?: string);
canHandle(plan: PlanInterface, planItem: PlanItemInterface): boolean;
fetchContent(plan: PlanInterface, planItems: PlanItemInterface[]): Promise<Map<string, PlanItemContentInterface>>;
hasAssociatedLesson(plan: PlanInterface): boolean;
isExternalVenue(plan: PlanInterface): boolean;
getExternalRef(plan: PlanInterface): ExternalVenueRefInterface | null;
getVenueId(plan: PlanInterface): string | null;
/**
* Fetch venue plan items - the basic hierarchical structure
* Returns: headers with children (sections), but sections don't have their actions
* Use this for preview mode display
*/
fetchVenuePlanItems(plan: PlanInterface): Promise<VenuePlanItemsResponseInterface>;
/**
* Fetch venue actions - sections with their full action lists
* Use this for action selection dialogs and full expansion
*/
fetchVenueActions(plan: PlanInterface): Promise<VenueActionResponseInterface>;
/**
* Fetch the full lesson tree for browsing (programs -> studies -> lessons -> venues)
*/
fetchLessonTree(): Promise<LessonTreeInterface>;
/**
* Fetch the action tree for action selection (includes actions in each venue section)
*/
fetchActionTree(): Promise<LessonActionTreeInterface>;
/**
* Get the display list - hierarchical items suitable for preview
* Structure: headers -> sections (no actions expanded)
* This is the lightweight version for showing what a lesson contains
*/
getDisplayList(plan: PlanInterface): Promise<PlanItemInterface[]>;
/**
* Get display list with sections only (strip actions from children)
* Use this when importing a lesson as editable plan items
*/
getSectionsOnlyList(plan: PlanInterface): Promise<PlanItemInterface[]>;
/**
* Get the fully expanded list - items with all actions populated in sections
* Merges fetchVenuePlanItems with fetchVenueActions to get complete data
*/
getExpandedList(plan: PlanInterface): Promise<PlanItemInterface[]>;
/**
* Get embed URL for an action
*/
getActionEmbedUrl(actionId: string, externalProviderId?: string): string;
/**
* Get embed URL for an add-on
*/
getAddOnEmbedUrl(addOnId: string, externalProviderId?: string): string;
/**
* Get embed URL for a section
*/
getSectionEmbedUrl(sectionId: string, externalProviderId?: string): string;
/**
* Get the external provider ID from a plan (if external)
*/
getExternalProviderId(plan: PlanInterface): string | null;
}
//# sourceMappingURL=LessonsContentProvider.d.ts.map