colibris-types 2.2.2 → 2.2.4
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/lib/imports/history.d.ts +10 -4
- package/lib/imports/history.js +11 -1
- package/lib/imports/index.d.ts +231 -231
- package/lib/imports/telecom.d.ts +694 -694
- package/lib/imports/telecom.js +120 -283
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/notification-settings.d.ts +89 -0
- package/lib/notification-settings.js +24 -0
- package/package.json +1 -1
|
@@ -2,52 +2,141 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const NotificationTypePreferenceSchema: z.ZodObject<{
|
|
3
3
|
inApp: z.ZodBoolean;
|
|
4
4
|
email: z.ZodBoolean;
|
|
5
|
+
push: z.ZodBoolean;
|
|
5
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
push: boolean;
|
|
6
8
|
inApp: boolean;
|
|
7
9
|
email: boolean;
|
|
8
10
|
}, {
|
|
11
|
+
push: boolean;
|
|
9
12
|
inApp: boolean;
|
|
10
13
|
email: boolean;
|
|
11
14
|
}>;
|
|
15
|
+
export declare const PushSubscriptionKeysSchema: z.ZodObject<{
|
|
16
|
+
p256dh: z.ZodString;
|
|
17
|
+
auth: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
p256dh: string;
|
|
20
|
+
auth: string;
|
|
21
|
+
}, {
|
|
22
|
+
p256dh: string;
|
|
23
|
+
auth: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const PushSubscriptionSchema: z.ZodObject<{
|
|
26
|
+
endpoint: z.ZodString;
|
|
27
|
+
keys: z.ZodObject<{
|
|
28
|
+
p256dh: z.ZodString;
|
|
29
|
+
auth: z.ZodString;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
p256dh: string;
|
|
32
|
+
auth: string;
|
|
33
|
+
}, {
|
|
34
|
+
p256dh: string;
|
|
35
|
+
auth: string;
|
|
36
|
+
}>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
keys: {
|
|
39
|
+
p256dh: string;
|
|
40
|
+
auth: string;
|
|
41
|
+
};
|
|
42
|
+
endpoint: string;
|
|
43
|
+
}, {
|
|
44
|
+
keys: {
|
|
45
|
+
p256dh: string;
|
|
46
|
+
auth: string;
|
|
47
|
+
};
|
|
48
|
+
endpoint: string;
|
|
49
|
+
}>;
|
|
12
50
|
export declare const NotificationPreferencesSchema: z.ZodObject<{
|
|
13
51
|
monthlyReport: z.ZodObject<{
|
|
14
52
|
inApp: z.ZodBoolean;
|
|
15
53
|
email: z.ZodBoolean;
|
|
54
|
+
push: z.ZodBoolean;
|
|
16
55
|
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
push: boolean;
|
|
17
57
|
inApp: boolean;
|
|
18
58
|
email: boolean;
|
|
19
59
|
}, {
|
|
60
|
+
push: boolean;
|
|
20
61
|
inApp: boolean;
|
|
21
62
|
email: boolean;
|
|
22
63
|
}>;
|
|
23
64
|
thresholds: z.ZodObject<{
|
|
24
65
|
inApp: z.ZodBoolean;
|
|
25
66
|
email: z.ZodBoolean;
|
|
67
|
+
push: z.ZodBoolean;
|
|
26
68
|
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
push: boolean;
|
|
27
70
|
inApp: boolean;
|
|
28
71
|
email: boolean;
|
|
29
72
|
}, {
|
|
73
|
+
push: boolean;
|
|
30
74
|
inApp: boolean;
|
|
31
75
|
email: boolean;
|
|
32
76
|
}>;
|
|
77
|
+
pushSubscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
78
|
+
endpoint: z.ZodString;
|
|
79
|
+
keys: z.ZodObject<{
|
|
80
|
+
p256dh: z.ZodString;
|
|
81
|
+
auth: z.ZodString;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
p256dh: string;
|
|
84
|
+
auth: string;
|
|
85
|
+
}, {
|
|
86
|
+
p256dh: string;
|
|
87
|
+
auth: string;
|
|
88
|
+
}>;
|
|
89
|
+
}, "strip", z.ZodTypeAny, {
|
|
90
|
+
keys: {
|
|
91
|
+
p256dh: string;
|
|
92
|
+
auth: string;
|
|
93
|
+
};
|
|
94
|
+
endpoint: string;
|
|
95
|
+
}, {
|
|
96
|
+
keys: {
|
|
97
|
+
p256dh: string;
|
|
98
|
+
auth: string;
|
|
99
|
+
};
|
|
100
|
+
endpoint: string;
|
|
101
|
+
}>, "many">>;
|
|
33
102
|
}, "strip", z.ZodTypeAny, {
|
|
34
103
|
monthlyReport: {
|
|
104
|
+
push: boolean;
|
|
35
105
|
inApp: boolean;
|
|
36
106
|
email: boolean;
|
|
37
107
|
};
|
|
38
108
|
thresholds: {
|
|
109
|
+
push: boolean;
|
|
39
110
|
inApp: boolean;
|
|
40
111
|
email: boolean;
|
|
41
112
|
};
|
|
113
|
+
pushSubscriptions?: {
|
|
114
|
+
keys: {
|
|
115
|
+
p256dh: string;
|
|
116
|
+
auth: string;
|
|
117
|
+
};
|
|
118
|
+
endpoint: string;
|
|
119
|
+
}[] | undefined;
|
|
42
120
|
}, {
|
|
43
121
|
monthlyReport: {
|
|
122
|
+
push: boolean;
|
|
44
123
|
inApp: boolean;
|
|
45
124
|
email: boolean;
|
|
46
125
|
};
|
|
47
126
|
thresholds: {
|
|
127
|
+
push: boolean;
|
|
48
128
|
inApp: boolean;
|
|
49
129
|
email: boolean;
|
|
50
130
|
};
|
|
131
|
+
pushSubscriptions?: {
|
|
132
|
+
keys: {
|
|
133
|
+
p256dh: string;
|
|
134
|
+
auth: string;
|
|
135
|
+
};
|
|
136
|
+
endpoint: string;
|
|
137
|
+
}[] | undefined;
|
|
51
138
|
}>;
|
|
52
139
|
export type NotificationTypePreference = z.infer<typeof NotificationTypePreferenceSchema>;
|
|
140
|
+
export type PushSubscriptionKeys = z.infer<typeof PushSubscriptionKeysSchema>;
|
|
141
|
+
export type PushSubscription = z.infer<typeof PushSubscriptionSchema>;
|
|
53
142
|
export type NotificationPreferences = z.infer<typeof NotificationPreferencesSchema>;
|
|
@@ -5,8 +5,26 @@ export const NotificationTypePreferenceSchema = z
|
|
|
5
5
|
.object({
|
|
6
6
|
inApp: z.boolean().openapi({ description: "Enable in-app notifications" }),
|
|
7
7
|
email: z.boolean().openapi({ description: "Enable email notifications" }),
|
|
8
|
+
push: z.boolean().openapi({ description: "Enable push notifications" }),
|
|
8
9
|
})
|
|
9
10
|
.openapi("NotificationTypePreference");
|
|
11
|
+
export const PushSubscriptionKeysSchema = z
|
|
12
|
+
.object({
|
|
13
|
+
p256dh: z
|
|
14
|
+
.string()
|
|
15
|
+
.openapi({ description: "User public key for encryption" }),
|
|
16
|
+
auth: z.string().openapi({ description: "Authentication secret" }),
|
|
17
|
+
})
|
|
18
|
+
.openapi("PushSubscriptionKeys");
|
|
19
|
+
export const PushSubscriptionSchema = z
|
|
20
|
+
.object({
|
|
21
|
+
endpoint: z
|
|
22
|
+
.string()
|
|
23
|
+
.url()
|
|
24
|
+
.openapi({ description: "Push service endpoint URL" }),
|
|
25
|
+
keys: PushSubscriptionKeysSchema,
|
|
26
|
+
})
|
|
27
|
+
.openapi("PushSubscription");
|
|
10
28
|
export const NotificationPreferencesSchema = z
|
|
11
29
|
.object({
|
|
12
30
|
monthlyReport: NotificationTypePreferenceSchema.openapi({
|
|
@@ -15,5 +33,11 @@ export const NotificationPreferencesSchema = z
|
|
|
15
33
|
thresholds: NotificationTypePreferenceSchema.openapi({
|
|
16
34
|
description: "Threshold alerts notification preferences",
|
|
17
35
|
}),
|
|
36
|
+
pushSubscriptions: z
|
|
37
|
+
.array(PushSubscriptionSchema)
|
|
38
|
+
.optional()
|
|
39
|
+
.openapi({
|
|
40
|
+
description: "Browser push subscriptions for this user",
|
|
41
|
+
}),
|
|
18
42
|
})
|
|
19
43
|
.openapi("NotificationPreferences");
|