@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
|
@@ -73,21 +73,6 @@ export declare const createNotificationTemplateRequestSchema: z.ZodObject<{
|
|
|
73
73
|
customized?: boolean | undefined;
|
|
74
74
|
}>;
|
|
75
75
|
export type CreateNotificationTemplateRequest = z.infer<typeof createNotificationTemplateRequestSchema>;
|
|
76
|
-
export
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
error: z.ZodOptional<z.ZodString>;
|
|
80
|
-
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
success: boolean;
|
|
82
|
-
error?: string | undefined;
|
|
83
|
-
template?: any;
|
|
84
|
-
}, {
|
|
85
|
-
success: boolean;
|
|
86
|
-
error?: string | undefined;
|
|
87
|
-
template?: any;
|
|
88
|
-
}>;
|
|
89
|
-
export type CreateNotificationTemplateResponse = {
|
|
90
|
-
success: boolean;
|
|
91
|
-
template?: Serialized<NotificationTemplateData>;
|
|
92
|
-
error?: string;
|
|
93
|
-
};
|
|
76
|
+
export interface CreateNotificationTemplateResponse {
|
|
77
|
+
template: Serialized<NotificationTemplateData>;
|
|
78
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createNotificationTemplateRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const notification_template_data_1 = require("../../models/notification-template-data");
|
|
6
6
|
// Request schema
|
|
@@ -23,9 +23,3 @@ exports.createNotificationTemplateRequestSchema = zod_1.z.object({
|
|
|
23
23
|
inheritedFrom: zod_1.z.string().optional(),
|
|
24
24
|
customized: zod_1.z.boolean().default(false)
|
|
25
25
|
});
|
|
26
|
-
// Response schema
|
|
27
|
-
exports.createNotificationTemplateResponseSchema = zod_1.z.object({
|
|
28
|
-
success: zod_1.z.boolean(),
|
|
29
|
-
template: zod_1.z.any().optional(), // Will be Serialized<NotificationTemplateData>
|
|
30
|
-
error: zod_1.z.string().optional()
|
|
31
|
-
});
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const deleteNotificationTemplateRequestSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
3
3
|
export type DeleteNotificationTemplateRequest = z.infer<typeof deleteNotificationTemplateRequestSchema>;
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
error: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
success: boolean;
|
|
9
|
-
error?: string | undefined;
|
|
10
|
-
}, {
|
|
11
|
-
success: boolean;
|
|
12
|
-
error?: string | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
export type DeleteNotificationTemplateResponse = z.infer<typeof deleteNotificationTemplateResponseSchema>;
|
|
4
|
+
export interface DeleteNotificationTemplateResponse {
|
|
5
|
+
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.deleteNotificationTemplateRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
// Request schema - no body needed for DELETE
|
|
6
6
|
exports.deleteNotificationTemplateRequestSchema = zod_1.z.object({});
|
|
7
|
-
// Response schema
|
|
8
|
-
exports.deleteNotificationTemplateResponseSchema = zod_1.z.object({
|
|
9
|
-
success: zod_1.z.boolean(),
|
|
10
|
-
error: zod_1.z.string().optional()
|
|
11
|
-
});
|
|
@@ -3,21 +3,6 @@ import { Serialized } from "../../../utils";
|
|
|
3
3
|
import { NotificationTemplateData } from "../../models/notification-template-data";
|
|
4
4
|
export declare const getNotificationTemplatesRequestSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
5
5
|
export type GetNotificationTemplatesRequest = z.infer<typeof getNotificationTemplatesRequestSchema>;
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
error: z.ZodOptional<z.ZodString>;
|
|
10
|
-
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
success: boolean;
|
|
12
|
-
templates?: any[] | undefined;
|
|
13
|
-
error?: string | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
success: boolean;
|
|
16
|
-
templates?: any[] | undefined;
|
|
17
|
-
error?: string | undefined;
|
|
18
|
-
}>;
|
|
19
|
-
export type GetNotificationTemplatesResponse = {
|
|
20
|
-
success: boolean;
|
|
21
|
-
templates?: Serialized<NotificationTemplateData>[];
|
|
22
|
-
error?: string;
|
|
23
|
-
};
|
|
6
|
+
export interface GetNotificationTemplatesResponse {
|
|
7
|
+
templates: Serialized<NotificationTemplateData>[];
|
|
8
|
+
}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getNotificationTemplatesRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
// Request schema - no body needed for GET
|
|
6
6
|
exports.getNotificationTemplatesRequestSchema = zod_1.z.object({});
|
|
7
|
-
// Response schema
|
|
8
|
-
exports.getNotificationTemplatesResponseSchema = zod_1.z.object({
|
|
9
|
-
success: zod_1.z.boolean(),
|
|
10
|
-
templates: zod_1.z.array(zod_1.z.any()).optional(), // Will be Serialized<NotificationTemplateData>[]
|
|
11
|
-
error: zod_1.z.string().optional()
|
|
12
|
-
});
|
|
@@ -19,40 +19,11 @@ export declare const previewNotificationTemplateRequestSchema: z.ZodObject<{
|
|
|
19
19
|
variables?: Record<string, any> | undefined;
|
|
20
20
|
}>;
|
|
21
21
|
export type PreviewNotificationTemplateRequest = z.infer<typeof previewNotificationTemplateRequestSchema>;
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
preview: z.ZodOptional<z.ZodObject<{
|
|
25
|
-
title: z.ZodString;
|
|
26
|
-
body: z.ZodString;
|
|
27
|
-
variables: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
28
|
-
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
export interface PreviewNotificationTemplateResponse {
|
|
23
|
+
preview: {
|
|
29
24
|
title: string;
|
|
30
25
|
body: string;
|
|
31
26
|
variables: Record<string, any>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
variables: Record<string, any>;
|
|
36
|
-
}>>;
|
|
37
|
-
missingVariables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
38
|
-
error: z.ZodOptional<z.ZodString>;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
success: boolean;
|
|
41
|
-
error?: string | undefined;
|
|
42
|
-
preview?: {
|
|
43
|
-
title: string;
|
|
44
|
-
body: string;
|
|
45
|
-
variables: Record<string, any>;
|
|
46
|
-
} | undefined;
|
|
47
|
-
missingVariables?: string[] | undefined;
|
|
48
|
-
}, {
|
|
49
|
-
success: boolean;
|
|
50
|
-
error?: string | undefined;
|
|
51
|
-
preview?: {
|
|
52
|
-
title: string;
|
|
53
|
-
body: string;
|
|
54
|
-
variables: Record<string, any>;
|
|
55
|
-
} | undefined;
|
|
56
|
-
missingVariables?: string[] | undefined;
|
|
57
|
-
}>;
|
|
58
|
-
export type PreviewNotificationTemplateResponse = z.infer<typeof previewNotificationTemplateResponseSchema>;
|
|
27
|
+
};
|
|
28
|
+
missingVariables: string[];
|
|
29
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.previewNotificationTemplateRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
// Request schema
|
|
6
6
|
exports.previewNotificationTemplateRequestSchema = zod_1.z.object({
|
|
@@ -10,14 +10,3 @@ exports.previewNotificationTemplateRequestSchema = zod_1.z.object({
|
|
|
10
10
|
entityId: zod_1.z.string(),
|
|
11
11
|
variables: zod_1.z.record(zod_1.z.any()).optional()
|
|
12
12
|
});
|
|
13
|
-
// Response schema
|
|
14
|
-
exports.previewNotificationTemplateResponseSchema = zod_1.z.object({
|
|
15
|
-
success: zod_1.z.boolean(),
|
|
16
|
-
preview: zod_1.z.object({
|
|
17
|
-
title: zod_1.z.string(),
|
|
18
|
-
body: zod_1.z.string(),
|
|
19
|
-
variables: zod_1.z.record(zod_1.z.any())
|
|
20
|
-
}).optional(),
|
|
21
|
-
missingVariables: zod_1.z.array(zod_1.z.string()).optional(),
|
|
22
|
-
error: zod_1.z.string().optional()
|
|
23
|
-
});
|
|
@@ -9,21 +9,6 @@ export declare const syncNotificationTemplateRequestSchema: z.ZodObject<{
|
|
|
9
9
|
sync: boolean;
|
|
10
10
|
}>;
|
|
11
11
|
export type SyncNotificationTemplateRequest = z.infer<typeof syncNotificationTemplateRequestSchema>;
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
error: z.ZodOptional<z.ZodString>;
|
|
16
|
-
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
success: boolean;
|
|
18
|
-
error?: string | undefined;
|
|
19
|
-
template?: any;
|
|
20
|
-
}, {
|
|
21
|
-
success: boolean;
|
|
22
|
-
error?: string | undefined;
|
|
23
|
-
template?: any;
|
|
24
|
-
}>;
|
|
25
|
-
export type SyncNotificationTemplateResponse = {
|
|
26
|
-
success: boolean;
|
|
27
|
-
template?: Serialized<NotificationTemplateData>;
|
|
28
|
-
error?: string;
|
|
29
|
-
};
|
|
12
|
+
export interface SyncNotificationTemplateResponse {
|
|
13
|
+
template: Serialized<NotificationTemplateData>;
|
|
14
|
+
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.syncNotificationTemplateRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
// Request schema
|
|
6
6
|
exports.syncNotificationTemplateRequestSchema = zod_1.z.object({
|
|
7
7
|
sync: zod_1.z.boolean() // true to sync with parent, false to unsync
|
|
8
8
|
});
|
|
9
|
-
// Response schema
|
|
10
|
-
exports.syncNotificationTemplateResponseSchema = zod_1.z.object({
|
|
11
|
-
success: zod_1.z.boolean(),
|
|
12
|
-
template: zod_1.z.any().optional(), // Will be Serialized<NotificationTemplateData>
|
|
13
|
-
error: zod_1.z.string().optional()
|
|
14
|
-
});
|
|
@@ -64,149 +64,6 @@ export declare const updateNotificationTemplateRequestSchema: z.ZodObject<{
|
|
|
64
64
|
customized?: boolean | undefined;
|
|
65
65
|
}>;
|
|
66
66
|
export type UpdateNotificationTemplateRequest = z.infer<typeof updateNotificationTemplateRequestSchema>;
|
|
67
|
-
export
|
|
68
|
-
template:
|
|
69
|
-
|
|
70
|
-
userId: z.ZodEffects<z.ZodString, import("../..").UserId, string>;
|
|
71
|
-
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
72
|
-
entityId: z.ZodOptional<z.ZodString>;
|
|
73
|
-
name: z.ZodString;
|
|
74
|
-
description: z.ZodOptional<z.ZodString>;
|
|
75
|
-
trigger: z.ZodObject<{
|
|
76
|
-
type: z.ZodEnum<["time_based", "event_based", "recurring"]>;
|
|
77
|
-
conditions: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
78
|
-
timing: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
79
|
-
}, "strip", z.ZodTypeAny, {
|
|
80
|
-
type: "time_based" | "event_based" | "recurring";
|
|
81
|
-
conditions: Record<string, any>;
|
|
82
|
-
timing: Record<string, any>;
|
|
83
|
-
}, {
|
|
84
|
-
type: "time_based" | "event_based" | "recurring";
|
|
85
|
-
conditions: Record<string, any>;
|
|
86
|
-
timing: Record<string, any>;
|
|
87
|
-
}>;
|
|
88
|
-
content: z.ZodObject<{
|
|
89
|
-
title: z.ZodString;
|
|
90
|
-
body: z.ZodString;
|
|
91
|
-
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
92
|
-
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
title: string;
|
|
94
|
-
body: string;
|
|
95
|
-
variables?: Record<string, string> | undefined;
|
|
96
|
-
}, {
|
|
97
|
-
title: string;
|
|
98
|
-
body: string;
|
|
99
|
-
variables?: Record<string, string> | undefined;
|
|
100
|
-
}>;
|
|
101
|
-
active: z.ZodDefault<z.ZodBoolean>;
|
|
102
|
-
inheritedFrom: z.ZodOptional<z.ZodEffects<z.ZodString, import("../..").NotificationTemplateId, string>>;
|
|
103
|
-
customized: z.ZodDefault<z.ZodBoolean>;
|
|
104
|
-
createdAt: z.ZodDate;
|
|
105
|
-
updatedAt: z.ZodDate;
|
|
106
|
-
}, "strip", z.ZodTypeAny, {
|
|
107
|
-
_id: string & {
|
|
108
|
-
readonly __brand: "NotificationTemplateId";
|
|
109
|
-
};
|
|
110
|
-
createdAt: Date;
|
|
111
|
-
updatedAt: Date;
|
|
112
|
-
userId: string & {
|
|
113
|
-
readonly __brand: "UserId";
|
|
114
|
-
};
|
|
115
|
-
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
116
|
-
name: string;
|
|
117
|
-
trigger: {
|
|
118
|
-
type: "time_based" | "event_based" | "recurring";
|
|
119
|
-
conditions: Record<string, any>;
|
|
120
|
-
timing: Record<string, any>;
|
|
121
|
-
};
|
|
122
|
-
content: {
|
|
123
|
-
title: string;
|
|
124
|
-
body: string;
|
|
125
|
-
variables?: Record<string, string> | undefined;
|
|
126
|
-
};
|
|
127
|
-
active: boolean;
|
|
128
|
-
customized: boolean;
|
|
129
|
-
entityId?: string | undefined;
|
|
130
|
-
description?: string | undefined;
|
|
131
|
-
inheritedFrom?: import("../..").NotificationTemplateId | undefined;
|
|
132
|
-
}, {
|
|
133
|
-
_id: string;
|
|
134
|
-
createdAt: Date;
|
|
135
|
-
updatedAt: Date;
|
|
136
|
-
userId: string;
|
|
137
|
-
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
138
|
-
name: string;
|
|
139
|
-
trigger: {
|
|
140
|
-
type: "time_based" | "event_based" | "recurring";
|
|
141
|
-
conditions: Record<string, any>;
|
|
142
|
-
timing: Record<string, any>;
|
|
143
|
-
};
|
|
144
|
-
content: {
|
|
145
|
-
title: string;
|
|
146
|
-
body: string;
|
|
147
|
-
variables?: Record<string, string> | undefined;
|
|
148
|
-
};
|
|
149
|
-
entityId?: string | undefined;
|
|
150
|
-
description?: string | undefined;
|
|
151
|
-
active?: boolean | undefined;
|
|
152
|
-
inheritedFrom?: string | undefined;
|
|
153
|
-
customized?: boolean | undefined;
|
|
154
|
-
}>;
|
|
155
|
-
}, "strip", z.ZodTypeAny, {
|
|
156
|
-
template: {
|
|
157
|
-
_id: string & {
|
|
158
|
-
readonly __brand: "NotificationTemplateId";
|
|
159
|
-
};
|
|
160
|
-
createdAt: Date;
|
|
161
|
-
updatedAt: Date;
|
|
162
|
-
userId: string & {
|
|
163
|
-
readonly __brand: "UserId";
|
|
164
|
-
};
|
|
165
|
-
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
166
|
-
name: string;
|
|
167
|
-
trigger: {
|
|
168
|
-
type: "time_based" | "event_based" | "recurring";
|
|
169
|
-
conditions: Record<string, any>;
|
|
170
|
-
timing: Record<string, any>;
|
|
171
|
-
};
|
|
172
|
-
content: {
|
|
173
|
-
title: string;
|
|
174
|
-
body: string;
|
|
175
|
-
variables?: Record<string, string> | undefined;
|
|
176
|
-
};
|
|
177
|
-
active: boolean;
|
|
178
|
-
customized: boolean;
|
|
179
|
-
entityId?: string | undefined;
|
|
180
|
-
description?: string | undefined;
|
|
181
|
-
inheritedFrom?: import("../..").NotificationTemplateId | undefined;
|
|
182
|
-
};
|
|
183
|
-
}, {
|
|
184
|
-
template: {
|
|
185
|
-
_id: string;
|
|
186
|
-
createdAt: Date;
|
|
187
|
-
updatedAt: Date;
|
|
188
|
-
userId: string;
|
|
189
|
-
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
190
|
-
name: string;
|
|
191
|
-
trigger: {
|
|
192
|
-
type: "time_based" | "event_based" | "recurring";
|
|
193
|
-
conditions: Record<string, any>;
|
|
194
|
-
timing: Record<string, any>;
|
|
195
|
-
};
|
|
196
|
-
content: {
|
|
197
|
-
title: string;
|
|
198
|
-
body: string;
|
|
199
|
-
variables?: Record<string, string> | undefined;
|
|
200
|
-
};
|
|
201
|
-
entityId?: string | undefined;
|
|
202
|
-
description?: string | undefined;
|
|
203
|
-
active?: boolean | undefined;
|
|
204
|
-
inheritedFrom?: string | undefined;
|
|
205
|
-
customized?: boolean | undefined;
|
|
206
|
-
};
|
|
207
|
-
}>;
|
|
208
|
-
export type UpdateNotificationTemplateResponse = {
|
|
209
|
-
success: boolean;
|
|
210
|
-
template?: Serialized<NotificationTemplateData>;
|
|
211
|
-
error?: string;
|
|
212
|
-
};
|
|
67
|
+
export interface UpdateNotificationTemplateResponse {
|
|
68
|
+
template: Serialized<NotificationTemplateData>;
|
|
69
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.updateNotificationTemplateRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
// Request schema
|
|
@@ -20,6 +20,3 @@ exports.updateNotificationTemplateRequestSchema = zod_1.z.object({
|
|
|
20
20
|
active: zod_1.z.boolean().optional(),
|
|
21
21
|
customized: zod_1.z.boolean().optional()
|
|
22
22
|
});
|
|
23
|
-
exports.updateNotificationTemplateResponseSchema = zod_1.z.object({
|
|
24
|
-
template: models_1.notificationTemplateDataSchema,
|
|
25
|
-
});
|
package/dist/types/id-types.d.ts
CHANGED
|
@@ -31,11 +31,11 @@ export declare const listItemIdSchema: z.ZodEffects<z.ZodString, ListItemId, str
|
|
|
31
31
|
export type ListItemId = string & {
|
|
32
32
|
readonly __brand: "ListItemId";
|
|
33
33
|
};
|
|
34
|
-
export declare const habitIdSchema: z.ZodEffects<z.ZodString,
|
|
34
|
+
export declare const habitIdSchema: z.ZodEffects<z.ZodString, HabitId, string>;
|
|
35
35
|
export type HabitId = string & {
|
|
36
36
|
readonly __brand: "HabitId";
|
|
37
37
|
};
|
|
38
|
-
export declare const habitEntryIdSchema: z.ZodEffects<z.ZodString,
|
|
38
|
+
export declare const habitEntryIdSchema: z.ZodEffects<z.ZodString, HabitEntryId, string>;
|
|
39
39
|
export type HabitEntryId = string & {
|
|
40
40
|
readonly __brand: "HabitEntryId";
|
|
41
41
|
};
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -14,9 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
__exportStar(require("./
|
|
17
|
+
// export * from './api'
|
|
18
|
+
// export * from './models'
|
|
19
|
+
__exportStar(require("./new"), exports);
|
|
20
|
+
// export * from './auth-tokens'
|
|
20
21
|
__exportStar(require("./id-types"), exports);
|
|
21
22
|
__exportStar(require("./misc-types"), exports);
|
|
22
23
|
__exportStar(require("./socket-message-types"), exports);
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Serialized } from '../../utils';
|
|
3
|
+
export declare const agendaItemSchema: z.ZodObject<{
|
|
4
|
+
_id: z.ZodEffects<z.ZodString, import("../id-types").ItemId, string>;
|
|
5
|
+
userId: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
|
|
6
|
+
createdAt: z.ZodDate;
|
|
7
|
+
updatedAt: z.ZodDate;
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
dueDate: z.ZodOptional<z.ZodDate>;
|
|
10
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
11
|
+
completed: z.ZodBoolean;
|
|
12
|
+
urgent: z.ZodBoolean;
|
|
13
|
+
category: z.ZodOptional<z.ZodString>;
|
|
14
|
+
type: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
_id: string & {
|
|
17
|
+
readonly __brand: "ItemId";
|
|
18
|
+
};
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
userId: string & {
|
|
22
|
+
readonly __brand: "UserId";
|
|
23
|
+
};
|
|
24
|
+
name: string;
|
|
25
|
+
completed: boolean;
|
|
26
|
+
urgent: boolean;
|
|
27
|
+
type?: string | undefined;
|
|
28
|
+
notes?: string | undefined;
|
|
29
|
+
dueDate?: Date | undefined;
|
|
30
|
+
category?: string | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
_id: string;
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
updatedAt: Date;
|
|
35
|
+
userId: string;
|
|
36
|
+
name: string;
|
|
37
|
+
completed: boolean;
|
|
38
|
+
urgent: boolean;
|
|
39
|
+
type?: string | undefined;
|
|
40
|
+
notes?: string | undefined;
|
|
41
|
+
dueDate?: Date | undefined;
|
|
42
|
+
category?: string | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const createAgendaItemRequestSchema: z.ZodObject<{
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
47
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
48
|
+
urgent: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
49
|
+
category: z.ZodOptional<z.ZodString>;
|
|
50
|
+
type: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
name: string;
|
|
53
|
+
urgent: boolean;
|
|
54
|
+
type?: string | undefined;
|
|
55
|
+
notes?: string | undefined;
|
|
56
|
+
dueDate?: string | undefined;
|
|
57
|
+
category?: string | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
name: string;
|
|
60
|
+
type?: string | undefined;
|
|
61
|
+
notes?: string | undefined;
|
|
62
|
+
dueDate?: string | undefined;
|
|
63
|
+
urgent?: boolean | undefined;
|
|
64
|
+
category?: string | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export declare const updateAgendaItemRequestSchema: z.ZodObject<{
|
|
67
|
+
name: z.ZodOptional<z.ZodString>;
|
|
68
|
+
dueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
+
urgent: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
type?: string | null | undefined;
|
|
75
|
+
name?: string | undefined;
|
|
76
|
+
notes?: string | null | undefined;
|
|
77
|
+
dueDate?: string | null | undefined;
|
|
78
|
+
urgent?: boolean | undefined;
|
|
79
|
+
category?: string | null | undefined;
|
|
80
|
+
}, {
|
|
81
|
+
type?: string | null | undefined;
|
|
82
|
+
name?: string | undefined;
|
|
83
|
+
notes?: string | null | undefined;
|
|
84
|
+
dueDate?: string | null | undefined;
|
|
85
|
+
urgent?: boolean | undefined;
|
|
86
|
+
category?: string | null | undefined;
|
|
87
|
+
}>;
|
|
88
|
+
export declare const completeAgendaItemRequestSchema: z.ZodObject<{
|
|
89
|
+
completed: z.ZodBoolean;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
completed: boolean;
|
|
92
|
+
}, {
|
|
93
|
+
completed: boolean;
|
|
94
|
+
}>;
|
|
95
|
+
export type AgendaItemData = z.infer<typeof agendaItemSchema>;
|
|
96
|
+
export type CreateAgendaItemRequest = z.infer<typeof createAgendaItemRequestSchema>;
|
|
97
|
+
export type UpdateAgendaItemRequest = z.infer<typeof updateAgendaItemRequestSchema>;
|
|
98
|
+
export type CompleteAgendaItemRequest = z.infer<typeof completeAgendaItemRequestSchema>;
|
|
99
|
+
export interface CreateAgendaItemResponse {
|
|
100
|
+
agendaItem: Serialized<AgendaItemData>;
|
|
101
|
+
}
|
|
102
|
+
export interface GetAgendaItemsResponse {
|
|
103
|
+
agendaItems: Serialized<AgendaItemData>[];
|
|
104
|
+
}
|
|
105
|
+
export interface GetAgendaItemResponse {
|
|
106
|
+
agendaItem: Serialized<AgendaItemData>;
|
|
107
|
+
}
|
|
108
|
+
export interface UpdateAgendaItemResponse {
|
|
109
|
+
agendaItem: Serialized<AgendaItemData>;
|
|
110
|
+
}
|
|
111
|
+
export interface CompleteAgendaItemResponse {
|
|
112
|
+
agendaItem: Serialized<AgendaItemData>;
|
|
113
|
+
}
|
|
114
|
+
export interface DeleteAgendaItemResponse {
|
|
115
|
+
deleted: boolean;
|
|
116
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.completeAgendaItemRequestSchema = exports.updateAgendaItemRequestSchema = exports.createAgendaItemRequestSchema = exports.agendaItemSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const id_types_1 = require("../id-types");
|
|
6
|
+
exports.agendaItemSchema = zod_1.z.object({
|
|
7
|
+
_id: id_types_1.itemIdSchema,
|
|
8
|
+
userId: id_types_1.userIdSchema,
|
|
9
|
+
createdAt: zod_1.z.date(),
|
|
10
|
+
updatedAt: zod_1.z.date(),
|
|
11
|
+
name: zod_1.z.string().min(1),
|
|
12
|
+
dueDate: zod_1.z.date().optional(),
|
|
13
|
+
notes: zod_1.z.string().optional(),
|
|
14
|
+
completed: zod_1.z.boolean(),
|
|
15
|
+
urgent: zod_1.z.boolean(),
|
|
16
|
+
category: zod_1.z.string().optional(),
|
|
17
|
+
type: zod_1.z.string().optional()
|
|
18
|
+
});
|
|
19
|
+
exports.createAgendaItemRequestSchema = zod_1.z.object({
|
|
20
|
+
name: zod_1.z.string().min(1),
|
|
21
|
+
dueDate: zod_1.z.string().optional(),
|
|
22
|
+
notes: zod_1.z.string().optional(),
|
|
23
|
+
urgent: zod_1.z.boolean().optional().default(false),
|
|
24
|
+
category: zod_1.z.string().optional(),
|
|
25
|
+
type: zod_1.z.string().optional()
|
|
26
|
+
});
|
|
27
|
+
exports.updateAgendaItemRequestSchema = zod_1.z.object({
|
|
28
|
+
name: zod_1.z.string().min(1).optional(),
|
|
29
|
+
dueDate: zod_1.z.string().nullish(),
|
|
30
|
+
notes: zod_1.z.string().nullish(),
|
|
31
|
+
urgent: zod_1.z.boolean().optional(),
|
|
32
|
+
category: zod_1.z.string().nullish(),
|
|
33
|
+
type: zod_1.z.string().nullish()
|
|
34
|
+
});
|
|
35
|
+
exports.completeAgendaItemRequestSchema = zod_1.z.object({
|
|
36
|
+
completed: zod_1.z.boolean()
|
|
37
|
+
});
|