fixxed color selector in the category settings and fixxed drag and drop
Build APK / build (push) Canceled after 2m0s
Build APK / build (push) Canceled after 2m0s
subtask
This commit is contained in:
Vendored
+1
-1
@@ -2,7 +2,7 @@ import { Request, Response, NextFunction } from 'express';
|
||||
import { AuthPayload } from '../types';
|
||||
export declare function generateToken(payload: AuthPayload): string;
|
||||
export declare function verifyToken(token: string): AuthPayload | null;
|
||||
export declare function authMiddleware(req: Request, res: Response, next: NextFunction): void;
|
||||
export declare function authMiddleware(req: Request, res: Response, next: NextFunction): Promise<void>;
|
||||
export declare function optionalAuthMiddleware(req: Request, res: Response, next: NextFunction): void;
|
||||
export declare function generateId(prefix?: string): string;
|
||||
export declare function getCurrentTimestamp(): number;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/utils/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAKvC,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAE1D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAM7D;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CA4BpF;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAW5F;AAED,wBAAgB,UAAU,CAAC,MAAM,GAAE,MAAW,GAAG,MAAM,CAItD;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C"}
|
||||
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/utils/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAK1D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAKvC,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAE1D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAM7D;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAuCnG;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAW5F;AAED,wBAAgB,UAAU,CAAC,MAAM,GAAE,MAAW,GAAG,MAAM,CAItD;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C"}
|
||||
Vendored
+14
-1
@@ -10,6 +10,9 @@ exports.optionalAuthMiddleware = optionalAuthMiddleware;
|
||||
exports.generateId = generateId;
|
||||
exports.getCurrentTimestamp = getCurrentTimestamp;
|
||||
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
||||
const db_1 = require("../db");
|
||||
const schema_1 = require("../db/schema");
|
||||
const drizzle_orm_1 = require("drizzle-orm");
|
||||
const JWT_SECRET = process.env.JWT_SECRET || 'your-super-secret-jwt-key-change-in-production';
|
||||
const JWT_EXPIRES_IN = '7d';
|
||||
function generateToken(payload) {
|
||||
@@ -23,7 +26,7 @@ function verifyToken(token) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
function authMiddleware(req, res, next) {
|
||||
async function authMiddleware(req, res, next) {
|
||||
const authHeader = req.headers.authorization;
|
||||
if (!authHeader || !authHeader.startsWith('Bearer ')) {
|
||||
res.status(401).json({
|
||||
@@ -45,6 +48,16 @@ function authMiddleware(req, res, next) {
|
||||
});
|
||||
return;
|
||||
}
|
||||
const user = await db_1.db.select({ id: schema_1.users.id }).from(schema_1.users).where((0, drizzle_orm_1.eq)(schema_1.users.id, payload.userId)).limit(1);
|
||||
if (user.length === 0) {
|
||||
res.status(401).json({
|
||||
error: {
|
||||
code: 'UNAUTHORIZED',
|
||||
message: 'User no longer exists, please log in again',
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
req.user = payload;
|
||||
next();
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/utils/auth.ts"],"names":[],"mappings":";;;;;AAOA,sCAEC;AAED,kCAMC;AAED,wCA4BC;AAED,wDAWC;AAED,gCAIC;AAED,kDAEC;AArED,gEAA+B;AAG/B,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,gDAAgD,CAAC;AAC9F,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B,SAAgB,aAAa,CAAC,OAAoB;IAChD,OAAO,sBAAG,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC;AACtE,CAAC;AAED,SAAgB,WAAW,CAAC,KAAa;IACvC,IAAI,CAAC;QACH,OAAO,sBAAG,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,CAAgB,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAgB,cAAc,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB;IAC5E,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC;IAE7C,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACrD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACnB,KAAK,EAAE;gBACL,IAAI,EAAE,cAAc;gBACpB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QACrB,CAAC;IACH,CAAC;IACD,IAAI,EAAE,CAAC;AACT,CAAC;AAED,SAAgB,UAAU,CAAC,SAAiB,EAAE;IAC5C,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACvD,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAAC;AAC9D,CAAC;AAED,SAAgB,mBAAmB;IACjC,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;AACpB,CAAC"}
|
||||
Vendored
+370
-90
@@ -1,4 +1,5 @@
|
||||
import { z } from 'zod';
|
||||
export declare function canCompleteTask(dueDate: number): boolean;
|
||||
export declare const categoryCreateSchema: z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
color: z.ZodString;
|
||||
@@ -26,20 +27,25 @@ export declare const categoryUpdateSchema: z.ZodObject<{
|
||||
order?: number | undefined;
|
||||
}>;
|
||||
export declare const repeatSchema: z.ZodEnum<["none", "daily", "weekly", "monthly", "custom"]>;
|
||||
export declare const repeatFieldSchema: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["none", "daily", "weekly", "monthly", "custom"]>, z.ZodLiteral<"">]>, "custom" | "none" | "daily" | "weekly" | "monthly", "" | "custom" | "none" | "daily" | "weekly" | "monthly">>;
|
||||
export declare const repeatIntervalFieldSchema: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
||||
export declare const taskCreateSchema: z.ZodObject<{
|
||||
title: z.ZodString;
|
||||
description: z.ZodOptional<z.ZodString>;
|
||||
categoryId: z.ZodString;
|
||||
categoryId: z.ZodNullable<z.ZodEffects<z.ZodString, string | null, string>>;
|
||||
priority: z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>;
|
||||
dueDate: z.ZodOptional<z.ZodNumber>;
|
||||
dueTime: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
||||
dueTime: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
|
||||
endTime: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
||||
repeat: z.ZodOptional<z.ZodEnum<["none", "daily", "weekly", "monthly", "custom"]>>;
|
||||
repeatInterval: z.ZodOptional<z.ZodNumber>;
|
||||
allDay: z.ZodOptional<z.ZodBoolean>;
|
||||
repeat: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["none", "daily", "weekly", "monthly", "custom"]>, z.ZodLiteral<"">]>, "custom" | "none" | "daily" | "weekly" | "monthly", "" | "custom" | "none" | "daily" | "weekly" | "monthly">>;
|
||||
repeatInterval: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
||||
repeatDays: z.ZodOptional<z.ZodString>;
|
||||
seriesId: z.ZodOptional<z.ZodString>;
|
||||
reminder: z.ZodOptional<z.ZodEnum<["none", "at_time", "15", "30", "60", "120", "1440"]>>;
|
||||
reminders: z.ZodOptional<z.ZodString>;
|
||||
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
||||
completedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
||||
subtasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
||||
title: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
@@ -48,93 +54,189 @@ export declare const taskCreateSchema: z.ZodObject<{
|
||||
title: string;
|
||||
}>, "many">>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
categoryId: string;
|
||||
categoryId: string | null;
|
||||
title: string;
|
||||
dueTime: string;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | null | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
reminders?: string | undefined;
|
||||
completedAt?: number | null | undefined;
|
||||
}, {
|
||||
categoryId: string;
|
||||
categoryId: string | null;
|
||||
title: string;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | null | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "" | "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
reminders?: string | undefined;
|
||||
completedAt?: number | null | undefined;
|
||||
}>;
|
||||
export declare const taskUpdateSchema: z.ZodObject<{
|
||||
title: z.ZodOptional<z.ZodString>;
|
||||
description: z.ZodOptional<z.ZodString>;
|
||||
categoryId: z.ZodOptional<z.ZodString>;
|
||||
categoryId: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, string | null | undefined>;
|
||||
priority: z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>;
|
||||
completed: z.ZodOptional<z.ZodBoolean>;
|
||||
dueDate: z.ZodOptional<z.ZodNumber>;
|
||||
dueTime: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
||||
dueTime: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string | undefined, string | undefined>;
|
||||
endTime: z.ZodOptional<z.ZodString>;
|
||||
reminders: z.ZodOptional<z.ZodString>;
|
||||
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
||||
completedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
categoryId?: string | undefined;
|
||||
categoryId?: string | null | undefined;
|
||||
title?: string | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
completed?: boolean | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | null | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminders?: string | undefined;
|
||||
completedAt?: number | null | undefined;
|
||||
}, {
|
||||
categoryId?: string | undefined;
|
||||
categoryId?: string | null | undefined;
|
||||
title?: string | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
completed?: boolean | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | null | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminders?: string | undefined;
|
||||
completedAt?: number | null | undefined;
|
||||
}>;
|
||||
export declare const subtaskCreateSchema: z.ZodObject<{
|
||||
title: z.ZodString;
|
||||
description: z.ZodOptional<z.ZodString>;
|
||||
priority: z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>;
|
||||
dueDate: z.ZodOptional<z.ZodNumber>;
|
||||
dueTime: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
|
||||
endTime: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
||||
allDay: z.ZodOptional<z.ZodBoolean>;
|
||||
repeat: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["none", "daily", "weekly", "monthly", "custom"]>, z.ZodLiteral<"">]>, "custom" | "none" | "daily" | "weekly" | "monthly", "" | "custom" | "none" | "daily" | "weekly" | "monthly">>;
|
||||
repeatInterval: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
||||
repeatDays: z.ZodOptional<z.ZodString>;
|
||||
seriesId: z.ZodOptional<z.ZodString>;
|
||||
reminder: z.ZodOptional<z.ZodEnum<["none", "at_time", "15", "30", "60", "120", "1440"]>>;
|
||||
reminders: z.ZodOptional<z.ZodString>;
|
||||
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
||||
order: z.ZodOptional<z.ZodNumber>;
|
||||
parentSubtaskId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
title: string;
|
||||
dueTime: string;
|
||||
order?: number | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
reminders?: string | undefined;
|
||||
parentSubtaskId?: string | null | undefined;
|
||||
}, {
|
||||
title: string;
|
||||
order?: number | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "" | "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
reminders?: string | undefined;
|
||||
parentSubtaskId?: string | null | undefined;
|
||||
}>;
|
||||
export declare const subtaskUpdateSchema: z.ZodObject<{
|
||||
title: z.ZodOptional<z.ZodString>;
|
||||
description: z.ZodOptional<z.ZodString>;
|
||||
priority: z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>;
|
||||
completed: z.ZodOptional<z.ZodBoolean>;
|
||||
dueDate: z.ZodOptional<z.ZodNumber>;
|
||||
dueTime: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string | undefined, string | undefined>;
|
||||
endTime: z.ZodOptional<z.ZodString>;
|
||||
allDay: z.ZodOptional<z.ZodBoolean>;
|
||||
repeat: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["none", "daily", "weekly", "monthly", "custom"]>, z.ZodLiteral<"">]>, "custom" | "none" | "daily" | "weekly" | "monthly", "" | "custom" | "none" | "daily" | "weekly" | "monthly">>;
|
||||
repeatInterval: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
||||
repeatDays: z.ZodOptional<z.ZodString>;
|
||||
seriesId: z.ZodOptional<z.ZodString>;
|
||||
reminder: z.ZodOptional<z.ZodEnum<["none", "at_time", "15", "30", "60", "120", "1440"]>>;
|
||||
reminders: z.ZodOptional<z.ZodString>;
|
||||
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
||||
order: z.ZodOptional<z.ZodNumber>;
|
||||
parentSubtaskId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
order?: number | undefined;
|
||||
title?: string | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
completed?: boolean | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
reminders?: string | undefined;
|
||||
parentSubtaskId?: string | null | undefined;
|
||||
}, {
|
||||
order?: number | undefined;
|
||||
title?: string | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
completed?: boolean | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "" | "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
reminders?: string | undefined;
|
||||
parentSubtaskId?: string | null | undefined;
|
||||
}>;
|
||||
export declare const userSettingsSchema: z.ZodObject<{
|
||||
darkMode: z.ZodOptional<z.ZodBoolean>;
|
||||
@@ -174,6 +276,29 @@ export declare const repeatProfileSchema: z.ZodObject<{
|
||||
repeatInterval: number;
|
||||
repeatDays: string;
|
||||
}>;
|
||||
export declare const repeatProfileUpdateSchema: z.ZodObject<{
|
||||
name: z.ZodOptional<z.ZodString>;
|
||||
repeat: z.ZodOptional<z.ZodEnum<["none", "daily", "weekly", "monthly", "custom"]>>;
|
||||
repeatInterval: z.ZodOptional<z.ZodNumber>;
|
||||
repeatDays: z.ZodOptional<z.ZodString>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
name?: string | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
}, {
|
||||
name?: string | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
}>;
|
||||
export declare const searchQuerySchema: z.ZodObject<{
|
||||
q: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
q: string;
|
||||
}, {
|
||||
q: string;
|
||||
}>;
|
||||
export declare const friendRequestSchema: z.ZodObject<{
|
||||
username: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
@@ -203,6 +328,19 @@ export declare const friendshipSchema: z.ZodObject<{
|
||||
status: "pending" | "accepted";
|
||||
updatedAt: number;
|
||||
}>;
|
||||
export declare const tombstoneSchema: z.ZodObject<{
|
||||
entity: z.ZodEnum<["categories", "tasks", "subtasks", "repeatProfiles", "friendships"]>;
|
||||
id: z.ZodString;
|
||||
updatedAt: z.ZodNumber;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
id: string;
|
||||
updatedAt: number;
|
||||
entity: "categories" | "tasks" | "subtasks" | "repeatProfiles" | "friendships";
|
||||
}, {
|
||||
id: string;
|
||||
updatedAt: number;
|
||||
entity: "categories" | "tasks" | "subtasks" | "repeatProfiles" | "friendships";
|
||||
}>;
|
||||
export declare const pushChangesSchema: z.ZodObject<{
|
||||
changes: z.ZodObject<{
|
||||
categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
||||
@@ -231,16 +369,18 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
||||
title: z.ZodString;
|
||||
description: z.ZodOptional<z.ZodString>;
|
||||
categoryId: z.ZodString;
|
||||
categoryId: z.ZodNullable<z.ZodEffects<z.ZodString, string | null, string>>;
|
||||
priority: z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>;
|
||||
dueDate: z.ZodOptional<z.ZodNumber>;
|
||||
dueTime: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
||||
dueTime: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
|
||||
endTime: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
||||
repeat: z.ZodOptional<z.ZodEnum<["none", "daily", "weekly", "monthly", "custom"]>>;
|
||||
repeatInterval: z.ZodOptional<z.ZodNumber>;
|
||||
allDay: z.ZodOptional<z.ZodBoolean>;
|
||||
repeat: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["none", "daily", "weekly", "monthly", "custom"]>, z.ZodLiteral<"">]>, "custom" | "none" | "daily" | "weekly" | "monthly", "" | "custom" | "none" | "daily" | "weekly" | "monthly">>;
|
||||
repeatInterval: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
||||
repeatDays: z.ZodOptional<z.ZodString>;
|
||||
seriesId: z.ZodOptional<z.ZodString>;
|
||||
reminder: z.ZodOptional<z.ZodEnum<["none", "at_time", "15", "30", "60", "120", "1440"]>>;
|
||||
reminders: z.ZodOptional<z.ZodString>;
|
||||
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
||||
subtasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
||||
title: z.ZodString;
|
||||
@@ -254,52 +394,73 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
completed: z.ZodBoolean;
|
||||
createdAt: z.ZodNumber;
|
||||
updatedAt: z.ZodNumber;
|
||||
completedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
id: string;
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
categoryId: string;
|
||||
categoryId: string | null;
|
||||
title: string;
|
||||
completed: boolean;
|
||||
dueTime: string;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | null | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
reminders?: string | undefined;
|
||||
completedAt?: number | null | undefined;
|
||||
}, {
|
||||
id: string;
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
categoryId: string;
|
||||
categoryId: string | null;
|
||||
title: string;
|
||||
completed: boolean;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | null | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "" | "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
reminders?: string | undefined;
|
||||
completedAt?: number | null | undefined;
|
||||
}>, "many">>;
|
||||
subtasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
||||
title: z.ZodString;
|
||||
description: z.ZodOptional<z.ZodString>;
|
||||
priority: z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>;
|
||||
dueDate: z.ZodOptional<z.ZodNumber>;
|
||||
dueTime: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
|
||||
endTime: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
||||
allDay: z.ZodOptional<z.ZodBoolean>;
|
||||
repeat: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["none", "daily", "weekly", "monthly", "custom"]>, z.ZodLiteral<"">]>, "custom" | "none" | "daily" | "weekly" | "monthly", "" | "custom" | "none" | "daily" | "weekly" | "monthly">>;
|
||||
repeatInterval: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
||||
repeatDays: z.ZodOptional<z.ZodString>;
|
||||
seriesId: z.ZodOptional<z.ZodString>;
|
||||
reminder: z.ZodOptional<z.ZodEnum<["none", "at_time", "15", "30", "60", "120", "1440"]>>;
|
||||
reminders: z.ZodOptional<z.ZodString>;
|
||||
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
||||
order: z.ZodOptional<z.ZodNumber>;
|
||||
parentSubtaskId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
||||
} & {
|
||||
id: z.ZodString;
|
||||
taskId: z.ZodString;
|
||||
@@ -312,8 +473,22 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
updatedAt: number;
|
||||
title: string;
|
||||
completed: boolean;
|
||||
dueTime: string;
|
||||
taskId: string;
|
||||
order?: number | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
reminders?: string | undefined;
|
||||
parentSubtaskId?: string | null | undefined;
|
||||
}, {
|
||||
id: string;
|
||||
createdAt: number;
|
||||
@@ -322,6 +497,20 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
completed: boolean;
|
||||
taskId: string;
|
||||
order?: number | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "" | "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
reminders?: string | undefined;
|
||||
parentSubtaskId?: string | null | undefined;
|
||||
}>, "many">>;
|
||||
repeatProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
@@ -372,14 +561,6 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
updatedAt: number;
|
||||
}>, "many">>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
friendships?: {
|
||||
id: string;
|
||||
createdAt: number;
|
||||
userId: string;
|
||||
friendId: string;
|
||||
status: "pending" | "accepted";
|
||||
updatedAt: number;
|
||||
}[] | undefined;
|
||||
categories?: {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -392,23 +573,26 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
id: string;
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
categoryId: string;
|
||||
categoryId: string | null;
|
||||
title: string;
|
||||
completed: boolean;
|
||||
dueTime: string;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | null | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
reminders?: string | undefined;
|
||||
completedAt?: number | null | undefined;
|
||||
}[] | undefined;
|
||||
subtasks?: {
|
||||
id: string;
|
||||
@@ -416,8 +600,22 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
updatedAt: number;
|
||||
title: string;
|
||||
completed: boolean;
|
||||
dueTime: string;
|
||||
taskId: string;
|
||||
order?: number | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
reminders?: string | undefined;
|
||||
parentSubtaskId?: string | null | undefined;
|
||||
}[] | undefined;
|
||||
repeatProfiles?: {
|
||||
id: string;
|
||||
@@ -428,15 +626,15 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
repeatInterval: number;
|
||||
repeatDays: string;
|
||||
}[] | undefined;
|
||||
friendships?: {
|
||||
id: string;
|
||||
createdAt: number;
|
||||
userId: string;
|
||||
friendId: string;
|
||||
status: "pending" | "accepted";
|
||||
updatedAt: number;
|
||||
}[] | undefined;
|
||||
}, {
|
||||
friendships?: {
|
||||
id: string;
|
||||
createdAt: number;
|
||||
userId: string;
|
||||
friendId: string;
|
||||
status: "pending" | "accepted";
|
||||
updatedAt: number;
|
||||
}[] | undefined;
|
||||
categories?: {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -449,23 +647,26 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
id: string;
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
categoryId: string;
|
||||
categoryId: string | null;
|
||||
title: string;
|
||||
completed: boolean;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | null | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "" | "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
reminders?: string | undefined;
|
||||
completedAt?: number | null | undefined;
|
||||
}[] | undefined;
|
||||
subtasks?: {
|
||||
id: string;
|
||||
@@ -475,6 +676,20 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
completed: boolean;
|
||||
taskId: string;
|
||||
order?: number | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "" | "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
reminders?: string | undefined;
|
||||
parentSubtaskId?: string | null | undefined;
|
||||
}[] | undefined;
|
||||
repeatProfiles?: {
|
||||
id: string;
|
||||
@@ -485,18 +700,31 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
repeatInterval: number;
|
||||
repeatDays: string;
|
||||
}[] | undefined;
|
||||
friendships?: {
|
||||
id: string;
|
||||
createdAt: number;
|
||||
userId: string;
|
||||
friendId: string;
|
||||
status: "pending" | "accepted";
|
||||
updatedAt: number;
|
||||
}[] | undefined;
|
||||
}>;
|
||||
deleted: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
||||
entity: z.ZodEnum<["categories", "tasks", "subtasks", "repeatProfiles", "friendships"]>;
|
||||
id: z.ZodString;
|
||||
updatedAt: z.ZodNumber;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
id: string;
|
||||
updatedAt: number;
|
||||
entity: "categories" | "tasks" | "subtasks" | "repeatProfiles" | "friendships";
|
||||
}, {
|
||||
id: string;
|
||||
updatedAt: number;
|
||||
entity: "categories" | "tasks" | "subtasks" | "repeatProfiles" | "friendships";
|
||||
}>, "many">>;
|
||||
lastPulledAt: z.ZodNumber;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
changes: {
|
||||
friendships?: {
|
||||
id: string;
|
||||
createdAt: number;
|
||||
userId: string;
|
||||
friendId: string;
|
||||
status: "pending" | "accepted";
|
||||
updatedAt: number;
|
||||
}[] | undefined;
|
||||
categories?: {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -509,23 +737,26 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
id: string;
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
categoryId: string;
|
||||
categoryId: string | null;
|
||||
title: string;
|
||||
completed: boolean;
|
||||
dueTime: string;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | null | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
reminders?: string | undefined;
|
||||
completedAt?: number | null | undefined;
|
||||
}[] | undefined;
|
||||
subtasks?: {
|
||||
id: string;
|
||||
@@ -533,8 +764,22 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
updatedAt: number;
|
||||
title: string;
|
||||
completed: boolean;
|
||||
dueTime: string;
|
||||
taskId: string;
|
||||
order?: number | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
reminders?: string | undefined;
|
||||
parentSubtaskId?: string | null | undefined;
|
||||
}[] | undefined;
|
||||
repeatProfiles?: {
|
||||
id: string;
|
||||
@@ -545,18 +790,23 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
repeatInterval: number;
|
||||
repeatDays: string;
|
||||
}[] | undefined;
|
||||
friendships?: {
|
||||
id: string;
|
||||
createdAt: number;
|
||||
userId: string;
|
||||
friendId: string;
|
||||
status: "pending" | "accepted";
|
||||
updatedAt: number;
|
||||
}[] | undefined;
|
||||
};
|
||||
lastPulledAt: number;
|
||||
deleted?: {
|
||||
id: string;
|
||||
updatedAt: number;
|
||||
entity: "categories" | "tasks" | "subtasks" | "repeatProfiles" | "friendships";
|
||||
}[] | undefined;
|
||||
}, {
|
||||
changes: {
|
||||
friendships?: {
|
||||
id: string;
|
||||
createdAt: number;
|
||||
userId: string;
|
||||
friendId: string;
|
||||
status: "pending" | "accepted";
|
||||
updatedAt: number;
|
||||
}[] | undefined;
|
||||
categories?: {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -569,23 +819,26 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
id: string;
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
categoryId: string;
|
||||
categoryId: string | null;
|
||||
title: string;
|
||||
completed: boolean;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | null | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
repeat?: "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "" | "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
subtasks?: {
|
||||
title: string;
|
||||
}[] | undefined;
|
||||
reminders?: string | undefined;
|
||||
completedAt?: number | null | undefined;
|
||||
}[] | undefined;
|
||||
subtasks?: {
|
||||
id: string;
|
||||
@@ -595,6 +848,20 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
completed: boolean;
|
||||
taskId: string;
|
||||
order?: number | undefined;
|
||||
description?: string | undefined;
|
||||
priority?: "none" | "low" | "medium" | "high" | "critical" | undefined;
|
||||
dueDate?: number | undefined;
|
||||
dueTime?: string | undefined;
|
||||
endTime?: string | undefined;
|
||||
allDay?: boolean | undefined;
|
||||
repeat?: "" | "custom" | "none" | "daily" | "weekly" | "monthly" | undefined;
|
||||
repeatInterval?: number | undefined;
|
||||
repeatDays?: string | undefined;
|
||||
seriesId?: string | undefined;
|
||||
assigneeId?: string | null | undefined;
|
||||
reminder?: "none" | "at_time" | "15" | "30" | "60" | "120" | "1440" | undefined;
|
||||
reminders?: string | undefined;
|
||||
parentSubtaskId?: string | null | undefined;
|
||||
}[] | undefined;
|
||||
repeatProfiles?: {
|
||||
id: string;
|
||||
@@ -605,8 +872,21 @@ export declare const pushChangesSchema: z.ZodObject<{
|
||||
repeatInterval: number;
|
||||
repeatDays: string;
|
||||
}[] | undefined;
|
||||
friendships?: {
|
||||
id: string;
|
||||
createdAt: number;
|
||||
userId: string;
|
||||
friendId: string;
|
||||
status: "pending" | "accepted";
|
||||
updatedAt: number;
|
||||
}[] | undefined;
|
||||
};
|
||||
lastPulledAt: number;
|
||||
deleted?: {
|
||||
id: string;
|
||||
updatedAt: number;
|
||||
entity: "categories" | "tasks" | "subtasks" | "repeatProfiles" | "friendships";
|
||||
}[] | undefined;
|
||||
}>;
|
||||
export declare const syncQuerySchema: z.ZodObject<{
|
||||
since: z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>;
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,eAAO,MAAM,YAAY,6DAA2D,CAAC;AAErF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;EAO7B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;EAE9B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;EAO3B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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.syncQuerySchema = exports.pushChangesSchema = exports.friendshipSchema = exports.friendRequestSchema = exports.repeatProfileSchema = exports.userSettingsSchema = exports.subtaskUpdateSchema = exports.subtaskCreateSchema = exports.taskUpdateSchema = exports.taskCreateSchema = exports.repeatSchema = exports.categoryUpdateSchema = exports.categoryCreateSchema = void 0;
|
||||
exports.taskQuerySchema = exports.syncQuerySchema = exports.pushChangesSchema = exports.tombstoneSchema = exports.friendshipSchema = exports.friendRequestSchema = exports.searchQuerySchema = exports.repeatProfileUpdateSchema = exports.repeatProfileSchema = exports.userSettingsSchema = exports.subtaskUpdateSchema = exports.subtaskCreateSchema = exports.taskUpdateSchema = exports.taskCreateSchema = exports.repeatIntervalFieldSchema = exports.repeatFieldSchema = exports.repeatSchema = exports.categoryUpdateSchema = exports.categoryCreateSchema = void 0;
|
||||
exports.canCompleteTask = canCompleteTask;
|
||||
const zod_1 = require("zod");
|
||||
function canCompleteTask(dueDate) {
|
||||
if (dueDate === 0)
|
||||
return true;
|
||||
const now = new Date();
|
||||
const endOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999).getTime();
|
||||
return dueDate <= endOfToday;
|
||||
}
|
||||
exports.categoryCreateSchema = zod_1.z.object({
|
||||
name: zod_1.z.string().min(1).max(50),
|
||||
color: zod_1.z.string().regex(/^#[0-9A-Fa-f]{6}$/),
|
||||
@@ -13,41 +21,87 @@ exports.categoryUpdateSchema = zod_1.z.object({
|
||||
order: zod_1.z.number().int().min(0).optional(),
|
||||
});
|
||||
exports.repeatSchema = zod_1.z.enum(['none', 'daily', 'weekly', 'monthly', 'custom']);
|
||||
// The client stores '' / 0 for unset repeat values; normalize them so stale or
|
||||
// legacy rows never fail validation on push.
|
||||
exports.repeatFieldSchema = exports.repeatSchema
|
||||
.or(zod_1.z.literal(''))
|
||||
.transform((v) => (v === '' ? 'none' : v))
|
||||
.optional();
|
||||
exports.repeatIntervalFieldSchema = zod_1.z
|
||||
.number()
|
||||
.int()
|
||||
.min(0)
|
||||
.max(30)
|
||||
.transform((v) => Math.max(1, v))
|
||||
.optional();
|
||||
exports.taskCreateSchema = zod_1.z.object({
|
||||
title: zod_1.z.string().min(1).max(100),
|
||||
description: zod_1.z.string().max(1000).optional(),
|
||||
categoryId: zod_1.z.string().min(1),
|
||||
categoryId: zod_1.z.string().max(100).transform((v) => (v === '' ? null : v)).nullable(),
|
||||
priority: zod_1.z.enum(['none', 'low', 'medium', 'high', 'critical']).optional(),
|
||||
dueDate: zod_1.z.number().int().min(0).optional(),
|
||||
dueTime: zod_1.z.string().regex(/^([01]\d|2[0-3]):([0-5]\d)$/).optional().nullable(),
|
||||
dueTime: zod_1.z.string().regex(/^([01]\d|2[0-3]):([0-5]\d)$/).optional().or(zod_1.z.literal('')).transform(v => v ?? ''),
|
||||
endTime: zod_1.z.string().regex(/^([01]\d|2[0-3]):([0-5]\d)$/).optional().or(zod_1.z.literal('')),
|
||||
repeat: exports.repeatSchema.optional(),
|
||||
repeatInterval: zod_1.z.number().int().min(1).max(30).optional(),
|
||||
allDay: zod_1.z.boolean().optional(),
|
||||
repeat: exports.repeatFieldSchema,
|
||||
repeatInterval: exports.repeatIntervalFieldSchema,
|
||||
repeatDays: zod_1.z.string().max(20).optional(),
|
||||
seriesId: zod_1.z.string().max(50).optional(),
|
||||
reminder: zod_1.z.enum(['none', 'at_time', '15', '30', '60', '120', '1440']).optional(),
|
||||
reminders: zod_1.z.string().max(100).optional(),
|
||||
assigneeId: zod_1.z.string().nullable().optional(),
|
||||
completedAt: zod_1.z.number().int().min(0).nullable().optional(),
|
||||
subtasks: zod_1.z.array(zod_1.z.object({ title: zod_1.z.string().min(1).max(100) })).optional(),
|
||||
});
|
||||
exports.taskUpdateSchema = zod_1.z.object({
|
||||
title: zod_1.z.string().min(1).max(100).optional(),
|
||||
description: zod_1.z.string().max(1000).optional(),
|
||||
categoryId: zod_1.z.string().min(1).optional(),
|
||||
categoryId: zod_1.z.string().max(100).nullable().optional().transform((v) => (v === '' ? null : v)),
|
||||
priority: zod_1.z.enum(['none', 'low', 'medium', 'high', 'critical']).optional(),
|
||||
completed: zod_1.z.boolean().optional(),
|
||||
dueDate: zod_1.z.number().int().min(0).optional(),
|
||||
dueTime: zod_1.z.string().regex(/^([01]\d|2[0-3]):([0-5]\d)$/).optional().nullable(),
|
||||
dueTime: zod_1.z.string().regex(/^([01]\d|2[0-3]):([0-5]\d)$/).optional().or(zod_1.z.literal('')).transform(v => v === '' ? undefined : v),
|
||||
endTime: zod_1.z.string().regex(/^([01]\d|2[0-3]):([0-5]\d)$/).optional(),
|
||||
reminders: zod_1.z.string().max(100).optional(),
|
||||
assigneeId: zod_1.z.string().nullable().optional(),
|
||||
completedAt: zod_1.z.number().int().min(0).nullable().optional(),
|
||||
});
|
||||
exports.subtaskCreateSchema = zod_1.z.object({
|
||||
title: zod_1.z.string().min(1).max(100),
|
||||
description: zod_1.z.string().max(1000).optional(),
|
||||
priority: zod_1.z.enum(['none', 'low', 'medium', 'high', 'critical']).optional(),
|
||||
dueDate: zod_1.z.number().int().min(0).optional(),
|
||||
dueTime: zod_1.z.string().regex(/^([01]\d|2[0-3]):([0-5]\d)$/).optional().or(zod_1.z.literal('')).transform(v => v ?? ''),
|
||||
endTime: zod_1.z.string().regex(/^([01]\d|2[0-3]):([0-5]\d)$/).optional().or(zod_1.z.literal('')),
|
||||
allDay: zod_1.z.boolean().optional(),
|
||||
repeat: exports.repeatFieldSchema,
|
||||
repeatInterval: exports.repeatIntervalFieldSchema,
|
||||
repeatDays: zod_1.z.string().max(20).optional(),
|
||||
seriesId: zod_1.z.string().max(50).optional(),
|
||||
reminder: zod_1.z.enum(['none', 'at_time', '15', '30', '60', '120', '1440']).optional(),
|
||||
reminders: zod_1.z.string().max(100).optional(),
|
||||
assigneeId: zod_1.z.string().nullable().optional(),
|
||||
order: zod_1.z.number().int().min(0).optional(),
|
||||
parentSubtaskId: zod_1.z.string().nullable().optional(),
|
||||
});
|
||||
exports.subtaskUpdateSchema = zod_1.z.object({
|
||||
title: zod_1.z.string().min(1).max(100).optional(),
|
||||
description: zod_1.z.string().max(1000).optional(),
|
||||
priority: zod_1.z.enum(['none', 'low', 'medium', 'high', 'critical']).optional(),
|
||||
completed: zod_1.z.boolean().optional(),
|
||||
dueDate: zod_1.z.number().int().min(0).optional(),
|
||||
dueTime: zod_1.z.string().regex(/^([01]\d|2[0-3]):([0-5]\d)$/).optional().or(zod_1.z.literal('')).transform(v => v === '' ? undefined : v),
|
||||
endTime: zod_1.z.string().regex(/^([01]\d|2[0-3]):([0-5]\d)$/).optional(),
|
||||
allDay: zod_1.z.boolean().optional(),
|
||||
repeat: exports.repeatFieldSchema,
|
||||
repeatInterval: exports.repeatIntervalFieldSchema,
|
||||
repeatDays: zod_1.z.string().max(20).optional(),
|
||||
seriesId: zod_1.z.string().max(50).optional(),
|
||||
reminder: zod_1.z.enum(['none', 'at_time', '15', '30', '60', '120', '1440']).optional(),
|
||||
reminders: zod_1.z.string().max(100).optional(),
|
||||
assigneeId: zod_1.z.string().nullable().optional(),
|
||||
order: zod_1.z.number().int().min(0).optional(),
|
||||
parentSubtaskId: zod_1.z.string().nullable().optional(),
|
||||
});
|
||||
exports.userSettingsSchema = zod_1.z.object({
|
||||
darkMode: zod_1.z.boolean().optional(),
|
||||
@@ -63,6 +117,15 @@ exports.repeatProfileSchema = zod_1.z.object({
|
||||
repeatInterval: zod_1.z.number().int().min(1).max(30),
|
||||
repeatDays: zod_1.z.string().max(20),
|
||||
});
|
||||
exports.repeatProfileUpdateSchema = zod_1.z.object({
|
||||
name: zod_1.z.string().min(1).max(50).optional(),
|
||||
repeat: exports.repeatSchema.optional(),
|
||||
repeatInterval: zod_1.z.number().int().min(1).max(30).optional(),
|
||||
repeatDays: zod_1.z.string().max(20).optional(),
|
||||
});
|
||||
exports.searchQuerySchema = zod_1.z.object({
|
||||
q: zod_1.z.string().min(1).max(50),
|
||||
});
|
||||
exports.friendRequestSchema = zod_1.z.object({
|
||||
username: zod_1.z.string().min(1).max(50),
|
||||
});
|
||||
@@ -74,14 +137,20 @@ exports.friendshipSchema = zod_1.z.object({
|
||||
createdAt: zod_1.z.number(),
|
||||
updatedAt: zod_1.z.number(),
|
||||
});
|
||||
exports.tombstoneSchema = zod_1.z.object({
|
||||
entity: zod_1.z.enum(['categories', 'tasks', 'subtasks', 'repeatProfiles', 'friendships']),
|
||||
id: zod_1.z.string(),
|
||||
updatedAt: zod_1.z.number().int().min(0),
|
||||
});
|
||||
exports.pushChangesSchema = zod_1.z.object({
|
||||
changes: zod_1.z.object({
|
||||
categories: zod_1.z.array(exports.categoryCreateSchema.extend({ id: zod_1.z.string(), createdAt: zod_1.z.number(), updatedAt: zod_1.z.number() })).optional(),
|
||||
tasks: zod_1.z.array(exports.taskCreateSchema.extend({ id: zod_1.z.string(), completed: zod_1.z.boolean(), createdAt: zod_1.z.number(), updatedAt: zod_1.z.number() })).optional(),
|
||||
tasks: zod_1.z.array(exports.taskCreateSchema.extend({ id: zod_1.z.string(), completed: zod_1.z.boolean(), createdAt: zod_1.z.number(), updatedAt: zod_1.z.number(), completedAt: zod_1.z.number().int().min(0).nullable().optional() })).optional(),
|
||||
subtasks: zod_1.z.array(exports.subtaskCreateSchema.extend({ id: zod_1.z.string(), taskId: zod_1.z.string(), completed: zod_1.z.boolean(), createdAt: zod_1.z.number(), updatedAt: zod_1.z.number() })).optional(),
|
||||
repeatProfiles: zod_1.z.array(exports.repeatProfileSchema.extend({ id: zod_1.z.string(), createdAt: zod_1.z.number(), updatedAt: zod_1.z.number() })).optional(),
|
||||
friendships: zod_1.z.array(exports.friendshipSchema).optional(),
|
||||
}),
|
||||
deleted: zod_1.z.array(exports.tombstoneSchema).optional(),
|
||||
lastPulledAt: zod_1.z.number().int().min(0),
|
||||
});
|
||||
exports.syncQuerySchema = zod_1.z.object({
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user