@timothyw/pat-common 1.0.112 → 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/api/notifications/create-notification-template-types.d.ts +3 -18
- package/dist/types/api/notifications/create-notification-template-types.js +1 -7
- package/dist/types/api/notifications/delete-notification-template-types.d.ts +2 -11
- package/dist/types/api/notifications/delete-notification-template-types.js +1 -6
- package/dist/types/api/notifications/get-notification-templates-types.d.ts +3 -18
- package/dist/types/api/notifications/get-notification-templates-types.js +1 -7
- package/dist/types/api/notifications/preview-notification-template-types.d.ts +5 -34
- package/dist/types/api/notifications/preview-notification-template-types.js +1 -12
- package/dist/types/api/notifications/sync-notification-template-types.d.ts +3 -18
- package/dist/types/api/notifications/sync-notification-template-types.js +1 -7
- package/dist/types/api/notifications/update-notification-template-types.d.ts +3 -146
- package/dist/types/api/notifications/update-notification-template-types.js +1 -4
- 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 +4 -13
- package/src/types/old/api/notifications/delete-notification-template-types.ts +8 -0
- package/src/types/old/api/notifications/get-notification-templates-types.ts +12 -0
- package/src/types/old/api/notifications/preview-notification-template-types.ts +21 -0
- package/src/types/old/api/notifications/sync-notification-template-types.ts +14 -0
- package/src/types/{api → old/api}/notifications/update-notification-template-types.ts +5 -12
- 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/notifications/delete-notification-template-types.ts +0 -14
- package/src/types/api/notifications/get-notification-templates-types.ts +0 -21
- package/src/types/api/notifications/preview-notification-template-types.ts +0 -26
- package/src/types/api/notifications/sync-notification-template-types.ts +0 -23
- /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/index.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,164 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Serialized } from '../../utils';
|
|
3
|
+
export declare enum ListType {
|
|
4
|
+
TASKS = "tasks",
|
|
5
|
+
NOTES = "notes"
|
|
6
|
+
}
|
|
7
|
+
export declare const listItemSchema: z.ZodObject<{
|
|
8
|
+
_id: z.ZodEffects<z.ZodString, import("../id-types").ListItemId, string>;
|
|
9
|
+
userId: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
|
|
10
|
+
createdAt: z.ZodDate;
|
|
11
|
+
updatedAt: z.ZodDate;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
14
|
+
completed: z.ZodBoolean;
|
|
15
|
+
listId: z.ZodEffects<z.ZodString, import("../id-types").ListId, string>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
_id: string & {
|
|
18
|
+
readonly __brand: "ListItemId";
|
|
19
|
+
};
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
userId: string & {
|
|
23
|
+
readonly __brand: "UserId";
|
|
24
|
+
};
|
|
25
|
+
name: string;
|
|
26
|
+
completed: boolean;
|
|
27
|
+
listId: string & {
|
|
28
|
+
readonly __brand: "ListId";
|
|
29
|
+
};
|
|
30
|
+
notes?: string | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
_id: string;
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
updatedAt: Date;
|
|
35
|
+
userId: string;
|
|
36
|
+
name: string;
|
|
37
|
+
completed: boolean;
|
|
38
|
+
listId: string;
|
|
39
|
+
notes?: string | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const listSchema: z.ZodObject<{
|
|
42
|
+
_id: z.ZodEffects<z.ZodString, import("../id-types").ListId, string>;
|
|
43
|
+
userId: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
|
|
44
|
+
createdAt: z.ZodDate;
|
|
45
|
+
updatedAt: z.ZodDate;
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
type: z.ZodNativeEnum<typeof ListType>;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
_id: string & {
|
|
50
|
+
readonly __brand: "ListId";
|
|
51
|
+
};
|
|
52
|
+
createdAt: Date;
|
|
53
|
+
updatedAt: Date;
|
|
54
|
+
userId: string & {
|
|
55
|
+
readonly __brand: "UserId";
|
|
56
|
+
};
|
|
57
|
+
type: ListType;
|
|
58
|
+
name: string;
|
|
59
|
+
}, {
|
|
60
|
+
_id: string;
|
|
61
|
+
createdAt: Date;
|
|
62
|
+
updatedAt: Date;
|
|
63
|
+
userId: string;
|
|
64
|
+
type: ListType;
|
|
65
|
+
name: string;
|
|
66
|
+
}>;
|
|
67
|
+
export declare const createListRequestSchema: z.ZodObject<{
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
type: z.ZodNativeEnum<typeof ListType>;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
type: ListType;
|
|
72
|
+
name: string;
|
|
73
|
+
}, {
|
|
74
|
+
type: ListType;
|
|
75
|
+
name: string;
|
|
76
|
+
}>;
|
|
77
|
+
export declare const updateListRequestSchema: z.ZodObject<{
|
|
78
|
+
name: z.ZodOptional<z.ZodString>;
|
|
79
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof ListType>>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
type?: ListType | undefined;
|
|
82
|
+
name?: string | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
type?: ListType | undefined;
|
|
85
|
+
name?: string | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
export declare const createListItemRequestSchema: z.ZodObject<{
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
90
|
+
listId: z.ZodEffects<z.ZodString, import("../id-types").ListId, string>;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
name: string;
|
|
93
|
+
listId: string & {
|
|
94
|
+
readonly __brand: "ListId";
|
|
95
|
+
};
|
|
96
|
+
notes?: string | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
name: string;
|
|
99
|
+
listId: string;
|
|
100
|
+
notes?: string | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
export declare const updateListItemRequestSchema: z.ZodObject<{
|
|
103
|
+
name: z.ZodOptional<z.ZodString>;
|
|
104
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
+
completed: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
+
listId: z.ZodOptional<z.ZodEffects<z.ZodString, import("../id-types").ListId, string>>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
name?: string | undefined;
|
|
109
|
+
notes?: string | null | undefined;
|
|
110
|
+
completed?: boolean | undefined;
|
|
111
|
+
listId?: import("../id-types").ListId | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
name?: string | undefined;
|
|
114
|
+
notes?: string | null | undefined;
|
|
115
|
+
completed?: boolean | undefined;
|
|
116
|
+
listId?: string | undefined;
|
|
117
|
+
}>;
|
|
118
|
+
export declare const completeListItemRequestSchema: z.ZodObject<{
|
|
119
|
+
completed: z.ZodBoolean;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
completed: boolean;
|
|
122
|
+
}, {
|
|
123
|
+
completed: boolean;
|
|
124
|
+
}>;
|
|
125
|
+
export type ListItemData = z.infer<typeof listItemSchema>;
|
|
126
|
+
export type ListData = z.infer<typeof listSchema>;
|
|
127
|
+
export type CreateListRequest = z.infer<typeof createListRequestSchema>;
|
|
128
|
+
export type UpdateListRequest = z.infer<typeof updateListRequestSchema>;
|
|
129
|
+
export type CreateListItemRequest = z.infer<typeof createListItemRequestSchema>;
|
|
130
|
+
export type UpdateListItemRequest = z.infer<typeof updateListItemRequestSchema>;
|
|
131
|
+
export type CompleteListItemRequest = z.infer<typeof completeListItemRequestSchema>;
|
|
132
|
+
export interface CreateListResponse {
|
|
133
|
+
list: Serialized<ListData>;
|
|
134
|
+
}
|
|
135
|
+
export interface GetListsResponse {
|
|
136
|
+
lists: Serialized<ListData>[];
|
|
137
|
+
}
|
|
138
|
+
export interface GetListResponse {
|
|
139
|
+
list: Serialized<ListData>;
|
|
140
|
+
}
|
|
141
|
+
export interface UpdateListResponse {
|
|
142
|
+
list: Serialized<ListData>;
|
|
143
|
+
}
|
|
144
|
+
export interface DeleteListResponse {
|
|
145
|
+
deleted: boolean;
|
|
146
|
+
}
|
|
147
|
+
export interface CreateListItemResponse {
|
|
148
|
+
listItem: Serialized<ListItemData>;
|
|
149
|
+
}
|
|
150
|
+
export interface GetListItemsResponse {
|
|
151
|
+
listItems: Serialized<ListItemData>[];
|
|
152
|
+
}
|
|
153
|
+
export interface GetListItemResponse {
|
|
154
|
+
listItem: Serialized<ListItemData>;
|
|
155
|
+
}
|
|
156
|
+
export interface UpdateListItemResponse {
|
|
157
|
+
listItem: Serialized<ListItemData>;
|
|
158
|
+
}
|
|
159
|
+
export interface CompleteListItemResponse {
|
|
160
|
+
listItem: Serialized<ListItemData>;
|
|
161
|
+
}
|
|
162
|
+
export interface DeleteListItemResponse {
|
|
163
|
+
deleted: boolean;
|
|
164
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.completeListItemRequestSchema = exports.updateListItemRequestSchema = exports.createListItemRequestSchema = exports.updateListRequestSchema = exports.createListRequestSchema = exports.listSchema = exports.listItemSchema = exports.ListType = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const id_types_1 = require("../id-types");
|
|
6
|
+
var ListType;
|
|
7
|
+
(function (ListType) {
|
|
8
|
+
ListType["TASKS"] = "tasks";
|
|
9
|
+
ListType["NOTES"] = "notes";
|
|
10
|
+
})(ListType || (exports.ListType = ListType = {}));
|
|
11
|
+
exports.listItemSchema = zod_1.z.object({
|
|
12
|
+
_id: id_types_1.listItemIdSchema,
|
|
13
|
+
userId: id_types_1.userIdSchema,
|
|
14
|
+
createdAt: zod_1.z.date(),
|
|
15
|
+
updatedAt: zod_1.z.date(),
|
|
16
|
+
name: zod_1.z.string(),
|
|
17
|
+
notes: zod_1.z.string().optional(),
|
|
18
|
+
completed: zod_1.z.boolean(),
|
|
19
|
+
listId: id_types_1.listIdSchema
|
|
20
|
+
});
|
|
21
|
+
exports.listSchema = zod_1.z.object({
|
|
22
|
+
_id: id_types_1.listIdSchema,
|
|
23
|
+
userId: id_types_1.userIdSchema,
|
|
24
|
+
createdAt: zod_1.z.date(),
|
|
25
|
+
updatedAt: zod_1.z.date(),
|
|
26
|
+
name: zod_1.z.string(),
|
|
27
|
+
type: zod_1.z.nativeEnum(ListType)
|
|
28
|
+
});
|
|
29
|
+
exports.createListRequestSchema = zod_1.z.object({
|
|
30
|
+
name: zod_1.z.string().min(1),
|
|
31
|
+
type: zod_1.z.nativeEnum(ListType)
|
|
32
|
+
});
|
|
33
|
+
exports.updateListRequestSchema = zod_1.z.object({
|
|
34
|
+
name: zod_1.z.string().min(1).optional(),
|
|
35
|
+
type: zod_1.z.nativeEnum(ListType).optional()
|
|
36
|
+
});
|
|
37
|
+
exports.createListItemRequestSchema = zod_1.z.object({
|
|
38
|
+
name: zod_1.z.string().min(1),
|
|
39
|
+
notes: zod_1.z.string().optional(),
|
|
40
|
+
listId: id_types_1.listIdSchema
|
|
41
|
+
});
|
|
42
|
+
exports.updateListItemRequestSchema = zod_1.z.object({
|
|
43
|
+
name: zod_1.z.string().min(1).optional(),
|
|
44
|
+
notes: zod_1.z.string().nullish(),
|
|
45
|
+
completed: zod_1.z.boolean().optional(),
|
|
46
|
+
listId: id_types_1.listIdSchema.optional()
|
|
47
|
+
});
|
|
48
|
+
exports.completeListItemRequestSchema = zod_1.z.object({
|
|
49
|
+
completed: zod_1.z.boolean()
|
|
50
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './version-types';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./version-types"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const versionQuerySchema: z.ZodObject<{
|
|
3
|
+
iOSBuildVersion: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
androidBuildVersion: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
iOSBuildVersion?: number | undefined;
|
|
7
|
+
androidBuildVersion?: number | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
iOSBuildVersion?: number | undefined;
|
|
10
|
+
androidBuildVersion?: number | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const versionResponseSchema: z.ZodObject<{
|
|
13
|
+
minIOSBuildVersion: z.ZodNumber;
|
|
14
|
+
minAndroidBuildVersion: z.ZodNumber;
|
|
15
|
+
updateRequired: z.ZodBoolean;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
minIOSBuildVersion: number;
|
|
18
|
+
minAndroidBuildVersion: number;
|
|
19
|
+
updateRequired: boolean;
|
|
20
|
+
}, {
|
|
21
|
+
minIOSBuildVersion: number;
|
|
22
|
+
minAndroidBuildVersion: number;
|
|
23
|
+
updateRequired: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
export type VersionQuery = z.infer<typeof versionQuerySchema>;
|
|
26
|
+
export type VersionResponse = z.infer<typeof versionResponseSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.versionResponseSchema = exports.versionQuerySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.versionQuerySchema = zod_1.z.object({
|
|
6
|
+
iOSBuildVersion: zod_1.z.number().optional(),
|
|
7
|
+
androidBuildVersion: zod_1.z.number().optional()
|
|
8
|
+
});
|
|
9
|
+
exports.versionResponseSchema = zod_1.z.object({
|
|
10
|
+
minIOSBuildVersion: zod_1.z.number(),
|
|
11
|
+
minAndroidBuildVersion: zod_1.z.number(),
|
|
12
|
+
updateRequired: zod_1.z.boolean()
|
|
13
|
+
});
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Serialized } from '../../utils';
|
|
3
|
+
export declare const notificationEntityTypeSchema: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
4
|
+
export declare const notificationTriggerTypeSchema: z.ZodEnum<["time_based", "event_based", "recurring"]>;
|
|
5
|
+
export declare const notificationTriggerSchema: z.ZodObject<{
|
|
6
|
+
type: z.ZodEnum<["time_based", "event_based", "recurring"]>;
|
|
7
|
+
conditions: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
8
|
+
timing: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
type: "time_based" | "event_based" | "recurring";
|
|
11
|
+
conditions: Record<string, any>;
|
|
12
|
+
timing: Record<string, any>;
|
|
13
|
+
}, {
|
|
14
|
+
type: "time_based" | "event_based" | "recurring";
|
|
15
|
+
conditions: Record<string, any>;
|
|
16
|
+
timing: Record<string, any>;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const notificationContentSchema: z.ZodObject<{
|
|
19
|
+
title: z.ZodString;
|
|
20
|
+
body: z.ZodString;
|
|
21
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
title: string;
|
|
24
|
+
body: string;
|
|
25
|
+
variables?: Record<string, string> | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
title: string;
|
|
28
|
+
body: string;
|
|
29
|
+
variables?: Record<string, string> | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const notificationTemplateSchema: z.ZodObject<{
|
|
32
|
+
_id: z.ZodEffects<z.ZodString, import("../id-types").NotificationTemplateId, string>;
|
|
33
|
+
userId: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
|
|
34
|
+
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
35
|
+
entityId: z.ZodOptional<z.ZodString>;
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
description: z.ZodOptional<z.ZodString>;
|
|
38
|
+
trigger: z.ZodObject<{
|
|
39
|
+
type: z.ZodEnum<["time_based", "event_based", "recurring"]>;
|
|
40
|
+
conditions: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
41
|
+
timing: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
type: "time_based" | "event_based" | "recurring";
|
|
44
|
+
conditions: Record<string, any>;
|
|
45
|
+
timing: Record<string, any>;
|
|
46
|
+
}, {
|
|
47
|
+
type: "time_based" | "event_based" | "recurring";
|
|
48
|
+
conditions: Record<string, any>;
|
|
49
|
+
timing: Record<string, any>;
|
|
50
|
+
}>;
|
|
51
|
+
content: z.ZodObject<{
|
|
52
|
+
title: z.ZodString;
|
|
53
|
+
body: z.ZodString;
|
|
54
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
title: string;
|
|
57
|
+
body: string;
|
|
58
|
+
variables?: Record<string, string> | undefined;
|
|
59
|
+
}, {
|
|
60
|
+
title: string;
|
|
61
|
+
body: string;
|
|
62
|
+
variables?: Record<string, string> | undefined;
|
|
63
|
+
}>;
|
|
64
|
+
active: z.ZodBoolean;
|
|
65
|
+
inheritedFrom: z.ZodOptional<z.ZodEffects<z.ZodString, import("../id-types").NotificationTemplateId, string>>;
|
|
66
|
+
customized: z.ZodBoolean;
|
|
67
|
+
createdAt: z.ZodDate;
|
|
68
|
+
updatedAt: z.ZodDate;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
_id: string & {
|
|
71
|
+
readonly __brand: "NotificationTemplateId";
|
|
72
|
+
};
|
|
73
|
+
createdAt: Date;
|
|
74
|
+
updatedAt: Date;
|
|
75
|
+
userId: string & {
|
|
76
|
+
readonly __brand: "UserId";
|
|
77
|
+
};
|
|
78
|
+
name: string;
|
|
79
|
+
content: {
|
|
80
|
+
title: string;
|
|
81
|
+
body: string;
|
|
82
|
+
variables?: Record<string, string> | undefined;
|
|
83
|
+
};
|
|
84
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
85
|
+
trigger: {
|
|
86
|
+
type: "time_based" | "event_based" | "recurring";
|
|
87
|
+
conditions: Record<string, any>;
|
|
88
|
+
timing: Record<string, any>;
|
|
89
|
+
};
|
|
90
|
+
active: boolean;
|
|
91
|
+
customized: boolean;
|
|
92
|
+
description?: string | undefined;
|
|
93
|
+
entityId?: string | undefined;
|
|
94
|
+
inheritedFrom?: import("../id-types").NotificationTemplateId | undefined;
|
|
95
|
+
}, {
|
|
96
|
+
_id: string;
|
|
97
|
+
createdAt: Date;
|
|
98
|
+
updatedAt: Date;
|
|
99
|
+
userId: string;
|
|
100
|
+
name: string;
|
|
101
|
+
content: {
|
|
102
|
+
title: string;
|
|
103
|
+
body: string;
|
|
104
|
+
variables?: Record<string, string> | undefined;
|
|
105
|
+
};
|
|
106
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
107
|
+
trigger: {
|
|
108
|
+
type: "time_based" | "event_based" | "recurring";
|
|
109
|
+
conditions: Record<string, any>;
|
|
110
|
+
timing: Record<string, any>;
|
|
111
|
+
};
|
|
112
|
+
active: boolean;
|
|
113
|
+
customized: boolean;
|
|
114
|
+
description?: string | undefined;
|
|
115
|
+
entityId?: string | undefined;
|
|
116
|
+
inheritedFrom?: string | undefined;
|
|
117
|
+
}>;
|
|
118
|
+
export declare const createNotificationTemplateSchema: z.ZodObject<Omit<{
|
|
119
|
+
_id: z.ZodEffects<z.ZodString, import("../id-types").NotificationTemplateId, string>;
|
|
120
|
+
userId: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
|
|
121
|
+
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
122
|
+
entityId: z.ZodOptional<z.ZodString>;
|
|
123
|
+
name: z.ZodString;
|
|
124
|
+
description: z.ZodOptional<z.ZodString>;
|
|
125
|
+
trigger: z.ZodObject<{
|
|
126
|
+
type: z.ZodEnum<["time_based", "event_based", "recurring"]>;
|
|
127
|
+
conditions: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
128
|
+
timing: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
type: "time_based" | "event_based" | "recurring";
|
|
131
|
+
conditions: Record<string, any>;
|
|
132
|
+
timing: Record<string, any>;
|
|
133
|
+
}, {
|
|
134
|
+
type: "time_based" | "event_based" | "recurring";
|
|
135
|
+
conditions: Record<string, any>;
|
|
136
|
+
timing: Record<string, any>;
|
|
137
|
+
}>;
|
|
138
|
+
content: z.ZodObject<{
|
|
139
|
+
title: z.ZodString;
|
|
140
|
+
body: z.ZodString;
|
|
141
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
title: string;
|
|
144
|
+
body: string;
|
|
145
|
+
variables?: Record<string, string> | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
title: string;
|
|
148
|
+
body: string;
|
|
149
|
+
variables?: Record<string, string> | undefined;
|
|
150
|
+
}>;
|
|
151
|
+
active: z.ZodBoolean;
|
|
152
|
+
inheritedFrom: z.ZodOptional<z.ZodEffects<z.ZodString, import("../id-types").NotificationTemplateId, string>>;
|
|
153
|
+
customized: z.ZodBoolean;
|
|
154
|
+
createdAt: z.ZodDate;
|
|
155
|
+
updatedAt: z.ZodDate;
|
|
156
|
+
}, "_id" | "createdAt" | "updatedAt">, "strip", z.ZodTypeAny, {
|
|
157
|
+
userId: string & {
|
|
158
|
+
readonly __brand: "UserId";
|
|
159
|
+
};
|
|
160
|
+
name: string;
|
|
161
|
+
content: {
|
|
162
|
+
title: string;
|
|
163
|
+
body: string;
|
|
164
|
+
variables?: Record<string, string> | undefined;
|
|
165
|
+
};
|
|
166
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
167
|
+
trigger: {
|
|
168
|
+
type: "time_based" | "event_based" | "recurring";
|
|
169
|
+
conditions: Record<string, any>;
|
|
170
|
+
timing: Record<string, any>;
|
|
171
|
+
};
|
|
172
|
+
active: boolean;
|
|
173
|
+
customized: boolean;
|
|
174
|
+
description?: string | undefined;
|
|
175
|
+
entityId?: string | undefined;
|
|
176
|
+
inheritedFrom?: import("../id-types").NotificationTemplateId | undefined;
|
|
177
|
+
}, {
|
|
178
|
+
userId: string;
|
|
179
|
+
name: string;
|
|
180
|
+
content: {
|
|
181
|
+
title: string;
|
|
182
|
+
body: string;
|
|
183
|
+
variables?: Record<string, string> | undefined;
|
|
184
|
+
};
|
|
185
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
186
|
+
trigger: {
|
|
187
|
+
type: "time_based" | "event_based" | "recurring";
|
|
188
|
+
conditions: Record<string, any>;
|
|
189
|
+
timing: Record<string, any>;
|
|
190
|
+
};
|
|
191
|
+
active: boolean;
|
|
192
|
+
customized: boolean;
|
|
193
|
+
description?: string | undefined;
|
|
194
|
+
entityId?: string | undefined;
|
|
195
|
+
inheritedFrom?: string | undefined;
|
|
196
|
+
}>;
|
|
197
|
+
export declare const entitySyncStateSchema: z.ZodObject<{
|
|
198
|
+
userId: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
|
|
199
|
+
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
200
|
+
entityId: z.ZodString;
|
|
201
|
+
synced: z.ZodBoolean;
|
|
202
|
+
updatedAt: z.ZodDate;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
updatedAt: Date;
|
|
205
|
+
userId: string & {
|
|
206
|
+
readonly __brand: "UserId";
|
|
207
|
+
};
|
|
208
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
209
|
+
entityId: string;
|
|
210
|
+
synced: boolean;
|
|
211
|
+
}, {
|
|
212
|
+
updatedAt: Date;
|
|
213
|
+
userId: string;
|
|
214
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
215
|
+
entityId: string;
|
|
216
|
+
synced: boolean;
|
|
217
|
+
}>;
|
|
218
|
+
export declare const createNotificationTemplateRequestSchema: z.ZodObject<{
|
|
219
|
+
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
220
|
+
entityId: z.ZodOptional<z.ZodString>;
|
|
221
|
+
name: z.ZodString;
|
|
222
|
+
description: z.ZodOptional<z.ZodString>;
|
|
223
|
+
trigger: z.ZodObject<{
|
|
224
|
+
type: z.ZodEnum<["time_based", "event_based", "recurring"]>;
|
|
225
|
+
conditions: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
226
|
+
timing: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
227
|
+
}, "strip", z.ZodTypeAny, {
|
|
228
|
+
type: "time_based" | "event_based" | "recurring";
|
|
229
|
+
conditions: Record<string, any>;
|
|
230
|
+
timing: Record<string, any>;
|
|
231
|
+
}, {
|
|
232
|
+
type: "time_based" | "event_based" | "recurring";
|
|
233
|
+
conditions: Record<string, any>;
|
|
234
|
+
timing: Record<string, any>;
|
|
235
|
+
}>;
|
|
236
|
+
content: z.ZodObject<{
|
|
237
|
+
title: z.ZodString;
|
|
238
|
+
body: z.ZodString;
|
|
239
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
240
|
+
}, "strip", z.ZodTypeAny, {
|
|
241
|
+
title: string;
|
|
242
|
+
body: string;
|
|
243
|
+
variables?: Record<string, string> | undefined;
|
|
244
|
+
}, {
|
|
245
|
+
title: string;
|
|
246
|
+
body: string;
|
|
247
|
+
variables?: Record<string, string> | undefined;
|
|
248
|
+
}>;
|
|
249
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
|
250
|
+
inheritedFrom: z.ZodOptional<z.ZodString>;
|
|
251
|
+
customized: z.ZodDefault<z.ZodBoolean>;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
name: string;
|
|
254
|
+
content: {
|
|
255
|
+
title: string;
|
|
256
|
+
body: string;
|
|
257
|
+
variables?: Record<string, string> | undefined;
|
|
258
|
+
};
|
|
259
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
260
|
+
trigger: {
|
|
261
|
+
type: "time_based" | "event_based" | "recurring";
|
|
262
|
+
conditions: Record<string, any>;
|
|
263
|
+
timing: Record<string, any>;
|
|
264
|
+
};
|
|
265
|
+
active: boolean;
|
|
266
|
+
customized: boolean;
|
|
267
|
+
description?: string | undefined;
|
|
268
|
+
entityId?: string | undefined;
|
|
269
|
+
inheritedFrom?: string | undefined;
|
|
270
|
+
}, {
|
|
271
|
+
name: string;
|
|
272
|
+
content: {
|
|
273
|
+
title: string;
|
|
274
|
+
body: string;
|
|
275
|
+
variables?: Record<string, string> | undefined;
|
|
276
|
+
};
|
|
277
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
278
|
+
trigger: {
|
|
279
|
+
type: "time_based" | "event_based" | "recurring";
|
|
280
|
+
conditions: Record<string, any>;
|
|
281
|
+
timing: Record<string, any>;
|
|
282
|
+
};
|
|
283
|
+
description?: string | undefined;
|
|
284
|
+
entityId?: string | undefined;
|
|
285
|
+
active?: boolean | undefined;
|
|
286
|
+
inheritedFrom?: string | undefined;
|
|
287
|
+
customized?: boolean | undefined;
|
|
288
|
+
}>;
|
|
289
|
+
export declare const updateNotificationTemplateRequestSchema: z.ZodObject<{
|
|
290
|
+
name: z.ZodOptional<z.ZodString>;
|
|
291
|
+
description: z.ZodOptional<z.ZodString>;
|
|
292
|
+
trigger: z.ZodOptional<z.ZodObject<{
|
|
293
|
+
type: z.ZodEnum<["time_based", "event_based", "recurring"]>;
|
|
294
|
+
conditions: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
295
|
+
timing: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
296
|
+
}, "strip", z.ZodTypeAny, {
|
|
297
|
+
type: "time_based" | "event_based" | "recurring";
|
|
298
|
+
conditions: Record<string, any>;
|
|
299
|
+
timing: Record<string, any>;
|
|
300
|
+
}, {
|
|
301
|
+
type: "time_based" | "event_based" | "recurring";
|
|
302
|
+
conditions: Record<string, any>;
|
|
303
|
+
timing: Record<string, any>;
|
|
304
|
+
}>>;
|
|
305
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
306
|
+
title: z.ZodString;
|
|
307
|
+
body: z.ZodString;
|
|
308
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
309
|
+
}, "strip", z.ZodTypeAny, {
|
|
310
|
+
title: string;
|
|
311
|
+
body: string;
|
|
312
|
+
variables?: Record<string, string> | undefined;
|
|
313
|
+
}, {
|
|
314
|
+
title: string;
|
|
315
|
+
body: string;
|
|
316
|
+
variables?: Record<string, string> | undefined;
|
|
317
|
+
}>>;
|
|
318
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
319
|
+
customized: z.ZodOptional<z.ZodBoolean>;
|
|
320
|
+
}, "strip", z.ZodTypeAny, {
|
|
321
|
+
name?: string | undefined;
|
|
322
|
+
description?: string | undefined;
|
|
323
|
+
content?: {
|
|
324
|
+
title: string;
|
|
325
|
+
body: string;
|
|
326
|
+
variables?: Record<string, string> | undefined;
|
|
327
|
+
} | undefined;
|
|
328
|
+
trigger?: {
|
|
329
|
+
type: "time_based" | "event_based" | "recurring";
|
|
330
|
+
conditions: Record<string, any>;
|
|
331
|
+
timing: Record<string, any>;
|
|
332
|
+
} | undefined;
|
|
333
|
+
active?: boolean | undefined;
|
|
334
|
+
customized?: boolean | undefined;
|
|
335
|
+
}, {
|
|
336
|
+
name?: string | undefined;
|
|
337
|
+
description?: string | undefined;
|
|
338
|
+
content?: {
|
|
339
|
+
title: string;
|
|
340
|
+
body: string;
|
|
341
|
+
variables?: Record<string, string> | undefined;
|
|
342
|
+
} | undefined;
|
|
343
|
+
trigger?: {
|
|
344
|
+
type: "time_based" | "event_based" | "recurring";
|
|
345
|
+
conditions: Record<string, any>;
|
|
346
|
+
timing: Record<string, any>;
|
|
347
|
+
} | undefined;
|
|
348
|
+
active?: boolean | undefined;
|
|
349
|
+
customized?: boolean | undefined;
|
|
350
|
+
}>;
|
|
351
|
+
export declare const syncNotificationTemplateRequestSchema: z.ZodObject<{
|
|
352
|
+
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
353
|
+
entityId: z.ZodString;
|
|
354
|
+
}, "strip", z.ZodTypeAny, {
|
|
355
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
356
|
+
entityId: string;
|
|
357
|
+
}, {
|
|
358
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
359
|
+
entityId: string;
|
|
360
|
+
}>;
|
|
361
|
+
export declare const previewNotificationTemplateRequestSchema: z.ZodObject<{
|
|
362
|
+
templateId: z.ZodEffects<z.ZodString, import("../id-types").NotificationTemplateId, string>;
|
|
363
|
+
entityData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
364
|
+
}, "strip", z.ZodTypeAny, {
|
|
365
|
+
templateId: string & {
|
|
366
|
+
readonly __brand: "NotificationTemplateId";
|
|
367
|
+
};
|
|
368
|
+
entityData?: Record<string, any> | undefined;
|
|
369
|
+
}, {
|
|
370
|
+
templateId: string;
|
|
371
|
+
entityData?: Record<string, any> | undefined;
|
|
372
|
+
}>;
|
|
373
|
+
export type NotificationEntityType = z.infer<typeof notificationEntityTypeSchema>;
|
|
374
|
+
export type NotificationTriggerType = z.infer<typeof notificationTriggerTypeSchema>;
|
|
375
|
+
export type NotificationTrigger = z.infer<typeof notificationTriggerSchema>;
|
|
376
|
+
export type NotificationContent = z.infer<typeof notificationContentSchema>;
|
|
377
|
+
export type NotificationTemplateData = z.infer<typeof notificationTemplateSchema>;
|
|
378
|
+
export type CreateNotificationTemplateData = z.infer<typeof createNotificationTemplateSchema>;
|
|
379
|
+
export type EntitySyncState = z.infer<typeof entitySyncStateSchema>;
|
|
380
|
+
export type CreateNotificationTemplateRequest = z.infer<typeof createNotificationTemplateRequestSchema>;
|
|
381
|
+
export type UpdateNotificationTemplateRequest = z.infer<typeof updateNotificationTemplateRequestSchema>;
|
|
382
|
+
export type SyncNotificationTemplateRequest = z.infer<typeof syncNotificationTemplateRequestSchema>;
|
|
383
|
+
export type PreviewNotificationTemplateRequest = z.infer<typeof previewNotificationTemplateRequestSchema>;
|
|
384
|
+
export interface CreateNotificationTemplateResponse {
|
|
385
|
+
template: Serialized<NotificationTemplateData>;
|
|
386
|
+
}
|
|
387
|
+
export interface GetNotificationTemplatesResponse {
|
|
388
|
+
templates: Serialized<NotificationTemplateData>[];
|
|
389
|
+
}
|
|
390
|
+
export interface GetNotificationTemplateResponse {
|
|
391
|
+
template: Serialized<NotificationTemplateData>;
|
|
392
|
+
}
|
|
393
|
+
export interface UpdateNotificationTemplateResponse {
|
|
394
|
+
template: Serialized<NotificationTemplateData>;
|
|
395
|
+
}
|
|
396
|
+
export interface DeleteNotificationTemplateResponse {
|
|
397
|
+
deleted: boolean;
|
|
398
|
+
}
|
|
399
|
+
export interface SyncNotificationTemplateResponse {
|
|
400
|
+
synced: boolean;
|
|
401
|
+
}
|
|
402
|
+
export interface PreviewNotificationTemplateResponse {
|
|
403
|
+
preview: {
|
|
404
|
+
title: string;
|
|
405
|
+
body: string;
|
|
406
|
+
};
|
|
407
|
+
}
|