@lssm/module.learning-journey 0.0.0-canary-20251217062139 → 0.0.0-canary-20251217060834
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/dist/contracts/models.d.ts +118 -118
- package/dist/contracts/models.js +1 -1
- package/dist/contracts/onboarding.d.ts +168 -168
- package/dist/contracts/onboarding.js +1 -1
- package/dist/contracts/operations.d.ts +71 -71
- package/dist/contracts/operations.js +1 -1
- package/dist/docs/learning-journey.docblock.js +1 -1
- package/dist/entities/ai.d.ts +200 -200
- package/dist/entities/ai.js +1 -1
- package/dist/entities/course.d.ts +150 -150
- package/dist/entities/course.js +1 -1
- package/dist/entities/flashcard.d.ts +145 -145
- package/dist/entities/flashcard.js +1 -1
- package/dist/entities/gamification.d.ts +198 -198
- package/dist/entities/gamification.js +1 -1
- package/dist/entities/index.d.ts +605 -605
- package/dist/entities/learner.d.ts +192 -192
- package/dist/entities/learner.js +1 -1
- package/dist/entities/onboarding.d.ts +165 -165
- package/dist/entities/onboarding.js +1 -1
- package/dist/entities/quiz.d.ts +185 -185
- package/dist/entities/quiz.js +1 -1
- package/dist/events.d.ts +213 -213
- package/dist/events.js +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +5 -5
- package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -1
- package/dist/libs/contracts/dist/client/index.js +0 -1
- package/dist/libs/contracts/dist/client/react/feature-render.js +0 -1
- package/dist/libs/contracts/dist/client/react/form-render.js +0 -1
- package/dist/libs/contracts/dist/client/react/index.js +0 -1
- package/dist/libs/contracts/dist/contract-registry/index.js +0 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js +0 -1
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -76
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -350
- package/dist/libs/contracts/dist/docs/index.js +0 -1
- package/dist/libs/contracts/dist/docs/presentations.js +0 -1
- package/dist/libs/contracts/dist/docs/registry.js +0 -1
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -383
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -68
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -140
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -86
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -1
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -58
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -38
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -213
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -289
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -1
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -1
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -262
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -57
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -63
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -36
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -20
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -65
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -41
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -122
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -1
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -68
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -1
- package/dist/libs/contracts/dist/events.js +0 -1
- package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
- package/dist/libs/contracts/dist/index.js +0 -1
- package/dist/libs/contracts/dist/install.js +0 -1
- package/dist/libs/contracts/dist/integrations/contracts.js +0 -1
- package/dist/libs/contracts/dist/integrations/index.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/index.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -1
- package/dist/libs/contracts/dist/jsonschema.js +0 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js +0 -1
- package/dist/libs/contracts/dist/knowledge/index.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -1
- package/dist/libs/contracts/dist/llm/exporters.js +0 -1
- package/dist/libs/contracts/dist/llm/index.js +0 -1
- package/dist/libs/contracts/dist/llm/prompts.js +0 -1
- package/dist/libs/contracts/dist/onboarding-base.js +0 -1
- package/dist/libs/contracts/dist/openapi.js +0 -1
- package/dist/libs/contracts/dist/ownership.js +0 -1
- package/dist/libs/contracts/dist/presentations.js +0 -1
- package/dist/libs/contracts/dist/presentations.v2.js +0 -1
- package/dist/libs/contracts/dist/prompt.js +0 -1
- package/dist/libs/contracts/dist/promptRegistry.js +0 -1
- package/dist/libs/contracts/dist/regenerator/index.js +0 -1
- package/dist/libs/contracts/dist/regenerator/service.js +0 -1
- package/dist/libs/contracts/dist/registry.js +0 -1
- package/dist/libs/contracts/dist/resources.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +0 -1
- package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -1
- package/dist/libs/contracts/dist/server/index.js +0 -1
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +0 -1
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +0 -1
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +0 -1
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +0 -1
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +0 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
- package/dist/libs/contracts/dist/server/rest-express.js +0 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
- package/dist/libs/contracts/dist/spec.js +0 -1
- package/dist/libs/contracts/dist/telemetry/index.js +0 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
- package/dist/libs/contracts/dist/tests/index.js +0 -1
- package/dist/libs/contracts/dist/tests/runner.js +0 -1
- package/dist/libs/contracts/dist/workflow/index.js +0 -1
- package/dist/libs/contracts/dist/workflow/runner.js +0 -1
- package/dist/libs/schema/dist/EnumType.js +0 -1
- package/dist/libs/schema/dist/FieldType.js +0 -1
- package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -1
- package/dist/libs/schema/dist/SchemaModel.js +0 -1
- package/dist/libs/schema/dist/entity/defineEntity.js +0 -1
- package/dist/libs/schema/dist/entity/index.js +0 -1
- package/dist/libs/schema/dist/entity/types.js +0 -1
- package/dist/libs/schema/dist/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{LEARNING_JOURNEY_OWNERS as e}from"./shared.js";import{SuccessOutput as t}from"./models.js";import{ScalarTypeEnum as n,defineSchemaModel as r}from"@lssm/lib.schema";import{defineCommand as i,defineQuery as a}from"@lssm/lib.contracts";const o=r({name:`OnboardingStepCondition`,description:`Structured completion condition for onboarding steps.`,fields:{eventName:{type:n.String_unsecure(),isOptional:!1},eventVersion:{type:n.Int_unsecure(),isOptional:!0},sourceModule:{type:n.String_unsecure(),isOptional:!0},payloadFilter:{type:n.JSON(),isOptional:!0}}}),s=r({name:`OnboardingStep`,description:`Declarative onboarding step definition.`,fields:{id:{type:n.String_unsecure(),isOptional:!1},trackId:{type:n.String_unsecure(),isOptional:!1},title:{type:n.String_unsecure(),isOptional:!1},description:{type:n.String_unsecure(),isOptional:!0},instructions:{type:n.String_unsecure(),isOptional:!0},helpUrl:{type:n.String_unsecure(),isOptional:!0},order:{type:n.Int_unsecure(),isOptional:!1},completionEvent:{type:n.String_unsecure(),isOptional:!1},completionCondition:{type:o,isOptional:!0},xpReward:{type:n.Int_unsecure(),isOptional:!0},isRequired:{type:n.Boolean(),isOptional:!0},canSkip:{type:n.Boolean(),isOptional:!0},actionUrl:{type:n.String_unsecure(),isOptional:!0},actionLabel:{type:n.String_unsecure(),isOptional:!0},metadata:{type:n.JSON(),isOptional:!0}}}),c=r({name:`OnboardingTrack`,description:`Onboarding track metadata and steps.`,fields:{id:{type:n.String_unsecure(),isOptional:!1},productId:{type:n.String_unsecure(),isOptional:!0},name:{type:n.String_unsecure(),isOptional:!1},description:{type:n.String_unsecure(),isOptional:!0},targetUserSegment:{type:n.String_unsecure(),isOptional:!0},targetRole:{type:n.String_unsecure(),isOptional:!0},isActive:{type:n.Boolean(),isOptional:!0},isRequired:{type:n.Boolean(),isOptional:!0},canSkip:{type:n.Boolean(),isOptional:!0},totalXp:{type:n.Int_unsecure(),isOptional:!0},completionXpBonus:{type:n.Int_unsecure(),isOptional:!0},completionBadgeKey:{type:n.String_unsecure(),isOptional:!0},streakHoursWindow:{type:n.Int_unsecure(),isOptional:!0},streakBonusXp:{type:n.Int_unsecure(),isOptional:!0},metadata:{type:n.JSON(),isOptional:!0},steps:{type:s,isArray:!0,isOptional:!1}}}),l=r({name:`OnboardingStepProgress`,description:`Progress for a specific onboarding step.`,fields:{stepId:{type:n.String_unsecure(),isOptional:!1},status:{type:n.String_unsecure(),isOptional:!1},xpEarned:{type:n.Int_unsecure(),isOptional:!0},triggeringEvent:{type:n.String_unsecure(),isOptional:!0},eventPayload:{type:n.JSON(),isOptional:!0},completedAt:{type:n.DateTime(),isOptional:!0}}}),u=r({name:`OnboardingProgress`,description:`Aggregated progress for an onboarding track.`,fields:{learnerId:{type:n.String_unsecure(),isOptional:!0},trackId:{type:n.String_unsecure(),isOptional:!1},progress:{type:n.Int_unsecure(),isOptional:!1},isCompleted:{type:n.Boolean(),isOptional:!1},xpEarned:{type:n.Int_unsecure(),isOptional:!0},startedAt:{type:n.DateTime(),isOptional:!0},completedAt:{type:n.DateTime(),isOptional:!0},lastActivityAt:{type:n.DateTime(),isOptional:!0},steps:{type:l,isArray:!0,isOptional:!0}}}),d=r({name:`ListOnboardingTracksInput`,description:`Filters for listing onboarding tracks.`,fields:{learnerId:{type:n.String_unsecure(),isOptional:!0},productId:{type:n.String_unsecure(),isOptional:!0},trackIds:{type:n.String_unsecure(),isArray:!0,isOptional:!0},includeProgress:{type:n.Boolean(),isOptional:!0}}}),f=r({name:`ListOnboardingTracksOutput`,description:`Available onboarding tracks with optional progress.`,fields:{tracks:{type:c,isArray:!0,isOptional:!1},progress:{type:u,isArray:!0,isOptional:!0}}}),p=r({name:`GetOnboardingProgressInput`,description:`Input for fetching onboarding progress for a track.`,fields:{trackId:{type:n.String_unsecure(),isOptional:!1},learnerId:{type:n.String_unsecure(),isOptional:!0}}}),m=r({name:`RecordOnboardingEventInput`,description:`Record a domain event to advance onboarding progress via completion conditions.`,fields:{learnerId:{type:n.String_unsecure(),isOptional:!1},trackId:{type:n.String_unsecure(),isOptional:!0},eventName:{type:n.String_unsecure(),isOptional:!1},eventVersion:{type:n.Int_unsecure(),isOptional:!0},eventPayload:{type:n.JSON(),isOptional:!0},occurredAt:{type:n.DateTime(),isOptional:!0}}}),h=a({meta:{name:`learning.onboarding.listTracks`,version:1,stability:`stable`,owners:[...e],tags:[`learning`,`onboarding`,`journey`],description:`List onboarding tracks available to a learner or product.`,goal:`Expose track catalog for UI/API surfaces.`,context:`Called when showing onboarding/learning journey catalog.`},io:{input:d,output:f},policy:{auth:`user`}}),g=a({meta:{name:`learning.onboarding.getProgress`,version:1,stability:`stable`,owners:[...e],tags:[`learning`,`onboarding`,`journey`],description:`Fetch onboarding progress for a specific track.`,goal:`Display learner progress and remaining steps.`,context:`Called when rendering a track detail or widget.`},io:{input:p,output:u},policy:{auth:`user`}}),_=i({meta:{name:`learning.onboarding.recordEvent`,version:1,stability:`stable`,owners:[...e],tags:[`learning`,`onboarding`,`events`],description:`Record a domain event to evaluate onboarding step completion conditions.`,goal:`Advance onboarding automatically from product events.`,context:`Called by event bus handlers when relevant product events fire (e.g., deal.created).`},io:{input:m,output:t,errors:{TRACK_NOT_FOUND:{description:`Track not found for event routing`,http:404,gqlCode:`TRACK_NOT_FOUND`,when:`Track ID or routing context is invalid`},STEP_NOT_FOUND:{description:`Step not found for completion condition`,http:404,gqlCode:`STEP_NOT_FOUND`,when:`No step matches the incoming event`}}},policy:{auth:`user`}});export{g as GetOnboardingProgressContract,h as ListOnboardingTracksContract,u as OnboardingProgressModel,s as OnboardingStepModel,l as OnboardingStepProgressModel,c as OnboardingTrackModel,_ as RecordOnboardingEventContract};
|
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema678 from "@lssm/lib.schema";
|
|
2
|
+
import * as _lssm_lib_contracts34 from "@lssm/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/contracts/operations.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Enroll in a course.
|
|
7
7
|
*/
|
|
8
|
-
declare const EnrollInCourseContract:
|
|
8
|
+
declare const EnrollInCourseContract: _lssm_lib_contracts34.ContractSpec<_lssm_lib_schema678.SchemaModel<{
|
|
9
9
|
courseId: {
|
|
10
|
-
type:
|
|
10
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
12
12
|
};
|
|
13
|
-
}>,
|
|
13
|
+
}>, _lssm_lib_schema678.SchemaModel<{
|
|
14
14
|
id: {
|
|
15
|
-
type:
|
|
15
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
16
16
|
isOptional: false;
|
|
17
17
|
};
|
|
18
18
|
learnerId: {
|
|
19
|
-
type:
|
|
19
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
20
20
|
isOptional: false;
|
|
21
21
|
};
|
|
22
22
|
courseId: {
|
|
23
|
-
type:
|
|
23
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
24
24
|
isOptional: false;
|
|
25
25
|
};
|
|
26
26
|
status: {
|
|
27
|
-
type:
|
|
27
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
28
28
|
isOptional: false;
|
|
29
29
|
};
|
|
30
30
|
progress: {
|
|
31
|
-
type:
|
|
31
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
32
32
|
isOptional: false;
|
|
33
33
|
};
|
|
34
34
|
startedAt: {
|
|
35
|
-
type:
|
|
35
|
+
type: _lssm_lib_schema678.FieldType<Date, string>;
|
|
36
36
|
isOptional: true;
|
|
37
37
|
};
|
|
38
38
|
completedAt: {
|
|
39
|
-
type:
|
|
39
|
+
type: _lssm_lib_schema678.FieldType<Date, string>;
|
|
40
40
|
isOptional: true;
|
|
41
41
|
};
|
|
42
42
|
}>, undefined>;
|
|
43
43
|
/**
|
|
44
44
|
* Complete a lesson.
|
|
45
45
|
*/
|
|
46
|
-
declare const CompleteLessonContract:
|
|
46
|
+
declare const CompleteLessonContract: _lssm_lib_contracts34.ContractSpec<_lssm_lib_schema678.SchemaModel<{
|
|
47
47
|
lessonId: {
|
|
48
|
-
type:
|
|
48
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
49
49
|
isOptional: false;
|
|
50
50
|
};
|
|
51
51
|
score: {
|
|
52
|
-
type:
|
|
52
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
53
53
|
isOptional: true;
|
|
54
54
|
};
|
|
55
55
|
timeSpent: {
|
|
56
|
-
type:
|
|
56
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
57
57
|
isOptional: false;
|
|
58
58
|
};
|
|
59
|
-
}>,
|
|
59
|
+
}>, _lssm_lib_schema678.SchemaModel<{
|
|
60
60
|
success: {
|
|
61
|
-
type:
|
|
61
|
+
type: _lssm_lib_schema678.FieldType<boolean, boolean>;
|
|
62
62
|
isOptional: false;
|
|
63
63
|
};
|
|
64
64
|
xpEarned: {
|
|
65
|
-
type:
|
|
65
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
66
66
|
isOptional: true;
|
|
67
67
|
};
|
|
68
68
|
}>, undefined>;
|
|
69
69
|
/**
|
|
70
70
|
* Submit a card review.
|
|
71
71
|
*/
|
|
72
|
-
declare const SubmitCardReviewContract:
|
|
72
|
+
declare const SubmitCardReviewContract: _lssm_lib_contracts34.ContractSpec<_lssm_lib_schema678.SchemaModel<{
|
|
73
73
|
cardId: {
|
|
74
|
-
type:
|
|
74
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
75
75
|
isOptional: false;
|
|
76
76
|
};
|
|
77
77
|
rating: {
|
|
78
|
-
type:
|
|
78
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
79
79
|
isOptional: false;
|
|
80
80
|
};
|
|
81
81
|
responseTimeMs: {
|
|
82
|
-
type:
|
|
82
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
83
83
|
isOptional: true;
|
|
84
84
|
};
|
|
85
|
-
}>,
|
|
85
|
+
}>, _lssm_lib_schema678.SchemaModel<{
|
|
86
86
|
success: {
|
|
87
|
-
type:
|
|
87
|
+
type: _lssm_lib_schema678.FieldType<boolean, boolean>;
|
|
88
88
|
isOptional: false;
|
|
89
89
|
};
|
|
90
90
|
xpEarned: {
|
|
91
|
-
type:
|
|
91
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
92
92
|
isOptional: true;
|
|
93
93
|
};
|
|
94
94
|
}>, undefined>;
|
|
95
95
|
/**
|
|
96
96
|
* Get cards due for review.
|
|
97
97
|
*/
|
|
98
|
-
declare const GetDueCardsContract:
|
|
98
|
+
declare const GetDueCardsContract: _lssm_lib_contracts34.ContractSpec<_lssm_lib_schema678.SchemaModel<{
|
|
99
99
|
deckId: {
|
|
100
|
-
type:
|
|
100
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
101
101
|
isOptional: true;
|
|
102
102
|
};
|
|
103
103
|
limit: {
|
|
104
|
-
type:
|
|
104
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
105
105
|
isOptional: true;
|
|
106
106
|
};
|
|
107
|
-
}>,
|
|
107
|
+
}>, _lssm_lib_schema678.SchemaModel<{
|
|
108
108
|
cards: {
|
|
109
|
-
type:
|
|
109
|
+
type: _lssm_lib_schema678.SchemaModel<{
|
|
110
110
|
id: {
|
|
111
|
-
type:
|
|
111
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
112
112
|
isOptional: false;
|
|
113
113
|
};
|
|
114
114
|
deckId: {
|
|
115
|
-
type:
|
|
115
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
116
116
|
isOptional: false;
|
|
117
117
|
};
|
|
118
118
|
front: {
|
|
119
|
-
type:
|
|
119
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
120
120
|
isOptional: false;
|
|
121
121
|
};
|
|
122
122
|
back: {
|
|
123
|
-
type:
|
|
123
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
124
124
|
isOptional: false;
|
|
125
125
|
};
|
|
126
126
|
hints: {
|
|
127
|
-
type:
|
|
127
|
+
type: _lssm_lib_schema678.FieldType<unknown, unknown>;
|
|
128
128
|
isOptional: true;
|
|
129
129
|
};
|
|
130
130
|
isDue: {
|
|
131
|
-
type:
|
|
131
|
+
type: _lssm_lib_schema678.FieldType<boolean, boolean>;
|
|
132
132
|
isOptional: false;
|
|
133
133
|
};
|
|
134
134
|
nextReviewAt: {
|
|
135
|
-
type:
|
|
135
|
+
type: _lssm_lib_schema678.FieldType<Date, string>;
|
|
136
136
|
isOptional: true;
|
|
137
137
|
};
|
|
138
138
|
}>;
|
|
@@ -140,96 +140,96 @@ declare const GetDueCardsContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_
|
|
|
140
140
|
isOptional: false;
|
|
141
141
|
};
|
|
142
142
|
total: {
|
|
143
|
-
type:
|
|
143
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
144
144
|
isOptional: false;
|
|
145
145
|
};
|
|
146
146
|
}>, undefined>;
|
|
147
147
|
/**
|
|
148
148
|
* Get learner dashboard.
|
|
149
149
|
*/
|
|
150
|
-
declare const GetLearnerDashboardContract:
|
|
150
|
+
declare const GetLearnerDashboardContract: _lssm_lib_contracts34.ContractSpec<_lssm_lib_schema678.SchemaModel<{
|
|
151
151
|
learnerId: {
|
|
152
|
-
type:
|
|
152
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
153
153
|
isOptional: true;
|
|
154
154
|
};
|
|
155
|
-
}>,
|
|
155
|
+
}>, _lssm_lib_schema678.SchemaModel<{
|
|
156
156
|
learner: {
|
|
157
|
-
type:
|
|
157
|
+
type: _lssm_lib_schema678.SchemaModel<{
|
|
158
158
|
id: {
|
|
159
|
-
type:
|
|
159
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
160
160
|
isOptional: false;
|
|
161
161
|
};
|
|
162
162
|
userId: {
|
|
163
|
-
type:
|
|
163
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
164
164
|
isOptional: false;
|
|
165
165
|
};
|
|
166
166
|
displayName: {
|
|
167
|
-
type:
|
|
167
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
168
168
|
isOptional: true;
|
|
169
169
|
};
|
|
170
170
|
level: {
|
|
171
|
-
type:
|
|
171
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
172
172
|
isOptional: false;
|
|
173
173
|
};
|
|
174
174
|
totalXp: {
|
|
175
|
-
type:
|
|
175
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
176
176
|
isOptional: false;
|
|
177
177
|
};
|
|
178
178
|
currentStreak: {
|
|
179
|
-
type:
|
|
179
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
180
180
|
isOptional: false;
|
|
181
181
|
};
|
|
182
182
|
longestStreak: {
|
|
183
|
-
type:
|
|
183
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
184
184
|
isOptional: false;
|
|
185
185
|
};
|
|
186
186
|
createdAt: {
|
|
187
|
-
type:
|
|
187
|
+
type: _lssm_lib_schema678.FieldType<Date, string>;
|
|
188
188
|
isOptional: false;
|
|
189
189
|
};
|
|
190
190
|
}>;
|
|
191
191
|
isOptional: false;
|
|
192
192
|
};
|
|
193
193
|
currentStreak: {
|
|
194
|
-
type:
|
|
194
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
195
195
|
isOptional: false;
|
|
196
196
|
};
|
|
197
197
|
dailyXpGoal: {
|
|
198
|
-
type:
|
|
198
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
199
199
|
isOptional: false;
|
|
200
200
|
};
|
|
201
201
|
dailyXpProgress: {
|
|
202
|
-
type:
|
|
202
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
203
203
|
isOptional: false;
|
|
204
204
|
};
|
|
205
205
|
activeEnrollments: {
|
|
206
|
-
type:
|
|
206
|
+
type: _lssm_lib_schema678.SchemaModel<{
|
|
207
207
|
id: {
|
|
208
|
-
type:
|
|
208
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
209
209
|
isOptional: false;
|
|
210
210
|
};
|
|
211
211
|
learnerId: {
|
|
212
|
-
type:
|
|
212
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
213
213
|
isOptional: false;
|
|
214
214
|
};
|
|
215
215
|
courseId: {
|
|
216
|
-
type:
|
|
216
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
217
217
|
isOptional: false;
|
|
218
218
|
};
|
|
219
219
|
status: {
|
|
220
|
-
type:
|
|
220
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
221
221
|
isOptional: false;
|
|
222
222
|
};
|
|
223
223
|
progress: {
|
|
224
|
-
type:
|
|
224
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
225
225
|
isOptional: false;
|
|
226
226
|
};
|
|
227
227
|
startedAt: {
|
|
228
|
-
type:
|
|
228
|
+
type: _lssm_lib_schema678.FieldType<Date, string>;
|
|
229
229
|
isOptional: true;
|
|
230
230
|
};
|
|
231
231
|
completedAt: {
|
|
232
|
-
type:
|
|
232
|
+
type: _lssm_lib_schema678.FieldType<Date, string>;
|
|
233
233
|
isOptional: true;
|
|
234
234
|
};
|
|
235
235
|
}>;
|
|
@@ -237,33 +237,33 @@ declare const GetLearnerDashboardContract: _lssm_lib_contracts31.ContractSpec<_l
|
|
|
237
237
|
isOptional: false;
|
|
238
238
|
};
|
|
239
239
|
recentAchievements: {
|
|
240
|
-
type:
|
|
240
|
+
type: _lssm_lib_schema678.SchemaModel<{
|
|
241
241
|
id: {
|
|
242
|
-
type:
|
|
242
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
243
243
|
isOptional: false;
|
|
244
244
|
};
|
|
245
245
|
key: {
|
|
246
|
-
type:
|
|
246
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
247
247
|
isOptional: false;
|
|
248
248
|
};
|
|
249
249
|
name: {
|
|
250
|
-
type:
|
|
250
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
251
251
|
isOptional: false;
|
|
252
252
|
};
|
|
253
253
|
description: {
|
|
254
|
-
type:
|
|
254
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
255
255
|
isOptional: false;
|
|
256
256
|
};
|
|
257
257
|
icon: {
|
|
258
|
-
type:
|
|
258
|
+
type: _lssm_lib_schema678.FieldType<string, string>;
|
|
259
259
|
isOptional: true;
|
|
260
260
|
};
|
|
261
261
|
xpReward: {
|
|
262
|
-
type:
|
|
262
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
263
263
|
isOptional: false;
|
|
264
264
|
};
|
|
265
265
|
unlockedAt: {
|
|
266
|
-
type:
|
|
266
|
+
type: _lssm_lib_schema678.FieldType<Date, string>;
|
|
267
267
|
isOptional: true;
|
|
268
268
|
};
|
|
269
269
|
}>;
|
|
@@ -271,7 +271,7 @@ declare const GetLearnerDashboardContract: _lssm_lib_contracts31.ContractSpec<_l
|
|
|
271
271
|
isOptional: false;
|
|
272
272
|
};
|
|
273
273
|
dueCardCount: {
|
|
274
|
-
type:
|
|
274
|
+
type: _lssm_lib_schema678.FieldType<number, number>;
|
|
275
275
|
isOptional: false;
|
|
276
276
|
};
|
|
277
277
|
}>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{LEARNING_JOURNEY_OWNERS as e}from"./shared.js";import{CompleteLessonInput as t,EnrollInCourseInput as n,EnrollmentModel as r,GetDueCardsInput as i,GetDueCardsOutput as a,GetLearnerDashboardInput as o,LearnerDashboardModel as s,SubmitCardReviewInput as c,SuccessOutput as l}from"./models.js";import{defineCommand as u,defineQuery as d}from"@lssm/lib.contracts";const f=u({meta:{name:`learning.enroll`,version:1,stability:`stable`,owners:[...e],tags:[`learning`,`enrollment`],description:`Enroll in a course.`,goal:`Start learning a new course.`,context:`Called when a learner wants to start a course.`},io:{input:n,output:r,errors:{COURSE_NOT_FOUND:{description:`Course does not exist`,http:404,gqlCode:`COURSE_NOT_FOUND`,when:`Course ID is invalid`},ALREADY_ENROLLED:{description:`Already enrolled in course`,http:409,gqlCode:`ALREADY_ENROLLED`,when:`Learner is already enrolled`}}},policy:{auth:`user`}}),p=u({meta:{name:`learning.completeLesson`,version:1,stability:`stable`,owners:[...e],tags:[`learning`,`progress`],description:`Mark a lesson as completed.`,goal:`Record lesson completion and earn XP.`,context:`Called when a learner finishes a lesson.`},io:{input:t,output:l,errors:{LESSON_NOT_FOUND:{description:`Lesson does not exist`,http:404,gqlCode:`LESSON_NOT_FOUND`,when:`Lesson ID is invalid`},NOT_ENROLLED:{description:`Not enrolled in course`,http:403,gqlCode:`NOT_ENROLLED`,when:`Learner is not enrolled in the course`}}},policy:{auth:`user`}}),m=u({meta:{name:`learning.submitCardReview`,version:1,stability:`stable`,owners:[...e],tags:[`learning`,`flashcards`],description:`Submit a flashcard review.`,goal:`Record review and update SRS schedule.`,context:`Called when reviewing flashcards.`},io:{input:c,output:l,errors:{CARD_NOT_FOUND:{description:`Card does not exist`,http:404,gqlCode:`CARD_NOT_FOUND`,when:`Card ID is invalid`},INVALID_RATING:{description:`Invalid rating`,http:400,gqlCode:`INVALID_RATING`,when:`Rating must be AGAIN, HARD, GOOD, or EASY`}}},policy:{auth:`user`}}),h=d({meta:{name:`learning.getDueCards`,version:1,stability:`stable`,owners:[...e],tags:[`learning`,`flashcards`],description:`Get flashcards due for review.`,goal:`Get the next batch of cards to review.`,context:`Called when starting a review session.`},io:{input:i,output:a},policy:{auth:`user`}}),g=d({meta:{name:`learning.getDashboard`,version:1,stability:`stable`,owners:[...e],tags:[`learning`,`dashboard`],description:`Get learner dashboard data.`,goal:`Display learner progress and stats.`,context:`Called when viewing the learning dashboard.`},io:{input:o,output:s},policy:{auth:`user`}});export{p as CompleteLessonContract,f as EnrollInCourseContract,h as GetDueCardsContract,g as GetLearnerDashboardContract,m as SubmitCardReviewContract};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{id:`docs.learning-journey.engine`,title:`Learning Journey Engine`,summary:`Tracks learners, tracks/modules/steps, progress, quizzes, streaks, XP, and AI coaching hooks for product-integrated onboarding.`,kind:`reference`,visibility:`public`,route:`/docs/learning-journey/engine`,tags:[`learning`,`onboarding`,`journey`,`education`],body:`## Capabilities
|
|
2
2
|
|
|
3
3
|
- **Entities**: Learner, Track, Module, Step, Progress, Quiz, Flashcard, AI Coach, Gamification (XP, streaks, badges).
|
|
4
4
|
- **Contracts**: enroll/resume/advance steps, complete quizzes, record streaks, assign XP, fetch progress dashboards, onboarding list/progress/recordEvent.
|