@checkstack/notification-backend 0.2.1 → 1.0.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,532 @@
1
+ {
2
+ "id": "87836133-99ce-41ef-a9b4-ce3051eaeb89",
3
+ "prevId": "487b48a4-723f-478c-ab7b-4512c095a7c4",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.notification_groups": {
8
+ "name": "notification_groups",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "name": {
18
+ "name": "name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "description": {
24
+ "name": "description",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "owner_plugin": {
30
+ "name": "owner_plugin",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "created_at": {
36
+ "name": "created_at",
37
+ "type": "timestamp",
38
+ "primaryKey": false,
39
+ "notNull": true,
40
+ "default": "now()"
41
+ }
42
+ },
43
+ "indexes": {},
44
+ "foreignKeys": {},
45
+ "compositePrimaryKeys": {},
46
+ "uniqueConstraints": {},
47
+ "policies": {},
48
+ "checkConstraints": {},
49
+ "isRLSEnabled": false
50
+ },
51
+ "public.notification_resource_parents": {
52
+ "name": "notification_resource_parents",
53
+ "schema": "",
54
+ "columns": {
55
+ "child_target_type_id": {
56
+ "name": "child_target_type_id",
57
+ "type": "text",
58
+ "primaryKey": false,
59
+ "notNull": true
60
+ },
61
+ "child_resource_key": {
62
+ "name": "child_resource_key",
63
+ "type": "text",
64
+ "primaryKey": false,
65
+ "notNull": true
66
+ },
67
+ "parent_target_type_id": {
68
+ "name": "parent_target_type_id",
69
+ "type": "text",
70
+ "primaryKey": false,
71
+ "notNull": true
72
+ },
73
+ "parent_resource_key": {
74
+ "name": "parent_resource_key",
75
+ "type": "text",
76
+ "primaryKey": false,
77
+ "notNull": true
78
+ }
79
+ },
80
+ "indexes": {
81
+ "notification_resource_parents_child_idx": {
82
+ "name": "notification_resource_parents_child_idx",
83
+ "columns": [
84
+ {
85
+ "expression": "child_target_type_id",
86
+ "isExpression": false,
87
+ "asc": true,
88
+ "nulls": "last"
89
+ },
90
+ {
91
+ "expression": "child_resource_key",
92
+ "isExpression": false,
93
+ "asc": true,
94
+ "nulls": "last"
95
+ }
96
+ ],
97
+ "isUnique": false,
98
+ "concurrently": false,
99
+ "method": "btree",
100
+ "with": {}
101
+ }
102
+ },
103
+ "foreignKeys": {},
104
+ "compositePrimaryKeys": {
105
+ "notification_resource_parents_child_target_type_id_child_resource_key_parent_target_type_id_parent_resource_key_pk": {
106
+ "name": "notification_resource_parents_child_target_type_id_child_resource_key_parent_target_type_id_parent_resource_key_pk",
107
+ "columns": [
108
+ "child_target_type_id",
109
+ "child_resource_key",
110
+ "parent_target_type_id",
111
+ "parent_resource_key"
112
+ ]
113
+ }
114
+ },
115
+ "uniqueConstraints": {},
116
+ "policies": {},
117
+ "checkConstraints": {},
118
+ "isRLSEnabled": false
119
+ },
120
+ "public.notification_resources": {
121
+ "name": "notification_resources",
122
+ "schema": "",
123
+ "columns": {
124
+ "target_type_id": {
125
+ "name": "target_type_id",
126
+ "type": "text",
127
+ "primaryKey": false,
128
+ "notNull": true
129
+ },
130
+ "resource_key": {
131
+ "name": "resource_key",
132
+ "type": "text",
133
+ "primaryKey": false,
134
+ "notNull": true
135
+ },
136
+ "display_label": {
137
+ "name": "display_label",
138
+ "type": "text",
139
+ "primaryKey": false,
140
+ "notNull": true
141
+ },
142
+ "upserted_at": {
143
+ "name": "upserted_at",
144
+ "type": "timestamp",
145
+ "primaryKey": false,
146
+ "notNull": true,
147
+ "default": "now()"
148
+ }
149
+ },
150
+ "indexes": {},
151
+ "foreignKeys": {
152
+ "notification_resources_target_type_id_notification_targets_target_type_id_fk": {
153
+ "name": "notification_resources_target_type_id_notification_targets_target_type_id_fk",
154
+ "tableFrom": "notification_resources",
155
+ "tableTo": "notification_targets",
156
+ "columnsFrom": [
157
+ "target_type_id"
158
+ ],
159
+ "columnsTo": [
160
+ "target_type_id"
161
+ ],
162
+ "onDelete": "cascade",
163
+ "onUpdate": "no action"
164
+ }
165
+ },
166
+ "compositePrimaryKeys": {
167
+ "notification_resources_target_type_id_resource_key_pk": {
168
+ "name": "notification_resources_target_type_id_resource_key_pk",
169
+ "columns": [
170
+ "target_type_id",
171
+ "resource_key"
172
+ ]
173
+ }
174
+ },
175
+ "uniqueConstraints": {},
176
+ "policies": {},
177
+ "checkConstraints": {},
178
+ "isRLSEnabled": false
179
+ },
180
+ "public.notification_subscriptions": {
181
+ "name": "notification_subscriptions",
182
+ "schema": "",
183
+ "columns": {
184
+ "user_id": {
185
+ "name": "user_id",
186
+ "type": "text",
187
+ "primaryKey": false,
188
+ "notNull": true
189
+ },
190
+ "group_id": {
191
+ "name": "group_id",
192
+ "type": "text",
193
+ "primaryKey": false,
194
+ "notNull": true
195
+ },
196
+ "subscribed_at": {
197
+ "name": "subscribed_at",
198
+ "type": "timestamp",
199
+ "primaryKey": false,
200
+ "notNull": true,
201
+ "default": "now()"
202
+ }
203
+ },
204
+ "indexes": {},
205
+ "foreignKeys": {
206
+ "notification_subscriptions_group_id_notification_groups_id_fk": {
207
+ "name": "notification_subscriptions_group_id_notification_groups_id_fk",
208
+ "tableFrom": "notification_subscriptions",
209
+ "tableTo": "notification_groups",
210
+ "columnsFrom": [
211
+ "group_id"
212
+ ],
213
+ "columnsTo": [
214
+ "id"
215
+ ],
216
+ "onDelete": "cascade",
217
+ "onUpdate": "no action"
218
+ }
219
+ },
220
+ "compositePrimaryKeys": {
221
+ "notification_subscriptions_user_id_group_id_pk": {
222
+ "name": "notification_subscriptions_user_id_group_id_pk",
223
+ "columns": [
224
+ "user_id",
225
+ "group_id"
226
+ ]
227
+ }
228
+ },
229
+ "uniqueConstraints": {},
230
+ "policies": {},
231
+ "checkConstraints": {},
232
+ "isRLSEnabled": false
233
+ },
234
+ "public.notification_targets": {
235
+ "name": "notification_targets",
236
+ "schema": "",
237
+ "columns": {
238
+ "target_type_id": {
239
+ "name": "target_type_id",
240
+ "type": "text",
241
+ "primaryKey": true,
242
+ "notNull": true
243
+ },
244
+ "owner_plugin": {
245
+ "name": "owner_plugin",
246
+ "type": "text",
247
+ "primaryKey": false,
248
+ "notNull": true
249
+ },
250
+ "resource_kind": {
251
+ "name": "resource_kind",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": true
255
+ },
256
+ "parent_target_type_id": {
257
+ "name": "parent_target_type_id",
258
+ "type": "text",
259
+ "primaryKey": false,
260
+ "notNull": false
261
+ },
262
+ "legacy_group_id_template": {
263
+ "name": "legacy_group_id_template",
264
+ "type": "text",
265
+ "primaryKey": false,
266
+ "notNull": false
267
+ },
268
+ "registered_at": {
269
+ "name": "registered_at",
270
+ "type": "timestamp",
271
+ "primaryKey": false,
272
+ "notNull": true,
273
+ "default": "now()"
274
+ }
275
+ },
276
+ "indexes": {},
277
+ "foreignKeys": {},
278
+ "compositePrimaryKeys": {},
279
+ "uniqueConstraints": {},
280
+ "policies": {},
281
+ "checkConstraints": {},
282
+ "isRLSEnabled": false
283
+ },
284
+ "public.notifications": {
285
+ "name": "notifications",
286
+ "schema": "",
287
+ "columns": {
288
+ "id": {
289
+ "name": "id",
290
+ "type": "uuid",
291
+ "primaryKey": true,
292
+ "notNull": true,
293
+ "default": "gen_random_uuid()"
294
+ },
295
+ "user_id": {
296
+ "name": "user_id",
297
+ "type": "text",
298
+ "primaryKey": false,
299
+ "notNull": true
300
+ },
301
+ "title": {
302
+ "name": "title",
303
+ "type": "text",
304
+ "primaryKey": false,
305
+ "notNull": true
306
+ },
307
+ "body": {
308
+ "name": "body",
309
+ "type": "text",
310
+ "primaryKey": false,
311
+ "notNull": true
312
+ },
313
+ "action": {
314
+ "name": "action",
315
+ "type": "jsonb",
316
+ "primaryKey": false,
317
+ "notNull": false
318
+ },
319
+ "importance": {
320
+ "name": "importance",
321
+ "type": "text",
322
+ "primaryKey": false,
323
+ "notNull": true,
324
+ "default": "'info'"
325
+ },
326
+ "is_read": {
327
+ "name": "is_read",
328
+ "type": "boolean",
329
+ "primaryKey": false,
330
+ "notNull": true,
331
+ "default": false
332
+ },
333
+ "group_id": {
334
+ "name": "group_id",
335
+ "type": "text",
336
+ "primaryKey": false,
337
+ "notNull": false
338
+ },
339
+ "subjects": {
340
+ "name": "subjects",
341
+ "type": "jsonb",
342
+ "primaryKey": false,
343
+ "notNull": false
344
+ },
345
+ "created_at": {
346
+ "name": "created_at",
347
+ "type": "timestamp",
348
+ "primaryKey": false,
349
+ "notNull": true,
350
+ "default": "now()"
351
+ }
352
+ },
353
+ "indexes": {
354
+ "notifications_user_collapse_idx": {
355
+ "name": "notifications_user_collapse_idx",
356
+ "columns": [
357
+ {
358
+ "expression": "user_id",
359
+ "isExpression": false,
360
+ "asc": true,
361
+ "nulls": "last"
362
+ },
363
+ {
364
+ "expression": "group_id",
365
+ "isExpression": false,
366
+ "asc": true,
367
+ "nulls": "last"
368
+ }
369
+ ],
370
+ "isUnique": false,
371
+ "concurrently": false,
372
+ "method": "btree",
373
+ "with": {}
374
+ },
375
+ "notifications_user_created_idx": {
376
+ "name": "notifications_user_created_idx",
377
+ "columns": [
378
+ {
379
+ "expression": "user_id",
380
+ "isExpression": false,
381
+ "asc": true,
382
+ "nulls": "last"
383
+ },
384
+ {
385
+ "expression": "created_at",
386
+ "isExpression": false,
387
+ "asc": true,
388
+ "nulls": "last"
389
+ }
390
+ ],
391
+ "isUnique": false,
392
+ "concurrently": false,
393
+ "method": "btree",
394
+ "with": {}
395
+ }
396
+ },
397
+ "foreignKeys": {},
398
+ "compositePrimaryKeys": {},
399
+ "uniqueConstraints": {},
400
+ "policies": {},
401
+ "checkConstraints": {},
402
+ "isRLSEnabled": false
403
+ },
404
+ "public.subscription_migrations": {
405
+ "name": "subscription_migrations",
406
+ "schema": "",
407
+ "columns": {
408
+ "spec_id": {
409
+ "name": "spec_id",
410
+ "type": "text",
411
+ "primaryKey": false,
412
+ "notNull": true
413
+ },
414
+ "resource_key": {
415
+ "name": "resource_key",
416
+ "type": "text",
417
+ "primaryKey": false,
418
+ "notNull": true
419
+ },
420
+ "migrated_at": {
421
+ "name": "migrated_at",
422
+ "type": "timestamp",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "default": "now()"
426
+ }
427
+ },
428
+ "indexes": {},
429
+ "foreignKeys": {},
430
+ "compositePrimaryKeys": {
431
+ "subscription_migrations_spec_id_resource_key_pk": {
432
+ "name": "subscription_migrations_spec_id_resource_key_pk",
433
+ "columns": [
434
+ "spec_id",
435
+ "resource_key"
436
+ ]
437
+ }
438
+ },
439
+ "uniqueConstraints": {},
440
+ "policies": {},
441
+ "checkConstraints": {},
442
+ "isRLSEnabled": false
443
+ },
444
+ "public.subscription_specs": {
445
+ "name": "subscription_specs",
446
+ "schema": "",
447
+ "columns": {
448
+ "spec_id": {
449
+ "name": "spec_id",
450
+ "type": "text",
451
+ "primaryKey": true,
452
+ "notNull": true
453
+ },
454
+ "owner_plugin": {
455
+ "name": "owner_plugin",
456
+ "type": "text",
457
+ "primaryKey": false,
458
+ "notNull": true
459
+ },
460
+ "local_id": {
461
+ "name": "local_id",
462
+ "type": "text",
463
+ "primaryKey": false,
464
+ "notNull": true
465
+ },
466
+ "target_type_id": {
467
+ "name": "target_type_id",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": true
471
+ },
472
+ "display_title": {
473
+ "name": "display_title",
474
+ "type": "text",
475
+ "primaryKey": false,
476
+ "notNull": true
477
+ },
478
+ "display_description": {
479
+ "name": "display_description",
480
+ "type": "text",
481
+ "primaryKey": false,
482
+ "notNull": true
483
+ },
484
+ "display_icon_name": {
485
+ "name": "display_icon_name",
486
+ "type": "text",
487
+ "primaryKey": false,
488
+ "notNull": false
489
+ },
490
+ "registered_at": {
491
+ "name": "registered_at",
492
+ "type": "timestamp",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "default": "now()"
496
+ }
497
+ },
498
+ "indexes": {},
499
+ "foreignKeys": {
500
+ "subscription_specs_target_type_id_notification_targets_target_type_id_fk": {
501
+ "name": "subscription_specs_target_type_id_notification_targets_target_type_id_fk",
502
+ "tableFrom": "subscription_specs",
503
+ "tableTo": "notification_targets",
504
+ "columnsFrom": [
505
+ "target_type_id"
506
+ ],
507
+ "columnsTo": [
508
+ "target_type_id"
509
+ ],
510
+ "onDelete": "no action",
511
+ "onUpdate": "no action"
512
+ }
513
+ },
514
+ "compositePrimaryKeys": {},
515
+ "uniqueConstraints": {},
516
+ "policies": {},
517
+ "checkConstraints": {},
518
+ "isRLSEnabled": false
519
+ }
520
+ },
521
+ "enums": {},
522
+ "schemas": {},
523
+ "sequences": {},
524
+ "roles": {},
525
+ "policies": {},
526
+ "views": {},
527
+ "_meta": {
528
+ "columns": {},
529
+ "schemas": {},
530
+ "tables": {}
531
+ }
532
+ }
@@ -36,6 +36,20 @@
36
36
  "when": 1767566076200,
37
37
  "tag": "0004_regular_corsair",
38
38
  "breakpoints": true
39
+ },
40
+ {
41
+ "idx": 5,
42
+ "version": "7",
43
+ "when": 1777534340114,
44
+ "tag": "0005_material_mauler",
45
+ "breakpoints": true
46
+ },
47
+ {
48
+ "idx": 6,
49
+ "version": "7",
50
+ "when": 1777549165507,
51
+ "tag": "0006_chubby_gladiator",
52
+ "breakpoints": true
39
53
  }
40
54
  ]
41
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/notification-backend",
3
- "version": "0.2.1",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -14,13 +14,13 @@
14
14
  "test": "bun test"
15
15
  },
16
16
  "dependencies": {
17
- "@checkstack/notification-common": "0.2.9",
18
- "@checkstack/backend-api": "0.13.0",
19
- "@checkstack/cache-api": "0.2.0",
20
- "@checkstack/cache-utils": "0.2.0",
21
- "@checkstack/signal-common": "0.1.10",
22
- "@checkstack/queue-api": "0.2.14",
23
- "@checkstack/auth-backend": "0.4.20",
17
+ "@checkstack/notification-common": "0.3.0",
18
+ "@checkstack/backend-api": "0.13.1",
19
+ "@checkstack/cache-api": "0.2.1",
20
+ "@checkstack/cache-utils": "0.2.1",
21
+ "@checkstack/signal-common": "0.2.0",
22
+ "@checkstack/queue-api": "0.2.15",
23
+ "@checkstack/auth-backend": "0.4.21",
24
24
  "@checkstack/auth-common": "0.6.3",
25
25
  "drizzle-orm": "^0.45.0",
26
26
  "zod": "^4.2.1",
@@ -31,8 +31,9 @@
31
31
  "@checkstack/drizzle-helper": "0.0.4",
32
32
  "@checkstack/scripts": "0.1.2",
33
33
  "@checkstack/tsconfig": "0.0.5",
34
- "@checkstack/test-utils-backend": "0.1.20",
34
+ "@checkstack/test-utils-backend": "0.1.21",
35
35
  "@types/node": "^20.0.0",
36
+ "drizzle-kit": "^0.31.10",
36
37
  "typescript": "^5.0.0"
37
38
  }
38
39
  }