Variable
LEARNER_ACTION_SCHEMASConst
LEARNER_ACTION_SCHEMAS: {
lessonCompletion: ZodObject<
{ lessonId: $ZodBranded<ZodUUID, "LessonId", "out"> },
$strip,
>;
playbackPosition: ZodObject<
{
lessonId: $ZodBranded<ZodUUID, "LessonId", "out">;
seconds: ZodNumber;
},
$strip,
>;
continueWatching: ZodObject<
{
courseSlug: $ZodBranded<ZodString, "Slug", "out">;
moduleSlug: $ZodBranded<ZodString, "Slug", "out">;
lessonId: $ZodBranded<ZodUUID, "LessonId", "out">;
},
$strip,
>;
learnerProfile: ZodObject<
{
name: ZodString;
avatar: ZodDiscriminatedUnion<
[
ZodObject<{ kind: ZodLiteral<"initials"> }, $strip>,
ZodObject<
{
kind: ZodLiteral<"illustration">;
id: ZodEnum<
{
sun: "sun";
wave: "wave";
leaf: "leaf";
plum: "plum";
ember: "ember";
echo: "echo";
night: "night";
schwa: "schwa";
},
>;
},
$strip,
>,
],
"kind",
>;
},
$strip,
>;
earnedTickets: ZodObject<
{ lessonIds: ZodArray<$ZodBranded<ZodUUID, "LessonId", "out">> },
$strip,
>;
prizeClaim: ZodObject<
{ moduleSlug: $ZodBranded<ZodString, "Slug", "out"> },
$strip,
>;
courseEnrollment: ZodObject<
{ courseSlug: $ZodBranded<ZodString, "Slug", "out"> },
$strip,
>;
} = ...
Type Declaration
lessonCompletion: ZodObject<{ lessonId: $ZodBranded<ZodUUID, "LessonId", "out"> }, $strip>
playbackPosition: ZodObject<
{
lessonId: $ZodBranded<ZodUUID, "LessonId", "out">;
seconds: ZodNumber;
},
$strip,
>
continueWatching: ZodObject<
{
courseSlug: $ZodBranded<ZodString, "Slug", "out">;
moduleSlug: $ZodBranded<ZodString, "Slug", "out">;
lessonId: $ZodBranded<ZodUUID, "LessonId", "out">;
},
$strip,
>
learnerProfile: ZodObject<
{
name: ZodString;
avatar: ZodDiscriminatedUnion<
[
ZodObject<{ kind: ZodLiteral<"initials"> }, $strip>,
ZodObject<
{
kind: ZodLiteral<"illustration">;
id: ZodEnum<
{
sun: "sun";
wave: "wave";
leaf: "leaf";
plum: "plum";
ember: "ember";
echo: "echo";
night: "night";
schwa: "schwa";
},
>;
},
$strip,
>,
],
"kind",
>;
},
$strip,
>
earnedTickets: ZodObject<
{ lessonIds: ZodArray<$ZodBranded<ZodUUID, "LessonId", "out">> },
$strip,
>
prizeClaim: ZodObject<{ moduleSlug: $ZodBranded<ZodString, "Slug", "out"> }, $strip>
courseEnrollment: ZodObject<{ courseSlug: $ZodBranded<ZodString, "Slug", "out"> }, $strip>
The input of every learner action, by action. None carries a learner or user id: the learner is whoever the session says, never what the client claims. Kept apart from
learner-actions.tsbecause a"use server"module may only export async functions.