@lssm/module.learning-journey 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217072406
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/index.js +6 -1
- package/dist/contracts/models.d.ts +118 -118
- package/dist/contracts/models.js +389 -1
- package/dist/contracts/onboarding.d.ts +167 -167
- package/dist/contracts/onboarding.js +404 -1
- package/dist/contracts/operations.d.ts +70 -70
- package/dist/contracts/operations.js +151 -1
- package/dist/contracts/shared.js +5 -1
- package/dist/docs/index.js +1 -1
- package/dist/docs/learning-journey.docblock.js +61 -5
- package/dist/engines/index.js +5 -1
- package/dist/engines/srs.js +219 -1
- package/dist/engines/streak.js +193 -1
- package/dist/engines/xp.js +212 -1
- package/dist/entities/ai.d.ts +200 -200
- package/dist/entities/ai.js +376 -1
- package/dist/entities/course.d.ts +150 -150
- package/dist/entities/course.js +316 -1
- package/dist/entities/flashcard.d.ts +145 -145
- package/dist/entities/flashcard.js +249 -1
- package/dist/entities/gamification.d.ts +198 -198
- package/dist/entities/gamification.js +392 -1
- package/dist/entities/index.d.ts +605 -605
- package/dist/entities/index.js +44 -1
- package/dist/entities/learner.d.ts +192 -192
- package/dist/entities/learner.js +365 -1
- package/dist/entities/onboarding.d.ts +165 -165
- package/dist/entities/onboarding.js +307 -1
- package/dist/entities/quiz.d.ts +185 -185
- package/dist/entities/quiz.js +370 -1
- package/dist/events.d.ts +213 -213
- package/dist/events.js +583 -1
- package/dist/index.js +22 -1
- package/dist/learning-journey.feature.js +148 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
- package/dist/libs/contracts/dist/client/index.js +5 -1
- package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
- package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
- package/dist/libs/contracts/dist/client/react/index.js +4 -1
- package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
- package/dist/libs/contracts/dist/docs/index.js +29 -1
- package/dist/libs/contracts/dist/docs/presentations.js +71 -1
- package/dist/libs/contracts/dist/docs/registry.js +44 -1
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
- package/dist/libs/contracts/dist/events.js +10 -1
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
- package/dist/libs/contracts/dist/index.js +71 -1
- package/dist/libs/contracts/dist/install.js +2 -1
- package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
- package/dist/libs/contracts/dist/integrations/index.js +18 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
- package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
- package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
- package/dist/libs/contracts/dist/jsonschema.js +1 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
- package/dist/libs/contracts/dist/knowledge/index.js +7 -1
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
- package/dist/libs/contracts/dist/llm/exporters.js +19 -1
- package/dist/libs/contracts/dist/llm/index.js +2 -1
- package/dist/libs/contracts/dist/llm/prompts.js +1 -1
- package/dist/libs/contracts/dist/onboarding-base.js +196 -1
- package/dist/libs/contracts/dist/openapi.js +1 -1
- package/dist/libs/contracts/dist/ownership.js +21 -1
- package/dist/libs/contracts/dist/presentations.js +1 -1
- package/dist/libs/contracts/dist/presentations.v2.js +11 -1
- package/dist/libs/contracts/dist/prompt.js +1 -1
- package/dist/libs/contracts/dist/promptRegistry.js +1 -1
- package/dist/libs/contracts/dist/regenerator/index.js +1 -1
- package/dist/libs/contracts/dist/regenerator/service.js +6 -1
- package/dist/libs/contracts/dist/registry.js +2 -1
- package/dist/libs/contracts/dist/resources.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +34 -1
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
- package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
- package/dist/libs/contracts/dist/server/index.js +8 -1
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
- package/dist/libs/contracts/dist/server/rest-express.js +1 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
- package/dist/libs/contracts/dist/spec.js +34 -1
- package/dist/libs/contracts/dist/telemetry/index.js +1 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
- package/dist/libs/contracts/dist/tests/index.js +1 -1
- package/dist/libs/contracts/dist/tests/runner.js +2 -1
- package/dist/libs/contracts/dist/workflow/index.js +1 -1
- package/dist/libs/contracts/dist/workflow/runner.js +1 -1
- package/dist/libs/schema/dist/EnumType.js +2 -1
- package/dist/libs/schema/dist/FieldType.js +49 -1
- package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/schema/dist/SchemaModel.js +39 -1
- package/dist/libs/schema/dist/entity/defineEntity.js +236 -1
- package/dist/libs/schema/dist/entity/index.js +2 -1
- package/dist/libs/schema/dist/entity/types.js +1 -1
- package/dist/libs/schema/dist/index.js +6 -1
- package/package.json +5 -5
|
@@ -1 +1,404 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
|
|
2
|
+
import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
|
|
3
|
+
import "../libs/schema/dist/index.js";
|
|
4
|
+
import { defineCommand, defineQuery } from "../libs/contracts/dist/spec.js";
|
|
5
|
+
import "../libs/contracts/dist/index.js";
|
|
6
|
+
import { LEARNING_JOURNEY_OWNERS } from "./shared.js";
|
|
7
|
+
import { SuccessOutput } from "./models.js";
|
|
8
|
+
|
|
9
|
+
//#region src/contracts/onboarding.ts
|
|
10
|
+
const OnboardingStepConditionModel = defineSchemaModel({
|
|
11
|
+
name: "OnboardingStepCondition",
|
|
12
|
+
description: "Structured completion condition for onboarding steps.",
|
|
13
|
+
fields: {
|
|
14
|
+
eventName: {
|
|
15
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
16
|
+
isOptional: false
|
|
17
|
+
},
|
|
18
|
+
eventVersion: {
|
|
19
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
20
|
+
isOptional: true
|
|
21
|
+
},
|
|
22
|
+
sourceModule: {
|
|
23
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
24
|
+
isOptional: true
|
|
25
|
+
},
|
|
26
|
+
payloadFilter: {
|
|
27
|
+
type: ScalarTypeEnum.JSON(),
|
|
28
|
+
isOptional: true
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const OnboardingStepModel = defineSchemaModel({
|
|
33
|
+
name: "OnboardingStep",
|
|
34
|
+
description: "Declarative onboarding step definition.",
|
|
35
|
+
fields: {
|
|
36
|
+
id: {
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
+
isOptional: false
|
|
39
|
+
},
|
|
40
|
+
trackId: {
|
|
41
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
42
|
+
isOptional: false
|
|
43
|
+
},
|
|
44
|
+
title: {
|
|
45
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
46
|
+
isOptional: false
|
|
47
|
+
},
|
|
48
|
+
description: {
|
|
49
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
50
|
+
isOptional: true
|
|
51
|
+
},
|
|
52
|
+
instructions: {
|
|
53
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
54
|
+
isOptional: true
|
|
55
|
+
},
|
|
56
|
+
helpUrl: {
|
|
57
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
58
|
+
isOptional: true
|
|
59
|
+
},
|
|
60
|
+
order: {
|
|
61
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
62
|
+
isOptional: false
|
|
63
|
+
},
|
|
64
|
+
completionEvent: {
|
|
65
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
66
|
+
isOptional: false
|
|
67
|
+
},
|
|
68
|
+
completionCondition: {
|
|
69
|
+
type: OnboardingStepConditionModel,
|
|
70
|
+
isOptional: true
|
|
71
|
+
},
|
|
72
|
+
xpReward: {
|
|
73
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
74
|
+
isOptional: true
|
|
75
|
+
},
|
|
76
|
+
isRequired: {
|
|
77
|
+
type: ScalarTypeEnum.Boolean(),
|
|
78
|
+
isOptional: true
|
|
79
|
+
},
|
|
80
|
+
canSkip: {
|
|
81
|
+
type: ScalarTypeEnum.Boolean(),
|
|
82
|
+
isOptional: true
|
|
83
|
+
},
|
|
84
|
+
actionUrl: {
|
|
85
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
86
|
+
isOptional: true
|
|
87
|
+
},
|
|
88
|
+
actionLabel: {
|
|
89
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
90
|
+
isOptional: true
|
|
91
|
+
},
|
|
92
|
+
metadata: {
|
|
93
|
+
type: ScalarTypeEnum.JSON(),
|
|
94
|
+
isOptional: true
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
const OnboardingTrackModel = defineSchemaModel({
|
|
99
|
+
name: "OnboardingTrack",
|
|
100
|
+
description: "Onboarding track metadata and steps.",
|
|
101
|
+
fields: {
|
|
102
|
+
id: {
|
|
103
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
104
|
+
isOptional: false
|
|
105
|
+
},
|
|
106
|
+
productId: {
|
|
107
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
108
|
+
isOptional: true
|
|
109
|
+
},
|
|
110
|
+
name: {
|
|
111
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
112
|
+
isOptional: false
|
|
113
|
+
},
|
|
114
|
+
description: {
|
|
115
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
116
|
+
isOptional: true
|
|
117
|
+
},
|
|
118
|
+
targetUserSegment: {
|
|
119
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
120
|
+
isOptional: true
|
|
121
|
+
},
|
|
122
|
+
targetRole: {
|
|
123
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
124
|
+
isOptional: true
|
|
125
|
+
},
|
|
126
|
+
isActive: {
|
|
127
|
+
type: ScalarTypeEnum.Boolean(),
|
|
128
|
+
isOptional: true
|
|
129
|
+
},
|
|
130
|
+
isRequired: {
|
|
131
|
+
type: ScalarTypeEnum.Boolean(),
|
|
132
|
+
isOptional: true
|
|
133
|
+
},
|
|
134
|
+
canSkip: {
|
|
135
|
+
type: ScalarTypeEnum.Boolean(),
|
|
136
|
+
isOptional: true
|
|
137
|
+
},
|
|
138
|
+
totalXp: {
|
|
139
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
140
|
+
isOptional: true
|
|
141
|
+
},
|
|
142
|
+
completionXpBonus: {
|
|
143
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
144
|
+
isOptional: true
|
|
145
|
+
},
|
|
146
|
+
completionBadgeKey: {
|
|
147
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
148
|
+
isOptional: true
|
|
149
|
+
},
|
|
150
|
+
streakHoursWindow: {
|
|
151
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
152
|
+
isOptional: true
|
|
153
|
+
},
|
|
154
|
+
streakBonusXp: {
|
|
155
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
156
|
+
isOptional: true
|
|
157
|
+
},
|
|
158
|
+
metadata: {
|
|
159
|
+
type: ScalarTypeEnum.JSON(),
|
|
160
|
+
isOptional: true
|
|
161
|
+
},
|
|
162
|
+
steps: {
|
|
163
|
+
type: OnboardingStepModel,
|
|
164
|
+
isArray: true,
|
|
165
|
+
isOptional: false
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
const OnboardingStepProgressModel = defineSchemaModel({
|
|
170
|
+
name: "OnboardingStepProgress",
|
|
171
|
+
description: "Progress for a specific onboarding step.",
|
|
172
|
+
fields: {
|
|
173
|
+
stepId: {
|
|
174
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
175
|
+
isOptional: false
|
|
176
|
+
},
|
|
177
|
+
status: {
|
|
178
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
179
|
+
isOptional: false
|
|
180
|
+
},
|
|
181
|
+
xpEarned: {
|
|
182
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
183
|
+
isOptional: true
|
|
184
|
+
},
|
|
185
|
+
triggeringEvent: {
|
|
186
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
187
|
+
isOptional: true
|
|
188
|
+
},
|
|
189
|
+
eventPayload: {
|
|
190
|
+
type: ScalarTypeEnum.JSON(),
|
|
191
|
+
isOptional: true
|
|
192
|
+
},
|
|
193
|
+
completedAt: {
|
|
194
|
+
type: ScalarTypeEnum.DateTime(),
|
|
195
|
+
isOptional: true
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
const OnboardingProgressModel = defineSchemaModel({
|
|
200
|
+
name: "OnboardingProgress",
|
|
201
|
+
description: "Aggregated progress for an onboarding track.",
|
|
202
|
+
fields: {
|
|
203
|
+
learnerId: {
|
|
204
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
205
|
+
isOptional: true
|
|
206
|
+
},
|
|
207
|
+
trackId: {
|
|
208
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
209
|
+
isOptional: false
|
|
210
|
+
},
|
|
211
|
+
progress: {
|
|
212
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
213
|
+
isOptional: false
|
|
214
|
+
},
|
|
215
|
+
isCompleted: {
|
|
216
|
+
type: ScalarTypeEnum.Boolean(),
|
|
217
|
+
isOptional: false
|
|
218
|
+
},
|
|
219
|
+
xpEarned: {
|
|
220
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
221
|
+
isOptional: true
|
|
222
|
+
},
|
|
223
|
+
startedAt: {
|
|
224
|
+
type: ScalarTypeEnum.DateTime(),
|
|
225
|
+
isOptional: true
|
|
226
|
+
},
|
|
227
|
+
completedAt: {
|
|
228
|
+
type: ScalarTypeEnum.DateTime(),
|
|
229
|
+
isOptional: true
|
|
230
|
+
},
|
|
231
|
+
lastActivityAt: {
|
|
232
|
+
type: ScalarTypeEnum.DateTime(),
|
|
233
|
+
isOptional: true
|
|
234
|
+
},
|
|
235
|
+
steps: {
|
|
236
|
+
type: OnboardingStepProgressModel,
|
|
237
|
+
isArray: true,
|
|
238
|
+
isOptional: true
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
const ListOnboardingTracksInput = defineSchemaModel({
|
|
243
|
+
name: "ListOnboardingTracksInput",
|
|
244
|
+
description: "Filters for listing onboarding tracks.",
|
|
245
|
+
fields: {
|
|
246
|
+
learnerId: {
|
|
247
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
248
|
+
isOptional: true
|
|
249
|
+
},
|
|
250
|
+
productId: {
|
|
251
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
252
|
+
isOptional: true
|
|
253
|
+
},
|
|
254
|
+
trackIds: {
|
|
255
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
256
|
+
isArray: true,
|
|
257
|
+
isOptional: true
|
|
258
|
+
},
|
|
259
|
+
includeProgress: {
|
|
260
|
+
type: ScalarTypeEnum.Boolean(),
|
|
261
|
+
isOptional: true
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
const ListOnboardingTracksOutput = defineSchemaModel({
|
|
266
|
+
name: "ListOnboardingTracksOutput",
|
|
267
|
+
description: "Available onboarding tracks with optional progress.",
|
|
268
|
+
fields: {
|
|
269
|
+
tracks: {
|
|
270
|
+
type: OnboardingTrackModel,
|
|
271
|
+
isArray: true,
|
|
272
|
+
isOptional: false
|
|
273
|
+
},
|
|
274
|
+
progress: {
|
|
275
|
+
type: OnboardingProgressModel,
|
|
276
|
+
isArray: true,
|
|
277
|
+
isOptional: true
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
const GetOnboardingProgressInput = defineSchemaModel({
|
|
282
|
+
name: "GetOnboardingProgressInput",
|
|
283
|
+
description: "Input for fetching onboarding progress for a track.",
|
|
284
|
+
fields: {
|
|
285
|
+
trackId: {
|
|
286
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
287
|
+
isOptional: false
|
|
288
|
+
},
|
|
289
|
+
learnerId: {
|
|
290
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
291
|
+
isOptional: true
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
const RecordOnboardingEventInput = defineSchemaModel({
|
|
296
|
+
name: "RecordOnboardingEventInput",
|
|
297
|
+
description: "Record a domain event to advance onboarding progress via completion conditions.",
|
|
298
|
+
fields: {
|
|
299
|
+
learnerId: {
|
|
300
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
301
|
+
isOptional: false
|
|
302
|
+
},
|
|
303
|
+
trackId: {
|
|
304
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
305
|
+
isOptional: true
|
|
306
|
+
},
|
|
307
|
+
eventName: {
|
|
308
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
309
|
+
isOptional: false
|
|
310
|
+
},
|
|
311
|
+
eventVersion: {
|
|
312
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
313
|
+
isOptional: true
|
|
314
|
+
},
|
|
315
|
+
eventPayload: {
|
|
316
|
+
type: ScalarTypeEnum.JSON(),
|
|
317
|
+
isOptional: true
|
|
318
|
+
},
|
|
319
|
+
occurredAt: {
|
|
320
|
+
type: ScalarTypeEnum.DateTime(),
|
|
321
|
+
isOptional: true
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
const ListOnboardingTracksContract = defineQuery({
|
|
326
|
+
meta: {
|
|
327
|
+
name: "learning.onboarding.listTracks",
|
|
328
|
+
version: 1,
|
|
329
|
+
stability: "stable",
|
|
330
|
+
owners: [...LEARNING_JOURNEY_OWNERS],
|
|
331
|
+
tags: [
|
|
332
|
+
"learning",
|
|
333
|
+
"onboarding",
|
|
334
|
+
"journey"
|
|
335
|
+
],
|
|
336
|
+
description: "List onboarding tracks available to a learner or product.",
|
|
337
|
+
goal: "Expose track catalog for UI/API surfaces.",
|
|
338
|
+
context: "Called when showing onboarding/learning journey catalog."
|
|
339
|
+
},
|
|
340
|
+
io: {
|
|
341
|
+
input: ListOnboardingTracksInput,
|
|
342
|
+
output: ListOnboardingTracksOutput
|
|
343
|
+
},
|
|
344
|
+
policy: { auth: "user" }
|
|
345
|
+
});
|
|
346
|
+
const GetOnboardingProgressContract = defineQuery({
|
|
347
|
+
meta: {
|
|
348
|
+
name: "learning.onboarding.getProgress",
|
|
349
|
+
version: 1,
|
|
350
|
+
stability: "stable",
|
|
351
|
+
owners: [...LEARNING_JOURNEY_OWNERS],
|
|
352
|
+
tags: [
|
|
353
|
+
"learning",
|
|
354
|
+
"onboarding",
|
|
355
|
+
"journey"
|
|
356
|
+
],
|
|
357
|
+
description: "Fetch onboarding progress for a specific track.",
|
|
358
|
+
goal: "Display learner progress and remaining steps.",
|
|
359
|
+
context: "Called when rendering a track detail or widget."
|
|
360
|
+
},
|
|
361
|
+
io: {
|
|
362
|
+
input: GetOnboardingProgressInput,
|
|
363
|
+
output: OnboardingProgressModel
|
|
364
|
+
},
|
|
365
|
+
policy: { auth: "user" }
|
|
366
|
+
});
|
|
367
|
+
const RecordOnboardingEventContract = defineCommand({
|
|
368
|
+
meta: {
|
|
369
|
+
name: "learning.onboarding.recordEvent",
|
|
370
|
+
version: 1,
|
|
371
|
+
stability: "stable",
|
|
372
|
+
owners: [...LEARNING_JOURNEY_OWNERS],
|
|
373
|
+
tags: [
|
|
374
|
+
"learning",
|
|
375
|
+
"onboarding",
|
|
376
|
+
"events"
|
|
377
|
+
],
|
|
378
|
+
description: "Record a domain event to evaluate onboarding step completion conditions.",
|
|
379
|
+
goal: "Advance onboarding automatically from product events.",
|
|
380
|
+
context: "Called by event bus handlers when relevant product events fire (e.g., deal.created)."
|
|
381
|
+
},
|
|
382
|
+
io: {
|
|
383
|
+
input: RecordOnboardingEventInput,
|
|
384
|
+
output: SuccessOutput,
|
|
385
|
+
errors: {
|
|
386
|
+
TRACK_NOT_FOUND: {
|
|
387
|
+
description: "Track not found for event routing",
|
|
388
|
+
http: 404,
|
|
389
|
+
gqlCode: "TRACK_NOT_FOUND",
|
|
390
|
+
when: "Track ID or routing context is invalid"
|
|
391
|
+
},
|
|
392
|
+
STEP_NOT_FOUND: {
|
|
393
|
+
description: "Step not found for completion condition",
|
|
394
|
+
http: 404,
|
|
395
|
+
gqlCode: "STEP_NOT_FOUND",
|
|
396
|
+
when: "No step matches the incoming event"
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
policy: { auth: "user" }
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
//#endregion
|
|
404
|
+
export { GetOnboardingProgressContract, ListOnboardingTracksContract, OnboardingProgressModel, OnboardingStepModel, OnboardingStepProgressModel, OnboardingTrackModel, RecordOnboardingEventContract };
|