@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
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
|
+
});
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const authTokensSchema: z.ZodObject<{
|
|
3
|
+
accessToken: z.ZodString;
|
|
4
|
+
refreshToken: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
accessToken: string;
|
|
7
|
+
refreshToken: string;
|
|
8
|
+
}, {
|
|
9
|
+
accessToken: string;
|
|
10
|
+
refreshToken: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const tokenPayloadSchema: z.ZodObject<{
|
|
13
|
+
authId: z.ZodString;
|
|
14
|
+
userId: z.ZodString;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
userId: string;
|
|
17
|
+
authId: string;
|
|
18
|
+
}, {
|
|
19
|
+
userId: string;
|
|
20
|
+
authId: string;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const refreshTokenPayloadSchema: z.ZodObject<{
|
|
23
|
+
authId: z.ZodString;
|
|
24
|
+
userId: z.ZodString;
|
|
25
|
+
} & {
|
|
26
|
+
tokenId: z.ZodString;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
userId: string;
|
|
29
|
+
authId: string;
|
|
30
|
+
tokenId: string;
|
|
31
|
+
}, {
|
|
32
|
+
userId: string;
|
|
33
|
+
authId: string;
|
|
34
|
+
tokenId: string;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const authDataSchema: z.ZodObject<{
|
|
37
|
+
_id: z.ZodEffects<z.ZodString, import("../id-types").AuthId, string>;
|
|
38
|
+
createdAt: z.ZodDate;
|
|
39
|
+
updatedAt: z.ZodDate;
|
|
40
|
+
userId: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
|
|
41
|
+
email: z.ZodString;
|
|
42
|
+
passwordHash: z.ZodString;
|
|
43
|
+
emailVerified: z.ZodBoolean;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
_id: string & {
|
|
46
|
+
readonly __brand: "AuthId";
|
|
47
|
+
};
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
userId: string & {
|
|
51
|
+
readonly __brand: "UserId";
|
|
52
|
+
};
|
|
53
|
+
email: string;
|
|
54
|
+
passwordHash: string;
|
|
55
|
+
emailVerified: boolean;
|
|
56
|
+
}, {
|
|
57
|
+
_id: string;
|
|
58
|
+
createdAt: Date;
|
|
59
|
+
updatedAt: Date;
|
|
60
|
+
userId: string;
|
|
61
|
+
email: string;
|
|
62
|
+
passwordHash: string;
|
|
63
|
+
emailVerified: boolean;
|
|
64
|
+
}>;
|
|
65
|
+
export declare const publicAuthDataSchema: z.ZodObject<{
|
|
66
|
+
email: z.ZodString;
|
|
67
|
+
emailVerified: z.ZodBoolean;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
email: string;
|
|
70
|
+
emailVerified: boolean;
|
|
71
|
+
}, {
|
|
72
|
+
email: string;
|
|
73
|
+
emailVerified: boolean;
|
|
74
|
+
}>;
|
|
75
|
+
export declare const createAccountRequestSchema: z.ZodObject<{
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
email: z.ZodString;
|
|
78
|
+
password: z.ZodString;
|
|
79
|
+
skipVerificationEmail: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
email: string;
|
|
82
|
+
name: string;
|
|
83
|
+
password: string;
|
|
84
|
+
skipVerificationEmail?: boolean | undefined;
|
|
85
|
+
}, {
|
|
86
|
+
email: string;
|
|
87
|
+
name: string;
|
|
88
|
+
password: string;
|
|
89
|
+
skipVerificationEmail?: boolean | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
export declare const signInRequestSchema: z.ZodObject<{
|
|
92
|
+
email: z.ZodString;
|
|
93
|
+
password: z.ZodString;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
email: string;
|
|
96
|
+
password: string;
|
|
97
|
+
}, {
|
|
98
|
+
email: string;
|
|
99
|
+
password: string;
|
|
100
|
+
}>;
|
|
101
|
+
export declare const refreshAuthRequestSchema: z.ZodObject<{
|
|
102
|
+
refreshToken: z.ZodString;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
refreshToken: string;
|
|
105
|
+
}, {
|
|
106
|
+
refreshToken: string;
|
|
107
|
+
}>;
|
|
108
|
+
export declare const resendVerificationRequestSchema: z.ZodObject<{
|
|
109
|
+
email: z.ZodString;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
email: string;
|
|
112
|
+
}, {
|
|
113
|
+
email: string;
|
|
114
|
+
}>;
|
|
115
|
+
export declare const verifyEmailQuerySchema: z.ZodObject<{
|
|
116
|
+
token: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, "strip", z.ZodTypeAny, {
|
|
118
|
+
token?: string | undefined;
|
|
119
|
+
}, {
|
|
120
|
+
token?: string | undefined;
|
|
121
|
+
}>;
|
|
122
|
+
export type AuthTokens = z.infer<typeof authTokensSchema>;
|
|
123
|
+
export type TokenPayload = z.infer<typeof tokenPayloadSchema>;
|
|
124
|
+
export type RefreshTokenPayload = z.infer<typeof refreshTokenPayloadSchema>;
|
|
125
|
+
export type AuthData = z.infer<typeof authDataSchema>;
|
|
126
|
+
export type PublicAuthData = z.infer<typeof publicAuthDataSchema> & {
|
|
127
|
+
readonly __brand: unique symbol;
|
|
128
|
+
};
|
|
129
|
+
export type CreateAccountRequest = z.infer<typeof createAccountRequestSchema>;
|
|
130
|
+
export type SignInRequest = z.infer<typeof signInRequestSchema>;
|
|
131
|
+
export type RefreshAuthRequest = z.infer<typeof refreshAuthRequestSchema>;
|
|
132
|
+
export type ResendVerificationRequest = z.infer<typeof resendVerificationRequestSchema>;
|
|
133
|
+
export type VerifyEmailQuery = z.infer<typeof verifyEmailQuerySchema>;
|
|
134
|
+
export interface CreateAccountResponse {
|
|
135
|
+
id: string;
|
|
136
|
+
name: string;
|
|
137
|
+
email: string;
|
|
138
|
+
}
|
|
139
|
+
export interface SignInResponse {
|
|
140
|
+
tokenData: AuthTokens;
|
|
141
|
+
authData: PublicAuthData;
|
|
142
|
+
user: any;
|
|
143
|
+
}
|
|
144
|
+
export interface RefreshAuthResponse {
|
|
145
|
+
tokenData: AuthTokens;
|
|
146
|
+
authData: PublicAuthData;
|
|
147
|
+
}
|
|
148
|
+
export interface ResendVerificationResponse {
|
|
149
|
+
sent: boolean;
|
|
150
|
+
}
|
|
151
|
+
export interface VerifyEmailResponse {
|
|
152
|
+
verified: boolean;
|
|
153
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.verifyEmailQuerySchema = exports.resendVerificationRequestSchema = exports.refreshAuthRequestSchema = exports.signInRequestSchema = exports.createAccountRequestSchema = exports.publicAuthDataSchema = exports.authDataSchema = exports.refreshTokenPayloadSchema = exports.tokenPayloadSchema = exports.authTokensSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const id_types_1 = require("../id-types");
|
|
6
|
+
exports.authTokensSchema = zod_1.z.object({
|
|
7
|
+
accessToken: zod_1.z.string(),
|
|
8
|
+
refreshToken: zod_1.z.string()
|
|
9
|
+
});
|
|
10
|
+
exports.tokenPayloadSchema = zod_1.z.object({
|
|
11
|
+
authId: zod_1.z.string(),
|
|
12
|
+
userId: zod_1.z.string()
|
|
13
|
+
});
|
|
14
|
+
exports.refreshTokenPayloadSchema = exports.tokenPayloadSchema.extend({
|
|
15
|
+
tokenId: zod_1.z.string()
|
|
16
|
+
});
|
|
17
|
+
exports.authDataSchema = zod_1.z.object({
|
|
18
|
+
_id: id_types_1.authIdSchema,
|
|
19
|
+
createdAt: zod_1.z.date(),
|
|
20
|
+
updatedAt: zod_1.z.date(),
|
|
21
|
+
userId: id_types_1.userIdSchema,
|
|
22
|
+
email: zod_1.z.string(),
|
|
23
|
+
passwordHash: zod_1.z.string(),
|
|
24
|
+
emailVerified: zod_1.z.boolean()
|
|
25
|
+
});
|
|
26
|
+
exports.publicAuthDataSchema = zod_1.z.object({
|
|
27
|
+
email: zod_1.z.string(),
|
|
28
|
+
emailVerified: zod_1.z.boolean()
|
|
29
|
+
});
|
|
30
|
+
exports.createAccountRequestSchema = zod_1.z.object({
|
|
31
|
+
name: zod_1.z.string().trim().min(1),
|
|
32
|
+
email: zod_1.z.string().trim().email(),
|
|
33
|
+
password: zod_1.z.string().min(4),
|
|
34
|
+
skipVerificationEmail: zod_1.z.boolean().optional()
|
|
35
|
+
});
|
|
36
|
+
exports.signInRequestSchema = zod_1.z.object({
|
|
37
|
+
email: zod_1.z.string().email(),
|
|
38
|
+
password: zod_1.z.string()
|
|
39
|
+
});
|
|
40
|
+
exports.refreshAuthRequestSchema = zod_1.z.object({
|
|
41
|
+
refreshToken: zod_1.z.string()
|
|
42
|
+
});
|
|
43
|
+
exports.resendVerificationRequestSchema = zod_1.z.object({
|
|
44
|
+
email: zod_1.z.string().email()
|
|
45
|
+
});
|
|
46
|
+
exports.verifyEmailQuerySchema = zod_1.z.object({
|
|
47
|
+
token: zod_1.z.string().optional()
|
|
48
|
+
});
|