@marktiderman/genesis-notifications 0.4.0 → 0.4.2
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.
|
@@ -203,10 +203,12 @@ update public.notification_preferences set quiet_hours_start = '06:00' where use
|
|
|
203
203
|
select is(private.genesis_notifications_quiet_until(pg_temp.u('c3'), '2026-11-01 10:59+00'), null, 'a start equal to the end is no quiet hours');
|
|
204
204
|
|
|
205
205
|
-- Push during quiet hours waits; a transactional one doesn't ----------------------------
|
|
206
|
-
-- a1 is quiet
|
|
206
|
+
-- a1 is quiet from an hour before now to an hour after, in UTC: a window around the test's own
|
|
207
|
+
-- clock (it may run past midnight, which the claim handles), never a fixed one a clock can be outside.
|
|
207
208
|
insert into public.notification_preferences (user_id, quiet_hours_enabled, quiet_hours_start, quiet_hours_end, time_zone)
|
|
208
|
-
values (pg_temp.u('a1'), true, '
|
|
209
|
-
on conflict (user_id) do update set quiet_hours_enabled = true, quiet_hours_start =
|
|
209
|
+
values (pg_temp.u('a1'), true, ((now() at time zone 'UTC') - interval '1 hour')::time, ((now() at time zone 'UTC') + interval '1 hour')::time, 'UTC')
|
|
210
|
+
on conflict (user_id) do update set quiet_hours_enabled = true, quiet_hours_start = excluded.quiet_hours_start,
|
|
211
|
+
quiet_hours_end = excluded.quiet_hours_end, time_zone = 'UTC';
|
|
210
212
|
insert into k select 'q1', notification_id from public.genesis_notify('gntest.message', jsonb_build_array(pg_temp.u('a1')), '{}', 'push:msg-q');
|
|
211
213
|
insert into k select 'q2', notification_id from public.genesis_notify('gntest.alert', jsonb_build_array(pg_temp.u('a1')), '{}', 'alert-1');
|
|
212
214
|
update public.notification_deliveries set send_after = now() - interval '1 minute' where notification_id in (pg_temp.k('q1'), pg_temp.k('q2'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marktiderman/genesis-notifications",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -93,13 +93,13 @@
|
|
|
93
93
|
"README.md"
|
|
94
94
|
],
|
|
95
95
|
"dependencies": {
|
|
96
|
-
"@marktiderman/genesis-features": "^0.8.
|
|
96
|
+
"@marktiderman/genesis-features": "^0.8.1"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
99
|
"@marktiderman/genesis-core": ">=1.17.0 <3.0.0",
|
|
100
100
|
"@marktiderman/genesis-native": ">=0.2.0 <1.0.0",
|
|
101
101
|
"@marktiderman/genesis-supabase": ">=0.7.0 <1.0.0",
|
|
102
|
-
"@marktiderman/genesis-ui": "^2.
|
|
102
|
+
"@marktiderman/genesis-ui": "^2.29.0",
|
|
103
103
|
"@marktiderman/genesis-ui-native": ">=2.9.0 <4.0.0",
|
|
104
104
|
"@react-email/components": "^1.0.0",
|
|
105
105
|
"@tanstack/react-query": "^5.0.0",
|
|
@@ -133,11 +133,11 @@
|
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
"devDependencies": {
|
|
136
|
-
"@marktiderman/genesis-core": "^2.
|
|
137
|
-
"@marktiderman/genesis-native": "^0.
|
|
138
|
-
"@marktiderman/genesis-supabase": "^0.
|
|
139
|
-
"@marktiderman/genesis-ui": "^2.
|
|
140
|
-
"@marktiderman/genesis-ui-native": "^3.
|
|
136
|
+
"@marktiderman/genesis-core": "^2.8.0",
|
|
137
|
+
"@marktiderman/genesis-native": "^0.7.0",
|
|
138
|
+
"@marktiderman/genesis-supabase": "^0.12.0",
|
|
139
|
+
"@marktiderman/genesis-ui": "^2.29.0",
|
|
140
|
+
"@marktiderman/genesis-ui-native": "^3.5.0",
|
|
141
141
|
"@react-email/components": "1.0.12",
|
|
142
142
|
"@tanstack/react-query": "^5.104.5",
|
|
143
143
|
"@testing-library/react": "^16.3.2",
|
|
@@ -182,7 +182,16 @@
|
|
|
182
182
|
"migrations": [
|
|
183
183
|
{
|
|
184
184
|
"file": "migrations/0001_genesis_notifications.sql",
|
|
185
|
-
"test": "migrations/tests/0001_genesis_notifications.test.sql"
|
|
185
|
+
"test": "migrations/tests/0001_genesis_notifications.test.sql",
|
|
186
|
+
"provides": [
|
|
187
|
+
{
|
|
188
|
+
"package": "@marktiderman/genesis-supabase",
|
|
189
|
+
"file": "migrations/0005_genesis_push.sql",
|
|
190
|
+
"functions": [
|
|
191
|
+
"functions/genesis-push-send"
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
]
|
|
186
195
|
}
|
|
187
196
|
],
|
|
188
197
|
"functions": [
|