@contractspec/module.learning-journey 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +200 -0
- package/dist/contracts/index.d.ts +5 -0
- package/dist/contracts/index.js +6 -0
- package/dist/contracts/models.d.ts +451 -0
- package/dist/contracts/models.d.ts.map +1 -0
- package/dist/contracts/models.js +388 -0
- package/dist/contracts/models.js.map +1 -0
- package/dist/contracts/onboarding.d.ts +666 -0
- package/dist/contracts/onboarding.d.ts.map +1 -0
- package/dist/contracts/onboarding.js +402 -0
- package/dist/contracts/onboarding.js.map +1 -0
- package/dist/contracts/operations.d.ts +280 -0
- package/dist/contracts/operations.d.ts.map +1 -0
- package/dist/contracts/operations.js +151 -0
- package/dist/contracts/operations.js.map +1 -0
- package/dist/contracts/shared.d.ts +5 -0
- package/dist/contracts/shared.d.ts.map +1 -0
- package/dist/contracts/shared.js +6 -0
- package/dist/contracts/shared.js.map +1 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/learning-journey.docblock.d.ts +1 -0
- package/dist/docs/learning-journey.docblock.js +136 -0
- package/dist/docs/learning-journey.docblock.js.map +1 -0
- package/dist/engines/index.d.ts +4 -0
- package/dist/engines/index.js +5 -0
- package/dist/engines/srs.d.ts +111 -0
- package/dist/engines/srs.d.ts.map +1 -0
- package/dist/engines/srs.js +219 -0
- package/dist/engines/srs.js.map +1 -0
- package/dist/engines/streak.d.ts +100 -0
- package/dist/engines/streak.d.ts.map +1 -0
- package/dist/engines/streak.js +194 -0
- package/dist/engines/streak.js.map +1 -0
- package/dist/engines/xp.d.ts +97 -0
- package/dist/engines/xp.d.ts.map +1 -0
- package/dist/engines/xp.js +213 -0
- package/dist/engines/xp.js.map +1 -0
- package/dist/entities/ai.d.ts +232 -0
- package/dist/entities/ai.d.ts.map +1 -0
- package/dist/entities/ai.js +376 -0
- package/dist/entities/ai.js.map +1 -0
- package/dist/entities/course.d.ts +184 -0
- package/dist/entities/course.d.ts.map +1 -0
- package/dist/entities/course.js +316 -0
- package/dist/entities/course.js.map +1 -0
- package/dist/entities/flashcard.d.ts +170 -0
- package/dist/entities/flashcard.d.ts.map +1 -0
- package/dist/entities/flashcard.js +249 -0
- package/dist/entities/flashcard.js.map +1 -0
- package/dist/entities/gamification.d.ts +238 -0
- package/dist/entities/gamification.d.ts.map +1 -0
- package/dist/entities/gamification.js +392 -0
- package/dist/entities/gamification.js.map +1 -0
- package/dist/entities/index.d.ts +629 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +45 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/learner.d.ts +224 -0
- package/dist/entities/learner.d.ts.map +1 -0
- package/dist/entities/learner.js +365 -0
- package/dist/entities/learner.js.map +1 -0
- package/dist/entities/onboarding.d.ts +190 -0
- package/dist/entities/onboarding.d.ts.map +1 -0
- package/dist/entities/onboarding.js +307 -0
- package/dist/entities/onboarding.js.map +1 -0
- package/dist/entities/quiz.d.ts +220 -0
- package/dist/entities/quiz.d.ts.map +1 -0
- package/dist/entities/quiz.js +370 -0
- package/dist/entities/quiz.js.map +1 -0
- package/dist/events.d.ts +796 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +690 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +22 -0
- package/dist/learning-journey.feature.d.ts +12 -0
- package/dist/learning-journey.feature.d.ts.map +1 -0
- package/dist/learning-journey.feature.js +150 -0
- package/dist/learning-journey.feature.js.map +1 -0
- package/dist/track-spec.d.ts +129 -0
- package/dist/track-spec.d.ts.map +1 -0
- package/dist/track-spec.js +0 -0
- package/package.json +98 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\nimport { LEARNING_JOURNEY_OWNERS } from './contracts/shared';\n\n// ============ Course Events ============\n\nconst CoursePublishedPayload = defineSchemaModel({\n name: 'CoursePublishedEventPayload',\n description: 'Payload when a course is published',\n fields: {\n courseId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n authorId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n publishedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const CoursePublishedEvent = defineEvent({\n meta: {\n key: 'course.published',\n version: 1,\n description: 'A course has been published.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'course'],\n },\n payload: CoursePublishedPayload,\n});\n\n// ============ Enrollment Events ============\n\nconst EnrollmentCreatedPayload = defineSchemaModel({\n name: 'EnrollmentCreatedEventPayload',\n description: 'Payload when a learner enrolls in a course',\n fields: {\n enrollmentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n courseId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n enrolledAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const EnrollmentCreatedEvent = defineEvent({\n meta: {\n key: 'enrollment.created',\n version: 1,\n description: 'A learner has enrolled in a course.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'enrollment'],\n },\n payload: EnrollmentCreatedPayload,\n});\n\n// ============ Progress Events ============\n\nconst LessonCompletedPayload = defineSchemaModel({\n name: 'LessonCompletedEventPayload',\n description: 'Payload when a lesson is completed',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n lessonId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n courseId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n score: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n xpEarned: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n timeSpent: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const LessonCompletedEvent = defineEvent({\n meta: {\n key: 'lesson.completed',\n version: 1,\n description: 'A learner has completed a lesson.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'progress', 'lesson'],\n },\n payload: LessonCompletedPayload,\n});\n\nconst CourseCompletedPayload = defineSchemaModel({\n name: 'CourseCompletedEventPayload',\n description: 'Payload when a course is completed',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n courseId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n enrollmentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n score: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n xpEarned: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n certificateId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const CourseCompletedEvent = defineEvent({\n meta: {\n key: 'course.completed',\n version: 1,\n description: 'A learner has completed a course.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'progress', 'course'],\n },\n payload: CourseCompletedPayload,\n});\n\n// ============ Onboarding Events ============\n\nconst OnboardingStartedPayload = defineSchemaModel({\n name: 'OnboardingStartedEventPayload',\n description: 'Payload when onboarding starts',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n trackId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const OnboardingStartedEvent = defineEvent({\n meta: {\n key: 'onboarding.started',\n version: 1,\n description: 'A learner has started onboarding.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'onboarding'],\n },\n payload: OnboardingStartedPayload,\n});\n\nconst OnboardingStepCompletedPayload = defineSchemaModel({\n name: 'OnboardingStepCompletedEventPayload',\n description: 'Payload when an onboarding step is completed',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n trackId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n triggeringEvent: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n xpEarned: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const OnboardingStepCompletedEvent = defineEvent({\n meta: {\n key: 'onboarding.step_completed',\n version: 1,\n description: 'An onboarding step has been completed.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'onboarding'],\n },\n payload: OnboardingStepCompletedPayload,\n});\n\nconst OnboardingCompletedPayload = defineSchemaModel({\n name: 'OnboardingCompletedEventPayload',\n description: 'Payload when onboarding is completed',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n trackId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n xpEarned: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const OnboardingCompletedEvent = defineEvent({\n meta: {\n key: 'onboarding.completed',\n version: 1,\n description: 'A learner has completed onboarding.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'onboarding'],\n },\n payload: OnboardingCompletedPayload,\n});\n\n// ============ Flashcard Events ============\n\nconst CardReviewedPayload = defineSchemaModel({\n name: 'CardReviewedEventPayload',\n description: 'Payload when a flashcard is reviewed',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n cardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n deckId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n rating: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n responseTimeMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n reviewedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const CardReviewedEvent = defineEvent({\n meta: {\n key: 'flashcard.reviewed',\n version: 1,\n description: 'A flashcard has been reviewed.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'flashcards'],\n },\n payload: CardReviewedPayload,\n});\n\n// ============ Quiz Events ============\n\nconst QuizStartedPayload = defineSchemaModel({\n name: 'QuizStartedEventPayload',\n description: 'Payload when a quiz is started',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n quizId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attemptId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attemptNumber: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const QuizStartedEvent = defineEvent({\n meta: {\n key: 'quiz.started',\n version: 1,\n description: 'A quiz attempt has started.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'quiz'],\n },\n payload: QuizStartedPayload,\n});\n\nconst QuizCompletedPayload = defineSchemaModel({\n name: 'QuizCompletedEventPayload',\n description: 'Payload when a quiz is completed',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n quizId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attemptId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n score: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n percentageScore: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n passed: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n xpEarned: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n timeSpent: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const QuizCompletedEvent = defineEvent({\n meta: {\n key: 'quiz.completed',\n version: 1,\n description: 'A quiz attempt has been completed.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'quiz'],\n },\n payload: QuizCompletedPayload,\n});\n\n// ============ Gamification Events ============\n\nconst XpEarnedPayload = defineSchemaModel({\n name: 'XpEarnedEventPayload',\n description: 'Payload when XP is earned',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n amount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n source: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n totalXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n earnedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const XpEarnedEvent = defineEvent({\n meta: {\n key: 'xp.earned',\n version: 1,\n description: 'XP has been earned.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'gamification', 'xp'],\n },\n payload: XpEarnedPayload,\n});\n\nconst LevelUpPayload = defineSchemaModel({\n name: 'LevelUpEventPayload',\n description: 'Payload when a learner levels up',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n previousLevel: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n newLevel: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n leveledUpAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const LevelUpEvent = defineEvent({\n meta: {\n key: 'level.up',\n version: 1,\n description: 'A learner has leveled up.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'gamification', 'level'],\n },\n payload: LevelUpPayload,\n});\n\nconst StreakUpdatedPayload = defineSchemaModel({\n name: 'StreakUpdatedEventPayload',\n description: 'Payload when a streak is updated',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n previousStreak: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n currentStreak: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n longestStreak: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n freezeUsed: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const StreakUpdatedEvent = defineEvent({\n meta: {\n key: 'streak.updated',\n version: 1,\n description: 'A streak has been updated.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'gamification', 'streak'],\n },\n payload: StreakUpdatedPayload,\n});\n\nconst AchievementUnlockedPayload = defineSchemaModel({\n name: 'AchievementUnlockedEventPayload',\n description: 'Payload when an achievement is unlocked',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n achievementId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n achievementKey: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n achievementName: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n xpEarned: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n unlockedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const AchievementUnlockedEvent = defineEvent({\n meta: {\n key: 'achievement.unlocked',\n version: 1,\n description: 'An achievement has been unlocked.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'gamification', 'achievement'],\n },\n payload: AchievementUnlockedPayload,\n});\n\nconst DailyGoalCompletedPayload = defineSchemaModel({\n name: 'DailyGoalCompletedEventPayload',\n description: 'Payload when a daily goal is completed',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n date: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n targetXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n actualXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const DailyGoalCompletedEvent = defineEvent({\n meta: {\n key: 'daily_goal.completed',\n version: 1,\n description: 'A daily goal has been completed.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'gamification', 'goal'],\n },\n payload: DailyGoalCompletedPayload,\n});\n\n// ============ Certificate Events ============\n\nconst CertificateIssuedPayload = defineSchemaModel({\n name: 'CertificateIssuedEventPayload',\n description: 'Payload when a certificate is issued',\n fields: {\n certificateId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n courseId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n certificateNumber: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n issuedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const CertificateIssuedEvent = defineEvent({\n meta: {\n key: 'certificate.issued',\n version: 1,\n description: 'A certificate has been issued.',\n stability: 'stable',\n owners: [...LEARNING_JOURNEY_OWNERS],\n tags: ['learning', 'certificate'],\n },\n payload: CertificateIssuedPayload,\n});\n\n/**\n * All learning journey events.\n */\nexport const LearningJourneyEvents = {\n CoursePublishedEvent,\n EnrollmentCreatedEvent,\n LessonCompletedEvent,\n CourseCompletedEvent,\n OnboardingStartedEvent,\n OnboardingStepCompletedEvent,\n OnboardingCompletedEvent,\n CardReviewedEvent,\n QuizStartedEvent,\n QuizCompletedEvent,\n XpEarn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BAAwB;EACpC,MAAM;GAAC;GAAY;GAAgB;GAAO;EAC3C;CACD,SAAS;CACV,CAAC;AAIF,MAAM,2BAA2B,kBAAkB;CACjD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,eAAe;GACb,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,mBAAmB;GACjB,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,UAAU;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EACjE;CACF,CAAC;AAEF,MAAa,yBAAyB,YAAY;CAChD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,GAAG,wBAAwB;EACpC,MAAM,CAAC,YAAY,cAAc;EAClC;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LEARNING_JOURNEY_OWNERS } from "./contracts/shared.js";
|
|
2
|
+
import { AchievementModel, CardModel, CompleteLessonInput, CourseModel, DeckModel, EnrollInCourseInput, EnrollmentModel, GetDueCardsInput, GetDueCardsOutput, GetLearnerDashboardInput, LearnerDashboardModel, LearnerModel, ProgressModel, SubmitCardReviewInput, SuccessOutput } from "./contracts/models.js";
|
|
3
|
+
import { CompleteLessonContract, EnrollInCourseContract, GetDueCardsContract, GetLearnerDashboardContract, SubmitCardReviewContract } from "./contracts/operations.js";
|
|
4
|
+
import { GetOnboardingProgressContract, ListOnboardingTracksContract, OnboardingProgressModel, OnboardingStepModel, OnboardingStepProgressModel, OnboardingTrackModel, RecordOnboardingEventContract } from "./contracts/onboarding.js";
|
|
5
|
+
import "./contracts/index.js";
|
|
6
|
+
import { CardRating, DEFAULT_SRS_CONFIG, ReviewResult, SRSConfig, SRSEngine, SRSState, srsEngine } from "./engines/srs.js";
|
|
7
|
+
import { DEFAULT_XP_CONFIG, XPActivityType, XPBreakdown, XPCalculationInput, XPConfig, XPEngine, XPResult, xpEngine } from "./engines/xp.js";
|
|
8
|
+
import { DEFAULT_STREAK_CONFIG, StreakConfig, StreakEngine, StreakState, StreakUpdateResult, streakEngine } from "./engines/streak.js";
|
|
9
|
+
import { LearnerProfileEntity, LearningGapEntity, LearningPathEntity, LearningStyleEnum, RecommendationEntity, RecommendationTypeEnum, SkillMapEntity, aiEntities, aiEnums } from "./entities/ai.js";
|
|
10
|
+
import { ContentTypeEnum, CourseDifficultyEnum, CourseEntity, CourseModuleEntity, CourseStatusEnum, LessonContentEntity, LessonEntity, LessonTypeEnum, courseEntities, courseEnums } from "./entities/course.js";
|
|
11
|
+
import { CardEntity, CardRatingEnum, CardReviewEntity, CardScheduleEntity, DeckEntity, flashcardEntities, flashcardEnums } from "./entities/flashcard.js";
|
|
12
|
+
import { AchievementEntity, AchievementTypeEnum, DailyGoalEntity, HeartEntity, LeaderboardEntryEntity, LeaderboardPeriodEnum, LearnerAchievementEntity, StreakEntity, XPTransactionEntity, gamificationEntities, gamificationEnums } from "./entities/gamification.js";
|
|
13
|
+
import { CertificateEntity, EnrollmentEntity, EnrollmentStatusEnum, LearnerEntity, LessonProgressEntity, ModuleCompletionEntity, ProgressStatusEnum, learnerEntities, learnerEnums } from "./entities/learner.js";
|
|
14
|
+
import { OnboardingProgressEntity, OnboardingStepCompletionEntity, OnboardingStepEntity, OnboardingStepStatusEnum, OnboardingTrackEntity, onboardingEntities, onboardingEnums } from "./entities/onboarding.js";
|
|
15
|
+
import { AttemptStatusEnum, QuestionEntity, QuestionOptionEntity, QuestionTypeEnum, QuizAttemptEntity, QuizEntity, QuizStatusEnum, SkillAssessmentEntity, quizEntities, quizEnums } from "./entities/quiz.js";
|
|
16
|
+
import { learningJourneyEntities, learningJourneyEnums, learningJourneySchemaContribution } from "./entities/index.js";
|
|
17
|
+
import { AchievementUnlockedEvent, CardReviewedEvent, CertificateIssuedEvent, CourseCompletedEvent, CoursePublishedEvent, DailyGoalCompletedEvent, EnrollmentCreatedEvent, LearningJourneyEvents, LessonCompletedEvent, LevelUpEvent, OnboardingCompletedEvent, OnboardingStartedEvent, OnboardingStepCompletedEvent, QuizCompletedEvent, QuizStartedEvent, StreakUpdatedEvent, XpEarnedEvent } from "./events.js";
|
|
18
|
+
import { BaseEventConditionSpec, CompletionRewardsSpec, CountCompletionConditionSpec, EventCompletionConditionSpec, LearningJourneyStepSpec, LearningJourneyTrackSpec, SrsMasteryCompletionConditionSpec, StepAvailabilitySpec, StepCompletionConditionSpec, StreakRuleSpec, TimeWindowCompletionConditionSpec } from "./track-spec.js";
|
|
19
|
+
import { LearningJourneyFeature } from "./learning-journey.feature.js";
|
|
20
|
+
export { AchievementEntity, AchievementModel, AchievementTypeEnum, AchievementUnlockedEvent, AttemptStatusEnum, BaseEventConditionSpec, CardEntity, CardModel, CardRating, CardRatingEnum, CardReviewEntity, CardReviewedEvent, CardScheduleEntity, CertificateEntity, CertificateIssuedEvent, CompleteLessonContract, CompleteLessonInput, CompletionRewardsSpec, ContentTypeEnum, CountCompletionConditionSpec, CourseCompletedEvent, CourseDifficultyEnum, CourseEntity, CourseModel, CourseModuleEntity, CoursePublishedEvent, CourseStatusEnum, DEFAULT_SRS_CONFIG, DEFAULT_STREAK_CONFIG, DEFAULT_XP_CONFIG, DailyGoalCompletedEvent, DailyGoalEntity, DeckEntity, DeckModel, EnrollInCourseContract, EnrollInCourseInput, EnrollmentCreatedEvent, EnrollmentEntity, EnrollmentModel, EnrollmentStatusEnum, EventCompletionConditionSpec, GetDueCardsContract, GetDueCardsInput, GetDueCardsOutput, GetLearnerDashboardContract, GetLearnerDashboardInput, GetOnboardingProgressContract, HeartEntity, LEARNING_JOURNEY_OWNERS, LeaderboardEntryEntity, LeaderboardPeriodEnum, LearnerAchievementEntity, LearnerDashboardModel, LearnerEntity, LearnerModel, LearnerProfileEntity, LearningGapEntity, LearningJourneyEvents, LearningJourneyFeature, LearningJourneyStepSpec, LearningJourneyTrackSpec, LearningPathEntity, LearningStyleEnum, LessonCompletedEvent, LessonContentEntity, LessonEntity, LessonProgressEntity, LessonTypeEnum, LevelUpEvent, ListOnboardingTracksContract, ModuleCompletionEntity, OnboardingCompletedEvent, OnboardingProgressEntity, OnboardingProgressModel, OnboardingStartedEvent, OnboardingStepCompletedEvent, OnboardingStepCompletionEntity, OnboardingStepEntity, OnboardingStepModel, OnboardingStepProgressModel, OnboardingStepStatusEnum, OnboardingTrackEntity, OnboardingTrackModel, ProgressModel, ProgressStatusEnum, QuestionEntity, QuestionOptionEntity, QuestionTypeEnum, QuizAttemptEntity, QuizCompletedEvent, QuizEntity, QuizStartedEvent, QuizStatusEnum, RecommendationEntity, RecommendationTypeEnum, RecordOnboardingEventContract, ReviewResult, SRSConfig, SRSEngine, SRSState, SkillAssessmentEntity, SkillMapEntity, SrsMasteryCompletionConditionSpec, StepAvailabilitySpec, StepCompletionConditionSpec, StreakConfig, StreakEngine, StreakEntity, StreakRuleSpec, StreakState, StreakUpdateResult, StreakUpdatedEvent, SubmitCardReviewContract, SubmitCardReviewInput, SuccessOutput, TimeWindowCompletionConditionSpec, XPActivityType, XPBreakdown, XPCalculationInput, XPConfig, XPEngine, XPResult, XPTransactionEntity, XpEarnedEvent, aiEntities, aiEnums, courseEntities, courseEnums, flashcardEntities, flashcardEnums, gamificationEntities, gamificationEnums, learnerEntities, learnerEnums, learningJourneyEntities, learningJourneyEnums, learningJourneySchemaContribution, onboardingEntities, onboardingEnums, quizEntities, quizEnums, srsEngine, streakEngine, xpEngine };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LEARNING_JOURNEY_OWNERS } from "./contracts/shared.js";
|
|
2
|
+
import { AchievementUnlockedEvent, CardReviewedEvent, CertificateIssuedEvent, CourseCompletedEvent, CoursePublishedEvent, DailyGoalCompletedEvent, EnrollmentCreatedEvent, LearningJourneyEvents, LessonCompletedEvent, LevelUpEvent, OnboardingCompletedEvent, OnboardingStartedEvent, OnboardingStepCompletedEvent, QuizCompletedEvent, QuizStartedEvent, StreakUpdatedEvent, XpEarnedEvent } from "./events.js";
|
|
3
|
+
import { ContentTypeEnum, CourseDifficultyEnum, CourseEntity, CourseModuleEntity, CourseStatusEnum, LessonContentEntity, LessonEntity, LessonTypeEnum, courseEntities, courseEnums } from "./entities/course.js";
|
|
4
|
+
import { CertificateEntity, EnrollmentEntity, EnrollmentStatusEnum, LearnerEntity, LessonProgressEntity, ModuleCompletionEntity, ProgressStatusEnum, learnerEntities, learnerEnums } from "./entities/learner.js";
|
|
5
|
+
import { OnboardingProgressEntity, OnboardingStepCompletionEntity, OnboardingStepEntity, OnboardingStepStatusEnum, OnboardingTrackEntity, onboardingEntities, onboardingEnums } from "./entities/onboarding.js";
|
|
6
|
+
import { CardEntity, CardRatingEnum, CardReviewEntity, CardScheduleEntity, DeckEntity, flashcardEntities, flashcardEnums } from "./entities/flashcard.js";
|
|
7
|
+
import { AttemptStatusEnum, QuestionEntity, QuestionOptionEntity, QuestionTypeEnum, QuizAttemptEntity, QuizEntity, QuizStatusEnum, SkillAssessmentEntity, quizEntities, quizEnums } from "./entities/quiz.js";
|
|
8
|
+
import { AchievementEntity, AchievementTypeEnum, DailyGoalEntity, HeartEntity, LeaderboardEntryEntity, LeaderboardPeriodEnum, LearnerAchievementEntity, StreakEntity, XPTransactionEntity, gamificationEntities, gamificationEnums } from "./entities/gamification.js";
|
|
9
|
+
import { LearnerProfileEntity, LearningGapEntity, LearningPathEntity, LearningStyleEnum, RecommendationEntity, RecommendationTypeEnum, SkillMapEntity, aiEntities, aiEnums } from "./entities/ai.js";
|
|
10
|
+
import { learningJourneyEntities, learningJourneyEnums, learningJourneySchemaContribution } from "./entities/index.js";
|
|
11
|
+
import { AchievementModel, CardModel, CompleteLessonInput, CourseModel, DeckModel, EnrollInCourseInput, EnrollmentModel, GetDueCardsInput, GetDueCardsOutput, GetLearnerDashboardInput, LearnerDashboardModel, LearnerModel, ProgressModel, SubmitCardReviewInput, SuccessOutput } from "./contracts/models.js";
|
|
12
|
+
import { CompleteLessonContract, EnrollInCourseContract, GetDueCardsContract, GetLearnerDashboardContract, SubmitCardReviewContract } from "./contracts/operations.js";
|
|
13
|
+
import { GetOnboardingProgressContract, ListOnboardingTracksContract, OnboardingProgressModel, OnboardingStepModel, OnboardingStepProgressModel, OnboardingTrackModel, RecordOnboardingEventContract } from "./contracts/onboarding.js";
|
|
14
|
+
import "./contracts/index.js";
|
|
15
|
+
import { DEFAULT_SRS_CONFIG, SRSEngine, srsEngine } from "./engines/srs.js";
|
|
16
|
+
import { DEFAULT_XP_CONFIG, XPEngine, xpEngine } from "./engines/xp.js";
|
|
17
|
+
import { DEFAULT_STREAK_CONFIG, StreakEngine, streakEngine } from "./engines/streak.js";
|
|
18
|
+
import "./engines/index.js";
|
|
19
|
+
import { LearningJourneyFeature } from "./learning-journey.feature.js";
|
|
20
|
+
import "./docs/index.js";
|
|
21
|
+
|
|
22
|
+
export { AchievementEntity, AchievementModel, AchievementTypeEnum, AchievementUnlockedEvent, AttemptStatusEnum, CardEntity, CardModel, CardRatingEnum, CardReviewEntity, CardReviewedEvent, CardScheduleEntity, CertificateEntity, CertificateIssuedEvent, CompleteLessonContract, CompleteLessonInput, ContentTypeEnum, CourseCompletedEvent, CourseDifficultyEnum, CourseEntity, CourseModel, CourseModuleEntity, CoursePublishedEvent, CourseStatusEnum, DEFAULT_SRS_CONFIG, DEFAULT_STREAK_CONFIG, DEFAULT_XP_CONFIG, DailyGoalCompletedEvent, DailyGoalEntity, DeckEntity, DeckModel, EnrollInCourseContract, EnrollInCourseInput, EnrollmentCreatedEvent, EnrollmentEntity, EnrollmentModel, EnrollmentStatusEnum, GetDueCardsContract, GetDueCardsInput, GetDueCardsOutput, GetLearnerDashboardContract, GetLearnerDashboardInput, GetOnboardingProgressContract, HeartEntity, LEARNING_JOURNEY_OWNERS, LeaderboardEntryEntity, LeaderboardPeriodEnum, LearnerAchievementEntity, LearnerDashboardModel, LearnerEntity, LearnerModel, LearnerProfileEntity, LearningGapEntity, LearningJourneyEvents, LearningJourneyFeature, LearningPathEntity, LearningStyleEnum, LessonCompletedEvent, LessonContentEntity, LessonEntity, LessonProgressEntity, LessonTypeEnum, LevelUpEvent, ListOnboardingTracksContract, ModuleCompletionEntity, OnboardingCompletedEvent, OnboardingProgressEntity, OnboardingProgressModel, OnboardingStartedEvent, OnboardingStepCompletedEvent, OnboardingStepCompletionEntity, OnboardingStepEntity, OnboardingStepModel, OnboardingStepProgressModel, OnboardingStepStatusEnum, OnboardingTrackEntity, OnboardingTrackModel, ProgressModel, ProgressStatusEnum, QuestionEntity, QuestionOptionEntity, QuestionTypeEnum, QuizAttemptEntity, QuizCompletedEvent, QuizEntity, QuizStartedEvent, QuizStatusEnum, RecommendationEntity, RecommendationTypeEnum, RecordOnboardingEventContract, SRSEngine, SkillAssessmentEntity, SkillMapEntity, StreakEngine, StreakEntity, StreakUpdatedEvent, SubmitCardReviewContract, SubmitCardReviewInput, SuccessOutput, XPEngine, XPTransactionEntity, XpEarnedEvent, aiEntities, aiEnums, courseEntities, courseEnums, flashcardEntities, flashcardEnums, gamificationEntities, gamificationEnums, learnerEntities, learnerEnums, learningJourneyEntities, learningJourneyEnums, learningJourneySchemaContribution, onboardingEntities, onboardingEnums, quizEntities, quizEnums, srsEngine, streakEngine, xpEngine };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FeatureModuleSpec } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/learning-journey.feature.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Learning Journey feature module that bundles course enrollment,
|
|
7
|
+
* onboarding tracks, flashcard review, and gamification capabilities.
|
|
8
|
+
*/
|
|
9
|
+
declare const LearningJourneyFeature: FeatureModuleSpec;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { LearningJourneyFeature };
|
|
12
|
+
//# sourceMappingURL=learning-journey.feature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learning-journey.feature.d.ts","names":[],"sources":["../src/learning-journey.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAWa,wBAAwB"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
//#region src/learning-journey.feature.ts
|
|
2
|
+
/**
|
|
3
|
+
* Learning Journey feature module that bundles course enrollment,
|
|
4
|
+
* onboarding tracks, flashcard review, and gamification capabilities.
|
|
5
|
+
*/
|
|
6
|
+
const LearningJourneyFeature = {
|
|
7
|
+
meta: {
|
|
8
|
+
key: "learning-journey",
|
|
9
|
+
version: 1,
|
|
10
|
+
title: "Learning Journey",
|
|
11
|
+
description: "Learning platform with courses, onboarding, flashcards, and gamification",
|
|
12
|
+
domain: "learning",
|
|
13
|
+
owners: ["@platform.learning-journey"],
|
|
14
|
+
tags: [
|
|
15
|
+
"learning",
|
|
16
|
+
"onboarding",
|
|
17
|
+
"courses",
|
|
18
|
+
"flashcards",
|
|
19
|
+
"gamification"
|
|
20
|
+
],
|
|
21
|
+
stability: "stable"
|
|
22
|
+
},
|
|
23
|
+
operations: [
|
|
24
|
+
{
|
|
25
|
+
key: "learning.onboarding.recordEvent",
|
|
26
|
+
version: 1
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: "learning.onboarding.listTracks",
|
|
30
|
+
version: 1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: "learning.onboarding.getProgress",
|
|
34
|
+
version: 1
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
key: "learning.enroll",
|
|
38
|
+
version: 1
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: "learning.completeLesson",
|
|
42
|
+
version: 1
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: "learning.submitCardReview",
|
|
46
|
+
version: 1
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "learning.getDueCards",
|
|
50
|
+
version: 1
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: "learning.getDashboard",
|
|
54
|
+
version: 1
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
events: [
|
|
58
|
+
{
|
|
59
|
+
key: "course.published",
|
|
60
|
+
version: 1
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
key: "course.completed",
|
|
64
|
+
version: 1
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
key: "enrollment.created",
|
|
68
|
+
version: 1
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: "lesson.completed",
|
|
72
|
+
version: 1
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: "onboarding.started",
|
|
76
|
+
version: 1
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
key: "onboarding.step_completed",
|
|
80
|
+
version: 1
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
key: "onboarding.completed",
|
|
84
|
+
version: 1
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
key: "flashcard.reviewed",
|
|
88
|
+
version: 1
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
key: "quiz.started",
|
|
92
|
+
version: 1
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
key: "quiz.completed",
|
|
96
|
+
version: 1
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
key: "xp.earned",
|
|
100
|
+
version: 1
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
key: "level.up",
|
|
104
|
+
version: 1
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
key: "streak.updated",
|
|
108
|
+
version: 1
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: "achievement.unlocked",
|
|
112
|
+
version: 1
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
key: "daily_goal.completed",
|
|
116
|
+
version: 1
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
key: "certificate.issued",
|
|
120
|
+
version: 1
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
presentations: [],
|
|
124
|
+
opToPresentation: [],
|
|
125
|
+
presentationsTargets: [],
|
|
126
|
+
capabilities: {
|
|
127
|
+
provides: [
|
|
128
|
+
{
|
|
129
|
+
key: "learning-journey",
|
|
130
|
+
version: 1
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
key: "onboarding",
|
|
134
|
+
version: 1
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
key: "gamification",
|
|
138
|
+
version: 1
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
requires: [{
|
|
142
|
+
key: "identity",
|
|
143
|
+
version: 1
|
|
144
|
+
}]
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
//#endregion
|
|
149
|
+
export { LearningJourneyFeature };
|
|
150
|
+
//# sourceMappingURL=learning-journey.feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learning-journey.feature.js","names":["LearningJourneyFeature: FeatureModuleSpec"],"sources":["../src/learning-journey.feature.ts"],"sourcesContent":["/**\n * Learning Journey Feature Module Specification\n *\n * Defines the feature module for learning, onboarding, and gamification.\n */\nimport type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\n/**\n * Learning Journey feature module that bundles course enrollment,\n * onboarding tracks, flashcard review, and gamification capabilities.\n */\nexport const LearningJourneyFeature: FeatureModuleSpec = {\n meta: {\n key: 'learning-journey',\n version: 1,\n title: 'Learning Journey',\n description:\n 'Learning platform with courses, onboarding, flashcards, and gamification',\n domain: 'learning',\n owners: ['@platform.learning-journey'],\n tags: ['learning', 'onboarding', 'courses', 'flashcards', 'gamification'],\n stability: 'stable',\n },\n\n // All contract operations included in this feature\n operations: [\n // Onboarding operations\n { key: 'learning.onboarding.recordEvent', version: 1 },\n { key: 'learning.onboarding.listTracks', version: 1 },\n { key: 'learning.onboarding.getProgress', version: 1 },\n\n // Core learning operations\n { key: 'learning.enroll', version: 1 },\n { key: 'learning.completeLesson', version: 1 },\n { key: 'learning.submitCardReview', version: 1 },\n { key: 'learning.getDueCards', version: 1 },\n { key: 'learning.getDashboard', version: 1 },\n ],\n\n // Events emitted by this feature\n events: [\n // Course events\n { key: 'course.published', version: 1 },\n { key: 'course.completed', version: 1 },\n\n // Enrollment events\n { key: 'enrollment.created', version: 1 },\n\n // Progress events\n { key: 'lesson.completed', version: 1 },\n\n // Onboarding events\n { key: 'onboarding.started', version: 1 },\n { key: 'onboarding.step_completed', version: 1 },\n { key: 'onboarding.completed', version: 1 },\n\n // Flashcard events\n { key: 'flashcard.reviewed', version: 1 },\n\n // Quiz events\n { key: 'quiz.started', version: 1 },\n { key: 'quiz.completed', version: 1 },\n\n // Gamification events\n { key: 'xp.earned', version: 1 },\n { key: 'level.up', version: 1 },\n { key: 'streak.updated', version: 1 },\n { key: 'achievement.unlocked', version: 1 },\n { key: 'daily_goal.completed', version: 1 },\n\n // Certificate events\n { key: 'certificate.issued', version: 1 },\n ],\n\n // No presentations for this module feature\n presentations: [],\n opToPresentation: [],\n presentationsTargets: [],\n\n // Capability definitions\n capabilities: {\n provides: [\n { key: 'learning-journey', version: 1 },\n { key: 'onboarding', version: 1 },\n { key: 'gamification', version: 1 },\n ],\n requires: [{ key: 'identity', version: 1 }],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,yBAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,6BAA6B;EACtC,MAAM;GAAC;GAAY;GAAc;GAAW;GAAc;GAAe;EACzE,WAAW;EACZ;CAGD,YAAY;EAEV;GAAE,KAAK;GAAmC,SAAS;GAAG;EACtD;GAAE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ditionSpec {
|
|
3
|
+
/**
|
|
4
|
+
* Required event name to satisfy the condition.
|
|
5
|
+
*/
|
|
6
|
+
eventName: string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional event version to match.
|
|
9
|
+
*/
|
|
10
|
+
eventVersion?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Optional source module to match (for disambiguation).
|
|
13
|
+
*/
|
|
14
|
+
sourceModule?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Optional payload filter (shallow equality on keys).
|
|
17
|
+
*/
|
|
18
|
+
payloadFilter?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
interface EventCompletionConditionSpec extends BaseEventConditionSpec {
|
|
21
|
+
kind?: 'event';
|
|
22
|
+
}
|
|
23
|
+
interface CountCompletionConditionSpec extends BaseEventConditionSpec {
|
|
24
|
+
kind: 'count';
|
|
25
|
+
/**
|
|
26
|
+
* Minimum number of matching events required to complete the step.
|
|
27
|
+
*/
|
|
28
|
+
atLeast: number;
|
|
29
|
+
/**
|
|
30
|
+
* Optional time window (hours) from track start for counting.
|
|
31
|
+
*/
|
|
32
|
+
withinHours?: number;
|
|
33
|
+
}
|
|
34
|
+
interface TimeWindowCompletionConditionSpec extends BaseEventConditionSpec {
|
|
35
|
+
kind: 'time_window';
|
|
36
|
+
/**
|
|
37
|
+
* Must be completed within this window (hours) from track start.
|
|
38
|
+
*/
|
|
39
|
+
withinHoursOfStart?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Optional additional delay before the step becomes available (hours).
|
|
42
|
+
*/
|
|
43
|
+
availableAfterHours?: number;
|
|
44
|
+
}
|
|
45
|
+
interface SrsMasteryCompletionConditionSpec {
|
|
46
|
+
kind: 'srs_mastery';
|
|
47
|
+
/**
|
|
48
|
+
* Event carrying mastery info (defaults to drill/flashcard mastery events).
|
|
49
|
+
*/
|
|
50
|
+
eventName: string;
|
|
51
|
+
/**
|
|
52
|
+
* Payload key containing skill identifier; defaults to `skillId`.
|
|
53
|
+
*/
|
|
54
|
+
skillIdField?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Payload key containing mastery value; defaults to `mastery`.
|
|
57
|
+
*/
|
|
58
|
+
masteryField?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Minimum mastery value required (e.g., 0-1 or a numeric level).
|
|
61
|
+
*/
|
|
62
|
+
minimumMastery: number;
|
|
63
|
+
/**
|
|
64
|
+
* Optional number of mastered cards required to complete step.
|
|
65
|
+
*/
|
|
66
|
+
requiredCount?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Optional payload filter.
|
|
69
|
+
*/
|
|
70
|
+
payloadFilter?: Record<string, unknown>;
|
|
71
|
+
}
|
|
72
|
+
type StepCompletionConditionSpec = EventCompletionConditionSpec | CountCompletionConditionSpec | TimeWindowCompletionConditionSpec | SrsMasteryCompletionConditionSpec;
|
|
73
|
+
interface StepAvailabilitySpec {
|
|
74
|
+
/**
|
|
75
|
+
* Unlock step after a delay (hours) from track start.
|
|
76
|
+
*/
|
|
77
|
+
unlockAfterHours?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Unlock on a specific day from track start (day 1 = start day).
|
|
80
|
+
*/
|
|
81
|
+
unlockOnDay?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Optional due window (hours) from unlock; if exceeded, step is considered missed.
|
|
84
|
+
*/
|
|
85
|
+
dueWithinHours?: number;
|
|
86
|
+
}
|
|
87
|
+
interface StreakRuleSpec {
|
|
88
|
+
hoursWindow?: number;
|
|
89
|
+
bonusXp?: number;
|
|
90
|
+
}
|
|
91
|
+
interface CompletionRewardsSpec {
|
|
92
|
+
xpBonus?: number;
|
|
93
|
+
badgeKey?: string;
|
|
94
|
+
}
|
|
95
|
+
interface LearningJourneyStepSpec {
|
|
96
|
+
id: string;
|
|
97
|
+
title: string;
|
|
98
|
+
description?: string;
|
|
99
|
+
instructions?: string;
|
|
100
|
+
helpUrl?: string;
|
|
101
|
+
order?: number;
|
|
102
|
+
completion: StepCompletionConditionSpec;
|
|
103
|
+
availability?: StepAvailabilitySpec;
|
|
104
|
+
xpReward?: number;
|
|
105
|
+
isRequired?: boolean;
|
|
106
|
+
canSkip?: boolean;
|
|
107
|
+
actionUrl?: string;
|
|
108
|
+
actionLabel?: string;
|
|
109
|
+
metadata?: Record<string, unknown>;
|
|
110
|
+
}
|
|
111
|
+
interface LearningJourneyTrackSpec {
|
|
112
|
+
id: string;
|
|
113
|
+
productId?: string;
|
|
114
|
+
name: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
targetUserSegment?: string;
|
|
117
|
+
targetRole?: string;
|
|
118
|
+
totalXp?: number;
|
|
119
|
+
isActive?: boolean;
|
|
120
|
+
isRequired?: boolean;
|
|
121
|
+
canSkip?: boolean;
|
|
122
|
+
streakRule?: StreakRuleSpec;
|
|
123
|
+
completionRewards?: CompletionRewardsSpec;
|
|
124
|
+
steps: LearningJourneyStepSpec[];
|
|
125
|
+
metadata?: Record<string, unknown>;
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
export { BaseEventConditionSpec, CompletionRewardsSpec, CountCompletionConditionSpec, EventCompletionConditionSpec, LearningJourneyStepSpec, LearningJourneyTrackSpec, SrsMasteryCompletionConditionSpec, StepAvailabilitySpec, StepCompletionConditionSpec, StreakRuleSpec, TimeWindowCompletionConditionSpec };
|
|
129
|
+
//# sourceMappingURL=track-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"track-spec.d.ts","names":[],"sources":["../src/track-spec.ts"],"sourcesContent":[],"mappings":";UAAiB,sBAAA;EAAA;AAmBjB;AAIA;EAYiB,SAAA,EAAA,MAAA;EAYA;AA4BjB;;EAEI,YAAA,CAAA,EAAA,MAAA;EACA;;;EAGa,YAAA,CAAA,EAAA,MAAA;EAeA;AAKjB;AAKA;EAOc,aAAA,CAAA,EAjGI,MAiGJ,CAAA,MAAA,EAAA,OAAA,CAAA;;AAOD,UArGI,4BAAA,SAAqC,sBAqGzC,CAAA;EAAM,IAAA,CAAA,EAAA,OAAA;AAGnB;AAWe,UA/GE,4BAAA,SAAqC,sBA+GvC,CAAA;EACO,IAAA,EAAA,OAAA;EACb;;;;;;;;;UArGQ,iCAAA,SAA0C;;;;;;;;;;;UAY1C,iCAAA;;;;;;;;;;;;;;;;;;;;;;;;;kBAyBC;;KAGN,2BAAA,GACR,+BACA,+BACA,oCACA;UAEa,oBAAA;;;;;;;;;;;;;;UAeA,cAAA;;;;UAKA,qBAAA;;;;UAKA,uBAAA;;;;;;;cAOH;iBACG;;;;;;aAMJ;;UAGI,wBAAA;;;;;;;;;;;eAWF;sBACO;SACb;aACI"}
|
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@contractspec/module.learning-journey",
|
|
3
|
+
"version": "1.44.0",
|
|
4
|
+
"description": "Comprehensive learning journey engine - onboarding, LMS, flashcards, gamification, and AI personalization",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
10
|
+
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
11
|
+
"build": "bun build:types && bun build:bundle",
|
|
12
|
+
"build:bundle": "tsdown",
|
|
13
|
+
"build:types": "tsc --noEmit",
|
|
14
|
+
"dev": "bun build:bundle --watch",
|
|
15
|
+
"clean": "rimraf dist .turbo",
|
|
16
|
+
"lint": "bun lint:fix",
|
|
17
|
+
"lint:fix": "eslint src --fix",
|
|
18
|
+
"lint:check": "eslint src"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@contractspec/lib.schema": "1.44.0",
|
|
22
|
+
"@contractspec/lib.contracts": "1.44.0",
|
|
23
|
+
"zod": "^4.1.13"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@contractspec/tool.typescript": "1.44.0",
|
|
27
|
+
"@contractspec/tool.tsdown": "1.44.0",
|
|
28
|
+
"typescript": "^5.9.3"
|
|
29
|
+
},
|
|
30
|
+
"exports": {
|
|
31
|
+
".": "./dist/index.js",
|
|
32
|
+
"./contracts": "./dist/contracts/index.js",
|
|
33
|
+
"./contracts/models": "./dist/contracts/models.js",
|
|
34
|
+
"./contracts/onboarding": "./dist/contracts/onboarding.js",
|
|
35
|
+
"./contracts/operations": "./dist/contracts/operations.js",
|
|
36
|
+
"./contracts/shared": "./dist/contracts/shared.js",
|
|
37
|
+
"./docs": "./dist/docs/index.js",
|
|
38
|
+
"./docs/learning-journey.docblock": "./dist/docs/learning-journey.docblock.js",
|
|
39
|
+
"./engines": "./dist/engines/index.js",
|
|
40
|
+
"./engines/srs": "./dist/engines/srs.js",
|
|
41
|
+
"./engines/streak": "./dist/engines/streak.js",
|
|
42
|
+
"./engines/xp": "./dist/engines/xp.js",
|
|
43
|
+
"./entities": "./dist/entities/index.js",
|
|
44
|
+
"./entities/ai": "./dist/entities/ai.js",
|
|
45
|
+
"./entities/course": "./dist/entities/course.js",
|
|
46
|
+
"./entities/flashcard": "./dist/entities/flashcard.js",
|
|
47
|
+
"./entities/gamification": "./dist/entities/gamification.js",
|
|
48
|
+
"./entities/learner": "./dist/entities/learner.js",
|
|
49
|
+
"./entities/onboarding": "./dist/entities/onboarding.js",
|
|
50
|
+
"./entities/quiz": "./dist/entities/quiz.js",
|
|
51
|
+
"./events": "./dist/events.js",
|
|
52
|
+
"./learning-journey.feature": "./dist/learning-journey.feature.js",
|
|
53
|
+
"./track-spec": "./dist/track-spec.js",
|
|
54
|
+
"./*": "./*"
|
|
55
|
+
},
|
|
56
|
+
"module": "./dist/index.js",
|
|
57
|
+
"files": [
|
|
58
|
+
"dist",
|
|
59
|
+
"README.md"
|
|
60
|
+
],
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public",
|
|
63
|
+
"exports": {
|
|
64
|
+
".": "./dist/index.js",
|
|
65
|
+
"./contracts": "./dist/contracts/index.js",
|
|
66
|
+
"./contracts/models": "./dist/contracts/models.js",
|
|
67
|
+
"./contracts/onboarding": "./dist/contracts/onboarding.js",
|
|
68
|
+
"./contracts/operations": "./dist/contracts/operations.js",
|
|
69
|
+
"./contracts/shared": "./dist/contracts/shared.js",
|
|
70
|
+
"./docs": "./dist/docs/index.js",
|
|
71
|
+
"./docs/learning-journey.docblock": "./dist/docs/learning-journey.docblock.js",
|
|
72
|
+
"./engines": "./dist/engines/index.js",
|
|
73
|
+
"./engines/srs": "./dist/engines/srs.js",
|
|
74
|
+
"./engines/streak": "./dist/engines/streak.js",
|
|
75
|
+
"./engines/xp": "./dist/engines/xp.js",
|
|
76
|
+
"./entities": "./dist/entities/index.js",
|
|
77
|
+
"./entities/ai": "./dist/entities/ai.js",
|
|
78
|
+
"./entities/course": "./dist/entities/course.js",
|
|
79
|
+
"./entities/flashcard": "./dist/entities/flashcard.js",
|
|
80
|
+
"./entities/gamification": "./dist/entities/gamification.js",
|
|
81
|
+
"./entities/learner": "./dist/entities/learner.js",
|
|
82
|
+
"./entities/onboarding": "./dist/entities/onboarding.js",
|
|
83
|
+
"./entities/quiz": "./dist/entities/quiz.js",
|
|
84
|
+
"./events": "./dist/events.js",
|
|
85
|
+
"./learning-journey.feature": "./dist/learning-journey.feature.js",
|
|
86
|
+
"./track-spec": "./dist/track-spec.js",
|
|
87
|
+
"./*": "./*"
|
|
88
|
+
},
|
|
89
|
+
"registry": "https://registry.npmjs.org/"
|
|
90
|
+
},
|
|
91
|
+
"license": "MIT",
|
|
92
|
+
"repository": {
|
|
93
|
+
"type": "git",
|
|
94
|
+
"url": "https://github.com/lssm-tech/contractspec.git",
|
|
95
|
+
"directory": "packages/modules/learning-journey"
|
|
96
|
+
},
|
|
97
|
+
"homepage": "https://contractspec.io"
|
|
98
|
+
}
|