@timothyw/pat-common 1.0.109 → 1.0.110
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/enums/module-type.d.ts +1 -1
- package/dist/enums/module-type.js +1 -1
- package/dist/types/api/notifications/create-notification-template-types.d.ts +3 -3
- package/dist/types/models/notification-template-data.d.ts +10 -10
- package/dist/types/models/notification-template-data.js +2 -2
- package/package.json +1 -1
- package/src/enums/module-type.ts +1 -1
- package/src/types/models/notification-template-data.ts +2 -2
|
@@ -5,7 +5,7 @@ var ModuleType;
|
|
|
5
5
|
(function (ModuleType) {
|
|
6
6
|
ModuleType["AGENDA"] = "agenda";
|
|
7
7
|
ModuleType["INBOX"] = "inbox";
|
|
8
|
-
ModuleType["
|
|
8
|
+
ModuleType["LISTS"] = "lists";
|
|
9
9
|
ModuleType["HABITS"] = "habits";
|
|
10
10
|
ModuleType["PEOPLE"] = "people";
|
|
11
11
|
ModuleType["SETTINGS"] = "settings";
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { Serialized } from "../../../utils";
|
|
3
3
|
import { NotificationTemplateData } from "../../models/notification-template-data";
|
|
4
4
|
export declare const createNotificationTemplateRequestSchema: z.ZodObject<{
|
|
5
|
-
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "
|
|
5
|
+
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
6
6
|
entityId: z.ZodOptional<z.ZodString>;
|
|
7
7
|
name: z.ZodString;
|
|
8
8
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -36,7 +36,7 @@ export declare const createNotificationTemplateRequestSchema: z.ZodObject<{
|
|
|
36
36
|
inheritedFrom: z.ZodOptional<z.ZodString>;
|
|
37
37
|
customized: z.ZodDefault<z.ZodBoolean>;
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
entityType: "agenda" | "inbox" | "
|
|
39
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
40
40
|
name: string;
|
|
41
41
|
trigger: {
|
|
42
42
|
type: "time_based" | "event_based" | "recurring";
|
|
@@ -54,7 +54,7 @@ export declare const createNotificationTemplateRequestSchema: z.ZodObject<{
|
|
|
54
54
|
description?: string | undefined;
|
|
55
55
|
inheritedFrom?: string | undefined;
|
|
56
56
|
}, {
|
|
57
|
-
entityType: "agenda" | "inbox" | "
|
|
57
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
58
58
|
name: string;
|
|
59
59
|
trigger: {
|
|
60
60
|
type: "time_based" | "event_based" | "recurring";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { NotificationTemplateId, UserId } from "../id-types";
|
|
3
|
-
export declare const notificationEntityTypeSchema: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "
|
|
3
|
+
export declare const notificationEntityTypeSchema: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
4
4
|
export type NotificationEntityType = z.infer<typeof notificationEntityTypeSchema>;
|
|
5
5
|
export declare const notificationTriggerTypeSchema: z.ZodEnum<["time_based", "event_based", "recurring"]>;
|
|
6
6
|
export type NotificationTriggerType = z.infer<typeof notificationTriggerTypeSchema>;
|
|
@@ -35,7 +35,7 @@ export type NotificationContent = z.infer<typeof notificationContentSchema>;
|
|
|
35
35
|
export declare const notificationTemplateDataSchema: z.ZodObject<{
|
|
36
36
|
_id: z.ZodEffects<z.ZodString, NotificationTemplateId, string>;
|
|
37
37
|
userId: z.ZodEffects<z.ZodString, UserId, string>;
|
|
38
|
-
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "
|
|
38
|
+
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
39
39
|
entityId: z.ZodOptional<z.ZodString>;
|
|
40
40
|
name: z.ZodString;
|
|
41
41
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -79,7 +79,7 @@ export declare const notificationTemplateDataSchema: z.ZodObject<{
|
|
|
79
79
|
userId: string & {
|
|
80
80
|
readonly __brand: "UserId";
|
|
81
81
|
};
|
|
82
|
-
entityType: "agenda" | "inbox" | "
|
|
82
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
83
83
|
name: string;
|
|
84
84
|
trigger: {
|
|
85
85
|
type: "time_based" | "event_based" | "recurring";
|
|
@@ -101,7 +101,7 @@ export declare const notificationTemplateDataSchema: z.ZodObject<{
|
|
|
101
101
|
createdAt: Date;
|
|
102
102
|
updatedAt: Date;
|
|
103
103
|
userId: string;
|
|
104
|
-
entityType: "agenda" | "inbox" | "
|
|
104
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
105
105
|
name: string;
|
|
106
106
|
trigger: {
|
|
107
107
|
type: "time_based" | "event_based" | "recurring";
|
|
@@ -123,7 +123,7 @@ export type NotificationTemplateData = z.infer<typeof notificationTemplateDataSc
|
|
|
123
123
|
export declare const createNotificationTemplateSchema: z.ZodObject<Omit<{
|
|
124
124
|
_id: z.ZodEffects<z.ZodString, NotificationTemplateId, string>;
|
|
125
125
|
userId: z.ZodEffects<z.ZodString, UserId, string>;
|
|
126
|
-
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "
|
|
126
|
+
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
127
127
|
entityId: z.ZodOptional<z.ZodString>;
|
|
128
128
|
name: z.ZodString;
|
|
129
129
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -162,7 +162,7 @@ export declare const createNotificationTemplateSchema: z.ZodObject<Omit<{
|
|
|
162
162
|
userId: string & {
|
|
163
163
|
readonly __brand: "UserId";
|
|
164
164
|
};
|
|
165
|
-
entityType: "agenda" | "inbox" | "
|
|
165
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
166
166
|
name: string;
|
|
167
167
|
trigger: {
|
|
168
168
|
type: "time_based" | "event_based" | "recurring";
|
|
@@ -181,7 +181,7 @@ export declare const createNotificationTemplateSchema: z.ZodObject<Omit<{
|
|
|
181
181
|
inheritedFrom?: NotificationTemplateId | undefined;
|
|
182
182
|
}, {
|
|
183
183
|
userId: string;
|
|
184
|
-
entityType: "agenda" | "inbox" | "
|
|
184
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
185
185
|
name: string;
|
|
186
186
|
trigger: {
|
|
187
187
|
type: "time_based" | "event_based" | "recurring";
|
|
@@ -202,7 +202,7 @@ export declare const createNotificationTemplateSchema: z.ZodObject<Omit<{
|
|
|
202
202
|
export type CreateNotificationTemplateData = z.infer<typeof createNotificationTemplateSchema>;
|
|
203
203
|
export declare const entitySyncStateSchema: z.ZodObject<{
|
|
204
204
|
userId: z.ZodEffects<z.ZodString, UserId, string>;
|
|
205
|
-
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "
|
|
205
|
+
entityType: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
206
206
|
entityId: z.ZodString;
|
|
207
207
|
synced: z.ZodDefault<z.ZodBoolean>;
|
|
208
208
|
updatedAt: z.ZodDate;
|
|
@@ -211,13 +211,13 @@ export declare const entitySyncStateSchema: z.ZodObject<{
|
|
|
211
211
|
userId: string & {
|
|
212
212
|
readonly __brand: "UserId";
|
|
213
213
|
};
|
|
214
|
-
entityType: "agenda" | "inbox" | "
|
|
214
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
215
215
|
entityId: string;
|
|
216
216
|
synced: boolean;
|
|
217
217
|
}, {
|
|
218
218
|
updatedAt: Date;
|
|
219
219
|
userId: string;
|
|
220
|
-
entityType: "agenda" | "inbox" | "
|
|
220
|
+
entityType: "agenda" | "inbox" | "habits" | "tasks" | "agenda_item" | "habit" | "agenda_defaults" | "habits_defaults";
|
|
221
221
|
entityId: string;
|
|
222
222
|
synced?: boolean | undefined;
|
|
223
223
|
}>;
|
|
@@ -5,9 +5,9 @@ const zod_1 = require("zod");
|
|
|
5
5
|
exports.notificationEntityTypeSchema = zod_1.z.enum([
|
|
6
6
|
// Individual entity types (notifications FOR the entity itself)
|
|
7
7
|
'agenda', 'tasks', 'habits', 'inbox',
|
|
8
|
-
'agenda_item', '
|
|
8
|
+
'agenda_item', 'habit',
|
|
9
9
|
// Parent template types (default templates for children)
|
|
10
|
-
'agenda_defaults', '
|
|
10
|
+
'agenda_defaults', 'habits_defaults'
|
|
11
11
|
]);
|
|
12
12
|
exports.notificationTriggerTypeSchema = zod_1.z.enum(['time_based', 'event_based', 'recurring']);
|
|
13
13
|
exports.notificationTriggerSchema = zod_1.z.object({
|
package/package.json
CHANGED
package/src/enums/module-type.ts
CHANGED
|
@@ -4,10 +4,10 @@ import { NotificationTemplateId, UserId } from "../id-types";
|
|
|
4
4
|
export const notificationEntityTypeSchema = z.enum([
|
|
5
5
|
// Individual entity types (notifications FOR the entity itself)
|
|
6
6
|
'agenda', 'tasks', 'habits', 'inbox',
|
|
7
|
-
'agenda_item', '
|
|
7
|
+
'agenda_item', 'habit',
|
|
8
8
|
|
|
9
9
|
// Parent template types (default templates for children)
|
|
10
|
-
'agenda_defaults', '
|
|
10
|
+
'agenda_defaults', 'habits_defaults'
|
|
11
11
|
]);
|
|
12
12
|
export type NotificationEntityType = z.infer<typeof notificationEntityTypeSchema>;
|
|
13
13
|
|