@timothyw/pat-common 1.0.55 → 1.0.56
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/items/create-item-types.d.ts +2 -2
- package/dist/types/api/items/update-item-types.d.ts +2 -2
- package/dist/types/misc-types.d.ts +3 -0
- package/dist/types/models/habit-data.d.ts +4 -2
- package/dist/types/models/habit-data.js +0 -1
- package/package.json +1 -1
- package/src/types/misc-types.ts +2 -0
- package/src/types/models/habit-data.ts +4 -3
|
@@ -9,15 +9,15 @@ export declare const createItemRequestSchema: z.ZodObject<{
|
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
10
|
name: string;
|
|
11
11
|
urgent: boolean;
|
|
12
|
+
notes?: string | undefined;
|
|
12
13
|
type?: string | null | undefined;
|
|
13
14
|
dueDate?: string | null | undefined;
|
|
14
|
-
notes?: string | undefined;
|
|
15
15
|
category?: string | null | undefined;
|
|
16
16
|
}, {
|
|
17
17
|
name: string;
|
|
18
|
+
notes?: string | undefined;
|
|
18
19
|
type?: string | null | undefined;
|
|
19
20
|
dueDate?: string | null | undefined;
|
|
20
|
-
notes?: string | undefined;
|
|
21
21
|
urgent?: boolean | undefined;
|
|
22
22
|
category?: string | null | undefined;
|
|
23
23
|
}>;
|
|
@@ -8,16 +8,16 @@ export declare const updateItemRequestSchema: z.ZodObject<{
|
|
|
8
8
|
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
10
|
name?: string | undefined;
|
|
11
|
+
notes?: string | undefined;
|
|
11
12
|
type?: string | null | undefined;
|
|
12
13
|
dueDate?: string | null | undefined;
|
|
13
|
-
notes?: string | undefined;
|
|
14
14
|
urgent?: boolean | undefined;
|
|
15
15
|
category?: string | null | undefined;
|
|
16
16
|
}, {
|
|
17
17
|
name?: string | undefined;
|
|
18
|
+
notes?: string | undefined;
|
|
18
19
|
type?: string | null | undefined;
|
|
19
20
|
dueDate?: string | null | undefined;
|
|
20
|
-
notes?: string | undefined;
|
|
21
21
|
urgent?: boolean | undefined;
|
|
22
22
|
category?: string | null | undefined;
|
|
23
23
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToDateString } from "../misc-types";
|
|
1
|
+
import { DateOnlyString, ToDateString } from "../misc-types";
|
|
2
2
|
export declare enum HabitFrequency {
|
|
3
3
|
DAILY = "daily",
|
|
4
4
|
WEEKLY = "weekly",
|
|
@@ -13,7 +13,7 @@ export declare enum HabitEntryStatus {
|
|
|
13
13
|
export interface HabitEntryData {
|
|
14
14
|
_id: string;
|
|
15
15
|
habitId: string;
|
|
16
|
-
date:
|
|
16
|
+
date: DateOnlyString;
|
|
17
17
|
status: HabitEntryStatus;
|
|
18
18
|
createdAt: Date;
|
|
19
19
|
updatedAt: Date;
|
|
@@ -23,8 +23,10 @@ export interface HabitData {
|
|
|
23
23
|
userId: string;
|
|
24
24
|
name: string;
|
|
25
25
|
description?: string;
|
|
26
|
+
notes?: string;
|
|
26
27
|
frequency: HabitFrequency;
|
|
27
28
|
rolloverTime: string;
|
|
29
|
+
firstDay: DateOnlyString;
|
|
28
30
|
createdAt: Date;
|
|
29
31
|
updatedAt: Date;
|
|
30
32
|
}
|
|
@@ -22,7 +22,6 @@ const toHabit = (data, entries, stats) => {
|
|
|
22
22
|
updatedAt: (0, utils_1.toDateString)(data.updatedAt),
|
|
23
23
|
entries: entries.map(entry => ({
|
|
24
24
|
...entry,
|
|
25
|
-
date: (0, utils_1.toDateString)(entry.date),
|
|
26
25
|
createdAt: (0, utils_1.toDateString)(entry.createdAt),
|
|
27
26
|
updatedAt: (0, utils_1.toDateString)(entry.updatedAt)
|
|
28
27
|
})),
|
package/package.json
CHANGED
package/src/types/misc-types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToDateString } from "../misc-types";
|
|
1
|
+
import { DateOnlyString, ToDateString } from "../misc-types";
|
|
2
2
|
import { toDateString } from "../../utils";
|
|
3
3
|
|
|
4
4
|
export enum HabitFrequency {
|
|
@@ -17,7 +17,7 @@ export enum HabitEntryStatus {
|
|
|
17
17
|
export interface HabitEntryData {
|
|
18
18
|
_id: string;
|
|
19
19
|
habitId: string;
|
|
20
|
-
date:
|
|
20
|
+
date: DateOnlyString;
|
|
21
21
|
status: HabitEntryStatus;
|
|
22
22
|
createdAt: Date;
|
|
23
23
|
updatedAt: Date;
|
|
@@ -28,8 +28,10 @@ export interface HabitData {
|
|
|
28
28
|
userId: string;
|
|
29
29
|
name: string;
|
|
30
30
|
description?: string;
|
|
31
|
+
notes?: string;
|
|
31
32
|
frequency: HabitFrequency;
|
|
32
33
|
rolloverTime: string;
|
|
34
|
+
firstDay: DateOnlyString;
|
|
33
35
|
createdAt: Date;
|
|
34
36
|
updatedAt: Date;
|
|
35
37
|
}
|
|
@@ -56,7 +58,6 @@ export const toHabit = (data: HabitData, entries: HabitEntryData[], stats: Habit
|
|
|
56
58
|
updatedAt: toDateString(data.updatedAt),
|
|
57
59
|
entries: entries.map(entry => ({
|
|
58
60
|
...entry,
|
|
59
|
-
date: toDateString(entry.date),
|
|
60
61
|
createdAt: toDateString(entry.createdAt),
|
|
61
62
|
updatedAt: toDateString(entry.updatedAt)
|
|
62
63
|
})),
|