@timothyw/pat-common 1.0.117 → 1.0.119
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/new/agenda-types.d.ts +0 -1
- package/dist/types/new/habits-types.d.ts +0 -2
- package/dist/types/new/lists-types.d.ts +0 -2
- package/dist/types/new/notifications-types.d.ts +7 -1
- package/dist/types/new/people-types.d.ts +0 -2
- package/dist/types/new/thoughts-types.d.ts +0 -1
- package/package.json +1 -1
- package/src/types/new/agenda-types.ts +1 -3
- package/src/types/new/habits-types.ts +2 -6
- package/src/types/new/lists-types.ts +2 -6
- package/src/types/new/notifications-types.ts +9 -3
- package/src/types/new/people-types.ts +2 -6
- package/src/types/new/thoughts-types.ts +1 -3
|
@@ -307,11 +307,9 @@ export interface UpdateHabitResponse {
|
|
|
307
307
|
habit: Serialized<Habit>;
|
|
308
308
|
}
|
|
309
309
|
export interface DeleteHabitResponse {
|
|
310
|
-
deleted: boolean;
|
|
311
310
|
}
|
|
312
311
|
export interface CreateHabitEntryResponse {
|
|
313
312
|
habit: Serialized<Habit>;
|
|
314
313
|
}
|
|
315
314
|
export interface DeleteHabitEntryResponse {
|
|
316
|
-
habit: Serialized<Habit>;
|
|
317
315
|
}
|
|
@@ -142,7 +142,6 @@ export interface UpdateListResponse {
|
|
|
142
142
|
list: Serialized<ListData>;
|
|
143
143
|
}
|
|
144
144
|
export interface DeleteListResponse {
|
|
145
|
-
deleted: boolean;
|
|
146
145
|
}
|
|
147
146
|
export interface CreateListItemResponse {
|
|
148
147
|
listItem: Serialized<ListItemData>;
|
|
@@ -160,5 +159,4 @@ export interface CompleteListItemResponse {
|
|
|
160
159
|
listItem: Serialized<ListItemData>;
|
|
161
160
|
}
|
|
162
161
|
export interface DeleteListItemResponse {
|
|
163
|
-
deleted: boolean;
|
|
164
162
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Serialized } from '../../utils';
|
|
3
|
+
export interface NotificationContext<T = any> {
|
|
4
|
+
entityId: string;
|
|
5
|
+
entityType: NotificationEntityType;
|
|
6
|
+
entityData: T;
|
|
7
|
+
userId: string;
|
|
8
|
+
variables: Record<string, any>;
|
|
9
|
+
}
|
|
3
10
|
export declare const notificationEntityTypeSchema: z.ZodEnum<["agenda", "tasks", "habits", "inbox", "agenda_item", "habit", "agenda_defaults", "habits_defaults"]>;
|
|
4
11
|
export declare const notificationStatusSchema: z.ZodEnum<["scheduled", "sent", "failed", "cancelled"]>;
|
|
5
12
|
export declare const notificationTriggerTypeSchema: z.ZodEnum<["time_based", "event_based", "recurring"]>;
|
|
@@ -487,7 +494,6 @@ export interface UpdateNotificationTemplateResponse {
|
|
|
487
494
|
template: Serialized<NotificationTemplateData>;
|
|
488
495
|
}
|
|
489
496
|
export interface DeleteNotificationTemplateResponse {
|
|
490
|
-
deleted: boolean;
|
|
491
497
|
}
|
|
492
498
|
export interface SyncNotificationTemplateResponse {
|
|
493
499
|
synced: boolean;
|
|
@@ -269,7 +269,6 @@ export interface UpdatePersonResponse {
|
|
|
269
269
|
person: Serialized<Person>;
|
|
270
270
|
}
|
|
271
271
|
export interface DeletePersonResponse {
|
|
272
|
-
deleted: boolean;
|
|
273
272
|
}
|
|
274
273
|
export interface CreatePersonNoteResponse {
|
|
275
274
|
personNote: Serialized<PersonNoteData>;
|
|
@@ -281,5 +280,4 @@ export interface UpdatePersonNoteResponse {
|
|
|
281
280
|
personNote: Serialized<PersonNoteData>;
|
|
282
281
|
}
|
|
283
282
|
export interface DeletePersonNoteResponse {
|
|
284
|
-
deleted: boolean;
|
|
285
283
|
}
|
package/package.json
CHANGED
|
@@ -99,14 +99,10 @@ export interface UpdateHabitResponse {
|
|
|
99
99
|
habit: Serialized<Habit>;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
export interface DeleteHabitResponse {
|
|
103
|
-
deleted: boolean;
|
|
104
|
-
}
|
|
102
|
+
export interface DeleteHabitResponse {}
|
|
105
103
|
|
|
106
104
|
export interface CreateHabitEntryResponse {
|
|
107
105
|
habit: Serialized<Habit>;
|
|
108
106
|
}
|
|
109
107
|
|
|
110
|
-
export interface DeleteHabitEntryResponse {
|
|
111
|
-
habit: Serialized<Habit>;
|
|
112
|
-
}
|
|
108
|
+
export interface DeleteHabitEntryResponse {}
|
|
@@ -79,9 +79,7 @@ export interface UpdateListResponse {
|
|
|
79
79
|
list: Serialized<ListData>;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
export interface DeleteListResponse {
|
|
83
|
-
deleted: boolean;
|
|
84
|
-
}
|
|
82
|
+
export interface DeleteListResponse {}
|
|
85
83
|
|
|
86
84
|
export interface CreateListItemResponse {
|
|
87
85
|
listItem: Serialized<ListItemData>;
|
|
@@ -103,6 +101,4 @@ export interface CompleteListItemResponse {
|
|
|
103
101
|
listItem: Serialized<ListItemData>;
|
|
104
102
|
}
|
|
105
103
|
|
|
106
|
-
export interface DeleteListItemResponse {
|
|
107
|
-
deleted: boolean;
|
|
108
|
-
}
|
|
104
|
+
export interface DeleteListItemResponse {}
|
|
@@ -2,6 +2,14 @@ import { z } from 'zod';
|
|
|
2
2
|
import { notificationTemplateIdSchema, notificationInstanceIdSchema, userIdSchema } from '../id-types';
|
|
3
3
|
import { Serialized } from '../../utils';
|
|
4
4
|
|
|
5
|
+
export interface NotificationContext<T = any> {
|
|
6
|
+
entityId: string;
|
|
7
|
+
entityType: NotificationEntityType;
|
|
8
|
+
entityData: T;
|
|
9
|
+
userId: string;
|
|
10
|
+
variables: Record<string, any>;
|
|
11
|
+
}
|
|
12
|
+
|
|
5
13
|
export const notificationEntityTypeSchema = z.enum([
|
|
6
14
|
'agenda', 'tasks', 'habits', 'inbox',
|
|
7
15
|
'agenda_item', 'habit',
|
|
@@ -162,9 +170,7 @@ export interface UpdateNotificationTemplateResponse {
|
|
|
162
170
|
template: Serialized<NotificationTemplateData>;
|
|
163
171
|
}
|
|
164
172
|
|
|
165
|
-
export interface DeleteNotificationTemplateResponse {
|
|
166
|
-
deleted: boolean;
|
|
167
|
-
}
|
|
173
|
+
export interface DeleteNotificationTemplateResponse {}
|
|
168
174
|
|
|
169
175
|
export interface SyncNotificationTemplateResponse {
|
|
170
176
|
synced: boolean;
|
|
@@ -89,9 +89,7 @@ export interface UpdatePersonResponse {
|
|
|
89
89
|
person: Serialized<Person>;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
export interface DeletePersonResponse {
|
|
93
|
-
deleted: boolean;
|
|
94
|
-
}
|
|
92
|
+
export interface DeletePersonResponse {}
|
|
95
93
|
|
|
96
94
|
export interface CreatePersonNoteResponse {
|
|
97
95
|
personNote: Serialized<PersonNoteData>;
|
|
@@ -105,6 +103,4 @@ export interface UpdatePersonNoteResponse {
|
|
|
105
103
|
personNote: Serialized<PersonNoteData>;
|
|
106
104
|
}
|
|
107
105
|
|
|
108
|
-
export interface DeletePersonNoteResponse {
|
|
109
|
-
deleted: boolean;
|
|
110
|
-
}
|
|
106
|
+
export interface DeletePersonNoteResponse {}
|