@timothyw/pat-common 1.0.113 → 1.0.115
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/id-types.d.ts +2 -2
- package/dist/types/index.d.ts +1 -3
- package/dist/types/index.js +4 -3
- package/dist/types/new/agenda-types.d.ts +116 -0
- package/dist/types/new/agenda-types.js +37 -0
- package/dist/types/new/auth-types.d.ts +153 -0
- package/dist/types/new/auth-types.js +48 -0
- package/dist/types/new/habits-types.d.ts +317 -0
- package/dist/types/new/habits-types.js +70 -0
- package/dist/types/new/index.d.ts +10 -0
- package/dist/types/new/index.js +26 -0
- package/dist/types/new/lists-types.d.ts +164 -0
- package/dist/types/new/lists-types.js +50 -0
- package/dist/types/new/misc/index.d.ts +1 -0
- package/dist/types/new/misc/index.js +17 -0
- package/dist/types/new/misc/version-types.d.ts +26 -0
- package/dist/types/new/misc/version-types.js +13 -0
- package/dist/types/new/notifications-types.d.ts +407 -0
- package/dist/types/new/notifications-types.js +91 -0
- package/dist/types/new/people-types.d.ts +285 -0
- package/dist/types/new/people-types.js +58 -0
- package/dist/types/new/program-config-types.d.ts +105 -0
- package/dist/types/new/program-config-types.js +29 -0
- package/dist/types/new/thoughts-types.d.ts +57 -0
- package/dist/types/new/thoughts-types.js +18 -0
- package/dist/types/new/user-types.d.ts +283 -0
- package/dist/types/new/user-types.js +46 -0
- package/dist/types/old/api/account/get-user-types.d.ts +5 -0
- package/dist/types/old/api/account/get-user-types.js +2 -0
- package/dist/types/old/api/account/index.d.ts +2 -0
- package/dist/types/old/api/account/index.js +18 -0
- package/dist/types/old/api/account/update-user-types.d.ts +128 -0
- package/dist/types/old/api/account/update-user-types.js +8 -0
- package/dist/types/old/api/auth/create-account-types.d.ts +24 -0
- package/dist/types/old/api/auth/create-account-types.js +10 -0
- package/dist/types/old/api/auth/index.d.ts +5 -0
- package/dist/types/old/api/auth/index.js +21 -0
- package/dist/types/old/api/auth/refresh-auth-types.d.ts +15 -0
- package/dist/types/old/api/auth/refresh-auth-types.js +7 -0
- package/dist/types/old/api/auth/resend-verification-types.d.ts +3 -0
- package/dist/types/old/api/auth/resend-verification-types.js +2 -0
- package/dist/types/old/api/auth/sign-in-types.d.ts +19 -0
- package/dist/types/old/api/auth/sign-in-types.js +8 -0
- package/dist/types/old/api/auth/verify-email-types.d.ts +3 -0
- package/dist/types/old/api/auth/verify-email-types.js +2 -0
- package/dist/types/old/api/habits/create-habit-entry-types.d.ts +19 -0
- package/dist/types/old/api/habits/create-habit-entry-types.js +10 -0
- package/dist/types/old/api/habits/create-habit-types.d.ts +26 -0
- package/dist/types/old/api/habits/create-habit-types.js +12 -0
- package/dist/types/old/api/habits/delete-habit-entry-types.d.ts +5 -0
- package/dist/types/old/api/habits/delete-habit-entry-types.js +2 -0
- package/dist/types/old/api/habits/delete-habit-types.d.ts +3 -0
- package/dist/types/old/api/habits/delete-habit-types.js +2 -0
- package/dist/types/old/api/habits/get-habits-types.d.ts +5 -0
- package/dist/types/old/api/habits/get-habits-types.js +2 -0
- package/dist/types/old/api/habits/index.d.ts +6 -0
- package/dist/types/old/api/habits/index.js +22 -0
- package/dist/types/old/api/habits/update-habit-types.d.ts +26 -0
- package/dist/types/old/api/habits/update-habit-types.js +12 -0
- package/dist/types/old/api/index.d.ts +9 -0
- package/dist/types/old/api/index.js +25 -0
- package/dist/types/old/api/items/complete-item-types.d.ts +14 -0
- package/dist/types/old/api/items/complete-item-types.js +7 -0
- package/dist/types/old/api/items/create-item-types.d.ts +29 -0
- package/dist/types/old/api/items/create-item-types.js +12 -0
- package/dist/types/old/api/items/delete-item-types.d.ts +3 -0
- package/dist/types/old/api/items/delete-item-types.js +2 -0
- package/dist/types/old/api/items/get-items-types.d.ts +5 -0
- package/dist/types/old/api/items/get-items-types.js +2 -0
- package/dist/types/old/api/items/index.d.ts +5 -0
- package/dist/types/old/api/items/index.js +21 -0
- package/dist/types/old/api/items/update-item-types.d.ts +29 -0
- package/dist/types/old/api/items/update-item-types.js +12 -0
- package/dist/types/old/api/lists/complete-list-item-types.d.ts +14 -0
- package/dist/types/old/api/lists/complete-list-item-types.js +7 -0
- package/dist/types/old/api/lists/create-list-item-types.d.ts +22 -0
- package/dist/types/old/api/lists/create-list-item-types.js +10 -0
- package/dist/types/old/api/lists/create-list-types.d.ts +17 -0
- package/dist/types/old/api/lists/create-list-types.js +9 -0
- package/dist/types/old/api/lists/get-list-item-types.d.ts +5 -0
- package/dist/types/old/api/lists/get-list-item-types.js +2 -0
- package/dist/types/old/api/lists/get-lists-types.d.ts +5 -0
- package/dist/types/old/api/lists/get-lists-types.js +2 -0
- package/dist/types/old/api/lists/index.d.ts +7 -0
- package/dist/types/old/api/lists/index.js +23 -0
- package/dist/types/old/api/lists/update-list-item-types.d.ts +23 -0
- package/dist/types/old/api/lists/update-list-item-types.js +11 -0
- package/dist/types/old/api/lists/update-list-types.d.ts +17 -0
- package/dist/types/old/api/lists/update-list-types.js +9 -0
- package/dist/types/old/api/misc/index.d.ts +1 -0
- package/dist/types/old/api/misc/index.js +17 -0
- package/dist/types/old/api/misc/version-types.d.ts +9 -0
- package/dist/types/old/api/misc/version-types.js +2 -0
- package/dist/types/old/api/notifications/create-notification-template-types.d.ts +78 -0
- package/dist/types/old/api/notifications/create-notification-template-types.js +25 -0
- package/dist/types/old/api/notifications/delete-notification-template-types.d.ts +5 -0
- package/dist/types/old/api/notifications/delete-notification-template-types.js +6 -0
- package/dist/types/old/api/notifications/get-notification-templates-types.d.ts +8 -0
- package/dist/types/old/api/notifications/get-notification-templates-types.js +6 -0
- package/dist/types/old/api/notifications/index.d.ts +6 -0
- package/dist/types/old/api/notifications/index.js +22 -0
- package/dist/types/old/api/notifications/preview-notification-template-types.d.ts +29 -0
- package/dist/types/old/api/notifications/preview-notification-template-types.js +12 -0
- package/dist/types/old/api/notifications/sync-notification-template-types.d.ts +14 -0
- package/dist/types/old/api/notifications/sync-notification-template-types.js +8 -0
- package/dist/types/old/api/notifications/update-notification-template-types.d.ts +69 -0
- package/dist/types/old/api/notifications/update-notification-template-types.js +22 -0
- package/dist/types/old/api/people/create-person-note-types.d.ts +19 -0
- package/dist/types/old/api/people/create-person-note-types.js +9 -0
- package/dist/types/old/api/people/create-person-types.d.ts +35 -0
- package/dist/types/old/api/people/create-person-types.js +13 -0
- package/dist/types/old/api/people/delete-person-notes-types.d.ts +3 -0
- package/dist/types/old/api/people/delete-person-notes-types.js +2 -0
- package/dist/types/old/api/people/delete-person-types.d.ts +3 -0
- package/dist/types/old/api/people/delete-person-types.js +2 -0
- package/dist/types/old/api/people/get-people-types.d.ts +5 -0
- package/dist/types/old/api/people/get-people-types.js +2 -0
- package/dist/types/old/api/people/get-person-notes-types.d.ts +5 -0
- package/dist/types/old/api/people/get-person-notes-types.js +2 -0
- package/dist/types/old/api/people/index.d.ts +8 -0
- package/dist/types/old/api/people/index.js +24 -0
- package/dist/types/old/api/people/update-person-note-types.d.ts +14 -0
- package/dist/types/old/api/people/update-person-note-types.js +7 -0
- package/dist/types/old/api/people/update-person-types.d.ts +35 -0
- package/dist/types/old/api/people/update-person-types.js +13 -0
- package/dist/types/old/api/thoughts/create-thought-types.d.ts +14 -0
- package/dist/types/old/api/thoughts/create-thought-types.js +7 -0
- package/dist/types/old/api/thoughts/delete-thought-types.d.ts +3 -0
- package/dist/types/old/api/thoughts/delete-thought-types.js +2 -0
- package/dist/types/old/api/thoughts/get-thoughts-types.d.ts +5 -0
- package/dist/types/old/api/thoughts/get-thoughts-types.js +2 -0
- package/dist/types/old/api/thoughts/index.d.ts +4 -0
- package/dist/types/old/api/thoughts/index.js +20 -0
- package/dist/types/old/api/thoughts/update-thought-types.d.ts +14 -0
- package/dist/types/old/api/thoughts/update-thought-types.js +7 -0
- package/dist/types/old/auth-tokens.d.ts +11 -0
- package/dist/types/old/auth-tokens.js +2 -0
- package/dist/types/old/models/auth-data.d.ts +14 -0
- package/dist/types/old/models/auth-data.js +9 -0
- package/dist/types/old/models/habit-data.d.ts +48 -0
- package/dist/types/old/models/habit-data.js +25 -0
- package/dist/types/old/models/index.d.ts +10 -0
- package/dist/types/old/models/index.js +26 -0
- package/dist/types/old/models/item-data.d.ts +14 -0
- package/dist/types/old/models/item-data.js +2 -0
- package/dist/types/old/models/list-data.d.ts +23 -0
- package/dist/types/old/models/list-data.js +8 -0
- package/dist/types/old/models/notifiable.d.ts +42 -0
- package/dist/types/old/models/notifiable.js +2 -0
- package/dist/types/old/models/notification-template-data.d.ts +224 -0
- package/dist/types/old/models/notification-template-data.js +52 -0
- package/dist/types/old/models/person-data.d.ts +31 -0
- package/dist/types/old/models/person-data.js +2 -0
- package/dist/types/old/models/program-config.d.ts +25 -0
- package/dist/types/old/models/program-config.js +2 -0
- package/dist/types/old/models/thought-data.d.ts +8 -0
- package/dist/types/old/models/thought-data.js +2 -0
- package/dist/types/old/models/user-data.d.ts +147 -0
- package/dist/types/old/models/user-data.js +42 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/type-helpers.d.ts +4 -0
- package/dist/utils/type-helpers.js +19 -0
- package/package.json +1 -1
- package/src/types/id-types.ts +2 -2
- package/src/types/index.ts +4 -3
- package/src/types/new/agenda-types.ts +69 -0
- package/src/types/new/auth-types.ts +92 -0
- package/src/types/new/habits-types.ts +112 -0
- package/src/types/new/index.ts +10 -0
- package/src/types/new/lists-types.ts +108 -0
- package/src/types/new/misc/index.ts +1 -0
- package/src/types/new/misc/version-types.ts +15 -0
- package/src/types/new/notifications-types.ts +144 -0
- package/src/types/new/people-types.ts +110 -0
- package/src/types/new/program-config-types.ts +29 -0
- package/src/types/new/thoughts-types.ts +44 -0
- package/src/types/new/user-types.ts +61 -0
- package/src/types/{api → old/api}/account/get-user-types.ts +1 -1
- package/src/types/{api → old/api}/account/update-user-types.ts +1 -1
- package/src/types/{api → old/api}/auth/create-account-types.ts +1 -1
- package/src/types/{api → old/api}/habits/create-habit-entry-types.ts +2 -2
- package/src/types/{api → old/api}/habits/create-habit-types.ts +1 -1
- package/src/types/{api → old/api}/habits/delete-habit-entry-types.ts +1 -1
- package/src/types/{api → old/api}/habits/get-habits-types.ts +1 -1
- package/src/types/{api → old/api}/habits/update-habit-types.ts +1 -1
- package/src/types/{api → old/api}/items/complete-item-types.ts +1 -1
- package/src/types/{api → old/api}/items/create-item-types.ts +1 -1
- package/src/types/{api → old/api}/items/get-items-types.ts +1 -1
- package/src/types/{api → old/api}/items/update-item-types.ts +1 -1
- package/src/types/{api → old/api}/lists/complete-list-item-types.ts +1 -1
- package/src/types/{api → old/api}/lists/create-list-item-types.ts +2 -2
- package/src/types/{api → old/api}/lists/create-list-types.ts +1 -1
- package/src/types/{api → old/api}/lists/get-list-item-types.ts +1 -1
- package/src/types/{api → old/api}/lists/get-lists-types.ts +1 -1
- package/src/types/{api → old/api}/lists/update-list-item-types.ts +2 -2
- package/src/types/{api → old/api}/lists/update-list-types.ts +1 -1
- package/src/types/{api → old/api}/notifications/create-notification-template-types.ts +1 -1
- package/src/types/{api → old/api}/notifications/get-notification-templates-types.ts +1 -1
- package/src/types/{api → old/api}/notifications/sync-notification-template-types.ts +1 -1
- package/src/types/{api → old/api}/notifications/update-notification-template-types.ts +1 -1
- package/src/types/{api → old/api}/people/create-person-note-types.ts +2 -2
- package/src/types/{api → old/api}/people/create-person-types.ts +2 -2
- package/src/types/{api → old/api}/people/get-people-types.ts +1 -1
- package/src/types/{api → old/api}/people/get-person-notes-types.ts +1 -1
- package/src/types/{api → old/api}/people/update-person-note-types.ts +1 -1
- package/src/types/{api → old/api}/people/update-person-types.ts +2 -2
- package/src/types/{api → old/api}/thoughts/create-thought-types.ts +1 -1
- package/src/types/{api → old/api}/thoughts/get-thoughts-types.ts +1 -1
- package/src/types/{api → old/api}/thoughts/update-thought-types.ts +1 -1
- package/src/types/{models → old/models}/auth-data.ts +1 -1
- package/src/types/{models → old/models}/habit-data.ts +2 -2
- package/src/types/{models → old/models}/item-data.ts +1 -1
- package/src/types/{models → old/models}/list-data.ts +1 -1
- package/src/types/{models → old/models}/notification-template-data.ts +1 -1
- package/src/types/{models → old/models}/person-data.ts +1 -1
- package/src/types/{models → old/models}/thought-data.ts +1 -1
- package/src/types/{models → old/models}/user-data.ts +2 -2
- package/src/utils/index.ts +2 -1
- package/src/utils/type-helpers.ts +19 -0
- /package/src/types/{api → old/api}/account/index.ts +0 -0
- /package/src/types/{api → old/api}/auth/index.ts +0 -0
- /package/src/types/{api → old/api}/auth/refresh-auth-types.ts +0 -0
- /package/src/types/{api → old/api}/auth/resend-verification-types.ts +0 -0
- /package/src/types/{api → old/api}/auth/sign-in-types.ts +0 -0
- /package/src/types/{api → old/api}/auth/verify-email-types.ts +0 -0
- /package/src/types/{api → old/api}/habits/delete-habit-types.ts +0 -0
- /package/src/types/{api → old/api}/habits/index.ts +0 -0
- /package/src/types/{api → old/api}/index.ts +0 -0
- /package/src/types/{api → old/api}/items/delete-item-types.ts +0 -0
- /package/src/types/{api → old/api}/items/index.ts +0 -0
- /package/src/types/{api → old/api}/lists/index.ts +0 -0
- /package/src/types/{api → old/api}/misc/index.ts +0 -0
- /package/src/types/{api → old/api}/misc/version-types.ts +0 -0
- /package/src/types/{api → old/api}/notifications/delete-notification-template-types.ts +0 -0
- /package/src/types/{api → old/api}/notifications/index.ts +0 -0
- /package/src/types/{api → old/api}/notifications/preview-notification-template-types.ts +0 -0
- /package/src/types/{api → old/api}/people/delete-person-notes-types.ts +0 -0
- /package/src/types/{api → old/api}/people/delete-person-types.ts +0 -0
- /package/src/types/{api → old/api}/people/index.ts +0 -0
- /package/src/types/{api → old/api}/thoughts/delete-thought-types.ts +0 -0
- /package/src/types/{api → old/api}/thoughts/index.ts +0 -0
- /package/src/types/{auth-tokens.ts → old/auth-tokens.ts} +0 -0
- /package/src/types/{models → old/models}/index.ts +0 -0
- /package/src/types/{models → old/models}/notifiable.ts +0 -0
- /package/src/types/{models → old/models}/program-config.ts +0 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ModuleType } from "../../../enums";
|
|
3
|
+
declare const moduleSchema: z.ZodObject<{
|
|
4
|
+
type: z.ZodNativeEnum<typeof ModuleType>;
|
|
5
|
+
visible: z.ZodBoolean;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
type: ModuleType;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
}, {
|
|
10
|
+
type: ModuleType;
|
|
11
|
+
visible: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const userDataSchema: z.ZodObject<{
|
|
14
|
+
_id: z.ZodEffects<z.ZodString, import("../../id-types").UserId, string>;
|
|
15
|
+
createdAt: z.ZodDate;
|
|
16
|
+
updatedAt: z.ZodDate;
|
|
17
|
+
sandbox: z.ZodObject<{
|
|
18
|
+
discordId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
devices: z.ZodArray<z.ZodObject<{
|
|
20
|
+
pushToken: z.ZodString;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
pushToken: string;
|
|
23
|
+
}, {
|
|
24
|
+
pushToken: string;
|
|
25
|
+
}>, "many">;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
devices: {
|
|
28
|
+
pushToken: string;
|
|
29
|
+
}[];
|
|
30
|
+
discordId?: string | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
devices: {
|
|
33
|
+
pushToken: string;
|
|
34
|
+
}[];
|
|
35
|
+
discordId?: string | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
timezone: z.ZodEffects<z.ZodString, string, string>;
|
|
39
|
+
config: z.ZodObject<{
|
|
40
|
+
modules: z.ZodArray<z.ZodObject<{
|
|
41
|
+
type: z.ZodNativeEnum<typeof ModuleType>;
|
|
42
|
+
visible: z.ZodBoolean;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
type: ModuleType;
|
|
45
|
+
visible: boolean;
|
|
46
|
+
}, {
|
|
47
|
+
type: ModuleType;
|
|
48
|
+
visible: boolean;
|
|
49
|
+
}>, "many">;
|
|
50
|
+
agenda: z.ZodObject<{
|
|
51
|
+
itemCategories: z.ZodArray<z.ZodString, "many">;
|
|
52
|
+
itemTypes: z.ZodArray<z.ZodString, "many">;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
itemCategories: string[];
|
|
55
|
+
itemTypes: string[];
|
|
56
|
+
}, {
|
|
57
|
+
itemCategories: string[];
|
|
58
|
+
itemTypes: string[];
|
|
59
|
+
}>;
|
|
60
|
+
people: z.ZodObject<{
|
|
61
|
+
propertyKeys: z.ZodArray<z.ZodString, "many">;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
propertyKeys: string[];
|
|
64
|
+
}, {
|
|
65
|
+
propertyKeys: string[];
|
|
66
|
+
}>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
agenda: {
|
|
69
|
+
itemCategories: string[];
|
|
70
|
+
itemTypes: string[];
|
|
71
|
+
};
|
|
72
|
+
people: {
|
|
73
|
+
propertyKeys: string[];
|
|
74
|
+
};
|
|
75
|
+
modules: {
|
|
76
|
+
type: ModuleType;
|
|
77
|
+
visible: boolean;
|
|
78
|
+
}[];
|
|
79
|
+
}, {
|
|
80
|
+
agenda: {
|
|
81
|
+
itemCategories: string[];
|
|
82
|
+
itemTypes: string[];
|
|
83
|
+
};
|
|
84
|
+
people: {
|
|
85
|
+
propertyKeys: string[];
|
|
86
|
+
};
|
|
87
|
+
modules: {
|
|
88
|
+
type: ModuleType;
|
|
89
|
+
visible: boolean;
|
|
90
|
+
}[];
|
|
91
|
+
}>;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
_id: string & {
|
|
94
|
+
readonly __brand: "UserId";
|
|
95
|
+
};
|
|
96
|
+
createdAt: Date;
|
|
97
|
+
updatedAt: Date;
|
|
98
|
+
name: string;
|
|
99
|
+
sandbox: {
|
|
100
|
+
devices: {
|
|
101
|
+
pushToken: string;
|
|
102
|
+
}[];
|
|
103
|
+
discordId?: string | undefined;
|
|
104
|
+
};
|
|
105
|
+
timezone: string;
|
|
106
|
+
config: {
|
|
107
|
+
agenda: {
|
|
108
|
+
itemCategories: string[];
|
|
109
|
+
itemTypes: string[];
|
|
110
|
+
};
|
|
111
|
+
people: {
|
|
112
|
+
propertyKeys: string[];
|
|
113
|
+
};
|
|
114
|
+
modules: {
|
|
115
|
+
type: ModuleType;
|
|
116
|
+
visible: boolean;
|
|
117
|
+
}[];
|
|
118
|
+
};
|
|
119
|
+
}, {
|
|
120
|
+
_id: string;
|
|
121
|
+
createdAt: Date;
|
|
122
|
+
updatedAt: Date;
|
|
123
|
+
name: string;
|
|
124
|
+
sandbox: {
|
|
125
|
+
devices: {
|
|
126
|
+
pushToken: string;
|
|
127
|
+
}[];
|
|
128
|
+
discordId?: string | undefined;
|
|
129
|
+
};
|
|
130
|
+
timezone: string;
|
|
131
|
+
config: {
|
|
132
|
+
agenda: {
|
|
133
|
+
itemCategories: string[];
|
|
134
|
+
itemTypes: string[];
|
|
135
|
+
};
|
|
136
|
+
people: {
|
|
137
|
+
propertyKeys: string[];
|
|
138
|
+
};
|
|
139
|
+
modules: {
|
|
140
|
+
type: ModuleType;
|
|
141
|
+
visible: boolean;
|
|
142
|
+
}[];
|
|
143
|
+
};
|
|
144
|
+
}>;
|
|
145
|
+
export type Module = z.infer<typeof moduleSchema>;
|
|
146
|
+
export type UserData = z.infer<typeof userDataSchema>;
|
|
147
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userDataSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const id_types_1 = require("../../id-types");
|
|
6
|
+
const enums_1 = require("../../../enums");
|
|
7
|
+
const moduleSchema = zod_1.z.object({
|
|
8
|
+
type: zod_1.z.nativeEnum(enums_1.ModuleType),
|
|
9
|
+
visible: zod_1.z.boolean()
|
|
10
|
+
});
|
|
11
|
+
const deviceSchema = zod_1.z.object({
|
|
12
|
+
pushToken: zod_1.z.string()
|
|
13
|
+
});
|
|
14
|
+
exports.userDataSchema = zod_1.z.object({
|
|
15
|
+
_id: id_types_1.userIdSchema,
|
|
16
|
+
createdAt: zod_1.z.date(),
|
|
17
|
+
updatedAt: zod_1.z.date(),
|
|
18
|
+
sandbox: zod_1.z.object({
|
|
19
|
+
discordId: zod_1.z.string().optional(),
|
|
20
|
+
devices: zod_1.z.array(deviceSchema)
|
|
21
|
+
}),
|
|
22
|
+
name: zod_1.z.string().min(1),
|
|
23
|
+
timezone: zod_1.z.string().refine((tz) => {
|
|
24
|
+
try {
|
|
25
|
+
Intl.DateTimeFormat(undefined, { timeZone: tz });
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}, { message: "Invalid timezone" }),
|
|
32
|
+
config: zod_1.z.object({
|
|
33
|
+
modules: zod_1.z.array(moduleSchema),
|
|
34
|
+
agenda: zod_1.z.object({
|
|
35
|
+
itemCategories: zod_1.z.array(zod_1.z.string()),
|
|
36
|
+
itemTypes: zod_1.z.array(zod_1.z.string())
|
|
37
|
+
}),
|
|
38
|
+
people: zod_1.z.object({
|
|
39
|
+
propertyKeys: zod_1.z.array(zod_1.z.string())
|
|
40
|
+
}),
|
|
41
|
+
})
|
|
42
|
+
});
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./date-utils"), exports);
|
|
18
18
|
__exportStar(require("./serializing-utils"), exports);
|
|
19
|
+
__exportStar(require("./type-helpers"), exports);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AuthData, PublicAuthData } from '../types';
|
|
2
|
+
import { HabitData, HabitEntryData, HabitStats, Habit } from '../types';
|
|
3
|
+
export declare function toPublicAuthData(data: AuthData): PublicAuthData;
|
|
4
|
+
export declare const toHabit: (data: HabitData, entries: HabitEntryData[], stats: HabitStats) => Habit;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toHabit = void 0;
|
|
4
|
+
exports.toPublicAuthData = toPublicAuthData;
|
|
5
|
+
// export type PublicAuthData = Pick<AuthData, 'email' | 'emailVerified'> & { readonly __brand: unique symbol };
|
|
6
|
+
function toPublicAuthData(data) {
|
|
7
|
+
return {
|
|
8
|
+
email: data.email,
|
|
9
|
+
emailVerified: data.emailVerified
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
const toHabit = (data, entries, stats) => {
|
|
13
|
+
return {
|
|
14
|
+
...data,
|
|
15
|
+
entries,
|
|
16
|
+
stats
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
exports.toHabit = toHabit;
|
package/package.json
CHANGED
package/src/types/id-types.ts
CHANGED
|
@@ -24,10 +24,10 @@ export type ListId = string & { readonly __brand: "ListId" };
|
|
|
24
24
|
export const listItemIdSchema = z.string().transform((val): ListItemId => val as ListItemId);
|
|
25
25
|
export type ListItemId = string & { readonly __brand: "ListItemId" };
|
|
26
26
|
|
|
27
|
-
export const habitIdSchema = z.string().transform((val):
|
|
27
|
+
export const habitIdSchema = z.string().transform((val): HabitId => val as HabitId);
|
|
28
28
|
export type HabitId = string & { readonly __brand: "HabitId" };
|
|
29
29
|
|
|
30
|
-
export const habitEntryIdSchema = z.string().transform((val):
|
|
30
|
+
export const habitEntryIdSchema = z.string().transform((val): HabitEntryId => val as HabitEntryId);
|
|
31
31
|
export type HabitEntryId = string & { readonly __brand: "HabitEntryId" };
|
|
32
32
|
|
|
33
33
|
export const notificationTemplateIdSchema = z.string().transform((val): NotificationTemplateId => val as NotificationTemplateId);
|
package/src/types/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from './api'
|
|
2
|
-
export * from './models'
|
|
3
|
-
export * from './
|
|
1
|
+
// export * from './api'
|
|
2
|
+
// export * from './models'
|
|
3
|
+
export * from './new'
|
|
4
|
+
// export * from './auth-tokens'
|
|
4
5
|
export * from './id-types'
|
|
5
6
|
export * from './misc-types'
|
|
6
7
|
export * from './socket-message-types'
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { itemIdSchema, userIdSchema } from '../id-types';
|
|
3
|
+
import { Serialized } from '../../utils';
|
|
4
|
+
|
|
5
|
+
export const agendaItemSchema = z.object({
|
|
6
|
+
_id: itemIdSchema,
|
|
7
|
+
userId: userIdSchema,
|
|
8
|
+
createdAt: z.date(),
|
|
9
|
+
updatedAt: z.date(),
|
|
10
|
+
name: z.string().min(1),
|
|
11
|
+
dueDate: z.date().optional(),
|
|
12
|
+
notes: z.string().optional(),
|
|
13
|
+
completed: z.boolean(),
|
|
14
|
+
urgent: z.boolean(),
|
|
15
|
+
category: z.string().optional(),
|
|
16
|
+
type: z.string().optional()
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const createAgendaItemRequestSchema = z.object({
|
|
20
|
+
name: z.string().min(1),
|
|
21
|
+
dueDate: z.string().optional(),
|
|
22
|
+
notes: z.string().optional(),
|
|
23
|
+
urgent: z.boolean().optional().default(false),
|
|
24
|
+
category: z.string().optional(),
|
|
25
|
+
type: z.string().optional()
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const updateAgendaItemRequestSchema = z.object({
|
|
29
|
+
name: z.string().min(1).optional(),
|
|
30
|
+
dueDate: z.string().nullish(),
|
|
31
|
+
notes: z.string().nullish(),
|
|
32
|
+
urgent: z.boolean().optional(),
|
|
33
|
+
category: z.string().nullish(),
|
|
34
|
+
type: z.string().nullish()
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const completeAgendaItemRequestSchema = z.object({
|
|
38
|
+
completed: z.boolean()
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export type AgendaItemData = z.infer<typeof agendaItemSchema>;
|
|
42
|
+
|
|
43
|
+
export type CreateAgendaItemRequest = z.infer<typeof createAgendaItemRequestSchema>;
|
|
44
|
+
export type UpdateAgendaItemRequest = z.infer<typeof updateAgendaItemRequestSchema>;
|
|
45
|
+
export type CompleteAgendaItemRequest = z.infer<typeof completeAgendaItemRequestSchema>;
|
|
46
|
+
|
|
47
|
+
export interface CreateAgendaItemResponse {
|
|
48
|
+
agendaItem: Serialized<AgendaItemData>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface GetAgendaItemsResponse {
|
|
52
|
+
agendaItems: Serialized<AgendaItemData>[];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface GetAgendaItemResponse {
|
|
56
|
+
agendaItem: Serialized<AgendaItemData>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface UpdateAgendaItemResponse {
|
|
60
|
+
agendaItem: Serialized<AgendaItemData>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface CompleteAgendaItemResponse {
|
|
64
|
+
agendaItem: Serialized<AgendaItemData>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface DeleteAgendaItemResponse {
|
|
68
|
+
deleted: boolean;
|
|
69
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { authIdSchema, userIdSchema } from '../id-types';
|
|
3
|
+
|
|
4
|
+
export const authTokensSchema = z.object({
|
|
5
|
+
accessToken: z.string(),
|
|
6
|
+
refreshToken: z.string()
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export const tokenPayloadSchema = z.object({
|
|
10
|
+
authId: z.string(),
|
|
11
|
+
userId: z.string()
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const refreshTokenPayloadSchema = tokenPayloadSchema.extend({
|
|
15
|
+
tokenId: z.string()
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const authDataSchema = z.object({
|
|
19
|
+
_id: authIdSchema,
|
|
20
|
+
createdAt: z.date(),
|
|
21
|
+
updatedAt: z.date(),
|
|
22
|
+
userId: userIdSchema,
|
|
23
|
+
email: z.string(),
|
|
24
|
+
passwordHash: z.string(),
|
|
25
|
+
emailVerified: z.boolean()
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const publicAuthDataSchema = z.object({
|
|
29
|
+
email: z.string(),
|
|
30
|
+
emailVerified: z.boolean()
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const createAccountRequestSchema = z.object({
|
|
34
|
+
name: z.string().trim().min(1),
|
|
35
|
+
email: z.string().trim().email(),
|
|
36
|
+
password: z.string().min(4),
|
|
37
|
+
skipVerificationEmail: z.boolean().optional()
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export const signInRequestSchema = z.object({
|
|
41
|
+
email: z.string().email(),
|
|
42
|
+
password: z.string()
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export const refreshAuthRequestSchema = z.object({
|
|
46
|
+
refreshToken: z.string()
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const resendVerificationRequestSchema = z.object({
|
|
50
|
+
email: z.string().email()
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export const verifyEmailQuerySchema = z.object({
|
|
54
|
+
token: z.string().optional()
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export type AuthTokens = z.infer<typeof authTokensSchema>;
|
|
58
|
+
export type TokenPayload = z.infer<typeof tokenPayloadSchema>;
|
|
59
|
+
export type RefreshTokenPayload = z.infer<typeof refreshTokenPayloadSchema>;
|
|
60
|
+
export type AuthData = z.infer<typeof authDataSchema>;
|
|
61
|
+
export type PublicAuthData = z.infer<typeof publicAuthDataSchema> & { readonly __brand: unique symbol };
|
|
62
|
+
|
|
63
|
+
export type CreateAccountRequest = z.infer<typeof createAccountRequestSchema>;
|
|
64
|
+
export type SignInRequest = z.infer<typeof signInRequestSchema>;
|
|
65
|
+
export type RefreshAuthRequest = z.infer<typeof refreshAuthRequestSchema>;
|
|
66
|
+
export type ResendVerificationRequest = z.infer<typeof resendVerificationRequestSchema>;
|
|
67
|
+
export type VerifyEmailQuery = z.infer<typeof verifyEmailQuerySchema>;
|
|
68
|
+
|
|
69
|
+
export interface CreateAccountResponse {
|
|
70
|
+
id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
email: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface SignInResponse {
|
|
76
|
+
tokenData: AuthTokens;
|
|
77
|
+
authData: PublicAuthData;
|
|
78
|
+
user: any;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface RefreshAuthResponse {
|
|
82
|
+
tokenData: AuthTokens;
|
|
83
|
+
authData: PublicAuthData;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface ResendVerificationResponse {
|
|
87
|
+
sent: boolean;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface VerifyEmailResponse {
|
|
91
|
+
verified: boolean;
|
|
92
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { habitIdSchema, habitEntryIdSchema, userIdSchema } from '../id-types';
|
|
3
|
+
import { dateOnlyStringSchema } from '../misc-types';
|
|
4
|
+
import { Serialized } from '../../utils';
|
|
5
|
+
|
|
6
|
+
export enum HabitFrequency {
|
|
7
|
+
DAILY = 'daily',
|
|
8
|
+
WEEKLY = 'weekly',
|
|
9
|
+
EVERY_N_DAYS = 'every_n_days',
|
|
10
|
+
WEEKDAYS_ONLY = 'weekdays_only',
|
|
11
|
+
CUSTOM = 'custom'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum HabitEntryStatus {
|
|
15
|
+
COMPLETED = 'completed',
|
|
16
|
+
EXCUSED = 'excused',
|
|
17
|
+
MISSED = 'missed'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const habitEntrySchema = z.object({
|
|
21
|
+
_id: habitEntryIdSchema,
|
|
22
|
+
habitId: habitIdSchema,
|
|
23
|
+
userId: userIdSchema,
|
|
24
|
+
date: dateOnlyStringSchema,
|
|
25
|
+
status: z.nativeEnum(HabitEntryStatus),
|
|
26
|
+
createdAt: z.date(),
|
|
27
|
+
updatedAt: z.date()
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const habitDataSchema = z.object({
|
|
31
|
+
_id: habitIdSchema,
|
|
32
|
+
userId: userIdSchema,
|
|
33
|
+
name: z.string(),
|
|
34
|
+
description: z.string().nullable().optional(),
|
|
35
|
+
notes: z.string().nullable().optional(),
|
|
36
|
+
frequency: z.nativeEnum(HabitFrequency),
|
|
37
|
+
rolloverTime: z.string(),
|
|
38
|
+
firstDay: dateOnlyStringSchema,
|
|
39
|
+
createdAt: z.date(),
|
|
40
|
+
updatedAt: z.date()
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const habitStatsSchema = z.object({
|
|
44
|
+
totalDays: z.number(),
|
|
45
|
+
completedDays: z.number(),
|
|
46
|
+
excusedDays: z.number(),
|
|
47
|
+
missedDays: z.number(),
|
|
48
|
+
completionRate: z.number()
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const habitSchema = habitDataSchema.extend({
|
|
52
|
+
entries: z.array(habitEntrySchema),
|
|
53
|
+
stats: habitStatsSchema
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export const createHabitRequestSchema = z.object({
|
|
57
|
+
name: z.string().min(1).trim(),
|
|
58
|
+
description: z.string().trim().optional(),
|
|
59
|
+
notes: z.string().trim().optional(),
|
|
60
|
+
frequency: z.nativeEnum(HabitFrequency),
|
|
61
|
+
rolloverTime: z.string().regex(/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/)
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export const updateHabitRequestSchema = z.object({
|
|
65
|
+
name: z.string().min(1).trim().optional(),
|
|
66
|
+
description: z.string().trim().nullish(),
|
|
67
|
+
notes: z.string().trim().nullish(),
|
|
68
|
+
frequency: z.nativeEnum(HabitFrequency).optional(),
|
|
69
|
+
rolloverTime: z.string().regex(/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/).optional()
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export const createHabitEntryRequestSchema = z.object({
|
|
73
|
+
date: dateOnlyStringSchema,
|
|
74
|
+
status: z.nativeEnum(HabitEntryStatus)
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export type HabitEntryData = z.infer<typeof habitEntrySchema>;
|
|
78
|
+
export type HabitData = z.infer<typeof habitDataSchema>;
|
|
79
|
+
export type HabitStats = z.infer<typeof habitStatsSchema>;
|
|
80
|
+
export type Habit = z.infer<typeof habitSchema>;
|
|
81
|
+
|
|
82
|
+
export type CreateHabitRequest = z.infer<typeof createHabitRequestSchema>;
|
|
83
|
+
export type UpdateHabitRequest = z.infer<typeof updateHabitRequestSchema>;
|
|
84
|
+
export type CreateHabitEntryRequest = z.infer<typeof createHabitEntryRequestSchema>;
|
|
85
|
+
|
|
86
|
+
export interface CreateHabitResponse {
|
|
87
|
+
habit: Serialized<Habit>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface GetHabitsResponse {
|
|
91
|
+
habits: Serialized<Habit>[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface GetHabitResponse {
|
|
95
|
+
habit: Serialized<Habit>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface UpdateHabitResponse {
|
|
99
|
+
habit: Serialized<Habit>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface DeleteHabitResponse {
|
|
103
|
+
deleted: boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface CreateHabitEntryResponse {
|
|
107
|
+
habit: Serialized<Habit>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface DeleteHabitEntryResponse {
|
|
111
|
+
habit: Serialized<Habit>;
|
|
112
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './agenda-types';
|
|
2
|
+
export * from './thoughts-types';
|
|
3
|
+
export * from './habits-types';
|
|
4
|
+
export * from './people-types';
|
|
5
|
+
export * from './lists-types';
|
|
6
|
+
export * from './notifications-types';
|
|
7
|
+
export * from './auth-types';
|
|
8
|
+
export * from './user-types';
|
|
9
|
+
export * from './program-config-types';
|
|
10
|
+
export * from './misc';
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { listIdSchema, listItemIdSchema, userIdSchema } from '../id-types';
|
|
3
|
+
import { Serialized } from '../../utils';
|
|
4
|
+
|
|
5
|
+
export enum ListType {
|
|
6
|
+
TASKS = 'tasks',
|
|
7
|
+
NOTES = 'notes'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const listItemSchema = z.object({
|
|
11
|
+
_id: listItemIdSchema,
|
|
12
|
+
userId: userIdSchema,
|
|
13
|
+
createdAt: z.date(),
|
|
14
|
+
updatedAt: z.date(),
|
|
15
|
+
name: z.string(),
|
|
16
|
+
notes: z.string().optional(),
|
|
17
|
+
completed: z.boolean(),
|
|
18
|
+
listId: listIdSchema
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export const listSchema = z.object({
|
|
22
|
+
_id: listIdSchema,
|
|
23
|
+
userId: userIdSchema,
|
|
24
|
+
createdAt: z.date(),
|
|
25
|
+
updatedAt: z.date(),
|
|
26
|
+
name: z.string(),
|
|
27
|
+
type: z.nativeEnum(ListType)
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const createListRequestSchema = z.object({
|
|
31
|
+
name: z.string().min(1),
|
|
32
|
+
type: z.nativeEnum(ListType)
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const updateListRequestSchema = z.object({
|
|
36
|
+
name: z.string().min(1).optional(),
|
|
37
|
+
type: z.nativeEnum(ListType).optional()
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export const createListItemRequestSchema = z.object({
|
|
41
|
+
name: z.string().min(1),
|
|
42
|
+
notes: z.string().optional(),
|
|
43
|
+
listId: listIdSchema
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const updateListItemRequestSchema = z.object({
|
|
47
|
+
name: z.string().min(1).optional(),
|
|
48
|
+
notes: z.string().nullish(),
|
|
49
|
+
completed: z.boolean().optional(),
|
|
50
|
+
listId: listIdSchema.optional()
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export const completeListItemRequestSchema = z.object({
|
|
54
|
+
completed: z.boolean()
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export type ListItemData = z.infer<typeof listItemSchema>;
|
|
58
|
+
export type ListData = z.infer<typeof listSchema>;
|
|
59
|
+
|
|
60
|
+
export type CreateListRequest = z.infer<typeof createListRequestSchema>;
|
|
61
|
+
export type UpdateListRequest = z.infer<typeof updateListRequestSchema>;
|
|
62
|
+
export type CreateListItemRequest = z.infer<typeof createListItemRequestSchema>;
|
|
63
|
+
export type UpdateListItemRequest = z.infer<typeof updateListItemRequestSchema>;
|
|
64
|
+
export type CompleteListItemRequest = z.infer<typeof completeListItemRequestSchema>;
|
|
65
|
+
|
|
66
|
+
export interface CreateListResponse {
|
|
67
|
+
list: Serialized<ListData>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface GetListsResponse {
|
|
71
|
+
lists: Serialized<ListData>[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface GetListResponse {
|
|
75
|
+
list: Serialized<ListData>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface UpdateListResponse {
|
|
79
|
+
list: Serialized<ListData>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface DeleteListResponse {
|
|
83
|
+
deleted: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface CreateListItemResponse {
|
|
87
|
+
listItem: Serialized<ListItemData>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface GetListItemsResponse {
|
|
91
|
+
listItems: Serialized<ListItemData>[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface GetListItemResponse {
|
|
95
|
+
listItem: Serialized<ListItemData>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface UpdateListItemResponse {
|
|
99
|
+
listItem: Serialized<ListItemData>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface CompleteListItemResponse {
|
|
103
|
+
listItem: Serialized<ListItemData>;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface DeleteListItemResponse {
|
|
107
|
+
deleted: boolean;
|
|
108
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './version-types';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const versionQuerySchema = z.object({
|
|
4
|
+
iOSBuildVersion: z.number().optional(),
|
|
5
|
+
androidBuildVersion: z.number().optional()
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export const versionResponseSchema = z.object({
|
|
9
|
+
minIOSBuildVersion: z.number(),
|
|
10
|
+
minAndroidBuildVersion: z.number(),
|
|
11
|
+
updateRequired: z.boolean()
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export type VersionQuery = z.infer<typeof versionQuerySchema>;
|
|
15
|
+
export type VersionResponse = z.infer<typeof versionResponseSchema>;
|