@checkstack/incident-backend 1.11.0 → 1.13.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.
- package/CHANGELOG.md +388 -0
- package/drizzle/0005_real_leper_queen.sql +4 -0
- package/drizzle/0006_last_princess_powerful.sql +1 -0
- package/drizzle/0007_colorful_true_believers.sql +2 -0
- package/drizzle/meta/0005_snapshot.json +346 -0
- package/drizzle/meta/0006_snapshot.json +353 -0
- package/drizzle/meta/0007_snapshot.json +391 -0
- package/drizzle/meta/_journal.json +21 -0
- package/package.json +15 -15
- package/src/ai/incident-add-link.test.ts +1 -0
- package/src/ai/incident-add-update.test.ts +6 -1
- package/src/ai/incident-delete-update.test.ts +59 -0
- package/src/ai/incident-delete-update.ts +73 -0
- package/src/ai/register-ai-tools.ts +2 -0
- package/src/automations.test.ts +70 -0
- package/src/automations.ts +77 -4
- package/src/hooks.ts +54 -4
- package/src/index.ts +4 -0
- package/src/notifications.test.ts +181 -0
- package/src/notifications.ts +12 -1
- package/src/read-visibility.test.ts +158 -0
- package/src/read-visibility.ts +99 -0
- package/src/router.test.ts +69 -1
- package/src/router.ts +195 -15
- package/src/schema.ts +55 -10
- package/src/service-reads.it.test.ts +353 -0
- package/src/service-updates.it.test.ts +340 -0
- package/src/service.it.test.ts +57 -0
- package/src/service.test.ts +235 -1
- package/src/service.ts +489 -177
- package/src/status-page-widget.test.ts +149 -0
- package/src/status-page-widget.ts +136 -37
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "ad7ffe14-5ac3-4028-895f-efa6c8026073",
|
|
3
|
+
"prevId": "c158fa99-0e1b-452f-85d3-6343af3349e1",
|
|
4
|
+
"version": "7",
|
|
5
|
+
"dialect": "postgresql",
|
|
6
|
+
"tables": {
|
|
7
|
+
"public.incident_links": {
|
|
8
|
+
"name": "incident_links",
|
|
9
|
+
"schema": "",
|
|
10
|
+
"columns": {
|
|
11
|
+
"id": {
|
|
12
|
+
"name": "id",
|
|
13
|
+
"type": "text",
|
|
14
|
+
"primaryKey": true,
|
|
15
|
+
"notNull": true
|
|
16
|
+
},
|
|
17
|
+
"incident_id": {
|
|
18
|
+
"name": "incident_id",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true
|
|
22
|
+
},
|
|
23
|
+
"label": {
|
|
24
|
+
"name": "label",
|
|
25
|
+
"type": "text",
|
|
26
|
+
"primaryKey": false,
|
|
27
|
+
"notNull": false
|
|
28
|
+
},
|
|
29
|
+
"url": {
|
|
30
|
+
"name": "url",
|
|
31
|
+
"type": "text",
|
|
32
|
+
"primaryKey": false,
|
|
33
|
+
"notNull": true
|
|
34
|
+
},
|
|
35
|
+
"visibility": {
|
|
36
|
+
"name": "visibility",
|
|
37
|
+
"type": "incident_content_visibility",
|
|
38
|
+
"typeSchema": "public",
|
|
39
|
+
"primaryKey": false,
|
|
40
|
+
"notNull": true,
|
|
41
|
+
"default": "'public'"
|
|
42
|
+
},
|
|
43
|
+
"created_at": {
|
|
44
|
+
"name": "created_at",
|
|
45
|
+
"type": "timestamp",
|
|
46
|
+
"primaryKey": false,
|
|
47
|
+
"notNull": true,
|
|
48
|
+
"default": "now()"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"indexes": {
|
|
52
|
+
"incident_links_incident_url_unique": {
|
|
53
|
+
"name": "incident_links_incident_url_unique",
|
|
54
|
+
"columns": [
|
|
55
|
+
{
|
|
56
|
+
"expression": "incident_id",
|
|
57
|
+
"isExpression": false,
|
|
58
|
+
"asc": true,
|
|
59
|
+
"nulls": "last"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"expression": "url",
|
|
63
|
+
"isExpression": false,
|
|
64
|
+
"asc": true,
|
|
65
|
+
"nulls": "last"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"isUnique": true,
|
|
69
|
+
"concurrently": false,
|
|
70
|
+
"method": "btree",
|
|
71
|
+
"with": {}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"foreignKeys": {
|
|
75
|
+
"incident_links_incident_id_incidents_id_fk": {
|
|
76
|
+
"name": "incident_links_incident_id_incidents_id_fk",
|
|
77
|
+
"tableFrom": "incident_links",
|
|
78
|
+
"tableTo": "incidents",
|
|
79
|
+
"columnsFrom": [
|
|
80
|
+
"incident_id"
|
|
81
|
+
],
|
|
82
|
+
"columnsTo": [
|
|
83
|
+
"id"
|
|
84
|
+
],
|
|
85
|
+
"onDelete": "cascade",
|
|
86
|
+
"onUpdate": "no action"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"compositePrimaryKeys": {},
|
|
90
|
+
"uniqueConstraints": {},
|
|
91
|
+
"policies": {},
|
|
92
|
+
"checkConstraints": {},
|
|
93
|
+
"isRLSEnabled": false
|
|
94
|
+
},
|
|
95
|
+
"public.incident_systems": {
|
|
96
|
+
"name": "incident_systems",
|
|
97
|
+
"schema": "",
|
|
98
|
+
"columns": {
|
|
99
|
+
"incident_id": {
|
|
100
|
+
"name": "incident_id",
|
|
101
|
+
"type": "text",
|
|
102
|
+
"primaryKey": false,
|
|
103
|
+
"notNull": true
|
|
104
|
+
},
|
|
105
|
+
"system_id": {
|
|
106
|
+
"name": "system_id",
|
|
107
|
+
"type": "text",
|
|
108
|
+
"primaryKey": false,
|
|
109
|
+
"notNull": true
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"indexes": {},
|
|
113
|
+
"foreignKeys": {
|
|
114
|
+
"incident_systems_incident_id_incidents_id_fk": {
|
|
115
|
+
"name": "incident_systems_incident_id_incidents_id_fk",
|
|
116
|
+
"tableFrom": "incident_systems",
|
|
117
|
+
"tableTo": "incidents",
|
|
118
|
+
"columnsFrom": [
|
|
119
|
+
"incident_id"
|
|
120
|
+
],
|
|
121
|
+
"columnsTo": [
|
|
122
|
+
"id"
|
|
123
|
+
],
|
|
124
|
+
"onDelete": "cascade",
|
|
125
|
+
"onUpdate": "no action"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"compositePrimaryKeys": {
|
|
129
|
+
"incident_systems_incident_id_system_id_pk": {
|
|
130
|
+
"name": "incident_systems_incident_id_system_id_pk",
|
|
131
|
+
"columns": [
|
|
132
|
+
"incident_id",
|
|
133
|
+
"system_id"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"uniqueConstraints": {},
|
|
138
|
+
"policies": {},
|
|
139
|
+
"checkConstraints": {},
|
|
140
|
+
"isRLSEnabled": false
|
|
141
|
+
},
|
|
142
|
+
"public.incident_updates": {
|
|
143
|
+
"name": "incident_updates",
|
|
144
|
+
"schema": "",
|
|
145
|
+
"columns": {
|
|
146
|
+
"id": {
|
|
147
|
+
"name": "id",
|
|
148
|
+
"type": "text",
|
|
149
|
+
"primaryKey": true,
|
|
150
|
+
"notNull": true
|
|
151
|
+
},
|
|
152
|
+
"incident_id": {
|
|
153
|
+
"name": "incident_id",
|
|
154
|
+
"type": "text",
|
|
155
|
+
"primaryKey": false,
|
|
156
|
+
"notNull": true
|
|
157
|
+
},
|
|
158
|
+
"message": {
|
|
159
|
+
"name": "message",
|
|
160
|
+
"type": "text",
|
|
161
|
+
"primaryKey": false,
|
|
162
|
+
"notNull": true
|
|
163
|
+
},
|
|
164
|
+
"status_change": {
|
|
165
|
+
"name": "status_change",
|
|
166
|
+
"type": "incident_status",
|
|
167
|
+
"typeSchema": "public",
|
|
168
|
+
"primaryKey": false,
|
|
169
|
+
"notNull": false
|
|
170
|
+
},
|
|
171
|
+
"visibility": {
|
|
172
|
+
"name": "visibility",
|
|
173
|
+
"type": "incident_content_visibility",
|
|
174
|
+
"typeSchema": "public",
|
|
175
|
+
"primaryKey": false,
|
|
176
|
+
"notNull": true,
|
|
177
|
+
"default": "'public'"
|
|
178
|
+
},
|
|
179
|
+
"created_at": {
|
|
180
|
+
"name": "created_at",
|
|
181
|
+
"type": "timestamp",
|
|
182
|
+
"primaryKey": false,
|
|
183
|
+
"notNull": true,
|
|
184
|
+
"default": "now()"
|
|
185
|
+
},
|
|
186
|
+
"edited_at": {
|
|
187
|
+
"name": "edited_at",
|
|
188
|
+
"type": "timestamp",
|
|
189
|
+
"primaryKey": false,
|
|
190
|
+
"notNull": false
|
|
191
|
+
},
|
|
192
|
+
"created_by": {
|
|
193
|
+
"name": "created_by",
|
|
194
|
+
"type": "text",
|
|
195
|
+
"primaryKey": false,
|
|
196
|
+
"notNull": false
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"indexes": {},
|
|
200
|
+
"foreignKeys": {
|
|
201
|
+
"incident_updates_incident_id_incidents_id_fk": {
|
|
202
|
+
"name": "incident_updates_incident_id_incidents_id_fk",
|
|
203
|
+
"tableFrom": "incident_updates",
|
|
204
|
+
"tableTo": "incidents",
|
|
205
|
+
"columnsFrom": [
|
|
206
|
+
"incident_id"
|
|
207
|
+
],
|
|
208
|
+
"columnsTo": [
|
|
209
|
+
"id"
|
|
210
|
+
],
|
|
211
|
+
"onDelete": "cascade",
|
|
212
|
+
"onUpdate": "no action"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"compositePrimaryKeys": {},
|
|
216
|
+
"uniqueConstraints": {},
|
|
217
|
+
"policies": {},
|
|
218
|
+
"checkConstraints": {},
|
|
219
|
+
"isRLSEnabled": false
|
|
220
|
+
},
|
|
221
|
+
"public.incidents": {
|
|
222
|
+
"name": "incidents",
|
|
223
|
+
"schema": "",
|
|
224
|
+
"columns": {
|
|
225
|
+
"id": {
|
|
226
|
+
"name": "id",
|
|
227
|
+
"type": "text",
|
|
228
|
+
"primaryKey": true,
|
|
229
|
+
"notNull": true
|
|
230
|
+
},
|
|
231
|
+
"title": {
|
|
232
|
+
"name": "title",
|
|
233
|
+
"type": "text",
|
|
234
|
+
"primaryKey": false,
|
|
235
|
+
"notNull": true
|
|
236
|
+
},
|
|
237
|
+
"description": {
|
|
238
|
+
"name": "description",
|
|
239
|
+
"type": "text",
|
|
240
|
+
"primaryKey": false,
|
|
241
|
+
"notNull": false
|
|
242
|
+
},
|
|
243
|
+
"status": {
|
|
244
|
+
"name": "status",
|
|
245
|
+
"type": "incident_status",
|
|
246
|
+
"typeSchema": "public",
|
|
247
|
+
"primaryKey": false,
|
|
248
|
+
"notNull": true,
|
|
249
|
+
"default": "'investigating'"
|
|
250
|
+
},
|
|
251
|
+
"severity": {
|
|
252
|
+
"name": "severity",
|
|
253
|
+
"type": "incident_severity",
|
|
254
|
+
"typeSchema": "public",
|
|
255
|
+
"primaryKey": false,
|
|
256
|
+
"notNull": true,
|
|
257
|
+
"default": "'major'"
|
|
258
|
+
},
|
|
259
|
+
"suppress_notifications": {
|
|
260
|
+
"name": "suppress_notifications",
|
|
261
|
+
"type": "boolean",
|
|
262
|
+
"primaryKey": false,
|
|
263
|
+
"notNull": true,
|
|
264
|
+
"default": false
|
|
265
|
+
},
|
|
266
|
+
"health_override": {
|
|
267
|
+
"name": "health_override",
|
|
268
|
+
"type": "incident_health_override",
|
|
269
|
+
"typeSchema": "public",
|
|
270
|
+
"primaryKey": false,
|
|
271
|
+
"notNull": false
|
|
272
|
+
},
|
|
273
|
+
"created_at": {
|
|
274
|
+
"name": "created_at",
|
|
275
|
+
"type": "timestamp",
|
|
276
|
+
"primaryKey": false,
|
|
277
|
+
"notNull": true,
|
|
278
|
+
"default": "now()"
|
|
279
|
+
},
|
|
280
|
+
"updated_at": {
|
|
281
|
+
"name": "updated_at",
|
|
282
|
+
"type": "timestamp",
|
|
283
|
+
"primaryKey": false,
|
|
284
|
+
"notNull": true,
|
|
285
|
+
"default": "now()"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"indexes": {},
|
|
289
|
+
"foreignKeys": {},
|
|
290
|
+
"compositePrimaryKeys": {},
|
|
291
|
+
"uniqueConstraints": {},
|
|
292
|
+
"policies": {},
|
|
293
|
+
"checkConstraints": {},
|
|
294
|
+
"isRLSEnabled": false
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"enums": {
|
|
298
|
+
"public.incident_health_override": {
|
|
299
|
+
"name": "incident_health_override",
|
|
300
|
+
"schema": "public",
|
|
301
|
+
"values": [
|
|
302
|
+
"degraded",
|
|
303
|
+
"unhealthy"
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
"public.incident_severity": {
|
|
307
|
+
"name": "incident_severity",
|
|
308
|
+
"schema": "public",
|
|
309
|
+
"values": [
|
|
310
|
+
"minor",
|
|
311
|
+
"major",
|
|
312
|
+
"critical"
|
|
313
|
+
]
|
|
314
|
+
},
|
|
315
|
+
"public.incident_status": {
|
|
316
|
+
"name": "incident_status",
|
|
317
|
+
"schema": "public",
|
|
318
|
+
"values": [
|
|
319
|
+
"investigating",
|
|
320
|
+
"identified",
|
|
321
|
+
"fixing",
|
|
322
|
+
"monitoring",
|
|
323
|
+
"resolved"
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
"public.incident_content_visibility": {
|
|
327
|
+
"name": "incident_content_visibility",
|
|
328
|
+
"schema": "public",
|
|
329
|
+
"values": [
|
|
330
|
+
"public",
|
|
331
|
+
"logged_in",
|
|
332
|
+
"internal"
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"schemas": {},
|
|
337
|
+
"sequences": {},
|
|
338
|
+
"roles": {},
|
|
339
|
+
"policies": {},
|
|
340
|
+
"views": {},
|
|
341
|
+
"_meta": {
|
|
342
|
+
"columns": {},
|
|
343
|
+
"schemas": {},
|
|
344
|
+
"tables": {}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "ff7f73e0-3d6b-47a4-b759-000739af4ee6",
|
|
3
|
+
"prevId": "ad7ffe14-5ac3-4028-895f-efa6c8026073",
|
|
4
|
+
"version": "7",
|
|
5
|
+
"dialect": "postgresql",
|
|
6
|
+
"tables": {
|
|
7
|
+
"public.incident_links": {
|
|
8
|
+
"name": "incident_links",
|
|
9
|
+
"schema": "",
|
|
10
|
+
"columns": {
|
|
11
|
+
"id": {
|
|
12
|
+
"name": "id",
|
|
13
|
+
"type": "text",
|
|
14
|
+
"primaryKey": true,
|
|
15
|
+
"notNull": true
|
|
16
|
+
},
|
|
17
|
+
"incident_id": {
|
|
18
|
+
"name": "incident_id",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true
|
|
22
|
+
},
|
|
23
|
+
"label": {
|
|
24
|
+
"name": "label",
|
|
25
|
+
"type": "text",
|
|
26
|
+
"primaryKey": false,
|
|
27
|
+
"notNull": false
|
|
28
|
+
},
|
|
29
|
+
"url": {
|
|
30
|
+
"name": "url",
|
|
31
|
+
"type": "text",
|
|
32
|
+
"primaryKey": false,
|
|
33
|
+
"notNull": true
|
|
34
|
+
},
|
|
35
|
+
"visibility": {
|
|
36
|
+
"name": "visibility",
|
|
37
|
+
"type": "incident_content_visibility",
|
|
38
|
+
"typeSchema": "public",
|
|
39
|
+
"primaryKey": false,
|
|
40
|
+
"notNull": true,
|
|
41
|
+
"default": "'public'"
|
|
42
|
+
},
|
|
43
|
+
"created_at": {
|
|
44
|
+
"name": "created_at",
|
|
45
|
+
"type": "timestamp",
|
|
46
|
+
"primaryKey": false,
|
|
47
|
+
"notNull": true,
|
|
48
|
+
"default": "now()"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"indexes": {
|
|
52
|
+
"incident_links_incident_url_unique": {
|
|
53
|
+
"name": "incident_links_incident_url_unique",
|
|
54
|
+
"columns": [
|
|
55
|
+
{
|
|
56
|
+
"expression": "incident_id",
|
|
57
|
+
"isExpression": false,
|
|
58
|
+
"asc": true,
|
|
59
|
+
"nulls": "last"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"expression": "url",
|
|
63
|
+
"isExpression": false,
|
|
64
|
+
"asc": true,
|
|
65
|
+
"nulls": "last"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"isUnique": true,
|
|
69
|
+
"concurrently": false,
|
|
70
|
+
"method": "btree",
|
|
71
|
+
"with": {}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"foreignKeys": {
|
|
75
|
+
"incident_links_incident_id_incidents_id_fk": {
|
|
76
|
+
"name": "incident_links_incident_id_incidents_id_fk",
|
|
77
|
+
"tableFrom": "incident_links",
|
|
78
|
+
"tableTo": "incidents",
|
|
79
|
+
"columnsFrom": [
|
|
80
|
+
"incident_id"
|
|
81
|
+
],
|
|
82
|
+
"columnsTo": [
|
|
83
|
+
"id"
|
|
84
|
+
],
|
|
85
|
+
"onDelete": "cascade",
|
|
86
|
+
"onUpdate": "no action"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"compositePrimaryKeys": {},
|
|
90
|
+
"uniqueConstraints": {},
|
|
91
|
+
"policies": {},
|
|
92
|
+
"checkConstraints": {},
|
|
93
|
+
"isRLSEnabled": false
|
|
94
|
+
},
|
|
95
|
+
"public.incident_systems": {
|
|
96
|
+
"name": "incident_systems",
|
|
97
|
+
"schema": "",
|
|
98
|
+
"columns": {
|
|
99
|
+
"incident_id": {
|
|
100
|
+
"name": "incident_id",
|
|
101
|
+
"type": "text",
|
|
102
|
+
"primaryKey": false,
|
|
103
|
+
"notNull": true
|
|
104
|
+
},
|
|
105
|
+
"system_id": {
|
|
106
|
+
"name": "system_id",
|
|
107
|
+
"type": "text",
|
|
108
|
+
"primaryKey": false,
|
|
109
|
+
"notNull": true
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"indexes": {},
|
|
113
|
+
"foreignKeys": {
|
|
114
|
+
"incident_systems_incident_id_incidents_id_fk": {
|
|
115
|
+
"name": "incident_systems_incident_id_incidents_id_fk",
|
|
116
|
+
"tableFrom": "incident_systems",
|
|
117
|
+
"tableTo": "incidents",
|
|
118
|
+
"columnsFrom": [
|
|
119
|
+
"incident_id"
|
|
120
|
+
],
|
|
121
|
+
"columnsTo": [
|
|
122
|
+
"id"
|
|
123
|
+
],
|
|
124
|
+
"onDelete": "cascade",
|
|
125
|
+
"onUpdate": "no action"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"compositePrimaryKeys": {
|
|
129
|
+
"incident_systems_incident_id_system_id_pk": {
|
|
130
|
+
"name": "incident_systems_incident_id_system_id_pk",
|
|
131
|
+
"columns": [
|
|
132
|
+
"incident_id",
|
|
133
|
+
"system_id"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"uniqueConstraints": {},
|
|
138
|
+
"policies": {},
|
|
139
|
+
"checkConstraints": {},
|
|
140
|
+
"isRLSEnabled": false
|
|
141
|
+
},
|
|
142
|
+
"public.incident_updates": {
|
|
143
|
+
"name": "incident_updates",
|
|
144
|
+
"schema": "",
|
|
145
|
+
"columns": {
|
|
146
|
+
"id": {
|
|
147
|
+
"name": "id",
|
|
148
|
+
"type": "text",
|
|
149
|
+
"primaryKey": true,
|
|
150
|
+
"notNull": true
|
|
151
|
+
},
|
|
152
|
+
"incident_id": {
|
|
153
|
+
"name": "incident_id",
|
|
154
|
+
"type": "text",
|
|
155
|
+
"primaryKey": false,
|
|
156
|
+
"notNull": true
|
|
157
|
+
},
|
|
158
|
+
"message": {
|
|
159
|
+
"name": "message",
|
|
160
|
+
"type": "text",
|
|
161
|
+
"primaryKey": false,
|
|
162
|
+
"notNull": true
|
|
163
|
+
},
|
|
164
|
+
"status_change": {
|
|
165
|
+
"name": "status_change",
|
|
166
|
+
"type": "incident_status",
|
|
167
|
+
"typeSchema": "public",
|
|
168
|
+
"primaryKey": false,
|
|
169
|
+
"notNull": false
|
|
170
|
+
},
|
|
171
|
+
"visibility": {
|
|
172
|
+
"name": "visibility",
|
|
173
|
+
"type": "incident_content_visibility",
|
|
174
|
+
"typeSchema": "public",
|
|
175
|
+
"primaryKey": false,
|
|
176
|
+
"notNull": true,
|
|
177
|
+
"default": "'public'"
|
|
178
|
+
},
|
|
179
|
+
"created_at": {
|
|
180
|
+
"name": "created_at",
|
|
181
|
+
"type": "timestamp",
|
|
182
|
+
"primaryKey": false,
|
|
183
|
+
"notNull": true,
|
|
184
|
+
"default": "now()"
|
|
185
|
+
},
|
|
186
|
+
"edited_at": {
|
|
187
|
+
"name": "edited_at",
|
|
188
|
+
"type": "timestamp",
|
|
189
|
+
"primaryKey": false,
|
|
190
|
+
"notNull": false
|
|
191
|
+
},
|
|
192
|
+
"edit_history": {
|
|
193
|
+
"name": "edit_history",
|
|
194
|
+
"type": "jsonb",
|
|
195
|
+
"primaryKey": false,
|
|
196
|
+
"notNull": true,
|
|
197
|
+
"default": "'[]'::jsonb"
|
|
198
|
+
},
|
|
199
|
+
"created_by": {
|
|
200
|
+
"name": "created_by",
|
|
201
|
+
"type": "text",
|
|
202
|
+
"primaryKey": false,
|
|
203
|
+
"notNull": false
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"indexes": {},
|
|
207
|
+
"foreignKeys": {
|
|
208
|
+
"incident_updates_incident_id_incidents_id_fk": {
|
|
209
|
+
"name": "incident_updates_incident_id_incidents_id_fk",
|
|
210
|
+
"tableFrom": "incident_updates",
|
|
211
|
+
"tableTo": "incidents",
|
|
212
|
+
"columnsFrom": [
|
|
213
|
+
"incident_id"
|
|
214
|
+
],
|
|
215
|
+
"columnsTo": [
|
|
216
|
+
"id"
|
|
217
|
+
],
|
|
218
|
+
"onDelete": "cascade",
|
|
219
|
+
"onUpdate": "no action"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"compositePrimaryKeys": {},
|
|
223
|
+
"uniqueConstraints": {},
|
|
224
|
+
"policies": {},
|
|
225
|
+
"checkConstraints": {},
|
|
226
|
+
"isRLSEnabled": false
|
|
227
|
+
},
|
|
228
|
+
"public.incidents": {
|
|
229
|
+
"name": "incidents",
|
|
230
|
+
"schema": "",
|
|
231
|
+
"columns": {
|
|
232
|
+
"id": {
|
|
233
|
+
"name": "id",
|
|
234
|
+
"type": "text",
|
|
235
|
+
"primaryKey": true,
|
|
236
|
+
"notNull": true
|
|
237
|
+
},
|
|
238
|
+
"title": {
|
|
239
|
+
"name": "title",
|
|
240
|
+
"type": "text",
|
|
241
|
+
"primaryKey": false,
|
|
242
|
+
"notNull": true
|
|
243
|
+
},
|
|
244
|
+
"description": {
|
|
245
|
+
"name": "description",
|
|
246
|
+
"type": "text",
|
|
247
|
+
"primaryKey": false,
|
|
248
|
+
"notNull": false
|
|
249
|
+
},
|
|
250
|
+
"status": {
|
|
251
|
+
"name": "status",
|
|
252
|
+
"type": "incident_status",
|
|
253
|
+
"typeSchema": "public",
|
|
254
|
+
"primaryKey": false,
|
|
255
|
+
"notNull": true,
|
|
256
|
+
"default": "'investigating'"
|
|
257
|
+
},
|
|
258
|
+
"severity": {
|
|
259
|
+
"name": "severity",
|
|
260
|
+
"type": "incident_severity",
|
|
261
|
+
"typeSchema": "public",
|
|
262
|
+
"primaryKey": false,
|
|
263
|
+
"notNull": true,
|
|
264
|
+
"default": "'major'"
|
|
265
|
+
},
|
|
266
|
+
"suppress_notifications": {
|
|
267
|
+
"name": "suppress_notifications",
|
|
268
|
+
"type": "boolean",
|
|
269
|
+
"primaryKey": false,
|
|
270
|
+
"notNull": true,
|
|
271
|
+
"default": false
|
|
272
|
+
},
|
|
273
|
+
"health_override": {
|
|
274
|
+
"name": "health_override",
|
|
275
|
+
"type": "incident_health_override",
|
|
276
|
+
"typeSchema": "public",
|
|
277
|
+
"primaryKey": false,
|
|
278
|
+
"notNull": false
|
|
279
|
+
},
|
|
280
|
+
"created_at": {
|
|
281
|
+
"name": "created_at",
|
|
282
|
+
"type": "timestamp",
|
|
283
|
+
"primaryKey": false,
|
|
284
|
+
"notNull": true,
|
|
285
|
+
"default": "now()"
|
|
286
|
+
},
|
|
287
|
+
"updated_at": {
|
|
288
|
+
"name": "updated_at",
|
|
289
|
+
"type": "timestamp",
|
|
290
|
+
"primaryKey": false,
|
|
291
|
+
"notNull": true,
|
|
292
|
+
"default": "now()"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"indexes": {},
|
|
296
|
+
"foreignKeys": {},
|
|
297
|
+
"compositePrimaryKeys": {},
|
|
298
|
+
"uniqueConstraints": {},
|
|
299
|
+
"policies": {},
|
|
300
|
+
"checkConstraints": {},
|
|
301
|
+
"isRLSEnabled": false
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"enums": {
|
|
305
|
+
"public.incident_health_override": {
|
|
306
|
+
"name": "incident_health_override",
|
|
307
|
+
"schema": "public",
|
|
308
|
+
"values": [
|
|
309
|
+
"degraded",
|
|
310
|
+
"unhealthy"
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
"public.incident_severity": {
|
|
314
|
+
"name": "incident_severity",
|
|
315
|
+
"schema": "public",
|
|
316
|
+
"values": [
|
|
317
|
+
"minor",
|
|
318
|
+
"major",
|
|
319
|
+
"critical"
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
"public.incident_status": {
|
|
323
|
+
"name": "incident_status",
|
|
324
|
+
"schema": "public",
|
|
325
|
+
"values": [
|
|
326
|
+
"investigating",
|
|
327
|
+
"identified",
|
|
328
|
+
"fixing",
|
|
329
|
+
"monitoring",
|
|
330
|
+
"resolved"
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
"public.incident_content_visibility": {
|
|
334
|
+
"name": "incident_content_visibility",
|
|
335
|
+
"schema": "public",
|
|
336
|
+
"values": [
|
|
337
|
+
"public",
|
|
338
|
+
"logged_in",
|
|
339
|
+
"internal"
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"schemas": {},
|
|
344
|
+
"sequences": {},
|
|
345
|
+
"roles": {},
|
|
346
|
+
"policies": {},
|
|
347
|
+
"views": {},
|
|
348
|
+
"_meta": {
|
|
349
|
+
"columns": {},
|
|
350
|
+
"schemas": {},
|
|
351
|
+
"tables": {}
|
|
352
|
+
}
|
|
353
|
+
}
|