@spfn/notification 0.1.0-beta.14 → 0.1.0-beta.16

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,15 @@
1
+ CREATE TABLE "spfn_notification"."tracking_events" (
2
+ "id" bigserial PRIMARY KEY NOT NULL,
3
+ "notification_id" integer NOT NULL,
4
+ "type" text NOT NULL,
5
+ "link_url" text,
6
+ "link_index" integer,
7
+ "ip_address" text,
8
+ "user_agent" text,
9
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
10
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
11
+ );
12
+ --> statement-breakpoint
13
+ CREATE INDEX "te_notification_id_idx" ON "spfn_notification"."tracking_events" USING btree ("notification_id");--> statement-breakpoint
14
+ CREATE INDEX "te_type_idx" ON "spfn_notification"."tracking_events" USING btree ("type");--> statement-breakpoint
15
+ CREATE INDEX "te_created_at_idx" ON "spfn_notification"."tracking_events" USING btree ("created_at");
@@ -0,0 +1,393 @@
1
+ {
2
+ "id": "d0403561-969d-40d4-88e9-da9341f2435d",
3
+ "prevId": "71e25072-c482-49b3-82a2-d40ca07060d5",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "spfn_notification.history": {
8
+ "name": "history",
9
+ "schema": "spfn_notification",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "bigserial",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "channel": {
18
+ "name": "channel",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "recipient": {
24
+ "name": "recipient",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "template_name": {
30
+ "name": "template_name",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": false
34
+ },
35
+ "template_data": {
36
+ "name": "template_data",
37
+ "type": "jsonb",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "subject": {
42
+ "name": "subject",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "content": {
48
+ "name": "content",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "status": {
54
+ "name": "status",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true,
58
+ "default": "'pending'"
59
+ },
60
+ "provider_message_id": {
61
+ "name": "provider_message_id",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": false
65
+ },
66
+ "provider_name": {
67
+ "name": "provider_name",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": false
71
+ },
72
+ "error_message": {
73
+ "name": "error_message",
74
+ "type": "text",
75
+ "primaryKey": false,
76
+ "notNull": false
77
+ },
78
+ "scheduled_at": {
79
+ "name": "scheduled_at",
80
+ "type": "timestamp with time zone",
81
+ "primaryKey": false,
82
+ "notNull": false
83
+ },
84
+ "sent_at": {
85
+ "name": "sent_at",
86
+ "type": "timestamp with time zone",
87
+ "primaryKey": false,
88
+ "notNull": false
89
+ },
90
+ "job_id": {
91
+ "name": "job_id",
92
+ "type": "text",
93
+ "primaryKey": false,
94
+ "notNull": false
95
+ },
96
+ "batch_id": {
97
+ "name": "batch_id",
98
+ "type": "text",
99
+ "primaryKey": false,
100
+ "notNull": false
101
+ },
102
+ "reference_type": {
103
+ "name": "reference_type",
104
+ "type": "text",
105
+ "primaryKey": false,
106
+ "notNull": false
107
+ },
108
+ "reference_id": {
109
+ "name": "reference_id",
110
+ "type": "text",
111
+ "primaryKey": false,
112
+ "notNull": false
113
+ },
114
+ "created_at": {
115
+ "name": "created_at",
116
+ "type": "timestamp with time zone",
117
+ "primaryKey": false,
118
+ "notNull": true,
119
+ "default": "now()"
120
+ },
121
+ "updated_at": {
122
+ "name": "updated_at",
123
+ "type": "timestamp with time zone",
124
+ "primaryKey": false,
125
+ "notNull": true,
126
+ "default": "now()"
127
+ }
128
+ },
129
+ "indexes": {
130
+ "noti_channel_idx": {
131
+ "name": "noti_channel_idx",
132
+ "columns": [
133
+ {
134
+ "expression": "channel",
135
+ "isExpression": false,
136
+ "asc": true,
137
+ "nulls": "last"
138
+ }
139
+ ],
140
+ "isUnique": false,
141
+ "concurrently": false,
142
+ "method": "btree",
143
+ "with": {}
144
+ },
145
+ "noti_status_idx": {
146
+ "name": "noti_status_idx",
147
+ "columns": [
148
+ {
149
+ "expression": "status",
150
+ "isExpression": false,
151
+ "asc": true,
152
+ "nulls": "last"
153
+ }
154
+ ],
155
+ "isUnique": false,
156
+ "concurrently": false,
157
+ "method": "btree",
158
+ "with": {}
159
+ },
160
+ "noti_recipient_idx": {
161
+ "name": "noti_recipient_idx",
162
+ "columns": [
163
+ {
164
+ "expression": "recipient",
165
+ "isExpression": false,
166
+ "asc": true,
167
+ "nulls": "last"
168
+ }
169
+ ],
170
+ "isUnique": false,
171
+ "concurrently": false,
172
+ "method": "btree",
173
+ "with": {}
174
+ },
175
+ "noti_created_at_idx": {
176
+ "name": "noti_created_at_idx",
177
+ "columns": [
178
+ {
179
+ "expression": "created_at",
180
+ "isExpression": false,
181
+ "asc": true,
182
+ "nulls": "last"
183
+ }
184
+ ],
185
+ "isUnique": false,
186
+ "concurrently": false,
187
+ "method": "btree",
188
+ "with": {}
189
+ },
190
+ "noti_scheduled_at_idx": {
191
+ "name": "noti_scheduled_at_idx",
192
+ "columns": [
193
+ {
194
+ "expression": "scheduled_at",
195
+ "isExpression": false,
196
+ "asc": true,
197
+ "nulls": "last"
198
+ }
199
+ ],
200
+ "isUnique": false,
201
+ "concurrently": false,
202
+ "method": "btree",
203
+ "with": {}
204
+ },
205
+ "noti_job_id_idx": {
206
+ "name": "noti_job_id_idx",
207
+ "columns": [
208
+ {
209
+ "expression": "job_id",
210
+ "isExpression": false,
211
+ "asc": true,
212
+ "nulls": "last"
213
+ }
214
+ ],
215
+ "isUnique": false,
216
+ "concurrently": false,
217
+ "method": "btree",
218
+ "with": {}
219
+ },
220
+ "noti_batch_id_idx": {
221
+ "name": "noti_batch_id_idx",
222
+ "columns": [
223
+ {
224
+ "expression": "batch_id",
225
+ "isExpression": false,
226
+ "asc": true,
227
+ "nulls": "last"
228
+ }
229
+ ],
230
+ "isUnique": false,
231
+ "concurrently": false,
232
+ "method": "btree",
233
+ "with": {}
234
+ },
235
+ "noti_reference_idx": {
236
+ "name": "noti_reference_idx",
237
+ "columns": [
238
+ {
239
+ "expression": "reference_type",
240
+ "isExpression": false,
241
+ "asc": true,
242
+ "nulls": "last"
243
+ },
244
+ {
245
+ "expression": "reference_id",
246
+ "isExpression": false,
247
+ "asc": true,
248
+ "nulls": "last"
249
+ }
250
+ ],
251
+ "isUnique": false,
252
+ "concurrently": false,
253
+ "method": "btree",
254
+ "with": {}
255
+ }
256
+ },
257
+ "foreignKeys": {},
258
+ "compositePrimaryKeys": {},
259
+ "uniqueConstraints": {},
260
+ "policies": {},
261
+ "checkConstraints": {},
262
+ "isRLSEnabled": false
263
+ },
264
+ "spfn_notification.tracking_events": {
265
+ "name": "tracking_events",
266
+ "schema": "spfn_notification",
267
+ "columns": {
268
+ "id": {
269
+ "name": "id",
270
+ "type": "bigserial",
271
+ "primaryKey": true,
272
+ "notNull": true
273
+ },
274
+ "notification_id": {
275
+ "name": "notification_id",
276
+ "type": "integer",
277
+ "primaryKey": false,
278
+ "notNull": true
279
+ },
280
+ "type": {
281
+ "name": "type",
282
+ "type": "text",
283
+ "primaryKey": false,
284
+ "notNull": true
285
+ },
286
+ "link_url": {
287
+ "name": "link_url",
288
+ "type": "text",
289
+ "primaryKey": false,
290
+ "notNull": false
291
+ },
292
+ "link_index": {
293
+ "name": "link_index",
294
+ "type": "integer",
295
+ "primaryKey": false,
296
+ "notNull": false
297
+ },
298
+ "ip_address": {
299
+ "name": "ip_address",
300
+ "type": "text",
301
+ "primaryKey": false,
302
+ "notNull": false
303
+ },
304
+ "user_agent": {
305
+ "name": "user_agent",
306
+ "type": "text",
307
+ "primaryKey": false,
308
+ "notNull": false
309
+ },
310
+ "created_at": {
311
+ "name": "created_at",
312
+ "type": "timestamp with time zone",
313
+ "primaryKey": false,
314
+ "notNull": true,
315
+ "default": "now()"
316
+ },
317
+ "updated_at": {
318
+ "name": "updated_at",
319
+ "type": "timestamp with time zone",
320
+ "primaryKey": false,
321
+ "notNull": true,
322
+ "default": "now()"
323
+ }
324
+ },
325
+ "indexes": {
326
+ "te_notification_id_idx": {
327
+ "name": "te_notification_id_idx",
328
+ "columns": [
329
+ {
330
+ "expression": "notification_id",
331
+ "isExpression": false,
332
+ "asc": true,
333
+ "nulls": "last"
334
+ }
335
+ ],
336
+ "isUnique": false,
337
+ "concurrently": false,
338
+ "method": "btree",
339
+ "with": {}
340
+ },
341
+ "te_type_idx": {
342
+ "name": "te_type_idx",
343
+ "columns": [
344
+ {
345
+ "expression": "type",
346
+ "isExpression": false,
347
+ "asc": true,
348
+ "nulls": "last"
349
+ }
350
+ ],
351
+ "isUnique": false,
352
+ "concurrently": false,
353
+ "method": "btree",
354
+ "with": {}
355
+ },
356
+ "te_created_at_idx": {
357
+ "name": "te_created_at_idx",
358
+ "columns": [
359
+ {
360
+ "expression": "created_at",
361
+ "isExpression": false,
362
+ "asc": true,
363
+ "nulls": "last"
364
+ }
365
+ ],
366
+ "isUnique": false,
367
+ "concurrently": false,
368
+ "method": "btree",
369
+ "with": {}
370
+ }
371
+ },
372
+ "foreignKeys": {},
373
+ "compositePrimaryKeys": {},
374
+ "uniqueConstraints": {},
375
+ "policies": {},
376
+ "checkConstraints": {},
377
+ "isRLSEnabled": false
378
+ }
379
+ },
380
+ "enums": {},
381
+ "schemas": {
382
+ "spfn_notification": "spfn_notification"
383
+ },
384
+ "sequences": {},
385
+ "roles": {},
386
+ "policies": {},
387
+ "views": {},
388
+ "_meta": {
389
+ "columns": {},
390
+ "schemas": {},
391
+ "tables": {}
392
+ }
393
+ }
@@ -8,6 +8,13 @@
8
8
  "when": 1771573039356,
9
9
  "tag": "0000_acoustic_bromley",
10
10
  "breakpoints": true
11
+ },
12
+ {
13
+ "idx": 1,
14
+ "version": "7",
15
+ "when": 1772979182891,
16
+ "tag": "0001_romantic_starjammers",
17
+ "breakpoints": true
11
18
  }
12
19
  ]
13
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spfn/notification",
3
- "version": "0.1.0-beta.14",
3
+ "version": "0.1.0-beta.16",
4
4
  "type": "module",
5
5
  "description": "Multi-channel notification system for SPFN - Email, SMS, Slack, Push",
6
6
  "exports": {
@@ -38,7 +38,7 @@
38
38
  "directory": "packages/notification"
39
39
  },
40
40
  "dependencies": {
41
- "@spfn/core": "0.2.0-beta.31"
41
+ "@spfn/core": "0.2.0-beta.32"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@aws-sdk/client-ses": "^3.0.0",
@@ -85,6 +85,7 @@
85
85
  "test": "vitest run",
86
86
  "test:watch": "vitest",
87
87
  "check:circular": "madge --circular --extensions ts src/",
88
- "type-check": "tsc --noEmit"
88
+ "type-check": "tsc --noEmit",
89
+ "db:generate": "drizzle-kit generate"
89
90
  }
90
91
  }