@timothyw/pat-common 1.0.60 → 1.0.62
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/dist/types/api/habits/update-habit-types.d.ts +7 -3
- package/dist/types/api/habits/update-habit-types.js +2 -1
- package/dist/types/api/items/update-item-types.d.ts +3 -3
- package/dist/types/api/items/update-item-types.js +1 -1
- package/dist/types/api/tasks/update-task-types.d.ts +3 -3
- package/dist/types/api/tasks/update-task-types.js +1 -1
- package/dist/types/models/habit-data.d.ts +2 -2
- package/dist/types/models/item-data.d.ts +1 -1
- package/dist/types/models/task-data.d.ts +1 -1
- package/package.json +1 -1
- package/src/types/api/habits/update-habit-types.ts +3 -1
- package/src/types/api/items/update-item-types.ts +1 -1
- package/src/types/api/tasks/update-task-types.ts +1 -1
- package/src/types/models/habit-data.ts +2 -2
- package/src/types/models/item-data.ts +1 -1
- package/src/types/models/task-data.ts +1 -1
|
@@ -2,23 +2,27 @@ import { z } from "zod";
|
|
|
2
2
|
import { Habit } from "../../models";
|
|
3
3
|
export declare const updateHabitRequestSchema: z.ZodObject<{
|
|
4
4
|
name: z.ZodOptional<z.ZodString>;
|
|
5
|
-
description: z.ZodOptional<z.ZodString
|
|
5
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
7
|
frequency: z.ZodOptional<z.ZodLiteral<"daily">>;
|
|
7
8
|
rolloverTime: z.ZodOptional<z.ZodString>;
|
|
8
9
|
}, "strip", z.ZodTypeAny, {
|
|
9
10
|
name?: string | undefined;
|
|
10
|
-
description?: string | undefined;
|
|
11
|
+
description?: string | null | undefined;
|
|
12
|
+
notes?: string | null | undefined;
|
|
11
13
|
frequency?: "daily" | undefined;
|
|
12
14
|
rolloverTime?: string | undefined;
|
|
13
15
|
}, {
|
|
14
16
|
name?: string | undefined;
|
|
15
|
-
description?: string | undefined;
|
|
17
|
+
description?: string | null | undefined;
|
|
18
|
+
notes?: string | null | undefined;
|
|
16
19
|
frequency?: "daily" | undefined;
|
|
17
20
|
rolloverTime?: string | undefined;
|
|
18
21
|
}>;
|
|
19
22
|
export interface UpdateHabitRequest {
|
|
20
23
|
name?: string;
|
|
21
24
|
description?: string;
|
|
25
|
+
notes?: string;
|
|
22
26
|
frequency?: 'daily';
|
|
23
27
|
rolloverTime?: string;
|
|
24
28
|
}
|
|
@@ -4,7 +4,8 @@ exports.updateHabitRequestSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.updateHabitRequestSchema = zod_1.z.object({
|
|
6
6
|
name: zod_1.z.string().min(1, 'Name is required').trim().optional(),
|
|
7
|
-
description: zod_1.z.string().trim().
|
|
7
|
+
description: zod_1.z.string().trim().nullish(),
|
|
8
|
+
notes: zod_1.z.string().trim().nullish(),
|
|
8
9
|
frequency: zod_1.z.literal('daily').optional(),
|
|
9
10
|
rolloverTime: zod_1.z.string().regex(/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/, 'rolloverTime must be in HH:MM format').optional()
|
|
10
11
|
});
|
|
@@ -2,21 +2,21 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const updateItemRequestSchema: z.ZodObject<{
|
|
3
3
|
name: z.ZodOptional<z.ZodString>;
|
|
4
4
|
dueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
|
-
notes: z.ZodOptional<z.ZodString
|
|
5
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
6
|
urgent: z.ZodOptional<z.ZodBoolean>;
|
|
7
7
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
8
|
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
10
|
type?: string | null | undefined;
|
|
11
11
|
name?: string | undefined;
|
|
12
|
-
notes?: string | undefined;
|
|
12
|
+
notes?: string | null | undefined;
|
|
13
13
|
dueDate?: string | null | undefined;
|
|
14
14
|
urgent?: boolean | undefined;
|
|
15
15
|
category?: string | null | undefined;
|
|
16
16
|
}, {
|
|
17
17
|
type?: string | null | undefined;
|
|
18
18
|
name?: string | undefined;
|
|
19
|
-
notes?: string | undefined;
|
|
19
|
+
notes?: string | null | undefined;
|
|
20
20
|
dueDate?: string | null | undefined;
|
|
21
21
|
urgent?: boolean | undefined;
|
|
22
22
|
category?: string | null | undefined;
|
|
@@ -5,7 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
exports.updateItemRequestSchema = zod_1.z.object({
|
|
6
6
|
name: zod_1.z.string().min(1).optional(),
|
|
7
7
|
dueDate: zod_1.z.string().nullish(),
|
|
8
|
-
notes: zod_1.z.string().
|
|
8
|
+
notes: zod_1.z.string().nullish(),
|
|
9
9
|
urgent: zod_1.z.boolean().optional(),
|
|
10
10
|
category: zod_1.z.string().nullish(),
|
|
11
11
|
type: zod_1.z.string().nullish()
|
|
@@ -2,18 +2,18 @@ import { z } from 'zod';
|
|
|
2
2
|
import { TaskId, TaskListId } from '../../id-types';
|
|
3
3
|
export declare const updateTaskRequestSchema: z.ZodObject<{
|
|
4
4
|
name: z.ZodOptional<z.ZodString>;
|
|
5
|
-
notes: z.ZodOptional<z.ZodString
|
|
5
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
6
|
completed: z.ZodOptional<z.ZodBoolean>;
|
|
7
7
|
taskListId: z.ZodOptional<z.ZodEffects<z.ZodString, TaskListId, string>>;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
9
|
completed?: boolean | undefined;
|
|
10
10
|
name?: string | undefined;
|
|
11
|
-
notes?: string | undefined;
|
|
11
|
+
notes?: string | null | undefined;
|
|
12
12
|
taskListId?: TaskListId | undefined;
|
|
13
13
|
}, {
|
|
14
14
|
completed?: boolean | undefined;
|
|
15
15
|
name?: string | undefined;
|
|
16
|
-
notes?: string | undefined;
|
|
16
|
+
notes?: string | null | undefined;
|
|
17
17
|
taskListId?: string | undefined;
|
|
18
18
|
}>;
|
|
19
19
|
export type UpdateTaskRequest = z.infer<typeof updateTaskRequestSchema>;
|
|
@@ -5,7 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const id_types_1 = require("../../id-types");
|
|
6
6
|
exports.updateTaskRequestSchema = zod_1.z.object({
|
|
7
7
|
name: zod_1.z.string().min(1).optional(),
|
|
8
|
-
notes: zod_1.z.string().
|
|
8
|
+
notes: zod_1.z.string().nullish(),
|
|
9
9
|
completed: zod_1.z.boolean().optional(),
|
|
10
10
|
taskListId: id_types_1.taskListIdSchema.optional()
|
|
11
11
|
});
|
|
@@ -23,8 +23,8 @@ export interface HabitData {
|
|
|
23
23
|
_id: HabitId;
|
|
24
24
|
userId: UserId;
|
|
25
25
|
name: string;
|
|
26
|
-
description?: string;
|
|
27
|
-
notes?: string;
|
|
26
|
+
description?: string | null;
|
|
27
|
+
notes?: string | null;
|
|
28
28
|
frequency: HabitFrequency;
|
|
29
29
|
rolloverTime: string;
|
|
30
30
|
firstDay: DateOnlyString;
|
package/package.json
CHANGED
|
@@ -3,7 +3,8 @@ import { Habit } from "../../models";
|
|
|
3
3
|
|
|
4
4
|
export const updateHabitRequestSchema = z.object({
|
|
5
5
|
name: z.string().min(1, 'Name is required').trim().optional(),
|
|
6
|
-
description: z.string().trim().
|
|
6
|
+
description: z.string().trim().nullish(),
|
|
7
|
+
notes: z.string().trim().nullish(),
|
|
7
8
|
frequency: z.literal('daily').optional(),
|
|
8
9
|
rolloverTime: z.string().regex(/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/, 'rolloverTime must be in HH:MM format').optional()
|
|
9
10
|
});
|
|
@@ -11,6 +12,7 @@ export const updateHabitRequestSchema = z.object({
|
|
|
11
12
|
export interface UpdateHabitRequest {
|
|
12
13
|
name?: string;
|
|
13
14
|
description?: string;
|
|
15
|
+
notes?: string;
|
|
14
16
|
frequency?: 'daily';
|
|
15
17
|
rolloverTime?: string;
|
|
16
18
|
}
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
export const updateItemRequestSchema = z.object({
|
|
4
4
|
name: z.string().min(1).optional(),
|
|
5
5
|
dueDate: z.string().nullish(),
|
|
6
|
-
notes: z.string().
|
|
6
|
+
notes: z.string().nullish(),
|
|
7
7
|
urgent: z.boolean().optional(),
|
|
8
8
|
category: z.string().nullish(),
|
|
9
9
|
type: z.string().nullish()
|
|
@@ -3,7 +3,7 @@ import { TaskId, TaskListId, taskListIdSchema } from '../../id-types';
|
|
|
3
3
|
|
|
4
4
|
export const updateTaskRequestSchema = z.object({
|
|
5
5
|
name: z.string().min(1).optional(),
|
|
6
|
-
notes: z.string().
|
|
6
|
+
notes: z.string().nullish(),
|
|
7
7
|
completed: z.boolean().optional(),
|
|
8
8
|
taskListId: taskListIdSchema.optional()
|
|
9
9
|
});
|
|
@@ -28,8 +28,8 @@ export interface HabitData {
|
|
|
28
28
|
_id: HabitId;
|
|
29
29
|
userId: UserId;
|
|
30
30
|
name: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
notes?: string;
|
|
31
|
+
description?: string | null;
|
|
32
|
+
notes?: string | null;
|
|
33
33
|
frequency: HabitFrequency;
|
|
34
34
|
rolloverTime: string;
|
|
35
35
|
firstDay: DateOnlyString;
|