@timothyw/pat-common 1.0.129 → 1.0.130
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.
|
@@ -11,9 +11,9 @@ export declare enum NotificationTemplateLevel {
|
|
|
11
11
|
ENTITY = "entity"
|
|
12
12
|
}
|
|
13
13
|
export declare enum NotificationEntityType {
|
|
14
|
-
|
|
14
|
+
AGENDA_ITEM = "agenda_item",
|
|
15
15
|
AGENDA_PANEL = "agenda_item",
|
|
16
|
-
|
|
16
|
+
INBOX_PANEL = "inbox_panel"
|
|
17
17
|
}
|
|
18
18
|
export declare enum NotificationTriggerType {
|
|
19
19
|
TIME_BASED = "time_based",
|
|
@@ -74,8 +74,9 @@ export declare const notificationTemplateSchema: z.ZodObject<{
|
|
|
74
74
|
active: boolean;
|
|
75
75
|
}>;
|
|
76
76
|
export declare const createNotificationTemplateRequestSchema: z.ZodObject<{
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
targetLevel: z.ZodNativeEnum<typeof NotificationTemplateLevel>;
|
|
78
|
+
targetEntityType: z.ZodNativeEnum<typeof NotificationEntityType>;
|
|
79
|
+
targetId: z.ZodOptional<z.ZodString>;
|
|
79
80
|
trigger: z.ZodObject<{
|
|
80
81
|
type: z.ZodNativeEnum<typeof NotificationTriggerType>;
|
|
81
82
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -85,19 +86,21 @@ export declare const createNotificationTemplateRequestSchema: z.ZodObject<{
|
|
|
85
86
|
}>;
|
|
86
87
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
87
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
targetLevel: NotificationTemplateLevel;
|
|
90
|
+
targetEntityType: NotificationEntityType;
|
|
88
91
|
trigger: {
|
|
89
92
|
type: NotificationTriggerType;
|
|
90
93
|
};
|
|
91
94
|
active: boolean;
|
|
92
|
-
|
|
93
|
-
entityId?: string | undefined;
|
|
95
|
+
targetId?: string | undefined;
|
|
94
96
|
}, {
|
|
97
|
+
targetLevel: NotificationTemplateLevel;
|
|
98
|
+
targetEntityType: NotificationEntityType;
|
|
95
99
|
trigger: {
|
|
96
100
|
type: NotificationTriggerType;
|
|
97
101
|
};
|
|
98
|
-
|
|
102
|
+
targetId?: string | undefined;
|
|
99
103
|
active?: boolean | undefined;
|
|
100
|
-
entityId?: string | undefined;
|
|
101
104
|
}>;
|
|
102
105
|
export declare const updateNotificationTemplateRequestSchema: z.ZodObject<{
|
|
103
106
|
trigger: z.ZodOptional<z.ZodObject<{
|
|
@@ -120,27 +123,27 @@ export declare const updateNotificationTemplateRequestSchema: z.ZodObject<{
|
|
|
120
123
|
active?: boolean | undefined;
|
|
121
124
|
}>;
|
|
122
125
|
export declare const entitySyncRequestSchema: z.ZodObject<{
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
targetEntityType: z.ZodNativeEnum<typeof NotificationEntityType>;
|
|
127
|
+
targetId: z.ZodString;
|
|
125
128
|
synced: z.ZodBoolean;
|
|
126
129
|
}, "strip", z.ZodTypeAny, {
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
targetEntityType: NotificationEntityType;
|
|
131
|
+
targetId: string;
|
|
129
132
|
synced: boolean;
|
|
130
133
|
}, {
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
targetEntityType: NotificationEntityType;
|
|
135
|
+
targetId: string;
|
|
133
136
|
synced: boolean;
|
|
134
137
|
}>;
|
|
135
138
|
export declare const getEntitySyncRequestSchema: z.ZodObject<{
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
targetEntityType: z.ZodNativeEnum<typeof NotificationEntityType>;
|
|
140
|
+
targetId: z.ZodString;
|
|
138
141
|
}, "strip", z.ZodTypeAny, {
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
targetEntityType: NotificationEntityType;
|
|
143
|
+
targetId: string;
|
|
141
144
|
}, {
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
targetEntityType: NotificationEntityType;
|
|
146
|
+
targetId: string;
|
|
144
147
|
}>;
|
|
145
148
|
export type NotificationTrigger = z.infer<typeof notificationTriggerSchema>;
|
|
146
149
|
export type NotificationTemplateData = z.infer<typeof notificationTemplateSchema>;
|
|
@@ -10,9 +10,9 @@ var NotificationTemplateLevel;
|
|
|
10
10
|
})(NotificationTemplateLevel || (exports.NotificationTemplateLevel = NotificationTemplateLevel = {}));
|
|
11
11
|
var NotificationEntityType;
|
|
12
12
|
(function (NotificationEntityType) {
|
|
13
|
-
NotificationEntityType["INBOX_PANEL"] = "inbox_panel";
|
|
14
|
-
NotificationEntityType["AGENDA_PANEL"] = "agenda_item";
|
|
15
13
|
NotificationEntityType["AGENDA_ITEM"] = "agenda_item";
|
|
14
|
+
NotificationEntityType["AGENDA_PANEL"] = "agenda_item";
|
|
15
|
+
NotificationEntityType["INBOX_PANEL"] = "inbox_panel";
|
|
16
16
|
})(NotificationEntityType || (exports.NotificationEntityType = NotificationEntityType = {}));
|
|
17
17
|
var NotificationTriggerType;
|
|
18
18
|
(function (NotificationTriggerType) {
|
|
@@ -38,8 +38,9 @@ exports.notificationTemplateSchema = zod_1.z.object({
|
|
|
38
38
|
updatedAt: zod_1.z.date()
|
|
39
39
|
});
|
|
40
40
|
exports.createNotificationTemplateRequestSchema = zod_1.z.object({
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
targetLevel: zod_1.z.nativeEnum(NotificationTemplateLevel),
|
|
42
|
+
targetEntityType: zod_1.z.nativeEnum(NotificationEntityType),
|
|
43
|
+
targetId: zod_1.z.string().optional(),
|
|
43
44
|
trigger: zod_1.z.object({
|
|
44
45
|
type: exports.notificationTriggerTypeSchema,
|
|
45
46
|
}),
|
|
@@ -52,11 +53,11 @@ exports.updateNotificationTemplateRequestSchema = zod_1.z.object({
|
|
|
52
53
|
active: zod_1.z.boolean().optional()
|
|
53
54
|
});
|
|
54
55
|
exports.entitySyncRequestSchema = zod_1.z.object({
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
targetEntityType: zod_1.z.nativeEnum(NotificationEntityType),
|
|
57
|
+
targetId: zod_1.z.string(),
|
|
57
58
|
synced: zod_1.z.boolean()
|
|
58
59
|
});
|
|
59
60
|
exports.getEntitySyncRequestSchema = zod_1.z.object({
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
targetEntityType: zod_1.z.nativeEnum(NotificationEntityType),
|
|
62
|
+
targetId: zod_1.z.string()
|
|
62
63
|
});
|
package/package.json
CHANGED
|
@@ -15,9 +15,10 @@ export enum NotificationTemplateLevel {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export enum NotificationEntityType {
|
|
18
|
-
INBOX_PANEL = 'inbox_panel',
|
|
19
|
-
AGENDA_PANEL = 'agenda_item',
|
|
20
18
|
AGENDA_ITEM = 'agenda_item',
|
|
19
|
+
|
|
20
|
+
AGENDA_PANEL = 'agenda_item',
|
|
21
|
+
INBOX_PANEL = 'inbox_panel',
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export enum NotificationTriggerType {
|
|
@@ -47,8 +48,9 @@ export const notificationTemplateSchema = z.object({
|
|
|
47
48
|
});
|
|
48
49
|
|
|
49
50
|
export const createNotificationTemplateRequestSchema = z.object({
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
targetLevel: z.nativeEnum(NotificationTemplateLevel),
|
|
52
|
+
targetEntityType: z.nativeEnum(NotificationEntityType),
|
|
53
|
+
targetId: z.string().optional(),
|
|
52
54
|
trigger: z.object({
|
|
53
55
|
type: notificationTriggerTypeSchema,
|
|
54
56
|
}),
|
|
@@ -63,14 +65,14 @@ export const updateNotificationTemplateRequestSchema = z.object({
|
|
|
63
65
|
});
|
|
64
66
|
|
|
65
67
|
export const entitySyncRequestSchema = z.object({
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
targetEntityType: z.nativeEnum(NotificationEntityType),
|
|
69
|
+
targetId: z.string(),
|
|
68
70
|
synced: z.boolean()
|
|
69
71
|
});
|
|
70
72
|
|
|
71
73
|
export const getEntitySyncRequestSchema = z.object({
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
targetEntityType: z.nativeEnum(NotificationEntityType),
|
|
75
|
+
targetId: z.string()
|
|
74
76
|
});
|
|
75
77
|
|
|
76
78
|
export type NotificationTrigger = z.infer<typeof notificationTriggerSchema>;
|