feat(shared): ownership types and marketplace schemas
This commit is contained in:
@@ -108,3 +108,22 @@ export type ChangePasswordInput = z.infer<typeof changePasswordSchema>;
|
||||
export type AcceptInviteInput = z.infer<typeof acceptInviteSchema>;
|
||||
export type InviteUserInput = z.infer<typeof inviteUserSchema>;
|
||||
export type AdminUserUpdateInput = z.infer<typeof adminUserUpdateSchema>;
|
||||
|
||||
export const lessonVisibilityUpdateSchema = z.object({
|
||||
visibility: z.enum(['private', 'shared']),
|
||||
});
|
||||
|
||||
export const adminLessonCuratedSchema = z.object({
|
||||
isCurated: z.boolean(),
|
||||
});
|
||||
|
||||
export const marketplaceQuerySchema = z.object({
|
||||
q: z.string().trim().max(120).optional(),
|
||||
curated: z.enum(['true', 'false']).optional(),
|
||||
limit: z.coerce.number().int().min(1).max(100).optional(),
|
||||
offset: z.coerce.number().int().min(0).optional(),
|
||||
});
|
||||
|
||||
export type LessonVisibilityUpdateInput = z.infer<typeof lessonVisibilityUpdateSchema>;
|
||||
export type AdminLessonCuratedInput = z.infer<typeof adminLessonCuratedSchema>;
|
||||
export type MarketplaceQuery = z.infer<typeof marketplaceQuerySchema>;
|
||||
|
||||
Reference in New Issue
Block a user