@contractspec/example.learning-journey-studio-onboarding 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$bundle.log +41 -0
- package/.turbo/turbo-build.log +42 -0
- package/CHANGELOG.md +178 -0
- package/LICENSE +21 -0
- package/README.md +41 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/studio-onboarding.docblock.d.ts +1 -0
- package/dist/docs/studio-onboarding.docblock.js +40 -0
- package/dist/docs/studio-onboarding.docblock.js.map +1 -0
- package/dist/example.d.ts +33 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +35 -0
- package/dist/example.js.map +1 -0
- package/dist/handlers/demo.handlers.d.ts +23 -0
- package/dist/handlers/demo.handlers.d.ts.map +1 -0
- package/dist/handlers/demo.handlers.js +24 -0
- package/dist/handlers/demo.handlers.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -0
- package/dist/learning-journey-studio-onboarding.feature.d.ts +12 -0
- package/dist/learning-journey-studio-onboarding.feature.d.ts.map +1 -0
- package/dist/learning-journey-studio-onboarding.feature.js +68 -0
- package/dist/learning-journey-studio-onboarding.feature.js.map +1 -0
- package/dist/operations/index.d.ts +271 -0
- package/dist/operations/index.d.ts.map +1 -0
- package/dist/operations/index.js +176 -0
- package/dist/operations/index.js.map +1 -0
- package/dist/presentations/index.d.ts +9 -0
- package/dist/presentations/index.d.ts.map +1 -0
- package/dist/presentations/index.js +57 -0
- package/dist/presentations/index.js.map +1 -0
- package/dist/track.d.ts +8 -0
- package/dist/track.d.ts.map +1 -0
- package/dist/track.js +91 -0
- package/dist/track.js.map +1 -0
- package/example.ts +1 -0
- package/package.json +67 -0
- package/src/docs/index.ts +1 -0
- package/src/docs/studio-onboarding.docblock.ts +38 -0
- package/src/example.ts +24 -0
- package/src/handlers/demo.handlers.ts +48 -0
- package/src/index.ts +7 -0
- package/src/learning-journey-studio-onboarding.feature.ts +66 -0
- package/src/operations/index.test.ts +49 -0
- package/src/operations/index.ts +122 -0
- package/src/presentations/index.ts +57 -0
- package/src/track.ts +86 -0
- package/tsconfig.json +9 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsdown.config.js +17 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
|
|
2
|
+
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
3
|
+
import * as _contractspec_module_learning_journey_track_spec0 from "@contractspec/module.learning-journey/track-spec";
|
|
4
|
+
|
|
5
|
+
//#region src/operations/index.d.ts
|
|
6
|
+
declare const StudioOnboardingTrackModel: _contractspec_lib_schema0.SchemaModel<{
|
|
7
|
+
id: {
|
|
8
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
9
|
+
isOptional: false;
|
|
10
|
+
};
|
|
11
|
+
name: {
|
|
12
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
13
|
+
isOptional: false;
|
|
14
|
+
};
|
|
15
|
+
description: {
|
|
16
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
17
|
+
isOptional: true;
|
|
18
|
+
};
|
|
19
|
+
totalXp: {
|
|
20
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
21
|
+
isOptional: true;
|
|
22
|
+
};
|
|
23
|
+
completionXpBonus: {
|
|
24
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
25
|
+
isOptional: true;
|
|
26
|
+
};
|
|
27
|
+
completionBadgeKey: {
|
|
28
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
29
|
+
isOptional: true;
|
|
30
|
+
};
|
|
31
|
+
streakHoursWindow: {
|
|
32
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
33
|
+
isOptional: true;
|
|
34
|
+
};
|
|
35
|
+
streakBonusXp: {
|
|
36
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
37
|
+
isOptional: true;
|
|
38
|
+
};
|
|
39
|
+
steps: {
|
|
40
|
+
type: _contractspec_lib_schema0.SchemaModel<{
|
|
41
|
+
id: {
|
|
42
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
43
|
+
isOptional: false;
|
|
44
|
+
};
|
|
45
|
+
title: {
|
|
46
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
47
|
+
isOptional: false;
|
|
48
|
+
};
|
|
49
|
+
description: {
|
|
50
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
51
|
+
isOptional: true;
|
|
52
|
+
};
|
|
53
|
+
completionEvent: {
|
|
54
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
55
|
+
isOptional: false;
|
|
56
|
+
};
|
|
57
|
+
sourceModule: {
|
|
58
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
59
|
+
isOptional: true;
|
|
60
|
+
};
|
|
61
|
+
xpReward: {
|
|
62
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
63
|
+
isOptional: true;
|
|
64
|
+
};
|
|
65
|
+
order: {
|
|
66
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
67
|
+
isOptional: true;
|
|
68
|
+
};
|
|
69
|
+
}>;
|
|
70
|
+
isArray: true;
|
|
71
|
+
isOptional: false;
|
|
72
|
+
};
|
|
73
|
+
}>;
|
|
74
|
+
declare const GetStudioOnboardingTrack: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{}>, _contractspec_lib_schema0.SchemaModel<{
|
|
75
|
+
track: {
|
|
76
|
+
type: _contractspec_lib_schema0.SchemaModel<{
|
|
77
|
+
id: {
|
|
78
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
79
|
+
isOptional: false;
|
|
80
|
+
};
|
|
81
|
+
name: {
|
|
82
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
83
|
+
isOptional: false;
|
|
84
|
+
};
|
|
85
|
+
description: {
|
|
86
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
87
|
+
isOptional: true;
|
|
88
|
+
};
|
|
89
|
+
totalXp: {
|
|
90
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
91
|
+
isOptional: true;
|
|
92
|
+
};
|
|
93
|
+
completionXpBonus: {
|
|
94
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
95
|
+
isOptional: true;
|
|
96
|
+
};
|
|
97
|
+
completionBadgeKey: {
|
|
98
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
99
|
+
isOptional: true;
|
|
100
|
+
};
|
|
101
|
+
streakHoursWindow: {
|
|
102
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
103
|
+
isOptional: true;
|
|
104
|
+
};
|
|
105
|
+
streakBonusXp: {
|
|
106
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
107
|
+
isOptional: true;
|
|
108
|
+
};
|
|
109
|
+
steps: {
|
|
110
|
+
type: _contractspec_lib_schema0.SchemaModel<{
|
|
111
|
+
id: {
|
|
112
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
113
|
+
isOptional: false;
|
|
114
|
+
};
|
|
115
|
+
title: {
|
|
116
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
117
|
+
isOptional: false;
|
|
118
|
+
};
|
|
119
|
+
description: {
|
|
120
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
121
|
+
isOptional: true;
|
|
122
|
+
};
|
|
123
|
+
completionEvent: {
|
|
124
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
125
|
+
isOptional: false;
|
|
126
|
+
};
|
|
127
|
+
sourceModule: {
|
|
128
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
129
|
+
isOptional: true;
|
|
130
|
+
};
|
|
131
|
+
xpReward: {
|
|
132
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
133
|
+
isOptional: true;
|
|
134
|
+
};
|
|
135
|
+
order: {
|
|
136
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
137
|
+
isOptional: true;
|
|
138
|
+
};
|
|
139
|
+
}>;
|
|
140
|
+
isArray: true;
|
|
141
|
+
isOptional: false;
|
|
142
|
+
};
|
|
143
|
+
}>;
|
|
144
|
+
isOptional: false;
|
|
145
|
+
};
|
|
146
|
+
}>, undefined>;
|
|
147
|
+
declare const RecordStudioOnboardingEvent: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
148
|
+
learnerId: {
|
|
149
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
150
|
+
isOptional: false;
|
|
151
|
+
};
|
|
152
|
+
eventName: {
|
|
153
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
154
|
+
isOptional: false;
|
|
155
|
+
};
|
|
156
|
+
payload: {
|
|
157
|
+
type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
|
|
158
|
+
isOptional: true;
|
|
159
|
+
};
|
|
160
|
+
occurredAt: {
|
|
161
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
162
|
+
isOptional: true;
|
|
163
|
+
};
|
|
164
|
+
}>, _contractspec_lib_schema0.SchemaModel<{
|
|
165
|
+
success: {
|
|
166
|
+
type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
|
|
167
|
+
isOptional: false;
|
|
168
|
+
};
|
|
169
|
+
}>, undefined>;
|
|
170
|
+
declare const studioOnboardingContracts: {
|
|
171
|
+
GetStudioOnboardingTrack: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{}>, _contractspec_lib_schema0.SchemaModel<{
|
|
172
|
+
track: {
|
|
173
|
+
type: _contractspec_lib_schema0.SchemaModel<{
|
|
174
|
+
id: {
|
|
175
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
176
|
+
isOptional: false;
|
|
177
|
+
};
|
|
178
|
+
name: {
|
|
179
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
180
|
+
isOptional: false;
|
|
181
|
+
};
|
|
182
|
+
description: {
|
|
183
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
184
|
+
isOptional: true;
|
|
185
|
+
};
|
|
186
|
+
totalXp: {
|
|
187
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
188
|
+
isOptional: true;
|
|
189
|
+
};
|
|
190
|
+
completionXpBonus: {
|
|
191
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
192
|
+
isOptional: true;
|
|
193
|
+
};
|
|
194
|
+
completionBadgeKey: {
|
|
195
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
196
|
+
isOptional: true;
|
|
197
|
+
};
|
|
198
|
+
streakHoursWindow: {
|
|
199
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
200
|
+
isOptional: true;
|
|
201
|
+
};
|
|
202
|
+
streakBonusXp: {
|
|
203
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
204
|
+
isOptional: true;
|
|
205
|
+
};
|
|
206
|
+
steps: {
|
|
207
|
+
type: _contractspec_lib_schema0.SchemaModel<{
|
|
208
|
+
id: {
|
|
209
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
210
|
+
isOptional: false;
|
|
211
|
+
};
|
|
212
|
+
title: {
|
|
213
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
214
|
+
isOptional: false;
|
|
215
|
+
};
|
|
216
|
+
description: {
|
|
217
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
218
|
+
isOptional: true;
|
|
219
|
+
};
|
|
220
|
+
completionEvent: {
|
|
221
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
222
|
+
isOptional: false;
|
|
223
|
+
};
|
|
224
|
+
sourceModule: {
|
|
225
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
226
|
+
isOptional: true;
|
|
227
|
+
};
|
|
228
|
+
xpReward: {
|
|
229
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
230
|
+
isOptional: true;
|
|
231
|
+
};
|
|
232
|
+
order: {
|
|
233
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
234
|
+
isOptional: true;
|
|
235
|
+
};
|
|
236
|
+
}>;
|
|
237
|
+
isArray: true;
|
|
238
|
+
isOptional: false;
|
|
239
|
+
};
|
|
240
|
+
}>;
|
|
241
|
+
isOptional: false;
|
|
242
|
+
};
|
|
243
|
+
}>, undefined>;
|
|
244
|
+
RecordStudioOnboardingEvent: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
245
|
+
learnerId: {
|
|
246
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
247
|
+
isOptional: false;
|
|
248
|
+
};
|
|
249
|
+
eventName: {
|
|
250
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
251
|
+
isOptional: false;
|
|
252
|
+
};
|
|
253
|
+
payload: {
|
|
254
|
+
type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
|
|
255
|
+
isOptional: true;
|
|
256
|
+
};
|
|
257
|
+
occurredAt: {
|
|
258
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
259
|
+
isOptional: true;
|
|
260
|
+
};
|
|
261
|
+
}>, _contractspec_lib_schema0.SchemaModel<{
|
|
262
|
+
success: {
|
|
263
|
+
type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
|
|
264
|
+
isOptional: false;
|
|
265
|
+
};
|
|
266
|
+
}>, undefined>;
|
|
267
|
+
track: _contractspec_module_learning_journey_track_spec0.LearningJourneyTrackSpec;
|
|
268
|
+
};
|
|
269
|
+
//#endregion
|
|
270
|
+
export { GetStudioOnboardingTrack, RecordStudioOnboardingEvent, StudioOnboardingTrackModel, studioOnboardingContracts };
|
|
271
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/operations/index.ts"],"sourcesContent":[],"mappings":";;;;;cAwBa,sDAA0B;;UAuBrC,yBAAA,CAAA;;;EAvBW,IAAA,EAAA;IAuBX,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;6CAvBqC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAoD1B,CAAA;EAoBX,iBAAA,EAAA;IApBmC,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;QAAA,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;QAAA,UAAA,EAAA,IAAA;MAsBxB,CAAA;MAiBX,eAAA,EAAA;;;;;iDAjBsC,CAAA,MAAA,EAAA,MAAA,CAAA;QAAA,UAAA,EAAA,IAAA;;;QAAA,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;QAmB3B,UAAA,EAAA,IAIZ;MAAA,CAAA;;;;;;;;;;cA7CY,0BAAwB,4BAAA,CAAA,cAoBnC,yBAAA,CApBmC,2CAAA;;;;cAAA,yBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsBxB,0DAA2B,wCAAA;;UAiBtC,yBAAA,CAAA;;;;;;;;;;;;;;;;;UAjBsC,yBAAA,CAAA;;;;cAmB3B;uEAIZ,yBAAA,CAAA"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { studioGettingStartedTrack } from "../track.js";
|
|
2
|
+
import { defineCommand, defineQuery } from "@contractspec/lib.contracts";
|
|
3
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
4
|
+
|
|
5
|
+
//#region src/operations/index.ts
|
|
6
|
+
const OWNERS = ["examples.learning-journey.studio-onboarding"];
|
|
7
|
+
const StepModel = defineSchemaModel({
|
|
8
|
+
name: "StudioOnboardingStep",
|
|
9
|
+
description: "Step metadata for Studio onboarding journey",
|
|
10
|
+
fields: {
|
|
11
|
+
id: {
|
|
12
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
13
|
+
isOptional: false
|
|
14
|
+
},
|
|
15
|
+
title: {
|
|
16
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
17
|
+
isOptional: false
|
|
18
|
+
},
|
|
19
|
+
description: {
|
|
20
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
21
|
+
isOptional: true
|
|
22
|
+
},
|
|
23
|
+
completionEvent: {
|
|
24
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
25
|
+
isOptional: false
|
|
26
|
+
},
|
|
27
|
+
sourceModule: {
|
|
28
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
29
|
+
isOptional: true
|
|
30
|
+
},
|
|
31
|
+
xpReward: {
|
|
32
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
33
|
+
isOptional: true
|
|
34
|
+
},
|
|
35
|
+
order: {
|
|
36
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
37
|
+
isOptional: true
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const StudioOnboardingTrackModel = defineSchemaModel({
|
|
42
|
+
name: "StudioOnboardingTrack",
|
|
43
|
+
description: "Studio onboarding track definition",
|
|
44
|
+
fields: {
|
|
45
|
+
id: {
|
|
46
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
47
|
+
isOptional: false
|
|
48
|
+
},
|
|
49
|
+
name: {
|
|
50
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
51
|
+
isOptional: false
|
|
52
|
+
},
|
|
53
|
+
description: {
|
|
54
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
55
|
+
isOptional: true
|
|
56
|
+
},
|
|
57
|
+
totalXp: {
|
|
58
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
59
|
+
isOptional: true
|
|
60
|
+
},
|
|
61
|
+
completionXpBonus: {
|
|
62
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
63
|
+
isOptional: true
|
|
64
|
+
},
|
|
65
|
+
completionBadgeKey: {
|
|
66
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
67
|
+
isOptional: true
|
|
68
|
+
},
|
|
69
|
+
streakHoursWindow: {
|
|
70
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
71
|
+
isOptional: true
|
|
72
|
+
},
|
|
73
|
+
streakBonusXp: {
|
|
74
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
75
|
+
isOptional: true
|
|
76
|
+
},
|
|
77
|
+
steps: {
|
|
78
|
+
type: StepModel,
|
|
79
|
+
isArray: true,
|
|
80
|
+
isOptional: false
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
const TrackResponseModel = defineSchemaModel({
|
|
85
|
+
name: "StudioOnboardingTrackResponse",
|
|
86
|
+
description: "Response wrapper for studio onboarding track",
|
|
87
|
+
fields: { track: {
|
|
88
|
+
type: StudioOnboardingTrackModel,
|
|
89
|
+
isOptional: false
|
|
90
|
+
} }
|
|
91
|
+
});
|
|
92
|
+
const RecordDemoEventInput = defineSchemaModel({
|
|
93
|
+
name: "StudioOnboardingRecordEventInput",
|
|
94
|
+
description: "Emit a demo event to advance Studio onboarding steps",
|
|
95
|
+
fields: {
|
|
96
|
+
learnerId: {
|
|
97
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
98
|
+
isOptional: false
|
|
99
|
+
},
|
|
100
|
+
eventName: {
|
|
101
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
102
|
+
isOptional: false
|
|
103
|
+
},
|
|
104
|
+
payload: {
|
|
105
|
+
type: ScalarTypeEnum.JSON(),
|
|
106
|
+
isOptional: true
|
|
107
|
+
},
|
|
108
|
+
occurredAt: {
|
|
109
|
+
type: ScalarTypeEnum.DateTime(),
|
|
110
|
+
isOptional: true
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
const SuccessModel = defineSchemaModel({
|
|
115
|
+
name: "StudioOnboardingSuccess",
|
|
116
|
+
description: "Generic success response",
|
|
117
|
+
fields: { success: {
|
|
118
|
+
type: ScalarTypeEnum.Boolean(),
|
|
119
|
+
isOptional: false
|
|
120
|
+
} }
|
|
121
|
+
});
|
|
122
|
+
const GetStudioOnboardingTrack = defineQuery({
|
|
123
|
+
meta: {
|
|
124
|
+
key: "learningJourney.studioOnboarding.getTrack",
|
|
125
|
+
version: 1,
|
|
126
|
+
stability: "experimental",
|
|
127
|
+
owners: [...OWNERS],
|
|
128
|
+
tags: [
|
|
129
|
+
"learning",
|
|
130
|
+
"onboarding",
|
|
131
|
+
"studio"
|
|
132
|
+
],
|
|
133
|
+
description: "Fetch the Studio onboarding track definition.",
|
|
134
|
+
goal: "Expose track metadata to UIs and templates.",
|
|
135
|
+
context: "Called by Studio/Playground to render journey steps."
|
|
136
|
+
},
|
|
137
|
+
io: {
|
|
138
|
+
input: defineSchemaModel({
|
|
139
|
+
name: "StudioOnboardingTrackInput",
|
|
140
|
+
description: "Track input",
|
|
141
|
+
fields: {}
|
|
142
|
+
}),
|
|
143
|
+
output: TrackResponseModel
|
|
144
|
+
},
|
|
145
|
+
policy: { auth: "user" }
|
|
146
|
+
});
|
|
147
|
+
const RecordStudioOnboardingEvent = defineCommand({
|
|
148
|
+
meta: {
|
|
149
|
+
key: "learningJourney.studioOnboarding.recordEvent",
|
|
150
|
+
version: 1,
|
|
151
|
+
stability: "experimental",
|
|
152
|
+
owners: [...OWNERS],
|
|
153
|
+
tags: [
|
|
154
|
+
"learning",
|
|
155
|
+
"onboarding",
|
|
156
|
+
"studio"
|
|
157
|
+
],
|
|
158
|
+
description: "Record an event to advance Studio onboarding progress.",
|
|
159
|
+
goal: "Advance steps via domain events in demo/sandbox contexts.",
|
|
160
|
+
context: "Called by handlers or demo scripts to emit step completion events."
|
|
161
|
+
},
|
|
162
|
+
io: {
|
|
163
|
+
input: RecordDemoEventInput,
|
|
164
|
+
output: SuccessModel
|
|
165
|
+
},
|
|
166
|
+
policy: { auth: "user" }
|
|
167
|
+
});
|
|
168
|
+
const studioOnboardingContracts = {
|
|
169
|
+
GetStudioOnboardingTrack,
|
|
170
|
+
RecordStudioOnboardingEvent,
|
|
171
|
+
track: studioGettingStartedTrack
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
//#endregion
|
|
175
|
+
export { GetStudioOnboardingTrack, RecordStudioOnboardingEvent, StudioOnboardingTrackModel, studioOnboardingContracts };
|
|
176
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/operations/index.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineCommand, defineQuery } from '@contractspec/lib.contracts';\n\nimport { studioGettingStartedTrack } from '../track';\n\nconst OWNERS = ['examples.learning-journey.studio-onboarding'] as const;\n\nconst StepModel = defineSchemaModel({\n name: 'StudioOnboardingStep',\n description: 'Step metadata for Studio onboarding journey',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n completionEvent: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n sourceModule: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n xpReward: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nexport const StudioOnboardingTrackModel = defineSchemaModel({\n name: 'StudioOnboardingTrack',\n description: 'Studio onboarding track definition',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n totalXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n completionXpBonus: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n completionBadgeKey: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n streakHoursWindow: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n streakBonusXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n steps: { type: StepModel, isArray: true, isOptional: false },\n },\n});\n\nconst TrackResponseModel = defineSchemaModel({\n name: 'StudioOnboardingTrackResponse',\n description: 'Response wrapper for studio onboarding track',\n fields: {\n track: { type: StudioOnboardingTrackModel, isOptional: false },\n },\n});\n\nconst RecordDemoEventInput = defineSchemaModel({\n name: 'StudioOnboardingRecordEventInput',\n description: 'Emit a demo event to advance Studio onboarding steps',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n eventName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n payload: { type: ScalarTypeEnum.JSON(), isOptional: true },\n occurredAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n },\n});\n\nconst SuccessModel = defineSchemaModel({\n name: 'StudioOnboardingSuccess',\n description: 'Generic success response',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n});\n\nexport const GetStudioOnboardingTrack = defineQuery({\n meta: {\n key: 'learningJourney.studioOnboarding.getTrack',\n version: 1,\n stability: 'experimental',\n owners: [...OWNERS],\n tags: ['learning', 'onboarding', 'studio'],\n description: 'Fetch the Studio onboarding track definition.',\n goal: 'Expose track metadata to UIs and templates.',\n context: 'Called by Studio/Playground to render journey steps.',\n },\n io: {\n input: defineSchemaModel({\n name: 'StudioOnboardingTrackInput',\n description: 'Track input',\n fields: {},\n }),\n output: TrackResponseModel,\n },\n policy: { auth: 'user' },\n});\n\nexport const RecordStudioOnboardingEvent = defineCommand({\n meta: {\n key: 'learningJourney.studioOnboarding.recordEvent',\n version: 1,\n stability: 'experimental',\n owners: [...OWNERS],\n tags: ['learning', 'onboarding', 'studio'],\n description: 'Record an event to advance Studio onboarding progress.',\n goal: 'Advance steps via domain events in demo/sandbox contexts.',\n context:\n 'Called by handlers or demo scripts to emit step completion events.',\n },\n io: {\n input: RecordDemoEventInput,\n output: SuccessModel,\n },\n policy: { auth: 'user' },\n});\n\nexport const studioOnboardingContracts = {\n GetStudioOnboardingTrack,\n RecordStudioOnboardingEvent,\n track: studioGettingStartedTrack,\n};\n"],"mappings":";;;;;AAKA,MAAM,SAAS,CAAC,8CAA8C;AAE9D,MAAM,YAAY,kBAAkB;CAClC,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,iBAAiB;GACf,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EAC1E,UAAU;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EACnE,OAAO;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EACjE;CACF,CAAC;AAEF,MAAa,6BAA6B,kBAAkB;CAC1D,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,SAAS;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EAClE,mBAAmB;GACjB,MAAM,eAAe,cAAc;GACnC,YAAY;GACb;EACD,oBAAoB;GAClB,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,mBAAmB;GACjB,MAAM,eAAe,cAAc;GACnC,YAAY;GACb;EACD,eAAe;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EACxE,OAAO;GAAE,MAAM;GAAW,SAAS;GAAM,YAAY;GAAO;EAC7D;CACF,CAAC;AAEF,MAAM,qBAAqB,kBAAkB;CAC3C,MAAM;CACN,aAAa;CACb,QAAQ,EACN,OAAO;EAAE,MAAM;EAA4B,YAAY;EAAO,EAC/D;CACF,CAAC;AAEF,MAAM,uBAAuB,kBAAkB;CAC7C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,SAAS;GAAE,MAAM,eAAe,MAAM;GAAE,YAAY;GAAM;EAC1D,YAAY;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EAClE;CACF,CAAC;AAEF,MAAM,eAAe,kBAAkB;CACrC,MAAM;CACN,aAAa;CACb,QAAQ,EACN,SAAS;EAAE,MAAM,eAAe,SAAS;EAAE,YAAY;EAAO,EAC/D;CACF,CAAC;AAEF,MAAa,2BAA2B,YAAY;CAClD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAY;GAAc;GAAS;EAC1C,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO,kBAAkB;GACvB,MAAM;GACN,aAAa;GACb,QAAQ,EAAE;GACX,CAAC;EACF,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,8BAA8B,cAAc;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAY;GAAc;GAAS;EAC1C,aAAa;EACb,MAAM;EACN,SACE;EACH;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,4BAA4B;CACvC;CACA;CACA,OAAO;CACR"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PresentationSpec } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/presentations/index.d.ts
|
|
4
|
+
declare const StudioOnboardingTrackPresentation: PresentationSpec;
|
|
5
|
+
declare const StudioOnboardingWidgetPresentation: PresentationSpec;
|
|
6
|
+
declare const studioOnboardingPresentations: PresentationSpec[];
|
|
7
|
+
//#endregion
|
|
8
|
+
export { StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation, studioOnboardingPresentations };
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/presentations/index.ts"],"sourcesContent":[],"mappings":";;;cAkBa,mCAAmC;cAkBnC,oCAAoC;AAlBpC,cAmCA,6BAnBZ,EAmByC,gBAnBzC,EAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { StudioOnboardingTrackModel } from "../operations/index.js";
|
|
2
|
+
import { StabilityEnum } from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/presentations/index.ts
|
|
5
|
+
const baseMeta = {
|
|
6
|
+
domain: "learning-journey",
|
|
7
|
+
title: "Studio Onboarding",
|
|
8
|
+
owners: ["@examples.learning-journey.studio-onboarding"],
|
|
9
|
+
tags: [
|
|
10
|
+
"learning",
|
|
11
|
+
"onboarding",
|
|
12
|
+
"studio"
|
|
13
|
+
],
|
|
14
|
+
stability: StabilityEnum.Experimental
|
|
15
|
+
};
|
|
16
|
+
const StudioOnboardingTrackPresentation = {
|
|
17
|
+
meta: {
|
|
18
|
+
key: "learning.journey.studio.track",
|
|
19
|
+
version: 1,
|
|
20
|
+
description: "Studio onboarding track detail",
|
|
21
|
+
goal: "Visualize the onboarding track for the user.",
|
|
22
|
+
context: "Displayed in the Studio dashboard.",
|
|
23
|
+
...baseMeta
|
|
24
|
+
},
|
|
25
|
+
source: {
|
|
26
|
+
type: "component",
|
|
27
|
+
framework: "react",
|
|
28
|
+
componentKey: "LearningTrackDetail",
|
|
29
|
+
props: StudioOnboardingTrackModel
|
|
30
|
+
},
|
|
31
|
+
targets: [
|
|
32
|
+
"react",
|
|
33
|
+
"markdown",
|
|
34
|
+
"application/json"
|
|
35
|
+
]
|
|
36
|
+
};
|
|
37
|
+
const StudioOnboardingWidgetPresentation = {
|
|
38
|
+
meta: {
|
|
39
|
+
key: "learning.journey.studio.widget",
|
|
40
|
+
version: 1,
|
|
41
|
+
description: "Compact widget for Studio onboarding progress",
|
|
42
|
+
goal: "Show quick progress summary.",
|
|
43
|
+
context: "Displayed in the Studio sidebar or header.",
|
|
44
|
+
...baseMeta
|
|
45
|
+
},
|
|
46
|
+
source: {
|
|
47
|
+
type: "component",
|
|
48
|
+
framework: "react",
|
|
49
|
+
componentKey: "LearningTrackProgressWidget"
|
|
50
|
+
},
|
|
51
|
+
targets: ["react"]
|
|
52
|
+
};
|
|
53
|
+
const studioOnboardingPresentations = [StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation];
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
export { StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation, studioOnboardingPresentations };
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["baseMeta: Pick<\n PresentationSpecMeta,\n 'domain' | 'owners' | 'tags' | 'title' | 'stability'\n>","StudioOnboardingTrackPresentation: PresentationSpec","StudioOnboardingWidgetPresentation: PresentationSpec"],"sources":["../../src/presentations/index.ts"],"sourcesContent":["import type {\n PresentationSpecMeta,\n PresentationSpec,\n} from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport { StudioOnboardingTrackModel } from '../operations';\n\nconst baseMeta: Pick<\n PresentationSpecMeta,\n 'domain' | 'owners' | 'tags' | 'title' | 'stability'\n> = {\n domain: 'learning-journey',\n title: 'Studio Onboarding',\n owners: ['@examples.learning-journey.studio-onboarding'] as string[],\n tags: ['learning', 'onboarding', 'studio'] as string[],\n stability: StabilityEnum.Experimental,\n};\n\nexport const StudioOnboardingTrackPresentation: PresentationSpec = {\n meta: {\n key: 'learning.journey.studio.track',\n version: 1,\n description: 'Studio onboarding track detail',\n goal: 'Visualize the onboarding track for the user.',\n context: 'Displayed in the Studio dashboard.',\n ...baseMeta,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LearningTrackDetail',\n props: StudioOnboardingTrackModel,\n },\n targets: ['react', 'markdown', 'application/json'],\n};\n\nexport const StudioOnboardingWidgetPresentation: PresentationSpec = {\n meta: {\n key: 'learning.journey.studio.widget',\n version: 1,\n description: 'Compact widget for Studio onboarding progress',\n goal: 'Show quick progress summary.',\n context: 'Displayed in the Studio sidebar or header.',\n ...baseMeta,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LearningTrackProgressWidget',\n },\n targets: ['react'],\n};\n\nexport const studioOnboardingPresentations = [\n StudioOnboardingTrackPresentation,\n StudioOnboardingWidgetPresentation,\n];\n"],"mappings":";;;;AAOA,MAAMA,WAGF;CACF,QAAQ;CACR,OAAO;CACP,QAAQ,CAAC,+CAA+C;CACxD,MAAM;EAAC;EAAY;EAAc;EAAS;CAC1C,WAAW,cAAc;CAC1B;AAED,MAAaC,oCAAsD;CACjE,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,GAAG;EACJ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CACnD;AAED,MAAaC,qCAAuD;CAClE,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,GAAG;EACJ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,QAAQ;CACnB;AAED,MAAa,gCAAgC,CAC3C,mCACA,mCACD"}
|
package/dist/track.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LearningJourneyTrackSpec } from "@contractspec/module.learning-journey/track-spec";
|
|
2
|
+
|
|
3
|
+
//#region src/track.d.ts
|
|
4
|
+
declare const studioGettingStartedTrack: LearningJourneyTrackSpec;
|
|
5
|
+
declare const studioLearningTracks: LearningJourneyTrackSpec[];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { studioGettingStartedTrack, studioLearningTracks };
|
|
8
|
+
//# sourceMappingURL=track.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"track.d.ts","names":[],"sources":["../src/track.ts"],"sourcesContent":[],"mappings":";;;cAEa,2BAA2B;cAiF3B,sBAAsB"}
|
package/dist/track.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
//#region src/track.ts
|
|
2
|
+
const studioGettingStartedTrack = {
|
|
3
|
+
id: "studio_getting_started",
|
|
4
|
+
productId: "contractspec-studio",
|
|
5
|
+
name: "Studio Getting Started",
|
|
6
|
+
description: "First 30 minutes in Studio: create a project, edit the spec, deploy/regenerate, and try key modules.",
|
|
7
|
+
targetUserSegment: "new_studio_user",
|
|
8
|
+
targetRole: "developer",
|
|
9
|
+
totalXp: 110,
|
|
10
|
+
streakRule: {
|
|
11
|
+
hoursWindow: 48,
|
|
12
|
+
bonusXp: 25
|
|
13
|
+
},
|
|
14
|
+
completionRewards: {
|
|
15
|
+
xpBonus: 25,
|
|
16
|
+
badgeKey: "studio_first_30m"
|
|
17
|
+
},
|
|
18
|
+
steps: [
|
|
19
|
+
{
|
|
20
|
+
id: "choose_template",
|
|
21
|
+
title: "Choose a template",
|
|
22
|
+
description: "Create your first Studio project (starter template).",
|
|
23
|
+
order: 1,
|
|
24
|
+
completion: {
|
|
25
|
+
eventName: "studio.template.instantiated",
|
|
26
|
+
sourceModule: "@contractspec/bundle.studio"
|
|
27
|
+
},
|
|
28
|
+
xpReward: 20,
|
|
29
|
+
metadata: { surface: "projects" }
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "edit_spec",
|
|
33
|
+
title: "Edit the spec",
|
|
34
|
+
description: "Change the spec (not generated code) and save.",
|
|
35
|
+
instructions: "Open spec editor, tweak a contract or presentation, save.",
|
|
36
|
+
order: 2,
|
|
37
|
+
completion: {
|
|
38
|
+
eventName: "spec.changed",
|
|
39
|
+
sourceModule: "@contractspec/bundle.studio"
|
|
40
|
+
},
|
|
41
|
+
xpReward: 20,
|
|
42
|
+
metadata: { surface: "spec-editor" }
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "regenerate_app",
|
|
46
|
+
title: "Regenerate the app",
|
|
47
|
+
description: "Regenerate artifacts from the updated spec.",
|
|
48
|
+
order: 3,
|
|
49
|
+
completion: {
|
|
50
|
+
eventName: "regeneration.completed",
|
|
51
|
+
sourceModule: "@contractspec/lib.contracts/regenerator"
|
|
52
|
+
},
|
|
53
|
+
xpReward: 20,
|
|
54
|
+
metadata: { surface: "regenerator" }
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "open_canvas",
|
|
58
|
+
title: "Open the canvas",
|
|
59
|
+
description: "Visit the canvas module for your project.",
|
|
60
|
+
order: 4,
|
|
61
|
+
completion: {
|
|
62
|
+
eventName: "module.navigated",
|
|
63
|
+
sourceModule: "@contractspec/bundle.studio",
|
|
64
|
+
payloadFilter: { moduleId: "canvas" }
|
|
65
|
+
},
|
|
66
|
+
xpReward: 20,
|
|
67
|
+
metadata: { surface: "canvas" }
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "try_evolution_mode",
|
|
71
|
+
title: "Try evolution mode",
|
|
72
|
+
description: "Request a change via Evolution, then regenerate.",
|
|
73
|
+
order: 5,
|
|
74
|
+
completion: {
|
|
75
|
+
eventName: "studio.evolution.applied",
|
|
76
|
+
sourceModule: "@contractspec/lib.evolution"
|
|
77
|
+
},
|
|
78
|
+
xpReward: 30,
|
|
79
|
+
metadata: { surface: "evolution" }
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
metadata: {
|
|
83
|
+
persona: "first_run",
|
|
84
|
+
surfacedIn: ["studio/home", "studio/sidebar/learning"]
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const studioLearningTracks = [studioGettingStartedTrack];
|
|
88
|
+
|
|
89
|
+
//#endregion
|
|
90
|
+
export { studioGettingStartedTrack, studioLearningTracks };
|
|
91
|
+
//# sourceMappingURL=track.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"track.js","names":["studioGettingStartedTrack: LearningJourneyTrackSpec","studioLearningTracks: LearningJourneyTrackSpec[]"],"sources":["../src/track.ts"],"sourcesContent":["import type { LearningJourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';\n\nexport const studioGettingStartedTrack: LearningJourneyTrackSpec = {\n id: 'studio_getting_started',\n productId: 'contractspec-studio',\n name: 'Studio Getting Started',\n description:\n 'First 30 minutes in Studio: create a project, edit the spec, deploy/regenerate, and try key modules.',\n targetUserSegment: 'new_studio_user',\n targetRole: 'developer',\n totalXp: 110,\n streakRule: { hoursWindow: 48, bonusXp: 25 },\n completionRewards: { xpBonus: 25, badgeKey: 'studio_first_30m' },\n steps: [\n {\n id: 'choose_template',\n title: 'Choose a template',\n description: 'Create your first Studio project (starter template).',\n order: 1,\n completion: {\n eventName: 'studio.template.instantiated',\n sourceModule: '@contractspec/bundle.studio',\n },\n xpReward: 20,\n metadata: { surface: 'projects' },\n },\n {\n id: 'edit_spec',\n title: 'Edit the spec',\n description: 'Change the spec (not generated code) and save.',\n instructions: 'Open spec editor, tweak a contract or presentation, save.',\n order: 2,\n completion: {\n eventName: 'spec.changed',\n sourceModule: '@contractspec/bundle.studio',\n },\n xpReward: 20,\n metadata: { surface: 'spec-editor' },\n },\n {\n id: 'regenerate_app',\n title: 'Regenerate the app',\n description: 'Regenerate artifacts from the updated spec.',\n order: 3,\n completion: {\n eventName: 'regeneration.completed',\n sourceModule: '@contractspec/lib.contracts/regenerator',\n },\n xpReward: 20,\n metadata: { surface: 'regenerator' },\n },\n {\n id: 'open_canvas',\n title: 'Open the canvas',\n description: 'Visit the canvas module for your project.',\n order: 4,\n completion: {\n eventName: 'module.navigated',\n sourceModule: '@contractspec/bundle.studio',\n payloadFilter: { moduleId: 'canvas' },\n },\n xpReward: 20,\n metadata: { surface: 'canvas' },\n },\n {\n id: 'try_evolution_mode',\n title: 'Try evolution mode',\n description: 'Request a change via Evolution, then regenerate.',\n order: 5,\n completion: {\n eventName: 'studio.evolution.applied',\n sourceModule: '@contractspec/lib.evolution',\n },\n xpReward: 30,\n metadata: { surface: 'evolution' },\n },\n ],\n metadata: {\n persona: 'first_run',\n surfacedIn: ['studio/home', 'studio/sidebar/learning'],\n },\n};\n\nexport const studioLearningTracks: LearningJourneyTrackSpec[] = [\n studioGettingStartedTrack,\n];\n"],"mappings":";AAEA,MAAaA,4BAAsD;CACjE,IAAI;CACJ,WAAW;CACX,MAAM;CACN,aACE;CACF,mBAAmB;CACnB,YAAY;CACZ,SAAS;CACT,YAAY;EAAE,aAAa;EAAI,SAAS;EAAI;CAC5C,mBAAmB;EAAE,SAAS;EAAI,UAAU;EAAoB;CAChE,OAAO;EACL;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,YAAY;GAClC;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,eAAe;GACrC;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,eAAe;GACrC;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACd,eAAe,EAAE,UAAU,UAAU;IACtC;GACD,UAAU;GACV,UAAU,EAAE,SAAS,UAAU;GAChC;EACD;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,OAAO;GACP,YAAY;IACV,WAAW;IACX,cAAc;IACf;GACD,UAAU;GACV,UAAU,EAAE,SAAS,aAAa;GACnC;EACF;CACD,UAAU;EACR,SAAS;EACT,YAAY,CAAC,eAAe,0BAA0B;EACvD;CACF;AAED,MAAaC,uBAAmD,CAC9D,0BACD"}
|
package/example.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './src/example';
|