@contractspec/module.learning-journey 0.0.0-canary-20260113162409

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.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +200 -0
  3. package/dist/contracts/index.d.ts +5 -0
  4. package/dist/contracts/index.js +6 -0
  5. package/dist/contracts/models.d.ts +451 -0
  6. package/dist/contracts/models.d.ts.map +1 -0
  7. package/dist/contracts/models.js +388 -0
  8. package/dist/contracts/models.js.map +1 -0
  9. package/dist/contracts/onboarding.d.ts +666 -0
  10. package/dist/contracts/onboarding.d.ts.map +1 -0
  11. package/dist/contracts/onboarding.js +402 -0
  12. package/dist/contracts/onboarding.js.map +1 -0
  13. package/dist/contracts/operations.d.ts +280 -0
  14. package/dist/contracts/operations.d.ts.map +1 -0
  15. package/dist/contracts/operations.js +151 -0
  16. package/dist/contracts/operations.js.map +1 -0
  17. package/dist/contracts/shared.d.ts +5 -0
  18. package/dist/contracts/shared.d.ts.map +1 -0
  19. package/dist/contracts/shared.js +6 -0
  20. package/dist/contracts/shared.js.map +1 -0
  21. package/dist/docs/index.d.ts +1 -0
  22. package/dist/docs/index.js +1 -0
  23. package/dist/docs/learning-journey.docblock.d.ts +1 -0
  24. package/dist/docs/learning-journey.docblock.js +136 -0
  25. package/dist/docs/learning-journey.docblock.js.map +1 -0
  26. package/dist/engines/index.d.ts +4 -0
  27. package/dist/engines/index.js +5 -0
  28. package/dist/engines/srs.d.ts +111 -0
  29. package/dist/engines/srs.d.ts.map +1 -0
  30. package/dist/engines/srs.js +219 -0
  31. package/dist/engines/srs.js.map +1 -0
  32. package/dist/engines/streak.d.ts +100 -0
  33. package/dist/engines/streak.d.ts.map +1 -0
  34. package/dist/engines/streak.js +194 -0
  35. package/dist/engines/streak.js.map +1 -0
  36. package/dist/engines/xp.d.ts +97 -0
  37. package/dist/engines/xp.d.ts.map +1 -0
  38. package/dist/engines/xp.js +213 -0
  39. package/dist/engines/xp.js.map +1 -0
  40. package/dist/entities/ai.d.ts +232 -0
  41. package/dist/entities/ai.d.ts.map +1 -0
  42. package/dist/entities/ai.js +376 -0
  43. package/dist/entities/ai.js.map +1 -0
  44. package/dist/entities/course.d.ts +184 -0
  45. package/dist/entities/course.d.ts.map +1 -0
  46. package/dist/entities/course.js +316 -0
  47. package/dist/entities/course.js.map +1 -0
  48. package/dist/entities/flashcard.d.ts +170 -0
  49. package/dist/entities/flashcard.d.ts.map +1 -0
  50. package/dist/entities/flashcard.js +249 -0
  51. package/dist/entities/flashcard.js.map +1 -0
  52. package/dist/entities/gamification.d.ts +238 -0
  53. package/dist/entities/gamification.d.ts.map +1 -0
  54. package/dist/entities/gamification.js +392 -0
  55. package/dist/entities/gamification.js.map +1 -0
  56. package/dist/entities/index.d.ts +629 -0
  57. package/dist/entities/index.d.ts.map +1 -0
  58. package/dist/entities/index.js +45 -0
  59. package/dist/entities/index.js.map +1 -0
  60. package/dist/entities/learner.d.ts +224 -0
  61. package/dist/entities/learner.d.ts.map +1 -0
  62. package/dist/entities/learner.js +365 -0
  63. package/dist/entities/learner.js.map +1 -0
  64. package/dist/entities/onboarding.d.ts +190 -0
  65. package/dist/entities/onboarding.d.ts.map +1 -0
  66. package/dist/entities/onboarding.js +307 -0
  67. package/dist/entities/onboarding.js.map +1 -0
  68. package/dist/entities/quiz.d.ts +220 -0
  69. package/dist/entities/quiz.d.ts.map +1 -0
  70. package/dist/entities/quiz.js +370 -0
  71. package/dist/entities/quiz.js.map +1 -0
  72. package/dist/events.d.ts +796 -0
  73. package/dist/events.d.ts.map +1 -0
  74. package/dist/events.js +690 -0
  75. package/dist/events.js.map +1 -0
  76. package/dist/index.d.ts +20 -0
  77. package/dist/index.js +22 -0
  78. package/dist/learning-journey.capability.d.ts +9 -0
  79. package/dist/learning-journey.capability.d.ts.map +1 -0
  80. package/dist/learning-journey.capability.js +46 -0
  81. package/dist/learning-journey.capability.js.map +1 -0
  82. package/dist/learning-journey.feature.d.ts +12 -0
  83. package/dist/learning-journey.feature.d.ts.map +1 -0
  84. package/dist/learning-journey.feature.js +157 -0
  85. package/dist/learning-journey.feature.js.map +1 -0
  86. package/dist/track-spec.d.ts +129 -0
  87. package/dist/track-spec.d.ts.map +1 -0
  88. package/dist/track-spec.js +0 -0
  89. package/package.json +105 -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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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.0.0',\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 XpEarnedEvent,\n LevelUpEvent,\n StreakUpdatedEvent,\n AchievementUnlockedEvent,\n DailyGoalCompletedEvent,\n CertificateIssuedEvent,\n};\n"],"mappings":";;;;;AAMA,MAAM,yBAAyB,kBAAkB;CAC/C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,aAAa;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EACpE;CACF,CAAC;AAEF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,GAAG,wBAAwB;EACpC,MAAM,CAAC,YAAY,SAAS;EAC7B;CACD,SAAS;CACV,CAAC;AAIF,MAAM,2BAA2B,kBAAkB;CACjD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE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ACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACpE,UAAU;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACpE,aAAa;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EACpE;CACF,CAAC;AAEF,MAAa,0BAA0B,YAAY;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,GAAG,wBAAwB;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"}
@@ -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,9 @@
1
+ import * as _contractspec_lib_contracts39 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/learning-journey.capability.d.ts
4
+ declare const LearningJourneyCapability: _contractspec_lib_contracts39.CapabilitySpec;
5
+ declare const OnboardingCapability: _contractspec_lib_contracts39.CapabilitySpec;
6
+ declare const GamificationCapability: _contractspec_lib_contracts39.CapabilitySpec;
7
+ //#endregion
8
+ export { GamificationCapability, LearningJourneyCapability, OnboardingCapability };
9
+ //# sourceMappingURL=learning-journey.capability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"learning-journey.capability.d.ts","names":[],"sources":["../src/learning-journey.capability.ts"],"sourcesContent":[],"mappings":";;;cAEa,2BAUX,6BAAA,CAVoC;cAYzB,sBAUX,6BAAA,CAV+B;cAYpB,wBAUX,6BAAA,CAViC"}
@@ -0,0 +1,46 @@
1
+ import { StabilityEnum, defineCapability } from "@contractspec/lib.contracts";
2
+
3
+ //#region src/learning-journey.capability.ts
4
+ const LearningJourneyCapability = defineCapability({ meta: {
5
+ key: "learning-journey",
6
+ version: "1.0.0",
7
+ kind: "ui",
8
+ stability: StabilityEnum.Experimental,
9
+ description: "Guided learning paths and progress tracking",
10
+ owners: ["platform.core"],
11
+ tags: [
12
+ "learning",
13
+ "onboarding",
14
+ "ui"
15
+ ]
16
+ } });
17
+ const OnboardingCapability = defineCapability({ meta: {
18
+ key: "onboarding",
19
+ version: "1.0.0",
20
+ kind: "ui",
21
+ stability: StabilityEnum.Experimental,
22
+ description: "User onboarding and first-time experience flows",
23
+ owners: ["platform.core"],
24
+ tags: [
25
+ "onboarding",
26
+ "ux",
27
+ "ui"
28
+ ]
29
+ } });
30
+ const GamificationCapability = defineCapability({ meta: {
31
+ key: "gamification",
32
+ version: "1.0.0",
33
+ kind: "ui",
34
+ stability: StabilityEnum.Experimental,
35
+ description: "Gamification elements like badges, points, and achievements",
36
+ owners: ["platform.core"],
37
+ tags: [
38
+ "gamification",
39
+ "engagement",
40
+ "ui"
41
+ ]
42
+ } });
43
+
44
+ //#endregion
45
+ export { GamificationCapability, LearningJourneyCapability, OnboardingCapability };
46
+ //# sourceMappingURL=learning-journey.capability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"learning-journey.capability.js","names":[],"sources":["../src/learning-journey.capability.ts"],"sourcesContent":["import { defineCapability, StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const LearningJourneyCapability = defineCapability({\n meta: {\n key: 'learning-journey',\n version: '1.0.0',\n kind: 'ui',\n stability: StabilityEnum.Experimental,\n description: 'Guided learning paths and progress tracking',\n owners: ['platform.core'],\n tags: ['learning', 'onboarding', 'ui'],\n },\n});\n\nexport const OnboardingCapability = defineCapability({\n meta: {\n key: 'onboarding',\n version: '1.0.0',\n kind: 'ui',\n stability: StabilityEnum.Experimental,\n description: 'User onboarding and first-time experience flows',\n owners: ['platform.core'],\n tags: ['onboarding', 'ux', 'ui'],\n },\n});\n\nexport const GamificationCapability = defineCapability({\n meta: {\n key: 'gamification',\n version: '1.0.0',\n kind: 'ui',\n stability: StabilityEnum.Experimental,\n description: 'Gamification elements like badges, points, and achievements',\n owners: ['platform.core'],\n tags: ['gamification', 'engagement', 'ui'],\n },\n});\n"],"mappings":";;;AAEA,MAAa,4BAA4B,iBAAiB,EACxD,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,gBAAgB;CACzB,MAAM;EAAC;EAAY;EAAc;EAAK;CACvC,EACF,CAAC;AAEF,MAAa,uBAAuB,iBAAiB,EACnD,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,gBAAgB;CACzB,MAAM;EAAC;EAAc;EAAM;EAAK;CACjC,EACF,CAAC;AAEF,MAAa,yBAAyB,iBAAiB,EACrD,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,gBAAgB;CACzB,MAAM;EAAC;EAAgB;EAAc;EAAK;CAC3C,EACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import * as _contractspec_lib_contracts42 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: _contractspec_lib_contracts42.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":";;;;;;;AAWA;cAAa,wBA6EX,6BAAA,CA7EiC"}
@@ -0,0 +1,157 @@
1
+ import { defineFeature } from "@contractspec/lib.contracts";
2
+
3
+ //#region src/learning-journey.feature.ts
4
+ /**
5
+ * Learning Journey Feature Module Specification
6
+ *
7
+ * Defines the feature module for learning, onboarding, and gamification.
8
+ */
9
+ /**
10
+ * Learning Journey feature module that bundles course enrollment,
11
+ * onboarding tracks, flashcard review, and gamification capabilities.
12
+ */
13
+ const LearningJourneyFeature = defineFeature({
14
+ meta: {
15
+ key: "learning-journey",
16
+ version: "1.0.0",
17
+ title: "Learning Journey",
18
+ description: "Learning platform with courses, onboarding, flashcards, and gamification",
19
+ domain: "learning",
20
+ owners: ["@platform.learning-journey"],
21
+ tags: [
22
+ "learning",
23
+ "onboarding",
24
+ "courses",
25
+ "flashcards",
26
+ "gamification"
27
+ ],
28
+ stability: "stable"
29
+ },
30
+ operations: [
31
+ {
32
+ key: "learning.onboarding.recordEvent",
33
+ version: "1.0.0"
34
+ },
35
+ {
36
+ key: "learning.onboarding.listTracks",
37
+ version: "1.0.0"
38
+ },
39
+ {
40
+ key: "learning.onboarding.getProgress",
41
+ version: "1.0.0"
42
+ },
43
+ {
44
+ key: "learning.enroll",
45
+ version: "1.0.0"
46
+ },
47
+ {
48
+ key: "learning.completeLesson",
49
+ version: "1.0.0"
50
+ },
51
+ {
52
+ key: "learning.submitCardReview",
53
+ version: "1.0.0"
54
+ },
55
+ {
56
+ key: "learning.getDueCards",
57
+ version: "1.0.0"
58
+ },
59
+ {
60
+ key: "learning.getDashboard",
61
+ version: "1.0.0"
62
+ }
63
+ ],
64
+ events: [
65
+ {
66
+ key: "course.published",
67
+ version: "1.0.0"
68
+ },
69
+ {
70
+ key: "course.completed",
71
+ version: "1.0.0"
72
+ },
73
+ {
74
+ key: "enrollment.created",
75
+ version: "1.0.0"
76
+ },
77
+ {
78
+ key: "lesson.completed",
79
+ version: "1.0.0"
80
+ },
81
+ {
82
+ key: "onboarding.started",
83
+ version: "1.0.0"
84
+ },
85
+ {
86
+ key: "onboarding.step_completed",
87
+ version: "1.0.0"
88
+ },
89
+ {
90
+ key: "onboarding.completed",
91
+ version: "1.0.0"
92
+ },
93
+ {
94
+ key: "flashcard.reviewed",
95
+ version: "1.0.0"
96
+ },
97
+ {
98
+ key: "quiz.started",
99
+ version: "1.0.0"
100
+ },
101
+ {
102
+ key: "quiz.completed",
103
+ version: "1.0.0"
104
+ },
105
+ {
106
+ key: "xp.earned",
107
+ version: "1.0.0"
108
+ },
109
+ {
110
+ key: "level.up",
111
+ version: "1.0.0"
112
+ },
113
+ {
114
+ key: "streak.updated",
115
+ version: "1.0.0"
116
+ },
117
+ {
118
+ key: "achievement.unlocked",
119
+ version: "1.0.0"
120
+ },
121
+ {
122
+ key: "daily_goal.completed",
123
+ version: "1.0.0"
124
+ },
125
+ {
126
+ key: "certificate.issued",
127
+ version: "1.0.0"
128
+ }
129
+ ],
130
+ presentations: [],
131
+ opToPresentation: [],
132
+ presentationsTargets: [],
133
+ capabilities: {
134
+ provides: [
135
+ {
136
+ key: "learning-journey",
137
+ version: "1.0.0"
138
+ },
139
+ {
140
+ key: "onboarding",
141
+ version: "1.0.0"
142
+ },
143
+ {
144
+ key: "gamification",
145
+ version: "1.0.0"
146
+ }
147
+ ],
148
+ requires: [{
149
+ key: "identity",
150
+ version: "1.0.0"
151
+ }]
152
+ }
153
+ });
154
+
155
+ //#endregion
156
+ export { LearningJourneyFeature };
157
+ //# sourceMappingURL=learning-journey.feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"learning-journey.feature.js","names":[],"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 { defineFeature } 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 = defineFeature({\n meta: {\n key: 'learning-journey',\n version: '1.0.0',\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.0.0' },\n { key: 'learning.onboarding.listTracks', version: '1.0.0' },\n { key: 'learning.onboarding.getProgress', version: '1.0.0' },\n\n // Core learning operations\n { key: 'learning.enroll', version: '1.0.0' },\n { key: 'learning.completeLesson', version: '1.0.0' },\n { key: 'learning.submitCardReview', version: '1.0.0' },\n { key: 'learning.getDueCards', version: '1.0.0' },\n { key: 'learning.getDashboard', version: '1.0.0' },\n ],\n\n // Events emitted by this feature\n events: [\n // Course events\n { key: 'course.published', version: '1.0.0' },\n { key: 'course.completed', version: '1.0.0' },\n\n // Enrollment events\n { key: 'enrollment.created', version: '1.0.0' },\n\n // Progress events\n { key: 'lesson.completed', version: '1.0.0' },\n\n // Onboarding events\n { key: 'onboarding.started', version: '1.0.0' },\n { key: 'onboarding.step_completed', version: '1.0.0' },\n { key: 'onboarding.completed', version: '1.0.0' },\n\n // Flashcard events\n { key: 'flashcard.reviewed', version: '1.0.0' },\n\n // Quiz events\n { key: 'quiz.started', version: '1.0.0' },\n { key: 'quiz.completed', version: '1.0.0' },\n\n // Gamification events\n { key: 'xp.earned', version: '1.0.0' },\n { key: 'level.up', version: '1.0.0' },\n { key: 'streak.updated', version: '1.0.0' },\n { key: 'achievement.unlocked', version: '1.0.0' },\n { key: 'daily_goal.completed', version: '1.0.0' },\n\n // Certificate events\n { key: 'certificate.issued', version: '1.0.0' },\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.0.0' },\n { key: 'onboarding', version: '1.0.0' },\n { key: 'gamification', version: '1.0.0' },\n ],\n requires: [{ key: 'identity', version: '1.0.0' }],\n },\n});\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,yBAAyB,cAAc;CAClD,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;GAAS;EAC5D;GAAE,KAAK;GAAkC,SAAS;GAAS;EAC3D;GAAE,KAAK;GAAmC,SAAS;GAAS;EAG5D;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC5C;GAAE,KAAK;GAA2B,SAAS;GAAS;EACpD;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAAwB,SAAS;GAAS;EACjD;GAAE,KAAK;GAAyB,SAAS;GAAS;EACnD;CAGD,QAAQ;EAEN;GAAE,KAAK;GAAoB,SAAS;GAAS;EAC7C;GAAE,KAAK;GAAoB,SAAS;GAAS;EAG7C;GAAE,KAAK;GAAsB,SAAS;GAAS;EAG/C;GAAE,KAAK;GAAoB,SAAS;GAAS;EAG7C;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAAwB,SAAS;GAAS;EAGjD;GAAE,KAAK;GAAsB,SAAS;GAAS;EAG/C;GAAE,KAAK;GAAgB,SAAS;GAAS;EACzC;GAAE,KAAK;GAAkB,SAAS;GAAS;EAG3C;GAAE,KAAK;GAAa,SAAS;GAAS;EACtC;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAkB,SAAS;GAAS;EAC3C;GAAE,KAAK;GAAwB,SAAS;GAAS;EACjD;GAAE,KAAK;GAAwB,SAAS;GAAS;EAGjD;GAAE,KAAK;GAAsB,SAAS;GAAS;EAChD;CAGD,eAAe,EAAE;CACjB,kBAAkB,EAAE;CACpB,sBAAsB,EAAE;CAGxB,cAAc;EACZ,UAAU;GACR;IAAE,KAAK;IAAoB,SAAS;IAAS;GAC7C;IAAE,KAAK;IAAc,SAAS;IAAS;GACvC;IAAE,KAAK;IAAgB,SAAS;IAAS;GAC1C;EACD,UAAU,CAAC;GAAE,KAAK;GAAY,SAAS;GAAS,CAAC;EAClD;CACF,CAAC"}
@@ -0,0 +1,129 @@
1
+ //#region src/track-spec.d.ts
2
+ interface BaseEventConditionSpec {
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,105 @@
1
+ {
2
+ "name": "@contractspec/module.learning-journey",
3
+ "version": "0.0.0-canary-20260113162409",
4
+ "description": "Comprehensive learning journey engine - onboarding, LMS, flashcards, gamification, and AI personalization",
5
+ "keywords": [
6
+ "contractspec",
7
+ "learning",
8
+ "onboarding",
9
+ "gamification",
10
+ "lms",
11
+ "typescript"
12
+ ],
13
+ "types": "./dist/index.d.ts",
14
+ "type": "module",
15
+ "scripts": {
16
+ "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
17
+ "publish:pkg:canary": "bun publish:pkg --tag canary",
18
+ "build": "bun build:types && bun build:bundle",
19
+ "build:bundle": "tsdown",
20
+ "build:types": "tsc --noEmit",
21
+ "dev": "bun build:bundle --watch",
22
+ "clean": "rimraf dist .turbo",
23
+ "lint": "bun lint:fix",
24
+ "lint:fix": "eslint src --fix",
25
+ "lint:check": "eslint src"
26
+ },
27
+ "dependencies": {
28
+ "@contractspec/lib.schema": "0.0.0-canary-20260113162409",
29
+ "@contractspec/lib.contracts": "0.0.0-canary-20260113162409",
30
+ "zod": "^4.3.5"
31
+ },
32
+ "devDependencies": {
33
+ "@contractspec/tool.typescript": "0.0.0-canary-20260113162409",
34
+ "@contractspec/tool.tsdown": "0.0.0-canary-20260113162409",
35
+ "typescript": "^5.9.3"
36
+ },
37
+ "exports": {
38
+ ".": "./dist/index.js",
39
+ "./contracts": "./dist/contracts/index.js",
40
+ "./contracts/models": "./dist/contracts/models.js",
41
+ "./contracts/onboarding": "./dist/contracts/onboarding.js",
42
+ "./contracts/operations": "./dist/contracts/operations.js",
43
+ "./contracts/shared": "./dist/contracts/shared.js",
44
+ "./docs": "./dist/docs/index.js",
45
+ "./docs/learning-journey.docblock": "./dist/docs/learning-journey.docblock.js",
46
+ "./engines": "./dist/engines/index.js",
47
+ "./engines/srs": "./dist/engines/srs.js",
48
+ "./engines/streak": "./dist/engines/streak.js",
49
+ "./engines/xp": "./dist/engines/xp.js",
50
+ "./entities": "./dist/entities/index.js",
51
+ "./entities/ai": "./dist/entities/ai.js",
52
+ "./entities/course": "./dist/entities/course.js",
53
+ "./entities/flashcard": "./dist/entities/flashcard.js",
54
+ "./entities/gamification": "./dist/entities/gamification.js",
55
+ "./entities/learner": "./dist/entities/learner.js",
56
+ "./entities/onboarding": "./dist/entities/onboarding.js",
57
+ "./entities/quiz": "./dist/entities/quiz.js",
58
+ "./events": "./dist/events.js",
59
+ "./learning-journey.capability": "./dist/learning-journey.capability.js",
60
+ "./learning-journey.feature": "./dist/learning-journey.feature.js",
61
+ "./track-spec": "./dist/track-spec.js",
62
+ "./*": "./*"
63
+ },
64
+ "files": [
65
+ "dist",
66
+ "README.md"
67
+ ],
68
+ "publishConfig": {
69
+ "access": "public",
70
+ "exports": {
71
+ ".": "./dist/index.js",
72
+ "./contracts": "./dist/contracts/index.js",
73
+ "./contracts/models": "./dist/contracts/models.js",
74
+ "./contracts/onboarding": "./dist/contracts/onboarding.js",
75
+ "./contracts/operations": "./dist/contracts/operations.js",
76
+ "./contracts/shared": "./dist/contracts/shared.js",
77
+ "./docs": "./dist/docs/index.js",
78
+ "./docs/learning-journey.docblock": "./dist/docs/learning-journey.docblock.js",
79
+ "./engines": "./dist/engines/index.js",
80
+ "./engines/srs": "./dist/engines/srs.js",
81
+ "./engines/streak": "./dist/engines/streak.js",
82
+ "./engines/xp": "./dist/engines/xp.js",
83
+ "./entities": "./dist/entities/index.js",
84
+ "./entities/ai": "./dist/entities/ai.js",
85
+ "./entities/course": "./dist/entities/course.js",
86
+ "./entities/flashcard": "./dist/entities/flashcard.js",
87
+ "./entities/gamification": "./dist/entities/gamification.js",
88
+ "./entities/learner": "./dist/entities/learner.js",
89
+ "./entities/onboarding": "./dist/entities/onboarding.js",
90
+ "./entities/quiz": "./dist/entities/quiz.js",
91
+ "./events": "./dist/events.js",
92
+ "./learning-journey.feature": "./dist/learning-journey.feature.js",
93
+ "./track-spec": "./dist/track-spec.js",
94
+ "./*": "./*"
95
+ },
96
+ "registry": "https://registry.npmjs.org/"
97
+ },
98
+ "license": "MIT",
99
+ "repository": {
100
+ "type": "git",
101
+ "url": "https://github.com/lssm-tech/contractspec.git",
102
+ "directory": "packages/modules/learning-journey"
103
+ },
104
+ "homepage": "https://contractspec.io"
105
+ }