@timothyw/pat-common 1.0.108 → 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.
@@ -1,7 +1,7 @@
1
1
  export declare enum ModuleType {
2
2
  AGENDA = "agenda",
3
3
  INBOX = "inbox",
4
- TASKS = "tasks",
4
+ LISTS = "lists",
5
5
  HABITS = "habits",
6
6
  PEOPLE = "people",
7
7
  SETTINGS = "settings",
@@ -5,7 +5,7 @@ var ModuleType;
5
5
  (function (ModuleType) {
6
6
  ModuleType["AGENDA"] = "agenda";
7
7
  ModuleType["INBOX"] = "inbox";
8
- ModuleType["TASKS"] = "tasks";
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", "task_list", "task", "habit", "agenda_defaults", "tasks_defaults", "habits_defaults"]>;
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" | "tasks" | "habits" | "agenda_item" | "task_list" | "task" | "habit" | "agenda_defaults" | "tasks_defaults" | "habits_defaults";
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" | "tasks" | "habits" | "agenda_item" | "task_list" | "task" | "habit" | "agenda_defaults" | "tasks_defaults" | "habits_defaults";
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", "task_list", "task", "habit", "agenda_defaults", "tasks_defaults", "habits_defaults"]>;
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", "task_list", "task", "habit", "agenda_defaults", "tasks_defaults", "habits_defaults"]>;
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" | "tasks" | "habits" | "agenda_item" | "task_list" | "task" | "habit" | "agenda_defaults" | "tasks_defaults" | "habits_defaults";
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" | "tasks" | "habits" | "agenda_item" | "task_list" | "task" | "habit" | "agenda_defaults" | "tasks_defaults" | "habits_defaults";
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", "task_list", "task", "habit", "agenda_defaults", "tasks_defaults", "habits_defaults"]>;
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" | "tasks" | "habits" | "agenda_item" | "task_list" | "task" | "habit" | "agenda_defaults" | "tasks_defaults" | "habits_defaults";
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" | "tasks" | "habits" | "agenda_item" | "task_list" | "task" | "habit" | "agenda_defaults" | "tasks_defaults" | "habits_defaults";
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", "task_list", "task", "habit", "agenda_defaults", "tasks_defaults", "habits_defaults"]>;
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" | "tasks" | "habits" | "agenda_item" | "task_list" | "task" | "habit" | "agenda_defaults" | "tasks_defaults" | "habits_defaults";
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" | "tasks" | "habits" | "agenda_item" | "task_list" | "task" | "habit" | "agenda_defaults" | "tasks_defaults" | "habits_defaults";
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', 'task_list', 'task', 'habit',
8
+ 'agenda_item', 'habit',
9
9
  // Parent template types (default templates for children)
10
- 'agenda_defaults', 'tasks_defaults', 'habits_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({
@@ -21,10 +21,10 @@ export declare class Serializer {
21
21
  static deserializePersonData(data: Serialized<PersonData>): PersonData;
22
22
  static serializePersonNoteData(data: PersonNoteData): Serialized<PersonNoteData>;
23
23
  static deserializePersonNoteData(data: Serialized<PersonNoteData>): PersonNoteData;
24
- static serializeTaskData(data: ListItemData): Serialized<ListItemData>;
25
- static deserializeTaskData(data: Serialized<ListItemData>): ListItemData;
26
- static serializeTaskListData(data: ListData): Serialized<ListData>;
27
- static deserializeTaskListData(data: Serialized<ListData>): ListData;
24
+ static serializeListItemData(data: ListItemData): Serialized<ListItemData>;
25
+ static deserializeListItemData(data: Serialized<ListItemData>): ListItemData;
26
+ static serializeListData(data: ListData): Serialized<ListData>;
27
+ static deserializeListData(data: Serialized<ListData>): ListData;
28
28
  static serializeThoughtData(data: ThoughtData): Serialized<ThoughtData>;
29
29
  static deserializeThoughtData(data: Serialized<ThoughtData>): ThoughtData;
30
30
  static serializeUserData(data: UserData): Serialized<UserData>;
@@ -56,16 +56,16 @@ class Serializer {
56
56
  static deserializePersonNoteData(data) {
57
57
  return this.deserialize(data);
58
58
  }
59
- static serializeTaskData(data) {
59
+ static serializeListItemData(data) {
60
60
  return this.serialize(data);
61
61
  }
62
- static deserializeTaskData(data) {
62
+ static deserializeListItemData(data) {
63
63
  return this.deserialize(data);
64
64
  }
65
- static serializeTaskListData(data) {
65
+ static serializeListData(data) {
66
66
  return this.serialize(data);
67
67
  }
68
- static deserializeTaskListData(data) {
68
+ static deserializeListData(data) {
69
69
  return this.deserialize(data);
70
70
  }
71
71
  static serializeThoughtData(data) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@timothyw/pat-common",
3
3
  "description": "",
4
4
  "author": "Timothy Washburn",
5
- "version": "1.0.108",
5
+ "version": "1.0.110",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -1,7 +1,7 @@
1
1
  export enum ModuleType {
2
2
  AGENDA = 'agenda',
3
3
  INBOX = 'inbox',
4
- TASKS = 'tasks',
4
+ LISTS = 'lists',
5
5
  HABITS = 'habits',
6
6
  PEOPLE = 'people',
7
7
  SETTINGS = 'settings',
@@ -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', 'task_list', 'task', 'habit',
7
+ 'agenda_item', 'habit',
8
8
 
9
9
  // Parent template types (default templates for children)
10
- 'agenda_defaults', 'tasks_defaults', 'habits_defaults'
10
+ 'agenda_defaults', 'habits_defaults'
11
11
  ]);
12
12
  export type NotificationEntityType = z.infer<typeof notificationEntityTypeSchema>;
13
13
 
@@ -96,19 +96,19 @@ export class Serializer {
96
96
  return this.deserialize(data) as unknown as PersonNoteData;
97
97
  }
98
98
 
99
- static serializeTaskData(data: ListItemData): Serialized<ListItemData> {
99
+ static serializeListItemData(data: ListItemData): Serialized<ListItemData> {
100
100
  return this.serialize(data);
101
101
  }
102
102
 
103
- static deserializeTaskData(data: Serialized<ListItemData>): ListItemData {
103
+ static deserializeListItemData(data: Serialized<ListItemData>): ListItemData {
104
104
  return this.deserialize(data) as unknown as ListItemData;
105
105
  }
106
106
 
107
- static serializeTaskListData(data: ListData): Serialized<ListData> {
107
+ static serializeListData(data: ListData): Serialized<ListData> {
108
108
  return this.serialize(data);
109
109
  }
110
110
 
111
- static deserializeTaskListData(data: Serialized<ListData>): ListData {
111
+ static deserializeListData(data: Serialized<ListData>): ListData {
112
112
  return this.deserialize(data) as unknown as ListData;
113
113
  }
114
114