hazo_notify 5.0.0 → 5.0.1
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.
|
@@ -3,9 +3,9 @@ import type { UpsertInboxRowInput, UpsertInboxRowResult, UpsertDeliveryInput, Up
|
|
|
3
3
|
* Upsert an inbox row using a claim-first strategy:
|
|
4
4
|
*
|
|
5
5
|
* 1. Try to increment an existing open batch that matches `batch_key` and
|
|
6
|
-
* `batch_closed_at`. This preserves the increment-on-conflict
|
|
7
|
-
* the original Postgres
|
|
8
|
-
* partial-index upsert.
|
|
6
|
+
* `batch_closed_at IS NULL`. This preserves the increment-on-conflict
|
|
7
|
+
* semantics of the original Postgres
|
|
8
|
+
* `ON CONFLICT (batch_key) WHERE batch_closed_at IS NULL` partial-index upsert.
|
|
9
9
|
* 2. If no open batch found, insert a fresh row.
|
|
10
10
|
*
|
|
11
11
|
* Race-condition trade-off: if two workers concurrently find no open batch and
|
|
@@ -13,12 +13,6 @@ import type { UpsertInboxRowInput, UpsertInboxRowResult, UpsertDeliveryInput, Up
|
|
|
13
13
|
* The original Postgres SQL used a partial unique index for true atomicity.
|
|
14
14
|
* For Hazodocs (single-worker), this race window is acceptable; adding retry
|
|
15
15
|
* logic would require error-code parsing not available in hazo_connect.
|
|
16
|
-
*
|
|
17
|
-
* SQLite NULL caveat: the clause-builder emits `col = ?` which SQLite's `=`
|
|
18
|
-
* operator does not use to match NULL (needs IS NULL). In production (Postgres),
|
|
19
|
-
* the behaviour is correct because Postgres's `=` also doesn't match NULL — the
|
|
20
|
-
* partial index `WHERE batch_closed_at IS NULL` handles the constraint there.
|
|
21
|
-
* In SQLite-backed tests use empty string instead of null for batch_closed_at.
|
|
22
16
|
*/
|
|
23
17
|
export declare function upsertInboxRow(i: UpsertInboxRowInput): Promise<UpsertInboxRowResult>;
|
|
24
18
|
/**
|
|
@@ -59,15 +53,9 @@ export declare function rescheduleDelivery(id: string, flush_after: string, erro
|
|
|
59
53
|
/**
|
|
60
54
|
* Task 2.10 — closeStaleBatches via adapter.claimRows
|
|
61
55
|
*
|
|
62
|
-
* Closes inbox rows whose batch_closed_at is
|
|
56
|
+
* Closes inbox rows whose batch_closed_at is NULL (open) and whose
|
|
63
57
|
* created_at is older than (now - window_ms).
|
|
64
58
|
*
|
|
65
|
-
* NULL caveat: SQLite's claimRows WHERE emits `col = ?` which does not match
|
|
66
|
-
* SQL NULL. Empty string '' is used as the sentinel for "open batch" in both
|
|
67
|
-
* SQLite tests and production (see upsertInboxRow). In production (Postgres),
|
|
68
|
-
* rows inserted via this adapter path use '' not NULL, so the '' sentinel is
|
|
69
|
-
* consistent end-to-end.
|
|
70
|
-
*
|
|
71
59
|
* Returns the number of batches closed.
|
|
72
60
|
*/
|
|
73
61
|
export declare function closeStaleBatches(window_ms: number): Promise<number>;
|
|
@@ -115,28 +103,19 @@ export declare function listUnreadForUser(user_id: string, scope_id: string, opt
|
|
|
115
103
|
*/
|
|
116
104
|
export declare function unreadCount(user_id: string, scope_id: string): Promise<number>;
|
|
117
105
|
/**
|
|
118
|
-
* Task 2.13a — markRead via claimRows
|
|
106
|
+
* Task 2.13a — markRead via claimRows
|
|
119
107
|
*
|
|
120
108
|
* Sets read_at = now() for the given inbox row, scoped by user_id to prevent
|
|
121
|
-
* cross-user reads.
|
|
122
|
-
*
|
|
123
|
-
* Idempotency trade-off: the `read_at: null` condition is omitted from the
|
|
124
|
-
* claimRows WHERE because the clause-builder emits `col = ?` which SQLite's
|
|
125
|
-
* `=` operator does not use to match NULL. Dropping the condition makes the
|
|
126
|
-
* operation idempotent — re-marking an already-read row re-sets read_at = now(),
|
|
127
|
-
* which is harmless for UI-driven calls.
|
|
109
|
+
* cross-user reads. Only updates unread rows. Returns true iff a row was
|
|
110
|
+
* actually marked read by this call.
|
|
128
111
|
*/
|
|
129
112
|
export declare function markRead(id: string, user_id: string): Promise<boolean>;
|
|
130
113
|
/**
|
|
131
|
-
* Task 2.13b — markAllRead via claimRows
|
|
132
|
-
*
|
|
133
|
-
* Sets read_at = now() for every inbox row belonging to the given user/scope.
|
|
134
|
-
*
|
|
135
|
-
* Idempotency trade-off: same as markRead — the `read_at: null` condition is
|
|
136
|
-
* omitted to avoid the SQLite NULL-matching issue. Already-read rows will have
|
|
137
|
-
* their read_at re-stamped, which is acceptable for bulk UI acknowledgment.
|
|
114
|
+
* Task 2.13b — markAllRead via claimRows
|
|
138
115
|
*
|
|
139
|
-
*
|
|
116
|
+
* Sets read_at = now() for every unread inbox row belonging to the given
|
|
117
|
+
* user/scope. Only updates unread rows. Returns the number of rows actually
|
|
118
|
+
* marked read by this call (already-read rows are not touched).
|
|
140
119
|
*/
|
|
141
120
|
export declare function markAllRead(user_id: string, scope_id: string): Promise<number>;
|
|
142
121
|
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/lib/inbox/storage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,QAAQ,EACT,MAAM,YAAY,CAAC;AAEpB
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/lib/inbox/storage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,QAAQ,EACT,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA0C1F;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA2C1F;AAED,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,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AAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAU5E;AAED;;;;;;GAMG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAUpF"}
|
|
@@ -4,9 +4,9 @@ import { getInboxConnection } from "./connection.js";
|
|
|
4
4
|
* Upsert an inbox row using a claim-first strategy:
|
|
5
5
|
*
|
|
6
6
|
* 1. Try to increment an existing open batch that matches `batch_key` and
|
|
7
|
-
* `batch_closed_at`. This preserves the increment-on-conflict
|
|
8
|
-
* the original Postgres
|
|
9
|
-
* partial-index upsert.
|
|
7
|
+
* `batch_closed_at IS NULL`. This preserves the increment-on-conflict
|
|
8
|
+
* semantics of the original Postgres
|
|
9
|
+
* `ON CONFLICT (batch_key) WHERE batch_closed_at IS NULL` partial-index upsert.
|
|
10
10
|
* 2. If no open batch found, insert a fresh row.
|
|
11
11
|
*
|
|
12
12
|
* Race-condition trade-off: if two workers concurrently find no open batch and
|
|
@@ -14,19 +14,13 @@ import { getInboxConnection } from "./connection.js";
|
|
|
14
14
|
* The original Postgres SQL used a partial unique index for true atomicity.
|
|
15
15
|
* For Hazodocs (single-worker), this race window is acceptable; adding retry
|
|
16
16
|
* logic would require error-code parsing not available in hazo_connect.
|
|
17
|
-
*
|
|
18
|
-
* SQLite NULL caveat: the clause-builder emits `col = ?` which SQLite's `=`
|
|
19
|
-
* operator does not use to match NULL (needs IS NULL). In production (Postgres),
|
|
20
|
-
* the behaviour is correct because Postgres's `=` also doesn't match NULL — the
|
|
21
|
-
* partial index `WHERE batch_closed_at IS NULL` handles the constraint there.
|
|
22
|
-
* In SQLite-backed tests use empty string instead of null for batch_closed_at.
|
|
23
17
|
*/
|
|
24
18
|
export async function upsertInboxRow(i) {
|
|
25
19
|
const adapter = getInboxConnection();
|
|
26
20
|
// Try to increment an existing open batch first.
|
|
27
21
|
const claimed = await adapter.claimRows({
|
|
28
22
|
table: "hazo_notify_inbox",
|
|
29
|
-
where: { batch_key: i.batch_key, batch_closed_at:
|
|
23
|
+
where: { batch_key: i.batch_key, batch_closed_at: null },
|
|
30
24
|
set: {
|
|
31
25
|
aggregate_count: { increment: 1 },
|
|
32
26
|
in_app_text: i.in_app_text,
|
|
@@ -198,15 +192,9 @@ export async function rescheduleDelivery(id, flush_after, error) {
|
|
|
198
192
|
/**
|
|
199
193
|
* Task 2.10 — closeStaleBatches via adapter.claimRows
|
|
200
194
|
*
|
|
201
|
-
* Closes inbox rows whose batch_closed_at is
|
|
195
|
+
* Closes inbox rows whose batch_closed_at is NULL (open) and whose
|
|
202
196
|
* created_at is older than (now - window_ms).
|
|
203
197
|
*
|
|
204
|
-
* NULL caveat: SQLite's claimRows WHERE emits `col = ?` which does not match
|
|
205
|
-
* SQL NULL. Empty string '' is used as the sentinel for "open batch" in both
|
|
206
|
-
* SQLite tests and production (see upsertInboxRow). In production (Postgres),
|
|
207
|
-
* rows inserted via this adapter path use '' not NULL, so the '' sentinel is
|
|
208
|
-
* consistent end-to-end.
|
|
209
|
-
*
|
|
210
198
|
* Returns the number of batches closed.
|
|
211
199
|
*/
|
|
212
200
|
export async function closeStaleBatches(window_ms) {
|
|
@@ -214,7 +202,7 @@ export async function closeStaleBatches(window_ms) {
|
|
|
214
202
|
const cutoff = new Date(Date.now() - window_ms).toISOString();
|
|
215
203
|
const rows = await adapter.claimRows({
|
|
216
204
|
table: "hazo_notify_inbox",
|
|
217
|
-
where: { batch_closed_at:
|
|
205
|
+
where: { batch_closed_at: null, created_at: { lte: cutoff } },
|
|
218
206
|
set: { batch_closed_at: { $now: true } },
|
|
219
207
|
returning: ["id"],
|
|
220
208
|
limit: 10000,
|
|
@@ -298,22 +286,17 @@ export async function unreadCount(user_id, scope_id) {
|
|
|
298
286
|
return rows.length;
|
|
299
287
|
}
|
|
300
288
|
/**
|
|
301
|
-
* Task 2.13a — markRead via claimRows
|
|
289
|
+
* Task 2.13a — markRead via claimRows
|
|
302
290
|
*
|
|
303
291
|
* Sets read_at = now() for the given inbox row, scoped by user_id to prevent
|
|
304
|
-
* cross-user reads.
|
|
305
|
-
*
|
|
306
|
-
* Idempotency trade-off: the `read_at: null` condition is omitted from the
|
|
307
|
-
* claimRows WHERE because the clause-builder emits `col = ?` which SQLite's
|
|
308
|
-
* `=` operator does not use to match NULL. Dropping the condition makes the
|
|
309
|
-
* operation idempotent — re-marking an already-read row re-sets read_at = now(),
|
|
310
|
-
* which is harmless for UI-driven calls.
|
|
292
|
+
* cross-user reads. Only updates unread rows. Returns true iff a row was
|
|
293
|
+
* actually marked read by this call.
|
|
311
294
|
*/
|
|
312
295
|
export async function markRead(id, user_id) {
|
|
313
296
|
const adapter = getInboxConnection();
|
|
314
297
|
const rows = await adapter.claimRows({
|
|
315
298
|
table: "hazo_notify_inbox",
|
|
316
|
-
where: { id, user_id },
|
|
299
|
+
where: { id, user_id, read_at: null },
|
|
317
300
|
set: { read_at: { $now: true } },
|
|
318
301
|
returning: ["id"],
|
|
319
302
|
limit: 1,
|
|
@@ -321,21 +304,17 @@ export async function markRead(id, user_id) {
|
|
|
321
304
|
return rows.length > 0;
|
|
322
305
|
}
|
|
323
306
|
/**
|
|
324
|
-
* Task 2.13b — markAllRead via claimRows
|
|
325
|
-
*
|
|
326
|
-
* Sets read_at = now() for every inbox row belonging to the given user/scope.
|
|
327
|
-
*
|
|
328
|
-
* Idempotency trade-off: same as markRead — the `read_at: null` condition is
|
|
329
|
-
* omitted to avoid the SQLite NULL-matching issue. Already-read rows will have
|
|
330
|
-
* their read_at re-stamped, which is acceptable for bulk UI acknowledgment.
|
|
307
|
+
* Task 2.13b — markAllRead via claimRows
|
|
331
308
|
*
|
|
332
|
-
*
|
|
309
|
+
* Sets read_at = now() for every unread inbox row belonging to the given
|
|
310
|
+
* user/scope. Only updates unread rows. Returns the number of rows actually
|
|
311
|
+
* marked read by this call (already-read rows are not touched).
|
|
333
312
|
*/
|
|
334
313
|
export async function markAllRead(user_id, scope_id) {
|
|
335
314
|
const adapter = getInboxConnection();
|
|
336
315
|
const rows = await adapter.claimRows({
|
|
337
316
|
table: "hazo_notify_inbox",
|
|
338
|
-
where: { user_id, scope_id },
|
|
317
|
+
where: { user_id, scope_id, read_at: null },
|
|
339
318
|
set: { read_at: { $now: true } },
|
|
340
319
|
returning: ["id"],
|
|
341
320
|
limit: 10000,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/lib/inbox/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAUrD
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/lib/inbox/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAUrD;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,CAAsB;IACzD,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,iDAAiD;IACjD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,SAAS,CAAiB;QACtD,KAAK,EAAE,mBAAmB;QAC1B,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE;QACxD,GAAG,EAAE;YACH,eAAe,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE;YACjC,WAAW,EAAE,CAAC,CAAC,WAAW;YAC1B,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC;YAClC,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;SAC3B;QACD,SAAS,EAAE,CAAC,IAAI,CAAC;Q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kB,EAAE,CAAC;IACrC,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,SAAS,CAAiB;QACnD,KAAK,EAAE,mBAAmB;QAC1B,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;QACrC,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAChC,SAAS,EAAE,CAAC,IAAI,CAAC;QACjB,KAAK,EAAE,CAAC;KACT,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;AACzB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAAe,EAAE,QAAgB;IACjE,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IACrC,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,SAAS,CAAiB;QACnD,KAAK,EAAE,mBAAmB;QAC1B,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE;QAC3C,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAChC,SAAS,EAAE,CAAC,IAAI,CAAC;QACjB,KAAK,EAAE,KAAM;KACd,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hazo_notify",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Email notification system with scope-aware template management",
|
|
6
6
|
"main": "./dist/lib/index.js",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"tailwind-merge": "^3.5.0"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
|
-
"hazo_connect": "^2.7.
|
|
121
|
+
"hazo_connect": "^2.7.1",
|
|
122
122
|
"hazo_jobs": "^0.7.0",
|
|
123
123
|
"hazo_logs": "^1.0.13",
|
|
124
124
|
"hazo_ui": "^2.8.0"
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"clsx": "^2.1.1",
|
|
191
191
|
"cmdk": "^1.1.1",
|
|
192
192
|
"hazo_auth": "^5.2.0",
|
|
193
|
-
"hazo_connect": "^2.7.
|
|
193
|
+
"hazo_connect": "^2.7.1",
|
|
194
194
|
"hazo_ui": "^2.8.0",
|
|
195
195
|
"jest": "^30.2.0",
|
|
196
196
|
"jest-environment-jsdom": "^30.4.1",
|