@checkstack/notification-backend 1.0.5 → 1.2.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.
@@ -0,0 +1,644 @@
1
+ {
2
+ "id": "d7d29b2a-044a-4d64-b9db-59211ca849f9",
3
+ "prevId": "87836133-99ce-41ef-a9b4-ce3051eaeb89",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.notification_delivery_attempts": {
8
+ "name": "notification_delivery_attempts",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "notification_id": {
19
+ "name": "notification_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "strategy_qualified_id": {
25
+ "name": "strategy_qualified_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "attempted_at": {
31
+ "name": "attempted_at",
32
+ "type": "timestamp",
33
+ "primaryKey": false,
34
+ "notNull": true,
35
+ "default": "now()"
36
+ },
37
+ "status": {
38
+ "name": "status",
39
+ "type": "notification_delivery_status",
40
+ "typeSchema": "public",
41
+ "primaryKey": false,
42
+ "notNull": true
43
+ },
44
+ "error_message": {
45
+ "name": "error_message",
46
+ "type": "text",
47
+ "primaryKey": false,
48
+ "notNull": false
49
+ },
50
+ "duration_ms": {
51
+ "name": "duration_ms",
52
+ "type": "integer",
53
+ "primaryKey": false,
54
+ "notNull": true
55
+ }
56
+ },
57
+ "indexes": {
58
+ "notification_delivery_attempts_notification_idx": {
59
+ "name": "notification_delivery_attempts_notification_idx",
60
+ "columns": [
61
+ {
62
+ "expression": "notification_id",
63
+ "isExpression": false,
64
+ "asc": true,
65
+ "nulls": "last"
66
+ }
67
+ ],
68
+ "isUnique": false,
69
+ "concurrently": false,
70
+ "method": "btree",
71
+ "with": {}
72
+ },
73
+ "notification_delivery_attempts_attempted_at_idx": {
74
+ "name": "notification_delivery_attempts_attempted_at_idx",
75
+ "columns": [
76
+ {
77
+ "expression": "attempted_at",
78
+ "isExpression": false,
79
+ "asc": true,
80
+ "nulls": "last"
81
+ }
82
+ ],
83
+ "isUnique": false,
84
+ "concurrently": false,
85
+ "method": "btree",
86
+ "with": {}
87
+ }
88
+ },
89
+ "foreignKeys": {
90
+ "notification_delivery_attempts_notification_id_notifications_id_fk": {
91
+ "name": "notification_delivery_attempts_notification_id_notifications_id_fk",
92
+ "tableFrom": "notification_delivery_attempts",
93
+ "tableTo": "notifications",
94
+ "columnsFrom": [
95
+ "notification_id"
96
+ ],
97
+ "columnsTo": [
98
+ "id"
99
+ ],
100
+ "onDelete": "cascade",
101
+ "onUpdate": "no action"
102
+ }
103
+ },
104
+ "compositePrimaryKeys": {},
105
+ "uniqueConstraints": {},
106
+ "policies": {},
107
+ "checkConstraints": {},
108
+ "isRLSEnabled": false
109
+ },
110
+ "public.notification_groups": {
111
+ "name": "notification_groups",
112
+ "schema": "",
113
+ "columns": {
114
+ "id": {
115
+ "name": "id",
116
+ "type": "text",
117
+ "primaryKey": true,
118
+ "notNull": true
119
+ },
120
+ "name": {
121
+ "name": "name",
122
+ "type": "text",
123
+ "primaryKey": false,
124
+ "notNull": true
125
+ },
126
+ "description": {
127
+ "name": "description",
128
+ "type": "text",
129
+ "primaryKey": false,
130
+ "notNull": true
131
+ },
132
+ "owner_plugin": {
133
+ "name": "owner_plugin",
134
+ "type": "text",
135
+ "primaryKey": false,
136
+ "notNull": true
137
+ },
138
+ "created_at": {
139
+ "name": "created_at",
140
+ "type": "timestamp",
141
+ "primaryKey": false,
142
+ "notNull": true,
143
+ "default": "now()"
144
+ }
145
+ },
146
+ "indexes": {},
147
+ "foreignKeys": {},
148
+ "compositePrimaryKeys": {},
149
+ "uniqueConstraints": {},
150
+ "policies": {},
151
+ "checkConstraints": {},
152
+ "isRLSEnabled": false
153
+ },
154
+ "public.notification_resource_parents": {
155
+ "name": "notification_resource_parents",
156
+ "schema": "",
157
+ "columns": {
158
+ "child_target_type_id": {
159
+ "name": "child_target_type_id",
160
+ "type": "text",
161
+ "primaryKey": false,
162
+ "notNull": true
163
+ },
164
+ "child_resource_key": {
165
+ "name": "child_resource_key",
166
+ "type": "text",
167
+ "primaryKey": false,
168
+ "notNull": true
169
+ },
170
+ "parent_target_type_id": {
171
+ "name": "parent_target_type_id",
172
+ "type": "text",
173
+ "primaryKey": false,
174
+ "notNull": true
175
+ },
176
+ "parent_resource_key": {
177
+ "name": "parent_resource_key",
178
+ "type": "text",
179
+ "primaryKey": false,
180
+ "notNull": true
181
+ }
182
+ },
183
+ "indexes": {
184
+ "notification_resource_parents_child_idx": {
185
+ "name": "notification_resource_parents_child_idx",
186
+ "columns": [
187
+ {
188
+ "expression": "child_target_type_id",
189
+ "isExpression": false,
190
+ "asc": true,
191
+ "nulls": "last"
192
+ },
193
+ {
194
+ "expression": "child_resource_key",
195
+ "isExpression": false,
196
+ "asc": true,
197
+ "nulls": "last"
198
+ }
199
+ ],
200
+ "isUnique": false,
201
+ "concurrently": false,
202
+ "method": "btree",
203
+ "with": {}
204
+ }
205
+ },
206
+ "foreignKeys": {},
207
+ "compositePrimaryKeys": {
208
+ "notification_resource_parents_child_target_type_id_child_resource_key_parent_target_type_id_parent_resource_key_pk": {
209
+ "name": "notification_resource_parents_child_target_type_id_child_resource_key_parent_target_type_id_parent_resource_key_pk",
210
+ "columns": [
211
+ "child_target_type_id",
212
+ "child_resource_key",
213
+ "parent_target_type_id",
214
+ "parent_resource_key"
215
+ ]
216
+ }
217
+ },
218
+ "uniqueConstraints": {},
219
+ "policies": {},
220
+ "checkConstraints": {},
221
+ "isRLSEnabled": false
222
+ },
223
+ "public.notification_resources": {
224
+ "name": "notification_resources",
225
+ "schema": "",
226
+ "columns": {
227
+ "target_type_id": {
228
+ "name": "target_type_id",
229
+ "type": "text",
230
+ "primaryKey": false,
231
+ "notNull": true
232
+ },
233
+ "resource_key": {
234
+ "name": "resource_key",
235
+ "type": "text",
236
+ "primaryKey": false,
237
+ "notNull": true
238
+ },
239
+ "display_label": {
240
+ "name": "display_label",
241
+ "type": "text",
242
+ "primaryKey": false,
243
+ "notNull": true
244
+ },
245
+ "upserted_at": {
246
+ "name": "upserted_at",
247
+ "type": "timestamp",
248
+ "primaryKey": false,
249
+ "notNull": true,
250
+ "default": "now()"
251
+ }
252
+ },
253
+ "indexes": {},
254
+ "foreignKeys": {
255
+ "notification_resources_target_type_id_notification_targets_target_type_id_fk": {
256
+ "name": "notification_resources_target_type_id_notification_targets_target_type_id_fk",
257
+ "tableFrom": "notification_resources",
258
+ "tableTo": "notification_targets",
259
+ "columnsFrom": [
260
+ "target_type_id"
261
+ ],
262
+ "columnsTo": [
263
+ "target_type_id"
264
+ ],
265
+ "onDelete": "cascade",
266
+ "onUpdate": "no action"
267
+ }
268
+ },
269
+ "compositePrimaryKeys": {
270
+ "notification_resources_target_type_id_resource_key_pk": {
271
+ "name": "notification_resources_target_type_id_resource_key_pk",
272
+ "columns": [
273
+ "target_type_id",
274
+ "resource_key"
275
+ ]
276
+ }
277
+ },
278
+ "uniqueConstraints": {},
279
+ "policies": {},
280
+ "checkConstraints": {},
281
+ "isRLSEnabled": false
282
+ },
283
+ "public.notification_subscriptions": {
284
+ "name": "notification_subscriptions",
285
+ "schema": "",
286
+ "columns": {
287
+ "user_id": {
288
+ "name": "user_id",
289
+ "type": "text",
290
+ "primaryKey": false,
291
+ "notNull": true
292
+ },
293
+ "group_id": {
294
+ "name": "group_id",
295
+ "type": "text",
296
+ "primaryKey": false,
297
+ "notNull": true
298
+ },
299
+ "subscribed_at": {
300
+ "name": "subscribed_at",
301
+ "type": "timestamp",
302
+ "primaryKey": false,
303
+ "notNull": true,
304
+ "default": "now()"
305
+ }
306
+ },
307
+ "indexes": {},
308
+ "foreignKeys": {
309
+ "notification_subscriptions_group_id_notification_groups_id_fk": {
310
+ "name": "notification_subscriptions_group_id_notification_groups_id_fk",
311
+ "tableFrom": "notification_subscriptions",
312
+ "tableTo": "notification_groups",
313
+ "columnsFrom": [
314
+ "group_id"
315
+ ],
316
+ "columnsTo": [
317
+ "id"
318
+ ],
319
+ "onDelete": "cascade",
320
+ "onUpdate": "no action"
321
+ }
322
+ },
323
+ "compositePrimaryKeys": {
324
+ "notification_subscriptions_user_id_group_id_pk": {
325
+ "name": "notification_subscriptions_user_id_group_id_pk",
326
+ "columns": [
327
+ "user_id",
328
+ "group_id"
329
+ ]
330
+ }
331
+ },
332
+ "uniqueConstraints": {},
333
+ "policies": {},
334
+ "checkConstraints": {},
335
+ "isRLSEnabled": false
336
+ },
337
+ "public.notification_targets": {
338
+ "name": "notification_targets",
339
+ "schema": "",
340
+ "columns": {
341
+ "target_type_id": {
342
+ "name": "target_type_id",
343
+ "type": "text",
344
+ "primaryKey": true,
345
+ "notNull": true
346
+ },
347
+ "owner_plugin": {
348
+ "name": "owner_plugin",
349
+ "type": "text",
350
+ "primaryKey": false,
351
+ "notNull": true
352
+ },
353
+ "resource_kind": {
354
+ "name": "resource_kind",
355
+ "type": "text",
356
+ "primaryKey": false,
357
+ "notNull": true
358
+ },
359
+ "parent_target_type_id": {
360
+ "name": "parent_target_type_id",
361
+ "type": "text",
362
+ "primaryKey": false,
363
+ "notNull": false
364
+ },
365
+ "legacy_group_id_template": {
366
+ "name": "legacy_group_id_template",
367
+ "type": "text",
368
+ "primaryKey": false,
369
+ "notNull": false
370
+ },
371
+ "registered_at": {
372
+ "name": "registered_at",
373
+ "type": "timestamp",
374
+ "primaryKey": false,
375
+ "notNull": true,
376
+ "default": "now()"
377
+ }
378
+ },
379
+ "indexes": {},
380
+ "foreignKeys": {},
381
+ "compositePrimaryKeys": {},
382
+ "uniqueConstraints": {},
383
+ "policies": {},
384
+ "checkConstraints": {},
385
+ "isRLSEnabled": false
386
+ },
387
+ "public.notifications": {
388
+ "name": "notifications",
389
+ "schema": "",
390
+ "columns": {
391
+ "id": {
392
+ "name": "id",
393
+ "type": "uuid",
394
+ "primaryKey": true,
395
+ "notNull": true,
396
+ "default": "gen_random_uuid()"
397
+ },
398
+ "user_id": {
399
+ "name": "user_id",
400
+ "type": "text",
401
+ "primaryKey": false,
402
+ "notNull": true
403
+ },
404
+ "title": {
405
+ "name": "title",
406
+ "type": "text",
407
+ "primaryKey": false,
408
+ "notNull": true
409
+ },
410
+ "body": {
411
+ "name": "body",
412
+ "type": "text",
413
+ "primaryKey": false,
414
+ "notNull": true
415
+ },
416
+ "action": {
417
+ "name": "action",
418
+ "type": "jsonb",
419
+ "primaryKey": false,
420
+ "notNull": false
421
+ },
422
+ "importance": {
423
+ "name": "importance",
424
+ "type": "text",
425
+ "primaryKey": false,
426
+ "notNull": true,
427
+ "default": "'info'"
428
+ },
429
+ "is_read": {
430
+ "name": "is_read",
431
+ "type": "boolean",
432
+ "primaryKey": false,
433
+ "notNull": true,
434
+ "default": false
435
+ },
436
+ "group_id": {
437
+ "name": "group_id",
438
+ "type": "text",
439
+ "primaryKey": false,
440
+ "notNull": false
441
+ },
442
+ "subjects": {
443
+ "name": "subjects",
444
+ "type": "jsonb",
445
+ "primaryKey": false,
446
+ "notNull": false
447
+ },
448
+ "created_at": {
449
+ "name": "created_at",
450
+ "type": "timestamp",
451
+ "primaryKey": false,
452
+ "notNull": true,
453
+ "default": "now()"
454
+ }
455
+ },
456
+ "indexes": {
457
+ "notifications_user_collapse_idx": {
458
+ "name": "notifications_user_collapse_idx",
459
+ "columns": [
460
+ {
461
+ "expression": "user_id",
462
+ "isExpression": false,
463
+ "asc": true,
464
+ "nulls": "last"
465
+ },
466
+ {
467
+ "expression": "group_id",
468
+ "isExpression": false,
469
+ "asc": true,
470
+ "nulls": "last"
471
+ }
472
+ ],
473
+ "isUnique": false,
474
+ "concurrently": false,
475
+ "method": "btree",
476
+ "with": {}
477
+ },
478
+ "notifications_user_created_idx": {
479
+ "name": "notifications_user_created_idx",
480
+ "columns": [
481
+ {
482
+ "expression": "user_id",
483
+ "isExpression": false,
484
+ "asc": true,
485
+ "nulls": "last"
486
+ },
487
+ {
488
+ "expression": "created_at",
489
+ "isExpression": false,
490
+ "asc": true,
491
+ "nulls": "last"
492
+ }
493
+ ],
494
+ "isUnique": false,
495
+ "concurrently": false,
496
+ "method": "btree",
497
+ "with": {}
498
+ }
499
+ },
500
+ "foreignKeys": {},
501
+ "compositePrimaryKeys": {},
502
+ "uniqueConstraints": {},
503
+ "policies": {},
504
+ "checkConstraints": {},
505
+ "isRLSEnabled": false
506
+ },
507
+ "public.subscription_migrations": {
508
+ "name": "subscription_migrations",
509
+ "schema": "",
510
+ "columns": {
511
+ "spec_id": {
512
+ "name": "spec_id",
513
+ "type": "text",
514
+ "primaryKey": false,
515
+ "notNull": true
516
+ },
517
+ "resource_key": {
518
+ "name": "resource_key",
519
+ "type": "text",
520
+ "primaryKey": false,
521
+ "notNull": true
522
+ },
523
+ "migrated_at": {
524
+ "name": "migrated_at",
525
+ "type": "timestamp",
526
+ "primaryKey": false,
527
+ "notNull": true,
528
+ "default": "now()"
529
+ }
530
+ },
531
+ "indexes": {},
532
+ "foreignKeys": {},
533
+ "compositePrimaryKeys": {
534
+ "subscription_migrations_spec_id_resource_key_pk": {
535
+ "name": "subscription_migrations_spec_id_resource_key_pk",
536
+ "columns": [
537
+ "spec_id",
538
+ "resource_key"
539
+ ]
540
+ }
541
+ },
542
+ "uniqueConstraints": {},
543
+ "policies": {},
544
+ "checkConstraints": {},
545
+ "isRLSEnabled": false
546
+ },
547
+ "public.subscription_specs": {
548
+ "name": "subscription_specs",
549
+ "schema": "",
550
+ "columns": {
551
+ "spec_id": {
552
+ "name": "spec_id",
553
+ "type": "text",
554
+ "primaryKey": true,
555
+ "notNull": true
556
+ },
557
+ "owner_plugin": {
558
+ "name": "owner_plugin",
559
+ "type": "text",
560
+ "primaryKey": false,
561
+ "notNull": true
562
+ },
563
+ "local_id": {
564
+ "name": "local_id",
565
+ "type": "text",
566
+ "primaryKey": false,
567
+ "notNull": true
568
+ },
569
+ "target_type_id": {
570
+ "name": "target_type_id",
571
+ "type": "text",
572
+ "primaryKey": false,
573
+ "notNull": true
574
+ },
575
+ "display_title": {
576
+ "name": "display_title",
577
+ "type": "text",
578
+ "primaryKey": false,
579
+ "notNull": true
580
+ },
581
+ "display_description": {
582
+ "name": "display_description",
583
+ "type": "text",
584
+ "primaryKey": false,
585
+ "notNull": true
586
+ },
587
+ "display_icon_name": {
588
+ "name": "display_icon_name",
589
+ "type": "text",
590
+ "primaryKey": false,
591
+ "notNull": false
592
+ },
593
+ "registered_at": {
594
+ "name": "registered_at",
595
+ "type": "timestamp",
596
+ "primaryKey": false,
597
+ "notNull": true,
598
+ "default": "now()"
599
+ }
600
+ },
601
+ "indexes": {},
602
+ "foreignKeys": {
603
+ "subscription_specs_target_type_id_notification_targets_target_type_id_fk": {
604
+ "name": "subscription_specs_target_type_id_notification_targets_target_type_id_fk",
605
+ "tableFrom": "subscription_specs",
606
+ "tableTo": "notification_targets",
607
+ "columnsFrom": [
608
+ "target_type_id"
609
+ ],
610
+ "columnsTo": [
611
+ "target_type_id"
612
+ ],
613
+ "onDelete": "no action",
614
+ "onUpdate": "no action"
615
+ }
616
+ },
617
+ "compositePrimaryKeys": {},
618
+ "uniqueConstraints": {},
619
+ "policies": {},
620
+ "checkConstraints": {},
621
+ "isRLSEnabled": false
622
+ }
623
+ },
624
+ "enums": {
625
+ "public.notification_delivery_status": {
626
+ "name": "notification_delivery_status",
627
+ "schema": "public",
628
+ "values": [
629
+ "success",
630
+ "failure"
631
+ ]
632
+ }
633
+ },
634
+ "schemas": {},
635
+ "sequences": {},
636
+ "roles": {},
637
+ "policies": {},
638
+ "views": {},
639
+ "_meta": {
640
+ "columns": {},
641
+ "schemas": {},
642
+ "tables": {}
643
+ }
644
+ }
@@ -50,6 +50,13 @@
50
50
  "when": 1777549165507,
51
51
  "tag": "0006_chubby_gladiator",
52
52
  "breakpoints": true
53
+ },
54
+ {
55
+ "idx": 7,
56
+ "version": "7",
57
+ "when": 1779822219628,
58
+ "tag": "0007_funny_hobgoblin",
59
+ "breakpoints": true
53
60
  }
54
61
  ]
55
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/notification-backend",
3
- "version": "1.0.5",
3
+ "version": "1.2.0",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -15,13 +15,13 @@
15
15
  "test": "bun test"
16
16
  },
17
17
  "dependencies": {
18
- "@checkstack/notification-common": "1.1.0",
19
- "@checkstack/backend-api": "0.15.2",
20
- "@checkstack/cache-api": "0.3.1",
21
- "@checkstack/cache-utils": "0.2.6",
18
+ "@checkstack/notification-common": "1.1.1",
19
+ "@checkstack/backend-api": "0.16.0",
20
+ "@checkstack/cache-api": "0.3.3",
21
+ "@checkstack/cache-utils": "0.2.8",
22
22
  "@checkstack/signal-common": "0.2.3",
23
- "@checkstack/queue-api": "0.3.1",
24
- "@checkstack/auth-backend": "0.4.26",
23
+ "@checkstack/queue-api": "0.3.3",
24
+ "@checkstack/auth-backend": "0.4.28",
25
25
  "@checkstack/auth-common": "0.7.0",
26
26
  "drizzle-orm": "^0.45.0",
27
27
  "zod": "^4.2.1",
@@ -32,7 +32,7 @@
32
32
  "@checkstack/drizzle-helper": "0.0.5",
33
33
  "@checkstack/scripts": "0.3.2",
34
34
  "@checkstack/tsconfig": "0.0.7",
35
- "@checkstack/test-utils-backend": "0.1.26",
35
+ "@checkstack/test-utils-backend": "0.1.28",
36
36
  "@types/node": "^20.0.0",
37
37
  "drizzle-kit": "^0.31.10",
38
38
  "typescript": "^5.0.0"