feat: add share link service, API routes, and short URL redirect
Create share.service.ts with token generation (128-bit base64url), CRUD operations, validation, and visibility transition side effects. Add share endpoints under /api/setups/:id/shares, shared access at /api/shared/:token, and /s/:token short URL redirect. Plan: 32-02 (Setup Sharing System - Share Link Backend) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -96,6 +96,12 @@ export const updateSetupSchema = z.object({
|
||||
visibility: z.enum(["private", "link", "public"]).optional(),
|
||||
});
|
||||
|
||||
export const createShareLinkSchema = z.object({
|
||||
expiresInDays: z
|
||||
.union([z.literal(7), z.literal(14), z.literal(30), z.null()])
|
||||
.default(14),
|
||||
});
|
||||
|
||||
export const syncSetupItemsSchema = z.object({
|
||||
itemIds: z.array(z.number().int().positive()),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user