@voltro/plugin-notifications 0.24.0 → 0.26.0
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/CHANGELOG.md +670 -0
- package/dist/index.d.ts +28 -1
- package/dist/index.js +220 -158
- package/dist/rpc.d.ts +22 -0
- package/dist/rpc.js +24 -8
- package/dist/web.d.ts +2 -0
- package/package.json +4 -4
package/dist/rpc.d.ts
CHANGED
|
@@ -3,6 +3,12 @@ import { PluginRpcClientDescriptor } from '@voltro/protocol';
|
|
|
3
3
|
import { QueryProcedureDescriptor } from '@voltro/protocol';
|
|
4
4
|
import { Schema } from 'effect';
|
|
5
5
|
|
|
6
|
+
export declare const archiveDescriptor: MutationProcedureDescriptor<"notifications.archive", Schema.Struct<{
|
|
7
|
+
id: typeof Schema.String;
|
|
8
|
+
}>, Schema.Struct<{
|
|
9
|
+
ok: typeof Schema.Boolean;
|
|
10
|
+
}>, typeof Schema.Never>;
|
|
11
|
+
|
|
6
12
|
export declare const clearQuietHoursDescriptor: MutationProcedureDescriptor<"notifications.clearQuietHours", Schema.Struct<{}>, Schema.Struct<{
|
|
7
13
|
ok: typeof Schema.Boolean;
|
|
8
14
|
}>, typeof Schema.Never>;
|
|
@@ -12,12 +18,22 @@ export declare const inboxDescriptor: QueryProcedureDescriptor<"notifications.in
|
|
|
12
18
|
limit: Schema.optional<typeof Schema.Number>;
|
|
13
19
|
}>, Schema.Array$<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, typeof Schema.Never>;
|
|
14
20
|
|
|
21
|
+
export declare const markAllReadDescriptor: MutationProcedureDescriptor<"notifications.markAllRead", Schema.Struct<{}>, Schema.Struct<{
|
|
22
|
+
count: typeof Schema.Number;
|
|
23
|
+
}>, typeof Schema.Never>;
|
|
24
|
+
|
|
15
25
|
export declare const markReadDescriptor: MutationProcedureDescriptor<"notifications.markRead", Schema.Struct<{
|
|
16
26
|
id: typeof Schema.String;
|
|
17
27
|
}>, Schema.Struct<{
|
|
18
28
|
ok: typeof Schema.Boolean;
|
|
19
29
|
}>, typeof Schema.Never>;
|
|
20
30
|
|
|
31
|
+
export declare const markUnreadDescriptor: MutationProcedureDescriptor<"notifications.markUnread", Schema.Struct<{
|
|
32
|
+
id: typeof Schema.String;
|
|
33
|
+
}>, Schema.Struct<{
|
|
34
|
+
ok: typeof Schema.Boolean;
|
|
35
|
+
}>, typeof Schema.Never>;
|
|
36
|
+
|
|
21
37
|
/** Declared for the codegen (`VoltroPlugin.rpcClientDescriptors`) so each tag is
|
|
22
38
|
* emitted into the generated client group. Kept in lockstep with the exports. */
|
|
23
39
|
export declare const notificationsRpcClientImports: ReadonlyArray<PluginRpcClientDescriptor>;
|
|
@@ -47,6 +63,12 @@ export declare const subscribeDescriptor: MutationProcedureDescriptor<"notificat
|
|
|
47
63
|
ok: typeof Schema.Boolean;
|
|
48
64
|
}>, typeof Schema.Never>;
|
|
49
65
|
|
|
66
|
+
export declare const unarchiveDescriptor: MutationProcedureDescriptor<"notifications.unarchive", Schema.Struct<{
|
|
67
|
+
id: typeof Schema.String;
|
|
68
|
+
}>, Schema.Struct<{
|
|
69
|
+
ok: typeof Schema.Boolean;
|
|
70
|
+
}>, typeof Schema.Never>;
|
|
71
|
+
|
|
50
72
|
export declare const unreadCountDescriptor: QueryProcedureDescriptor<"notifications.unreadCount", Schema.Struct<{}>, Schema.Struct<{
|
|
51
73
|
count: typeof Schema.Number;
|
|
52
74
|
}>, typeof Schema.Never>;
|
package/dist/rpc.js
CHANGED
|
@@ -19,14 +19,30 @@ var r = n({
|
|
|
19
19
|
name: "notifications.markRead",
|
|
20
20
|
input: e.Struct({ id: e.String }),
|
|
21
21
|
output: e.Struct({ ok: e.Boolean })
|
|
22
|
-
}), o =
|
|
22
|
+
}), o = t({
|
|
23
|
+
name: "notifications.markUnread",
|
|
24
|
+
input: e.Struct({ id: e.String }),
|
|
25
|
+
output: e.Struct({ ok: e.Boolean })
|
|
26
|
+
}), s = t({
|
|
27
|
+
name: "notifications.markAllRead",
|
|
28
|
+
input: e.Struct({}),
|
|
29
|
+
output: e.Struct({ count: e.Number })
|
|
30
|
+
}), c = t({
|
|
31
|
+
name: "notifications.archive",
|
|
32
|
+
input: e.Struct({ id: e.String }),
|
|
33
|
+
output: e.Struct({ ok: e.Boolean })
|
|
34
|
+
}), l = t({
|
|
35
|
+
name: "notifications.unarchive",
|
|
36
|
+
input: e.Struct({ id: e.String }),
|
|
37
|
+
output: e.Struct({ ok: e.Boolean })
|
|
38
|
+
}), u = n({
|
|
23
39
|
name: "notifications.preferences",
|
|
24
40
|
input: e.Struct({}),
|
|
25
41
|
output: e.Array(e.Record({
|
|
26
42
|
key: e.String,
|
|
27
43
|
value: e.Unknown
|
|
28
44
|
}))
|
|
29
|
-
}),
|
|
45
|
+
}), d = t({
|
|
30
46
|
name: "notifications.setPreference",
|
|
31
47
|
input: e.Struct({
|
|
32
48
|
category: e.String,
|
|
@@ -34,15 +50,15 @@ var r = n({
|
|
|
34
50
|
enabled: e.Boolean
|
|
35
51
|
}),
|
|
36
52
|
output: e.Struct({ ok: e.Boolean })
|
|
37
|
-
}),
|
|
53
|
+
}), f = t({
|
|
38
54
|
name: "notifications.subscribe",
|
|
39
55
|
input: e.Struct({ topic: e.String }),
|
|
40
56
|
output: e.Struct({ ok: e.Boolean })
|
|
41
|
-
}),
|
|
57
|
+
}), p = t({
|
|
42
58
|
name: "notifications.unsubscribe",
|
|
43
59
|
input: e.Struct({ topic: e.String }),
|
|
44
60
|
output: e.Struct({ ok: e.Boolean })
|
|
45
|
-
}),
|
|
61
|
+
}), m = t({
|
|
46
62
|
name: "notifications.setQuietHours",
|
|
47
63
|
input: e.Struct({
|
|
48
64
|
startMinute: e.Number,
|
|
@@ -51,11 +67,11 @@ var r = n({
|
|
|
51
67
|
policy: e.optional(e.Literal("hold", "drop"))
|
|
52
68
|
}),
|
|
53
69
|
output: e.Struct({ ok: e.Boolean })
|
|
54
|
-
}),
|
|
70
|
+
}), h = t({
|
|
55
71
|
name: "notifications.clearQuietHours",
|
|
56
72
|
input: e.Struct({}),
|
|
57
73
|
output: e.Struct({ ok: e.Boolean })
|
|
58
|
-
}),
|
|
74
|
+
}), g = [
|
|
59
75
|
{
|
|
60
76
|
tag: "notifications.inbox",
|
|
61
77
|
kind: "query",
|
|
@@ -130,4 +146,4 @@ var r = n({
|
|
|
130
146
|
}
|
|
131
147
|
];
|
|
132
148
|
//#endregion
|
|
133
|
-
export {
|
|
149
|
+
export { c as archiveDescriptor, h as clearQuietHoursDescriptor, r as inboxDescriptor, s as markAllReadDescriptor, a as markReadDescriptor, o as markUnreadDescriptor, g as notificationsRpcClientImports, u as preferencesDescriptor, d as setPreferenceDescriptor, m as setQuietHoursDescriptor, f as subscribeDescriptor, l as unarchiveDescriptor, i as unreadCountDescriptor, p as unsubscribeDescriptor };
|
package/dist/web.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ declare interface InboxItem {
|
|
|
7
7
|
readonly body: string;
|
|
8
8
|
readonly data: Record<string, unknown>;
|
|
9
9
|
readonly readAt: string | null;
|
|
10
|
+
/** When the user cleared it out of the inbox. A different state from read. */
|
|
11
|
+
readonly archivedAt: string | null;
|
|
10
12
|
readonly createdAt: string;
|
|
11
13
|
readonly tenantId: string | null;
|
|
12
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/plugin-notifications",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "One unified notification surface — email, Slack/webhook, SMS, push, in-app — with per-subject preference routing, an in-app inbox, and a delivery log. NotificationService + typed routes + useInbox/useUnreadCount hooks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"node": ">=24.0.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@voltro/client": "0.
|
|
46
|
-
"@voltro/database": "0.
|
|
47
|
-
"@voltro/protocol": "0.
|
|
45
|
+
"@voltro/client": "0.26.0",
|
|
46
|
+
"@voltro/database": "0.26.0",
|
|
47
|
+
"@voltro/protocol": "0.26.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"effect": "^3.22.0"
|