Openstatus www.openstatus.dev

🔥auto resolve incident (#655)

* 🔥auto resolve incident

* 🔥auto resolve incident

* 🔥 fix incident unique

* 🧪 fix tests

* 🧪 fix tests

authored by

Thibault Le Ouay and committed by
GitHub
77f4a4a8 7f48dd20

+4970 -284
+3 -3
apps/server/src/checker/alerting.test.ts
··· 1 1 import { expect, mock, test } from "bun:test"; 2 2 3 - import { triggerAlerting } from "./alerting"; 3 + import { triggerNotifications } from "./alerting"; 4 4 5 5 test.todo("should send email notification", async () => { 6 6 const fn = mock(() => {}); ··· 11 11 }, 12 12 }; 13 13 }); 14 - await triggerAlerting({ 14 + await triggerNotifications({ 15 15 monitorId: "1", 16 - region: "ams", 17 16 statusCode: 400, 17 + notifType: "alert", 18 18 }); 19 19 expect(fn).toHaveBeenCalled(); 20 20 });
+21 -11
apps/server/src/checker/alerting.ts
··· 7 7 selectMonitorSchema, 8 8 selectNotificationSchema, 9 9 } from "@openstatus/db/src/schema"; 10 - import { flyRegionsDict } from "@openstatus/utils"; 11 10 12 11 import { checkerAudit } from "../utils/audit-log"; 13 12 import { providerToFunction } from "./utils"; 14 13 15 - export const triggerAlerting = async ({ 14 + export const triggerNotifications = async ({ 16 15 monitorId, 17 - region, 18 16 statusCode, 19 17 message, 18 + notifType, 20 19 }: { 21 20 monitorId: string; 22 - region: keyof typeof flyRegionsDict; 23 21 statusCode?: number; 24 22 message?: string; 23 + notifType: "alert" | "recovery"; 25 24 }) => { 26 25 console.log(`💌 triggerAlerting for ${monitorId}`); 27 26 const notifications = await db ··· 42 41 `💌 sending notification for ${monitorId} and chanel ${notif.notification.provider}`, 43 42 ); 44 43 const monitor = selectMonitorSchema.parse(notif.monitor); 45 - await providerToFunction[notif.notification.provider]({ 46 - monitor, 47 - notification: selectNotificationSchema.parse(notif.notification), 48 - region: flyRegionsDict[region].location, 49 - statusCode, 50 - message, 51 - }); 44 + switch (notifType) { 45 + case "alert": 46 + await providerToFunction[notif.notification.provider].sendAlert({ 47 + monitor, 48 + notification: selectNotificationSchema.parse(notif.notification), 49 + statusCode, 50 + message, 51 + }); 52 + break; 53 + case "recovery": 54 + await providerToFunction[notif.notification.provider].sendRecovery({ 55 + monitor, 56 + notification: selectNotificationSchema.parse(notif.notification), 57 + statusCode, 58 + message, 59 + }); 60 + break; 61 + } 52 62 // ALPHA 53 63 await checkerAudit.publishAuditLog({ 54 64 id: `monitor:${monitorId}`,
+54 -32
apps/server/src/checker/index.ts
··· 9 9 10 10 import { env } from "../env"; 11 11 import { checkerAudit } from "../utils/audit-log"; 12 - import { triggerAlerting, upsertMonitorStatus } from "./alerting"; 12 + import { triggerNotifications, upsertMonitorStatus } from "./alerting"; 13 13 14 14 export const checkerRoute = new Hono(); 15 15 const redis = Redis.fromEnv(); ··· 124 124 }) 125 125 .onConflictDoNothing(); 126 126 127 - await triggerAlerting({ monitorId, statusCode, message, region }); 127 + await triggerNotifications({ 128 + monitorId, 129 + statusCode, 130 + message, 131 + notifType: "alert", 132 + }); 128 133 } 129 134 } 130 135 } ··· 144 149 metadata: { region: region, statusCode: Number(statusCode) }, 145 150 }); 146 151 147 - // FIX: TO BE IMPROVED 148 - // if (incident) { 149 - // const redisKey = `${monitorId}-${cronTimestamp}-resolved`; 150 - // // We add the new region to the set 151 - // await redis.sadd(redisKey, region); 152 - // // let's add an expire to the set 153 - // await redis.expire(redisKey, 60 * 60 * 24); 154 - // // We get the number of regions affected 155 - // const nbAffectedRegion = await redis.scard(redisKey); 156 - 157 - // const currentMonitor = await db 158 - // .select() 159 - // .from(schema.monitor) 160 - // .where(eq(schema.monitor.id, Number(monitorId))) 161 - // .get(); 152 + if (incident) { 153 + const redisKey = `${monitorId}-${cronTimestamp}-resolved`; 154 + // // We add the new region to the set 155 + await redis.sadd(redisKey, region); 156 + // // let's add an expire to the set 157 + await redis.expire(redisKey, 60 * 60 * 24); 158 + // // We get the number of regions affected 159 + const nbAffectedRegion = await redis.scard(redisKey); 162 160 163 - // const monitor = selectMonitorSchema.parse(currentMonitor); 161 + const currentMonitor = await db 162 + .select() 163 + .from(schema.monitor) 164 + .where(eq(schema.monitor.id, Number(monitorId))) 165 + .get(); 164 166 165 - // if (!cronTimestamp) { 166 - // console.log("cronTimestamp is undefined"); 167 - // } 167 + const monitor = selectMonitorSchema.parse(currentMonitor); 168 168 169 - // const numberOfRegions = monitor.regions.length; 169 + const numberOfRegions = monitor.regions.length; 170 170 171 - // // If the number of affected regions is greater than half of the total region, we trigger the alerting 172 - // // 4 of 6 monitor need to fail to trigger an alerting 173 - // if (nbAffectedRegion > numberOfRegions / 2) { 174 - // // Trigger recovery notification 175 - // // await triggerRecovery({ monitorId, statusCode, message, region }); 176 - // await db.update(incidentTable).set({ 177 - // resolvedAt: new Date(), 178 - // }); 179 - // } 180 - // } 171 + // // If the number of affected regions is greater than half of the total region, we trigger the alerting 172 + // // 4 of 6 monitor need to fail to trigger an alerting 173 + if (nbAffectedRegion > numberOfRegions / 2) { 174 + const incident = await db 175 + .select() 176 + .from(incidentTable) 177 + .where( 178 + and( 179 + eq(incidentTable.monitorId, Number(monitorId)), 180 + isNull(incidentTable.resolvedAt), 181 + isNull(incidentTable.acknowledgedAt), 182 + ), 183 + ) 184 + .get(); 185 + if (incident) { 186 + await db 187 + .update(incidentTable) 188 + .set({ 189 + resolvedAt: new Date(cronTimestamp), 190 + autoResolved: true, 191 + }) 192 + .where(eq(incidentTable.id, incident.id)) 193 + .run(); 194 + await triggerNotifications({ 195 + monitorId, 196 + statusCode, 197 + message, 198 + notifType: "recovery", 199 + }); 200 + } 201 + } 202 + } 181 203 } 182 204 183 205 return c.text("Ok", 200);
+32 -12
apps/server/src/checker/utils.ts
··· 3 3 Notification, 4 4 NotificationProvider, 5 5 } from "@openstatus/db/src/schema"; 6 - import { sendDiscordMessage } from "@openstatus/notification-discord"; 7 - import { send as sendEmail } from "@openstatus/notification-emails"; 8 - import { sendSlackMessage } from "@openstatus/notification-slack"; 9 - import { sendTextMessage } from "@openstatus/notification-twillio-sms"; 10 - import type { flyRegionsDict } from "@openstatus/utils"; 6 + import { 7 + sendAlert as sendDiscordAlert, 8 + sendRecovery as sendDiscordRecovery, 9 + } from "@openstatus/notification-discord"; 10 + import { 11 + sendAlert as sendEmailAlert, 12 + sendRecovery as sendEmailRecovery, 13 + } from "@openstatus/notification-emails"; 14 + import { 15 + sendAlert as sendSlackAlert, 16 + sendRecovery as sendSlackRecovery, 17 + } from "@openstatus/notification-slack"; 18 + import { 19 + sendAlert as sendSmsAlert, 20 + sendRecovery as sendSmsRecovery, 21 + } from "@openstatus/notification-twillio-sms"; 11 22 12 23 type SendNotification = ({ 13 24 monitor, 14 25 notification, 15 - region, 16 26 statusCode, 27 + message, 17 28 }: { 18 29 monitor: Monitor; 19 30 notification: Notification; 20 - region: keyof typeof flyRegionsDict; 21 31 statusCode?: number; 22 32 message?: string; 23 33 }) => Promise<void>; 24 34 35 + type Notif = { 36 + sendAlert: SendNotification; 37 + sendRecovery: SendNotification; 38 + }; 25 39 export const providerToFunction = { 26 - email: sendEmail, 27 - slack: sendSlackMessage, 28 - discord: sendDiscordMessage, 29 - sms: sendTextMessage, 30 - } satisfies Record<NotificationProvider, SendNotification>; 40 + email: { 41 + sendAlert: sendEmailAlert, 42 + sendRecovery: sendEmailRecovery, 43 + }, 44 + slack: { 45 + sendAlert: sendSlackAlert, 46 + sendRecovery: sendSlackRecovery, 47 + }, 48 + discord: { sendAlert: sendDiscordAlert, sendRecovery: sendDiscordRecovery }, 49 + sms: { sendAlert: sendSmsAlert, sendRecovery: sendSmsRecovery }, 50 + } satisfies Record<NotificationProvider, Notif>;
+1
packages/db/drizzle/0018_neat_orphan.sql
··· 1 + ALTER TABLE incident ADD `auto_resolved` integer DEFAULT false;
+3
packages/db/drizzle/0019_dashing_malcolm_colcord.sql
··· 1 + DROP INDEX IF EXISTS `incident_monitor_id_started_at_unique`;--> statement-breakpoint 2 + DROP INDEX IF EXISTS `composite_incident_new_id_started_at_unique`;--> statement-breakpoint 3 + CREATE UNIQUE INDEX `incident_id_monitor_id_started_at_unique` ON `incident` (`id`,`monitor_id`,`started_at`);
+2
packages/db/drizzle/0020_flat_bedlam.sql
··· 1 + DROP INDEX IF EXISTS `incident_id_monitor_id_started_at_unique`;--> statement-breakpoint 2 + CREATE UNIQUE INDEX `incident_monitor_id_started_at_unique` ON `incident` (`monitor_id`,`started_at`);
+1472
packages/db/drizzle/meta/0018_snapshot.json
··· 1 + { 2 + "version": "5", 3 + "dialect": "sqlite", 4 + "id": "8b74891f-e46d-4716-89a8-e2befaca5513", 5 + "prevId": "bbc87c20-bc65-4132-913c-65154793a027", 6 + "tables": { 7 + "status_report_to_monitors": { 8 + "name": "status_report_to_monitors", 9 + "columns": { 10 + "monitor_id": { 11 + "name": "monitor_id", 12 + "type": "integer", 13 + "primaryKey": false, 14 + "notNull": true, 15 + "autoincrement": false 16 + }, 17 + "status_report_id": { 18 + "name": "status_report_id", 19 + "type": "integer", 20 + "primaryKey": false, 21 + "notNull": true, 22 + "autoincrement": false 23 + }, 24 + "created_at": { 25 + "name": "created_at", 26 + "type": "integer", 27 + "primaryKey": false, 28 + "notNull": false, 29 + "autoincrement": false, 30 + "default": "(strftime('%s', 'now'))" 31 + } 32 + }, 33 + "indexes": {}, 34 + "foreignKeys": { 35 + "status_report_to_monitors_monitor_id_monitor_id_fk": { 36 + "name": "status_report_to_monitors_monitor_id_monitor_id_fk", 37 + "tableFrom": "status_report_to_monitors", 38 + "tableTo": "monitor", 39 + "columnsFrom": [ 40 + "monitor_id" 41 + ], 42 + "columnsTo": [ 43 + "id" 44 + ], 45 + "onDelete": "cascade", 46 + "onUpdate": "no action" 47 + }, 48 + "status_report_to_monitors_status_report_id_status_report_id_fk": { 49 + "name": "status_report_to_monitors_status_report_id_status_report_id_fk", 50 + "tableFrom": "status_report_to_monitors", 51 + "tableTo": "status_report", 52 + "columnsFrom": [ 53 + "status_report_id" 54 + ], 55 + "columnsTo": [ 56 + "id" 57 + ], 58 + "onDelete": "cascade", 59 + "onUpdate": "no action" 60 + } 61 + }, 62 + "compositePrimaryKeys": { 63 + "status_report_to_monitors_monitor_id_status_report_id_pk": { 64 + "columns": [ 65 + "monitor_id", 66 + "status_report_id" 67 + ], 68 + "name": "status_report_to_monitors_monitor_id_status_report_id_pk" 69 + } 70 + }, 71 + "uniqueConstraints": {} 72 + }, 73 + "status_reports_to_pages": { 74 + "name": "status_reports_to_pages", 75 + "columns": { 76 + "page_id": { 77 + "name": "page_id", 78 + "type": "integer", 79 + "primaryKey": false, 80 + "notNull": true, 81 + "autoincrement": false 82 + }, 83 + "status_report_id": { 84 + "name": "status_report_id", 85 + "type": "integer", 86 + "primaryKey": false, 87 + "notNull": true, 88 + "autoincrement": false 89 + }, 90 + "created_at": { 91 + "name": "created_at", 92 + "type": "integer", 93 + "primaryKey": false, 94 + "notNull": false, 95 + "autoincrement": false, 96 + "default": "(strftime('%s', 'now'))" 97 + } 98 + }, 99 + "indexes": {}, 100 + "foreignKeys": { 101 + "status_reports_to_pages_page_id_page_id_fk": { 102 + "name": "status_reports_to_pages_page_id_page_id_fk", 103 + "tableFrom": "status_reports_to_pages", 104 + "tableTo": "page", 105 + "columnsFrom": [ 106 + "page_id" 107 + ], 108 + "columnsTo": [ 109 + "id" 110 + ], 111 + "onDelete": "cascade", 112 + "onUpdate": "no action" 113 + }, 114 + "status_reports_to_pages_status_report_id_status_report_id_fk": { 115 + "name": "status_reports_to_pages_status_report_id_status_report_id_fk", 116 + "tableFrom": "status_reports_to_pages", 117 + "tableTo": "status_report", 118 + "columnsFrom": [ 119 + "status_report_id" 120 + ], 121 + "columnsTo": [ 122 + "id" 123 + ], 124 + "onDelete": "cascade", 125 + "onUpdate": "no action" 126 + } 127 + }, 128 + "compositePrimaryKeys": { 129 + "status_reports_to_pages_page_id_status_report_id_pk": { 130 + "columns": [ 131 + "page_id", 132 + "status_report_id" 133 + ], 134 + "name": "status_reports_to_pages_page_id_status_report_id_pk" 135 + } 136 + }, 137 + "uniqueConstraints": {} 138 + }, 139 + "status_report": { 140 + "name": "status_report", 141 + "columns": { 142 + "id": { 143 + "name": "id", 144 + "type": "integer", 145 + "primaryKey": true, 146 + "notNull": true, 147 + "autoincrement": false 148 + }, 149 + "status": { 150 + "name": "status", 151 + "type": "text", 152 + "primaryKey": false, 153 + "notNull": true, 154 + "autoincrement": false 155 + }, 156 + "title": { 157 + "name": "title", 158 + "type": "text(256)", 159 + "primaryKey": false, 160 + "notNull": true, 161 + "autoincrement": false 162 + }, 163 + "workspace_id": { 164 + "name": "workspace_id", 165 + "type": "integer", 166 + "primaryKey": false, 167 + "notNull": false, 168 + "autoincrement": false 169 + }, 170 + "created_at": { 171 + "name": "created_at", 172 + "type": "integer", 173 + "primaryKey": false, 174 + "notNull": false, 175 + "autoincrement": false, 176 + "default": "(strftime('%s', 'now'))" 177 + }, 178 + "updated_at": { 179 + "name": "updated_at", 180 + "type": "integer", 181 + "primaryKey": false, 182 + "notNull": false, 183 + "autoincrement": false, 184 + "default": "(strftime('%s', 'now'))" 185 + } 186 + }, 187 + "indexes": {}, 188 + "foreignKeys": { 189 + "status_report_workspace_id_workspace_id_fk": { 190 + "name": "status_report_workspace_id_workspace_id_fk", 191 + "tableFrom": "status_report", 192 + "tableTo": "workspace", 193 + "columnsFrom": [ 194 + "workspace_id" 195 + ], 196 + "columnsTo": [ 197 + "id" 198 + ], 199 + "onDelete": "no action", 200 + "onUpdate": "no action" 201 + } 202 + }, 203 + "compositePrimaryKeys": {}, 204 + "uniqueConstraints": {} 205 + }, 206 + "status_report_update": { 207 + "name": "status_report_update", 208 + "columns": { 209 + "id": { 210 + "name": "id", 211 + "type": "integer", 212 + "primaryKey": true, 213 + "notNull": true, 214 + "autoincrement": false 215 + }, 216 + "status": { 217 + "name": "status", 218 + "type": "text(4)", 219 + "primaryKey": false, 220 + "notNull": true, 221 + "autoincrement": false 222 + }, 223 + "date": { 224 + "name": "date", 225 + "type": "integer", 226 + "primaryKey": false, 227 + "notNull": true, 228 + "autoincrement": false 229 + }, 230 + "message": { 231 + "name": "message", 232 + "type": "text", 233 + "primaryKey": false, 234 + "notNull": true, 235 + "autoincrement": false 236 + }, 237 + "status_report_id": { 238 + "name": "status_report_id", 239 + "type": "integer", 240 + "primaryKey": false, 241 + "notNull": true, 242 + "autoincrement": false 243 + }, 244 + "created_at": { 245 + "name": "created_at", 246 + "type": "integer", 247 + "primaryKey": false, 248 + "notNull": false, 249 + "autoincrement": false, 250 + "default": "(strftime('%s', 'now'))" 251 + }, 252 + "updated_at": { 253 + "name": "updated_at", 254 + "type": "integer", 255 + "primaryKey": false, 256 + "notNull": false, 257 + "autoincrement": false, 258 + "default": "(strftime('%s', 'now'))" 259 + } 260 + }, 261 + "indexes": {}, 262 + "foreignKeys": { 263 + "status_report_update_status_report_id_status_report_id_fk": { 264 + "name": "status_report_update_status_report_id_status_report_id_fk", 265 + "tableFrom": "status_report_update", 266 + "tableTo": "status_report", 267 + "columnsFrom": [ 268 + "status_report_id" 269 + ], 270 + "columnsTo": [ 271 + "id" 272 + ], 273 + "onDelete": "cascade", 274 + "onUpdate": "no action" 275 + } 276 + }, 277 + "compositePrimaryKeys": {}, 278 + "uniqueConstraints": {} 279 + }, 280 + "integration": { 281 + "name": "integration", 282 + "columns": { 283 + "id": { 284 + "name": "id", 285 + "type": "integer", 286 + "primaryKey": true, 287 + "notNull": true, 288 + "autoincrement": false 289 + }, 290 + "name": { 291 + "name": "name", 292 + "type": "text(256)", 293 + "primaryKey": false, 294 + "notNull": true, 295 + "autoincrement": false 296 + }, 297 + "workspace_id": { 298 + "name": "workspace_id", 299 + "type": "integer", 300 + "primaryKey": false, 301 + "notNull": false, 302 + "autoincrement": false 303 + }, 304 + "credential": { 305 + "name": "credential", 306 + "type": "text", 307 + "primaryKey": false, 308 + "notNull": false, 309 + "autoincrement": false 310 + }, 311 + "external_id": { 312 + "name": "external_id", 313 + "type": "text", 314 + "primaryKey": false, 315 + "notNull": true, 316 + "autoincrement": false 317 + }, 318 + "created_at": { 319 + "name": "created_at", 320 + "type": "integer", 321 + "primaryKey": false, 322 + "notNull": false, 323 + "autoincrement": false, 324 + "default": "(strftime('%s', 'now'))" 325 + }, 326 + "updated_at": { 327 + "name": "updated_at", 328 + "type": "integer", 329 + "primaryKey": false, 330 + "notNull": false, 331 + "autoincrement": false, 332 + "default": "(strftime('%s', 'now'))" 333 + }, 334 + "data": { 335 + "name": "data", 336 + "type": "text", 337 + "primaryKey": false, 338 + "notNull": true, 339 + "autoincrement": false 340 + } 341 + }, 342 + "indexes": {}, 343 + "foreignKeys": { 344 + "integration_workspace_id_workspace_id_fk": { 345 + "name": "integration_workspace_id_workspace_id_fk", 346 + "tableFrom": "integration", 347 + "tableTo": "workspace", 348 + "columnsFrom": [ 349 + "workspace_id" 350 + ], 351 + "columnsTo": [ 352 + "id" 353 + ], 354 + "onDelete": "no action", 355 + "onUpdate": "no action" 356 + } 357 + }, 358 + "compositePrimaryKeys": {}, 359 + "uniqueConstraints": {} 360 + }, 361 + "page": { 362 + "name": "page", 363 + "columns": { 364 + "id": { 365 + "name": "id", 366 + "type": "integer", 367 + "primaryKey": true, 368 + "notNull": true, 369 + "autoincrement": false 370 + }, 371 + "workspace_id": { 372 + "name": "workspace_id", 373 + "type": "integer", 374 + "primaryKey": false, 375 + "notNull": true, 376 + "autoincrement": false 377 + }, 378 + "title": { 379 + "name": "title", 380 + "type": "text", 381 + "primaryKey": false, 382 + "notNull": true, 383 + "autoincrement": false 384 + }, 385 + "description": { 386 + "name": "description", 387 + "type": "text", 388 + "primaryKey": false, 389 + "notNull": true, 390 + "autoincrement": false 391 + }, 392 + "icon": { 393 + "name": "icon", 394 + "type": "text(256)", 395 + "primaryKey": false, 396 + "notNull": false, 397 + "autoincrement": false, 398 + "default": "''" 399 + }, 400 + "slug": { 401 + "name": "slug", 402 + "type": "text(256)", 403 + "primaryKey": false, 404 + "notNull": true, 405 + "autoincrement": false 406 + }, 407 + "custom_domain": { 408 + "name": "custom_domain", 409 + "type": "text(256)", 410 + "primaryKey": false, 411 + "notNull": true, 412 + "autoincrement": false 413 + }, 414 + "published": { 415 + "name": "published", 416 + "type": "integer", 417 + "primaryKey": false, 418 + "notNull": false, 419 + "autoincrement": false, 420 + "default": false 421 + }, 422 + "created_at": { 423 + "name": "created_at", 424 + "type": "integer", 425 + "primaryKey": false, 426 + "notNull": false, 427 + "autoincrement": false, 428 + "default": "(strftime('%s', 'now'))" 429 + }, 430 + "updated_at": { 431 + "name": "updated_at", 432 + "type": "integer", 433 + "primaryKey": false, 434 + "notNull": false, 435 + "autoincrement": false, 436 + "default": "(strftime('%s', 'now'))" 437 + } 438 + }, 439 + "indexes": { 440 + "page_slug_unique": { 441 + "name": "page_slug_unique", 442 + "columns": [ 443 + "slug" 444 + ], 445 + "isUnique": true 446 + } 447 + }, 448 + "foreignKeys": { 449 + "page_workspace_id_workspace_id_fk": { 450 + "name": "page_workspace_id_workspace_id_fk", 451 + "tableFrom": "page", 452 + "tableTo": "workspace", 453 + "columnsFrom": [ 454 + "workspace_id" 455 + ], 456 + "columnsTo": [ 457 + "id" 458 + ], 459 + "onDelete": "cascade", 460 + "onUpdate": "no action" 461 + } 462 + }, 463 + "compositePrimaryKeys": {}, 464 + "uniqueConstraints": {} 465 + }, 466 + "monitor": { 467 + "name": "monitor", 468 + "columns": { 469 + "id": { 470 + "name": "id", 471 + "type": "integer", 472 + "primaryKey": true, 473 + "notNull": true, 474 + "autoincrement": false 475 + }, 476 + "job_type": { 477 + "name": "job_type", 478 + "type": "text", 479 + "primaryKey": false, 480 + "notNull": true, 481 + "autoincrement": false, 482 + "default": "'other'" 483 + }, 484 + "periodicity": { 485 + "name": "periodicity", 486 + "type": "text", 487 + "primaryKey": false, 488 + "notNull": true, 489 + "autoincrement": false, 490 + "default": "'other'" 491 + }, 492 + "status": { 493 + "name": "status", 494 + "type": "text", 495 + "primaryKey": false, 496 + "notNull": true, 497 + "autoincrement": false, 498 + "default": "'active'" 499 + }, 500 + "active": { 501 + "name": "active", 502 + "type": "integer", 503 + "primaryKey": false, 504 + "notNull": false, 505 + "autoincrement": false, 506 + "default": false 507 + }, 508 + "regions": { 509 + "name": "regions", 510 + "type": "text", 511 + "primaryKey": false, 512 + "notNull": true, 513 + "autoincrement": false, 514 + "default": "''" 515 + }, 516 + "url": { 517 + "name": "url", 518 + "type": "text(2048)", 519 + "primaryKey": false, 520 + "notNull": true, 521 + "autoincrement": false 522 + }, 523 + "name": { 524 + "name": "name", 525 + "type": "text(256)", 526 + "primaryKey": false, 527 + "notNull": true, 528 + "autoincrement": false, 529 + "default": "''" 530 + }, 531 + "description": { 532 + "name": "description", 533 + "type": "text", 534 + "primaryKey": false, 535 + "notNull": true, 536 + "autoincrement": false, 537 + "default": "''" 538 + }, 539 + "headers": { 540 + "name": "headers", 541 + "type": "text", 542 + "primaryKey": false, 543 + "notNull": false, 544 + "autoincrement": false, 545 + "default": "''" 546 + }, 547 + "body": { 548 + "name": "body", 549 + "type": "text", 550 + "primaryKey": false, 551 + "notNull": false, 552 + "autoincrement": false, 553 + "default": "''" 554 + }, 555 + "method": { 556 + "name": "method", 557 + "type": "text", 558 + "primaryKey": false, 559 + "notNull": false, 560 + "autoincrement": false, 561 + "default": "'GET'" 562 + }, 563 + "workspace_id": { 564 + "name": "workspace_id", 565 + "type": "integer", 566 + "primaryKey": false, 567 + "notNull": false, 568 + "autoincrement": false 569 + }, 570 + "created_at": { 571 + "name": "created_at", 572 + "type": "integer", 573 + "primaryKey": false, 574 + "notNull": false, 575 + "autoincrement": false, 576 + "default": "(strftime('%s', 'now'))" 577 + }, 578 + "updated_at": { 579 + "name": "updated_at", 580 + "type": "integer", 581 + "primaryKey": false, 582 + "notNull": false, 583 + "autoincrement": false, 584 + "default": "(strftime('%s', 'now'))" 585 + } 586 + }, 587 + "indexes": {}, 588 + "foreignKeys": { 589 + "monitor_workspace_id_workspace_id_fk": { 590 + "name": "monitor_workspace_id_workspace_id_fk", 591 + "tableFrom": "monitor", 592 + "tableTo": "workspace", 593 + "columnsFrom": [ 594 + "workspace_id" 595 + ], 596 + "columnsTo": [ 597 + "id" 598 + ], 599 + "onDelete": "no action", 600 + "onUpdate": "no action" 601 + } 602 + }, 603 + "compositePrimaryKeys": {}, 604 + "uniqueConstraints": {} 605 + }, 606 + "monitors_to_pages": { 607 + "name": "monitors_to_pages", 608 + "columns": { 609 + "monitor_id": { 610 + "name": "monitor_id", 611 + "type": "integer", 612 + "primaryKey": false, 613 + "notNull": true, 614 + "autoincrement": false 615 + }, 616 + "page_id": { 617 + "name": "page_id", 618 + "type": "integer", 619 + "primaryKey": false, 620 + "notNull": true, 621 + "autoincrement": false 622 + }, 623 + "created_at": { 624 + "name": "created_at", 625 + "type": "integer", 626 + "primaryKey": false, 627 + "notNull": false, 628 + "autoincrement": false, 629 + "default": "(strftime('%s', 'now'))" 630 + } 631 + }, 632 + "indexes": {}, 633 + "foreignKeys": { 634 + "monitors_to_pages_monitor_id_monitor_id_fk": { 635 + "name": "monitors_to_pages_monitor_id_monitor_id_fk", 636 + "tableFrom": "monitors_to_pages", 637 + "tableTo": "monitor", 638 + "columnsFrom": [ 639 + "monitor_id" 640 + ], 641 + "columnsTo": [ 642 + "id" 643 + ], 644 + "onDelete": "cascade", 645 + "onUpdate": "no action" 646 + }, 647 + "monitors_to_pages_page_id_page_id_fk": { 648 + "name": "monitors_to_pages_page_id_page_id_fk", 649 + "tableFrom": "monitors_to_pages", 650 + "tableTo": "page", 651 + "columnsFrom": [ 652 + "page_id" 653 + ], 654 + "columnsTo": [ 655 + "id" 656 + ], 657 + "onDelete": "cascade", 658 + "onUpdate": "no action" 659 + } 660 + }, 661 + "compositePrimaryKeys": { 662 + "monitors_to_pages_monitor_id_page_id_pk": { 663 + "columns": [ 664 + "monitor_id", 665 + "page_id" 666 + ], 667 + "name": "monitors_to_pages_monitor_id_page_id_pk" 668 + } 669 + }, 670 + "uniqueConstraints": {} 671 + }, 672 + "user": { 673 + "name": "user", 674 + "columns": { 675 + "id": { 676 + "name": "id", 677 + "type": "integer", 678 + "primaryKey": true, 679 + "notNull": true, 680 + "autoincrement": false 681 + }, 682 + "tenant_id": { 683 + "name": "tenant_id", 684 + "type": "text(256)", 685 + "primaryKey": false, 686 + "notNull": false, 687 + "autoincrement": false 688 + }, 689 + "first_name": { 690 + "name": "first_name", 691 + "type": "text", 692 + "primaryKey": false, 693 + "notNull": false, 694 + "autoincrement": false, 695 + "default": "''" 696 + }, 697 + "last_name": { 698 + "name": "last_name", 699 + "type": "text", 700 + "primaryKey": false, 701 + "notNull": false, 702 + "autoincrement": false, 703 + "default": "''" 704 + }, 705 + "email": { 706 + "name": "email", 707 + "type": "text", 708 + "primaryKey": false, 709 + "notNull": false, 710 + "autoincrement": false, 711 + "default": "''" 712 + }, 713 + "photo_url": { 714 + "name": "photo_url", 715 + "type": "text", 716 + "primaryKey": false, 717 + "notNull": false, 718 + "autoincrement": false, 719 + "default": "''" 720 + }, 721 + "created_at": { 722 + "name": "created_at", 723 + "type": "integer", 724 + "primaryKey": false, 725 + "notNull": false, 726 + "autoincrement": false, 727 + "default": "(strftime('%s', 'now'))" 728 + }, 729 + "updated_at": { 730 + "name": "updated_at", 731 + "type": "integer", 732 + "primaryKey": false, 733 + "notNull": false, 734 + "autoincrement": false, 735 + "default": "(strftime('%s', 'now'))" 736 + } 737 + }, 738 + "indexes": { 739 + "user_tenant_id_unique": { 740 + "name": "user_tenant_id_unique", 741 + "columns": [ 742 + "tenant_id" 743 + ], 744 + "isUnique": true 745 + } 746 + }, 747 + "foreignKeys": {}, 748 + "compositePrimaryKeys": {}, 749 + "uniqueConstraints": {} 750 + }, 751 + "users_to_workspaces": { 752 + "name": "users_to_workspaces", 753 + "columns": { 754 + "user_id": { 755 + "name": "user_id", 756 + "type": "integer", 757 + "primaryKey": false, 758 + "notNull": true, 759 + "autoincrement": false 760 + }, 761 + "workspace_id": { 762 + "name": "workspace_id", 763 + "type": "integer", 764 + "primaryKey": false, 765 + "notNull": true, 766 + "autoincrement": false 767 + }, 768 + "role": { 769 + "name": "role", 770 + "type": "text", 771 + "primaryKey": false, 772 + "notNull": true, 773 + "autoincrement": false, 774 + "default": "'member'" 775 + }, 776 + "created_at": { 777 + "name": "created_at", 778 + "type": "integer", 779 + "primaryKey": false, 780 + "notNull": false, 781 + "autoincrement": false, 782 + "default": "(strftime('%s', 'now'))" 783 + } 784 + }, 785 + "indexes": {}, 786 + "foreignKeys": { 787 + "users_to_workspaces_user_id_user_id_fk": { 788 + "name": "users_to_workspaces_user_id_user_id_fk", 789 + "tableFrom": "users_to_workspaces", 790 + "tableTo": "user", 791 + "columnsFrom": [ 792 + "user_id" 793 + ], 794 + "columnsTo": [ 795 + "id" 796 + ], 797 + "onDelete": "no action", 798 + "onUpdate": "no action" 799 + }, 800 + "users_to_workspaces_workspace_id_workspace_id_fk": { 801 + "name": "users_to_workspaces_workspace_id_workspace_id_fk", 802 + "tableFrom": "users_to_workspaces", 803 + "tableTo": "workspace", 804 + "columnsFrom": [ 805 + "workspace_id" 806 + ], 807 + "columnsTo": [ 808 + "id" 809 + ], 810 + "onDelete": "no action", 811 + "onUpdate": "no action" 812 + } 813 + }, 814 + "compositePrimaryKeys": { 815 + "users_to_workspaces_user_id_workspace_id_pk": { 816 + "columns": [ 817 + "user_id", 818 + "workspace_id" 819 + ], 820 + "name": "users_to_workspaces_user_id_workspace_id_pk" 821 + } 822 + }, 823 + "uniqueConstraints": {} 824 + }, 825 + "page_subscriber": { 826 + "name": "page_subscriber", 827 + "columns": { 828 + "id": { 829 + "name": "id", 830 + "type": "integer", 831 + "primaryKey": true, 832 + "notNull": true, 833 + "autoincrement": false 834 + }, 835 + "email": { 836 + "name": "email", 837 + "type": "text", 838 + "primaryKey": false, 839 + "notNull": true, 840 + "autoincrement": false 841 + }, 842 + "page_id": { 843 + "name": "page_id", 844 + "type": "integer", 845 + "primaryKey": false, 846 + "notNull": true, 847 + "autoincrement": false 848 + }, 849 + "token": { 850 + "name": "token", 851 + "type": "text", 852 + "primaryKey": false, 853 + "notNull": false, 854 + "autoincrement": false 855 + }, 856 + "accepted_at": { 857 + "name": "accepted_at", 858 + "type": "integer", 859 + "primaryKey": false, 860 + "notNull": false, 861 + "autoincrement": false 862 + }, 863 + "expires_at": { 864 + "name": "expires_at", 865 + "type": "integer", 866 + "primaryKey": false, 867 + "notNull": false, 868 + "autoincrement": false 869 + }, 870 + "created_at": { 871 + "name": "created_at", 872 + "type": "integer", 873 + "primaryKey": false, 874 + "notNull": false, 875 + "autoincrement": false, 876 + "default": "(strftime('%s', 'now'))" 877 + }, 878 + "updated_at": { 879 + "name": "updated_at", 880 + "type": "integer", 881 + "primaryKey": false, 882 + "notNull": false, 883 + "autoincrement": false, 884 + "default": "(strftime('%s', 'now'))" 885 + } 886 + }, 887 + "indexes": {}, 888 + "foreignKeys": { 889 + "page_subscriber_page_id_page_id_fk": { 890 + "name": "page_subscriber_page_id_page_id_fk", 891 + "tableFrom": "page_subscriber", 892 + "tableTo": "page", 893 + "columnsFrom": [ 894 + "page_id" 895 + ], 896 + "columnsTo": [ 897 + "id" 898 + ], 899 + "onDelete": "no action", 900 + "onUpdate": "no action" 901 + } 902 + }, 903 + "compositePrimaryKeys": {}, 904 + "uniqueConstraints": {} 905 + }, 906 + "workspace": { 907 + "name": "workspace", 908 + "columns": { 909 + "id": { 910 + "name": "id", 911 + "type": "integer", 912 + "primaryKey": true, 913 + "notNull": true, 914 + "autoincrement": false 915 + }, 916 + "slug": { 917 + "name": "slug", 918 + "type": "text", 919 + "primaryKey": false, 920 + "notNull": true, 921 + "autoincrement": false 922 + }, 923 + "name": { 924 + "name": "name", 925 + "type": "text", 926 + "primaryKey": false, 927 + "notNull": false, 928 + "autoincrement": false 929 + }, 930 + "stripe_id": { 931 + "name": "stripe_id", 932 + "type": "text(256)", 933 + "primaryKey": false, 934 + "notNull": false, 935 + "autoincrement": false 936 + }, 937 + "subscription_id": { 938 + "name": "subscription_id", 939 + "type": "text", 940 + "primaryKey": false, 941 + "notNull": false, 942 + "autoincrement": false 943 + }, 944 + "plan": { 945 + "name": "plan", 946 + "type": "text", 947 + "primaryKey": false, 948 + "notNull": false, 949 + "autoincrement": false 950 + }, 951 + "ends_at": { 952 + "name": "ends_at", 953 + "type": "integer", 954 + "primaryKey": false, 955 + "notNull": false, 956 + "autoincrement": false 957 + }, 958 + "paid_until": { 959 + "name": "paid_until", 960 + "type": "integer", 961 + "primaryKey": false, 962 + "notNull": false, 963 + "autoincrement": false 964 + }, 965 + "created_at": { 966 + "name": "created_at", 967 + "type": "integer", 968 + "primaryKey": false, 969 + "notNull": false, 970 + "autoincrement": false, 971 + "default": "(strftime('%s', 'now'))" 972 + }, 973 + "updated_at": { 974 + "name": "updated_at", 975 + "type": "integer", 976 + "primaryKey": false, 977 + "notNull": false, 978 + "autoincrement": false, 979 + "default": "(strftime('%s', 'now'))" 980 + } 981 + }, 982 + "indexes": { 983 + "workspace_slug_unique": { 984 + "name": "workspace_slug_unique", 985 + "columns": [ 986 + "slug" 987 + ], 988 + "isUnique": true 989 + }, 990 + "workspace_stripe_id_unique": { 991 + "name": "workspace_stripe_id_unique", 992 + "columns": [ 993 + "stripe_id" 994 + ], 995 + "isUnique": true 996 + } 997 + }, 998 + "foreignKeys": {}, 999 + "compositePrimaryKeys": {}, 1000 + "uniqueConstraints": {} 1001 + }, 1002 + "notification": { 1003 + "name": "notification", 1004 + "columns": { 1005 + "id": { 1006 + "name": "id", 1007 + "type": "integer", 1008 + "primaryKey": true, 1009 + "notNull": true, 1010 + "autoincrement": false 1011 + }, 1012 + "name": { 1013 + "name": "name", 1014 + "type": "text", 1015 + "primaryKey": false, 1016 + "notNull": true, 1017 + "autoincrement": false 1018 + }, 1019 + "provider": { 1020 + "name": "provider", 1021 + "type": "text", 1022 + "primaryKey": false, 1023 + "notNull": true, 1024 + "autoincrement": false 1025 + }, 1026 + "data": { 1027 + "name": "data", 1028 + "type": "text", 1029 + "primaryKey": false, 1030 + "notNull": false, 1031 + "autoincrement": false, 1032 + "default": "'{}'" 1033 + }, 1034 + "workspace_id": { 1035 + "name": "workspace_id", 1036 + "type": "integer", 1037 + "primaryKey": false, 1038 + "notNull": false, 1039 + "autoincrement": false 1040 + }, 1041 + "created_at": { 1042 + "name": "created_at", 1043 + "type": "integer", 1044 + "primaryKey": false, 1045 + "notNull": false, 1046 + "autoincrement": false, 1047 + "default": "(strftime('%s', 'now'))" 1048 + }, 1049 + "updated_at": { 1050 + "name": "updated_at", 1051 + "type": "integer", 1052 + "primaryKey": false, 1053 + "notNull": false, 1054 + "autoincrement": false, 1055 + "default": "(strftime('%s', 'now'))" 1056 + } 1057 + }, 1058 + "indexes": {}, 1059 + "foreignKeys": { 1060 + "notification_workspace_id_workspace_id_fk": { 1061 + "name": "notification_workspace_id_workspace_id_fk", 1062 + "tableFrom": "notification", 1063 + "tableTo": "workspace", 1064 + "columnsFrom": [ 1065 + "workspace_id" 1066 + ], 1067 + "columnsTo": [ 1068 + "id" 1069 + ], 1070 + "onDelete": "no action", 1071 + "onUpdate": "no action" 1072 + } 1073 + }, 1074 + "compositePrimaryKeys": {}, 1075 + "uniqueConstraints": {} 1076 + }, 1077 + "notifications_to_monitors": { 1078 + "name": "notifications_to_monitors", 1079 + "columns": { 1080 + "monitor_id": { 1081 + "name": "monitor_id", 1082 + "type": "integer", 1083 + "primaryKey": false, 1084 + "notNull": true, 1085 + "autoincrement": false 1086 + }, 1087 + "notification_id": { 1088 + "name": "notification_id", 1089 + "type": "integer", 1090 + "primaryKey": false, 1091 + "notNull": true, 1092 + "autoincrement": false 1093 + }, 1094 + "created_at": { 1095 + "name": "created_at", 1096 + "type": "integer", 1097 + "primaryKey": false, 1098 + "notNull": false, 1099 + "autoincrement": false, 1100 + "default": "(strftime('%s', 'now'))" 1101 + } 1102 + }, 1103 + "indexes": {}, 1104 + "foreignKeys": { 1105 + "notifications_to_monitors_monitor_id_monitor_id_fk": { 1106 + "name": "notifications_to_monitors_monitor_id_monitor_id_fk", 1107 + "tableFrom": "notifications_to_monitors", 1108 + "tableTo": "monitor", 1109 + "columnsFrom": [ 1110 + "monitor_id" 1111 + ], 1112 + "columnsTo": [ 1113 + "id" 1114 + ], 1115 + "onDelete": "cascade", 1116 + "onUpdate": "no action" 1117 + }, 1118 + "notifications_to_monitors_notification_id_notification_id_fk": { 1119 + "name": "notifications_to_monitors_notification_id_notification_id_fk", 1120 + "tableFrom": "notifications_to_monitors", 1121 + "tableTo": "notification", 1122 + "columnsFrom": [ 1123 + "notification_id" 1124 + ], 1125 + "columnsTo": [ 1126 + "id" 1127 + ], 1128 + "onDelete": "cascade", 1129 + "onUpdate": "no action" 1130 + } 1131 + }, 1132 + "compositePrimaryKeys": { 1133 + "notifications_to_monitors_monitor_id_notification_id_pk": { 1134 + "columns": [ 1135 + "monitor_id", 1136 + "notification_id" 1137 + ], 1138 + "name": "notifications_to_monitors_monitor_id_notification_id_pk" 1139 + } 1140 + }, 1141 + "uniqueConstraints": {} 1142 + }, 1143 + "monitor_status": { 1144 + "name": "monitor_status", 1145 + "columns": { 1146 + "monitor_id": { 1147 + "name": "monitor_id", 1148 + "type": "integer", 1149 + "primaryKey": false, 1150 + "notNull": true, 1151 + "autoincrement": false 1152 + }, 1153 + "region": { 1154 + "name": "region", 1155 + "type": "text", 1156 + "primaryKey": false, 1157 + "notNull": true, 1158 + "autoincrement": false, 1159 + "default": "''" 1160 + }, 1161 + "status": { 1162 + "name": "status", 1163 + "type": "text", 1164 + "primaryKey": false, 1165 + "notNull": true, 1166 + "autoincrement": false, 1167 + "default": "'active'" 1168 + }, 1169 + "created_at": { 1170 + "name": "created_at", 1171 + "type": "integer", 1172 + "primaryKey": false, 1173 + "notNull": false, 1174 + "autoincrement": false, 1175 + "default": "(strftime('%s', 'now'))" 1176 + }, 1177 + "updated_at": { 1178 + "name": "updated_at", 1179 + "type": "integer", 1180 + "primaryKey": false, 1181 + "notNull": false, 1182 + "autoincrement": false, 1183 + "default": "(strftime('%s', 'now'))" 1184 + } 1185 + }, 1186 + "indexes": { 1187 + "monitor_status_idx": { 1188 + "name": "monitor_status_idx", 1189 + "columns": [ 1190 + "monitor_id", 1191 + "region" 1192 + ], 1193 + "isUnique": false 1194 + } 1195 + }, 1196 + "foreignKeys": { 1197 + "monitor_status_monitor_id_monitor_id_fk": { 1198 + "name": "monitor_status_monitor_id_monitor_id_fk", 1199 + "tableFrom": "monitor_status", 1200 + "tableTo": "monitor", 1201 + "columnsFrom": [ 1202 + "monitor_id" 1203 + ], 1204 + "columnsTo": [ 1205 + "id" 1206 + ], 1207 + "onDelete": "cascade", 1208 + "onUpdate": "no action" 1209 + } 1210 + }, 1211 + "compositePrimaryKeys": { 1212 + "monitor_status_monitor_id_region_pk": { 1213 + "columns": [ 1214 + "monitor_id", 1215 + "region" 1216 + ], 1217 + "name": "monitor_status_monitor_id_region_pk" 1218 + } 1219 + }, 1220 + "uniqueConstraints": {} 1221 + }, 1222 + "invitation": { 1223 + "name": "invitation", 1224 + "columns": { 1225 + "id": { 1226 + "name": "id", 1227 + "type": "integer", 1228 + "primaryKey": true, 1229 + "notNull": true, 1230 + "autoincrement": false 1231 + }, 1232 + "email": { 1233 + "name": "email", 1234 + "type": "text", 1235 + "primaryKey": false, 1236 + "notNull": true, 1237 + "autoincrement": false 1238 + }, 1239 + "role": { 1240 + "name": "role", 1241 + "type": "text", 1242 + "primaryKey": false, 1243 + "notNull": true, 1244 + "autoincrement": false, 1245 + "default": "'member'" 1246 + }, 1247 + "workspace_id": { 1248 + "name": "workspace_id", 1249 + "type": "integer", 1250 + "primaryKey": false, 1251 + "notNull": true, 1252 + "autoincrement": false 1253 + }, 1254 + "token": { 1255 + "name": "token", 1256 + "type": "text", 1257 + "primaryKey": false, 1258 + "notNull": true, 1259 + "autoincrement": false 1260 + }, 1261 + "expires_at": { 1262 + "name": "expires_at", 1263 + "type": "integer", 1264 + "primaryKey": false, 1265 + "notNull": true, 1266 + "autoincrement": false 1267 + }, 1268 + "created_at": { 1269 + "name": "created_at", 1270 + "type": "integer", 1271 + "primaryKey": false, 1272 + "notNull": false, 1273 + "autoincrement": false, 1274 + "default": "(strftime('%s', 'now'))" 1275 + }, 1276 + "accepted_at": { 1277 + "name": "accepted_at", 1278 + "type": "integer", 1279 + "primaryKey": false, 1280 + "notNull": false, 1281 + "autoincrement": false 1282 + } 1283 + }, 1284 + "indexes": {}, 1285 + "foreignKeys": {}, 1286 + "compositePrimaryKeys": {}, 1287 + "uniqueConstraints": {} 1288 + }, 1289 + "incident": { 1290 + "name": "incident", 1291 + "columns": { 1292 + "id": { 1293 + "name": "id", 1294 + "type": "integer", 1295 + "primaryKey": true, 1296 + "notNull": true, 1297 + "autoincrement": false 1298 + }, 1299 + "title": { 1300 + "name": "title", 1301 + "type": "text", 1302 + "primaryKey": false, 1303 + "notNull": true, 1304 + "autoincrement": false, 1305 + "default": "''" 1306 + }, 1307 + "summary": { 1308 + "name": "summary", 1309 + "type": "text", 1310 + "primaryKey": false, 1311 + "notNull": true, 1312 + "autoincrement": false, 1313 + "default": "''" 1314 + }, 1315 + "status": { 1316 + "name": "status", 1317 + "type": "text", 1318 + "primaryKey": false, 1319 + "notNull": true, 1320 + "autoincrement": false, 1321 + "default": "'triage'" 1322 + }, 1323 + "monitor_id": { 1324 + "name": "monitor_id", 1325 + "type": "integer", 1326 + "primaryKey": false, 1327 + "notNull": false, 1328 + "autoincrement": false 1329 + }, 1330 + "workspace_id": { 1331 + "name": "workspace_id", 1332 + "type": "integer", 1333 + "primaryKey": false, 1334 + "notNull": false, 1335 + "autoincrement": false 1336 + }, 1337 + "started_at": { 1338 + "name": "started_at", 1339 + "type": "integer", 1340 + "primaryKey": false, 1341 + "notNull": true, 1342 + "autoincrement": false, 1343 + "default": "(strftime('%s', 'now'))" 1344 + }, 1345 + "acknowledged_at": { 1346 + "name": "acknowledged_at", 1347 + "type": "integer", 1348 + "primaryKey": false, 1349 + "notNull": false, 1350 + "autoincrement": false 1351 + }, 1352 + "acknowledged_by": { 1353 + "name": "acknowledged_by", 1354 + "type": "integer", 1355 + "primaryKey": false, 1356 + "notNull": false, 1357 + "autoincrement": false 1358 + }, 1359 + "resolved_at": { 1360 + "name": "resolved_at", 1361 + "type": "integer", 1362 + "primaryKey": false, 1363 + "notNull": false, 1364 + "autoincrement": false 1365 + }, 1366 + "resolved_by": { 1367 + "name": "resolved_by", 1368 + "type": "integer", 1369 + "primaryKey": false, 1370 + "notNull": false, 1371 + "autoincrement": false 1372 + }, 1373 + "auto_resolved": { 1374 + "name": "auto_resolved", 1375 + "type": "integer", 1376 + "primaryKey": false, 1377 + "notNull": false, 1378 + "autoincrement": false, 1379 + "default": false 1380 + }, 1381 + "created_at": { 1382 + "name": "created_at", 1383 + "type": "integer", 1384 + "primaryKey": false, 1385 + "notNull": false, 1386 + "autoincrement": false, 1387 + "default": "(strftime('%s', 'now'))" 1388 + }, 1389 + "updated_at": { 1390 + "name": "updated_at", 1391 + "type": "integer", 1392 + "primaryKey": false, 1393 + "notNull": false, 1394 + "autoincrement": false, 1395 + "default": "(strftime('%s', 'now'))" 1396 + } 1397 + }, 1398 + "indexes": { 1399 + "incident_monitor_id_started_at_unique": { 1400 + "name": "incident_monitor_id_started_at_unique", 1401 + "columns": [ 1402 + "monitor_id", 1403 + "started_at" 1404 + ], 1405 + "isUnique": true 1406 + } 1407 + }, 1408 + "foreignKeys": { 1409 + "incident_monitor_id_monitor_id_fk": { 1410 + "name": "incident_monitor_id_monitor_id_fk", 1411 + "tableFrom": "incident", 1412 + "tableTo": "monitor", 1413 + "columnsFrom": [ 1414 + "monitor_id" 1415 + ], 1416 + "columnsTo": [ 1417 + "id" 1418 + ], 1419 + "onDelete": "set default", 1420 + "onUpdate": "no action" 1421 + }, 1422 + "incident_workspace_id_workspace_id_fk": { 1423 + "name": "incident_workspace_id_workspace_id_fk", 1424 + "tableFrom": "incident", 1425 + "tableTo": "workspace", 1426 + "columnsFrom": [ 1427 + "workspace_id" 1428 + ], 1429 + "columnsTo": [ 1430 + "id" 1431 + ], 1432 + "onDelete": "no action", 1433 + "onUpdate": "no action" 1434 + }, 1435 + "incident_acknowledged_by_user_id_fk": { 1436 + "name": "incident_acknowledged_by_user_id_fk", 1437 + "tableFrom": "incident", 1438 + "tableTo": "user", 1439 + "columnsFrom": [ 1440 + "acknowledged_by" 1441 + ], 1442 + "columnsTo": [ 1443 + "id" 1444 + ], 1445 + "onDelete": "no action", 1446 + "onUpdate": "no action" 1447 + }, 1448 + "incident_resolved_by_user_id_fk": { 1449 + "name": "incident_resolved_by_user_id_fk", 1450 + "tableFrom": "incident", 1451 + "tableTo": "user", 1452 + "columnsFrom": [ 1453 + "resolved_by" 1454 + ], 1455 + "columnsTo": [ 1456 + "id" 1457 + ], 1458 + "onDelete": "no action", 1459 + "onUpdate": "no action" 1460 + } 1461 + }, 1462 + "compositePrimaryKeys": {}, 1463 + "uniqueConstraints": {} 1464 + } 1465 + }, 1466 + "enums": {}, 1467 + "_meta": { 1468 + "schemas": {}, 1469 + "tables": {}, 1470 + "columns": {} 1471 + } 1472 + }
+1473
packages/db/drizzle/meta/0019_snapshot.json
··· 1 + { 2 + "version": "5", 3 + "dialect": "sqlite", 4 + "id": "fed3b3e4-d55d-4370-b39b-c837512a6d8e", 5 + "prevId": "8b74891f-e46d-4716-89a8-e2befaca5513", 6 + "tables": { 7 + "status_report_to_monitors": { 8 + "name": "status_report_to_monitors", 9 + "columns": { 10 + "monitor_id": { 11 + "name": "monitor_id", 12 + "type": "integer", 13 + "primaryKey": false, 14 + "notNull": true, 15 + "autoincrement": false 16 + }, 17 + "status_report_id": { 18 + "name": "status_report_id", 19 + "type": "integer", 20 + "primaryKey": false, 21 + "notNull": true, 22 + "autoincrement": false 23 + }, 24 + "created_at": { 25 + "name": "created_at", 26 + "type": "integer", 27 + "primaryKey": false, 28 + "notNull": false, 29 + "autoincrement": false, 30 + "default": "(strftime('%s', 'now'))" 31 + } 32 + }, 33 + "indexes": {}, 34 + "foreignKeys": { 35 + "status_report_to_monitors_monitor_id_monitor_id_fk": { 36 + "name": "status_report_to_monitors_monitor_id_monitor_id_fk", 37 + "tableFrom": "status_report_to_monitors", 38 + "tableTo": "monitor", 39 + "columnsFrom": [ 40 + "monitor_id" 41 + ], 42 + "columnsTo": [ 43 + "id" 44 + ], 45 + "onDelete": "cascade", 46 + "onUpdate": "no action" 47 + }, 48 + "status_report_to_monitors_status_report_id_status_report_id_fk": { 49 + "name": "status_report_to_monitors_status_report_id_status_report_id_fk", 50 + "tableFrom": "status_report_to_monitors", 51 + "tableTo": "status_report", 52 + "columnsFrom": [ 53 + "status_report_id" 54 + ], 55 + "columnsTo": [ 56 + "id" 57 + ], 58 + "onDelete": "cascade", 59 + "onUpdate": "no action" 60 + } 61 + }, 62 + "compositePrimaryKeys": { 63 + "status_report_to_monitors_monitor_id_status_report_id_pk": { 64 + "columns": [ 65 + "monitor_id", 66 + "status_report_id" 67 + ], 68 + "name": "status_report_to_monitors_monitor_id_status_report_id_pk" 69 + } 70 + }, 71 + "uniqueConstraints": {} 72 + }, 73 + "status_reports_to_pages": { 74 + "name": "status_reports_to_pages", 75 + "columns": { 76 + "page_id": { 77 + "name": "page_id", 78 + "type": "integer", 79 + "primaryKey": false, 80 + "notNull": true, 81 + "autoincrement": false 82 + }, 83 + "status_report_id": { 84 + "name": "status_report_id", 85 + "type": "integer", 86 + "primaryKey": false, 87 + "notNull": true, 88 + "autoincrement": false 89 + }, 90 + "created_at": { 91 + "name": "created_at", 92 + "type": "integer", 93 + "primaryKey": false, 94 + "notNull": false, 95 + "autoincrement": false, 96 + "default": "(strftime('%s', 'now'))" 97 + } 98 + }, 99 + "indexes": {}, 100 + "foreignKeys": { 101 + "status_reports_to_pages_page_id_page_id_fk": { 102 + "name": "status_reports_to_pages_page_id_page_id_fk", 103 + "tableFrom": "status_reports_to_pages", 104 + "tableTo": "page", 105 + "columnsFrom": [ 106 + "page_id" 107 + ], 108 + "columnsTo": [ 109 + "id" 110 + ], 111 + "onDelete": "cascade", 112 + "onUpdate": "no action" 113 + }, 114 + "status_reports_to_pages_status_report_id_status_report_id_fk": { 115 + "name": "status_reports_to_pages_status_report_id_status_report_id_fk", 116 + "tableFrom": "status_reports_to_pages", 117 + "tableTo": "status_report", 118 + "columnsFrom": [ 119 + "status_report_id" 120 + ], 121 + "columnsTo": [ 122 + "id" 123 + ], 124 + "onDelete": "cascade", 125 + "onUpdate": "no action" 126 + } 127 + }, 128 + "compositePrimaryKeys": { 129 + "status_reports_to_pages_page_id_status_report_id_pk": { 130 + "columns": [ 131 + "page_id", 132 + "status_report_id" 133 + ], 134 + "name": "status_reports_to_pages_page_id_status_report_id_pk" 135 + } 136 + }, 137 + "uniqueConstraints": {} 138 + }, 139 + "status_report": { 140 + "name": "status_report", 141 + "columns": { 142 + "id": { 143 + "name": "id", 144 + "type": "integer", 145 + "primaryKey": true, 146 + "notNull": true, 147 + "autoincrement": false 148 + }, 149 + "status": { 150 + "name": "status", 151 + "type": "text", 152 + "primaryKey": false, 153 + "notNull": true, 154 + "autoincrement": false 155 + }, 156 + "title": { 157 + "name": "title", 158 + "type": "text(256)", 159 + "primaryKey": false, 160 + "notNull": true, 161 + "autoincrement": false 162 + }, 163 + "workspace_id": { 164 + "name": "workspace_id", 165 + "type": "integer", 166 + "primaryKey": false, 167 + "notNull": false, 168 + "autoincrement": false 169 + }, 170 + "created_at": { 171 + "name": "created_at", 172 + "type": "integer", 173 + "primaryKey": false, 174 + "notNull": false, 175 + "autoincrement": false, 176 + "default": "(strftime('%s', 'now'))" 177 + }, 178 + "updated_at": { 179 + "name": "updated_at", 180 + "type": "integer", 181 + "primaryKey": false, 182 + "notNull": false, 183 + "autoincrement": false, 184 + "default": "(strftime('%s', 'now'))" 185 + } 186 + }, 187 + "indexes": {}, 188 + "foreignKeys": { 189 + "status_report_workspace_id_workspace_id_fk": { 190 + "name": "status_report_workspace_id_workspace_id_fk", 191 + "tableFrom": "status_report", 192 + "tableTo": "workspace", 193 + "columnsFrom": [ 194 + "workspace_id" 195 + ], 196 + "columnsTo": [ 197 + "id" 198 + ], 199 + "onDelete": "no action", 200 + "onUpdate": "no action" 201 + } 202 + }, 203 + "compositePrimaryKeys": {}, 204 + "uniqueConstraints": {} 205 + }, 206 + "status_report_update": { 207 + "name": "status_report_update", 208 + "columns": { 209 + "id": { 210 + "name": "id", 211 + "type": "integer", 212 + "primaryKey": true, 213 + "notNull": true, 214 + "autoincrement": false 215 + }, 216 + "status": { 217 + "name": "status", 218 + "type": "text(4)", 219 + "primaryKey": false, 220 + "notNull": true, 221 + "autoincrement": false 222 + }, 223 + "date": { 224 + "name": "date", 225 + "type": "integer", 226 + "primaryKey": false, 227 + "notNull": true, 228 + "autoincrement": false 229 + }, 230 + "message": { 231 + "name": "message", 232 + "type": "text", 233 + "primaryKey": false, 234 + "notNull": true, 235 + "autoincrement": false 236 + }, 237 + "status_report_id": { 238 + "name": "status_report_id", 239 + "type": "integer", 240 + "primaryKey": false, 241 + "notNull": true, 242 + "autoincrement": false 243 + }, 244 + "created_at": { 245 + "name": "created_at", 246 + "type": "integer", 247 + "primaryKey": false, 248 + "notNull": false, 249 + "autoincrement": false, 250 + "default": "(strftime('%s', 'now'))" 251 + }, 252 + "updated_at": { 253 + "name": "updated_at", 254 + "type": "integer", 255 + "primaryKey": false, 256 + "notNull": false, 257 + "autoincrement": false, 258 + "default": "(strftime('%s', 'now'))" 259 + } 260 + }, 261 + "indexes": {}, 262 + "foreignKeys": { 263 + "status_report_update_status_report_id_status_report_id_fk": { 264 + "name": "status_report_update_status_report_id_status_report_id_fk", 265 + "tableFrom": "status_report_update", 266 + "tableTo": "status_report", 267 + "columnsFrom": [ 268 + "status_report_id" 269 + ], 270 + "columnsTo": [ 271 + "id" 272 + ], 273 + "onDelete": "cascade", 274 + "onUpdate": "no action" 275 + } 276 + }, 277 + "compositePrimaryKeys": {}, 278 + "uniqueConstraints": {} 279 + }, 280 + "integration": { 281 + "name": "integration", 282 + "columns": { 283 + "id": { 284 + "name": "id", 285 + "type": "integer", 286 + "primaryKey": true, 287 + "notNull": true, 288 + "autoincrement": false 289 + }, 290 + "name": { 291 + "name": "name", 292 + "type": "text(256)", 293 + "primaryKey": false, 294 + "notNull": true, 295 + "autoincrement": false 296 + }, 297 + "workspace_id": { 298 + "name": "workspace_id", 299 + "type": "integer", 300 + "primaryKey": false, 301 + "notNull": false, 302 + "autoincrement": false 303 + }, 304 + "credential": { 305 + "name": "credential", 306 + "type": "text", 307 + "primaryKey": false, 308 + "notNull": false, 309 + "autoincrement": false 310 + }, 311 + "external_id": { 312 + "name": "external_id", 313 + "type": "text", 314 + "primaryKey": false, 315 + "notNull": true, 316 + "autoincrement": false 317 + }, 318 + "created_at": { 319 + "name": "created_at", 320 + "type": "integer", 321 + "primaryKey": false, 322 + "notNull": false, 323 + "autoincrement": false, 324 + "default": "(strftime('%s', 'now'))" 325 + }, 326 + "updated_at": { 327 + "name": "updated_at", 328 + "type": "integer", 329 + "primaryKey": false, 330 + "notNull": false, 331 + "autoincrement": false, 332 + "default": "(strftime('%s', 'now'))" 333 + }, 334 + "data": { 335 + "name": "data", 336 + "type": "text", 337 + "primaryKey": false, 338 + "notNull": true, 339 + "autoincrement": false 340 + } 341 + }, 342 + "indexes": {}, 343 + "foreignKeys": { 344 + "integration_workspace_id_workspace_id_fk": { 345 + "name": "integration_workspace_id_workspace_id_fk", 346 + "tableFrom": "integration", 347 + "tableTo": "workspace", 348 + "columnsFrom": [ 349 + "workspace_id" 350 + ], 351 + "columnsTo": [ 352 + "id" 353 + ], 354 + "onDelete": "no action", 355 + "onUpdate": "no action" 356 + } 357 + }, 358 + "compositePrimaryKeys": {}, 359 + "uniqueConstraints": {} 360 + }, 361 + "page": { 362 + "name": "page", 363 + "columns": { 364 + "id": { 365 + "name": "id", 366 + "type": "integer", 367 + "primaryKey": true, 368 + "notNull": true, 369 + "autoincrement": false 370 + }, 371 + "workspace_id": { 372 + "name": "workspace_id", 373 + "type": "integer", 374 + "primaryKey": false, 375 + "notNull": true, 376 + "autoincrement": false 377 + }, 378 + "title": { 379 + "name": "title", 380 + "type": "text", 381 + "primaryKey": false, 382 + "notNull": true, 383 + "autoincrement": false 384 + }, 385 + "description": { 386 + "name": "description", 387 + "type": "text", 388 + "primaryKey": false, 389 + "notNull": true, 390 + "autoincrement": false 391 + }, 392 + "icon": { 393 + "name": "icon", 394 + "type": "text(256)", 395 + "primaryKey": false, 396 + "notNull": false, 397 + "autoincrement": false, 398 + "default": "''" 399 + }, 400 + "slug": { 401 + "name": "slug", 402 + "type": "text(256)", 403 + "primaryKey": false, 404 + "notNull": true, 405 + "autoincrement": false 406 + }, 407 + "custom_domain": { 408 + "name": "custom_domain", 409 + "type": "text(256)", 410 + "primaryKey": false, 411 + "notNull": true, 412 + "autoincrement": false 413 + }, 414 + "published": { 415 + "name": "published", 416 + "type": "integer", 417 + "primaryKey": false, 418 + "notNull": false, 419 + "autoincrement": false, 420 + "default": false 421 + }, 422 + "created_at": { 423 + "name": "created_at", 424 + "type": "integer", 425 + "primaryKey": false, 426 + "notNull": false, 427 + "autoincrement": false, 428 + "default": "(strftime('%s', 'now'))" 429 + }, 430 + "updated_at": { 431 + "name": "updated_at", 432 + "type": "integer", 433 + "primaryKey": false, 434 + "notNull": false, 435 + "autoincrement": false, 436 + "default": "(strftime('%s', 'now'))" 437 + } 438 + }, 439 + "indexes": { 440 + "page_slug_unique": { 441 + "name": "page_slug_unique", 442 + "columns": [ 443 + "slug" 444 + ], 445 + "isUnique": true 446 + } 447 + }, 448 + "foreignKeys": { 449 + "page_workspace_id_workspace_id_fk": { 450 + "name": "page_workspace_id_workspace_id_fk", 451 + "tableFrom": "page", 452 + "tableTo": "workspace", 453 + "columnsFrom": [ 454 + "workspace_id" 455 + ], 456 + "columnsTo": [ 457 + "id" 458 + ], 459 + "onDelete": "cascade", 460 + "onUpdate": "no action" 461 + } 462 + }, 463 + "compositePrimaryKeys": {}, 464 + "uniqueConstraints": {} 465 + }, 466 + "monitor": { 467 + "name": "monitor", 468 + "columns": { 469 + "id": { 470 + "name": "id", 471 + "type": "integer", 472 + "primaryKey": true, 473 + "notNull": true, 474 + "autoincrement": false 475 + }, 476 + "job_type": { 477 + "name": "job_type", 478 + "type": "text", 479 + "primaryKey": false, 480 + "notNull": true, 481 + "autoincrement": false, 482 + "default": "'other'" 483 + }, 484 + "periodicity": { 485 + "name": "periodicity", 486 + "type": "text", 487 + "primaryKey": false, 488 + "notNull": true, 489 + "autoincrement": false, 490 + "default": "'other'" 491 + }, 492 + "status": { 493 + "name": "status", 494 + "type": "text", 495 + "primaryKey": false, 496 + "notNull": true, 497 + "autoincrement": false, 498 + "default": "'active'" 499 + }, 500 + "active": { 501 + "name": "active", 502 + "type": "integer", 503 + "primaryKey": false, 504 + "notNull": false, 505 + "autoincrement": false, 506 + "default": false 507 + }, 508 + "regions": { 509 + "name": "regions", 510 + "type": "text", 511 + "primaryKey": false, 512 + "notNull": true, 513 + "autoincrement": false, 514 + "default": "''" 515 + }, 516 + "url": { 517 + "name": "url", 518 + "type": "text(2048)", 519 + "primaryKey": false, 520 + "notNull": true, 521 + "autoincrement": false 522 + }, 523 + "name": { 524 + "name": "name", 525 + "type": "text(256)", 526 + "primaryKey": false, 527 + "notNull": true, 528 + "autoincrement": false, 529 + "default": "''" 530 + }, 531 + "description": { 532 + "name": "description", 533 + "type": "text", 534 + "primaryKey": false, 535 + "notNull": true, 536 + "autoincrement": false, 537 + "default": "''" 538 + }, 539 + "headers": { 540 + "name": "headers", 541 + "type": "text", 542 + "primaryKey": false, 543 + "notNull": false, 544 + "autoincrement": false, 545 + "default": "''" 546 + }, 547 + "body": { 548 + "name": "body", 549 + "type": "text", 550 + "primaryKey": false, 551 + "notNull": false, 552 + "autoincrement": false, 553 + "default": "''" 554 + }, 555 + "method": { 556 + "name": "method", 557 + "type": "text", 558 + "primaryKey": false, 559 + "notNull": false, 560 + "autoincrement": false, 561 + "default": "'GET'" 562 + }, 563 + "workspace_id": { 564 + "name": "workspace_id", 565 + "type": "integer", 566 + "primaryKey": false, 567 + "notNull": false, 568 + "autoincrement": false 569 + }, 570 + "created_at": { 571 + "name": "created_at", 572 + "type": "integer", 573 + "primaryKey": false, 574 + "notNull": false, 575 + "autoincrement": false, 576 + "default": "(strftime('%s', 'now'))" 577 + }, 578 + "updated_at": { 579 + "name": "updated_at", 580 + "type": "integer", 581 + "primaryKey": false, 582 + "notNull": false, 583 + "autoincrement": false, 584 + "default": "(strftime('%s', 'now'))" 585 + } 586 + }, 587 + "indexes": {}, 588 + "foreignKeys": { 589 + "monitor_workspace_id_workspace_id_fk": { 590 + "name": "monitor_workspace_id_workspace_id_fk", 591 + "tableFrom": "monitor", 592 + "tableTo": "workspace", 593 + "columnsFrom": [ 594 + "workspace_id" 595 + ], 596 + "columnsTo": [ 597 + "id" 598 + ], 599 + "onDelete": "no action", 600 + "onUpdate": "no action" 601 + } 602 + }, 603 + "compositePrimaryKeys": {}, 604 + "uniqueConstraints": {} 605 + }, 606 + "monitors_to_pages": { 607 + "name": "monitors_to_pages", 608 + "columns": { 609 + "monitor_id": { 610 + "name": "monitor_id", 611 + "type": "integer", 612 + "primaryKey": false, 613 + "notNull": true, 614 + "autoincrement": false 615 + }, 616 + "page_id": { 617 + "name": "page_id", 618 + "type": "integer", 619 + "primaryKey": false, 620 + "notNull": true, 621 + "autoincrement": false 622 + }, 623 + "created_at": { 624 + "name": "created_at", 625 + "type": "integer", 626 + "primaryKey": false, 627 + "notNull": false, 628 + "autoincrement": false, 629 + "default": "(strftime('%s', 'now'))" 630 + } 631 + }, 632 + "indexes": {}, 633 + "foreignKeys": { 634 + "monitors_to_pages_monitor_id_monitor_id_fk": { 635 + "name": "monitors_to_pages_monitor_id_monitor_id_fk", 636 + "tableFrom": "monitors_to_pages", 637 + "tableTo": "monitor", 638 + "columnsFrom": [ 639 + "monitor_id" 640 + ], 641 + "columnsTo": [ 642 + "id" 643 + ], 644 + "onDelete": "cascade", 645 + "onUpdate": "no action" 646 + }, 647 + "monitors_to_pages_page_id_page_id_fk": { 648 + "name": "monitors_to_pages_page_id_page_id_fk", 649 + "tableFrom": "monitors_to_pages", 650 + "tableTo": "page", 651 + "columnsFrom": [ 652 + "page_id" 653 + ], 654 + "columnsTo": [ 655 + "id" 656 + ], 657 + "onDelete": "cascade", 658 + "onUpdate": "no action" 659 + } 660 + }, 661 + "compositePrimaryKeys": { 662 + "monitors_to_pages_monitor_id_page_id_pk": { 663 + "columns": [ 664 + "monitor_id", 665 + "page_id" 666 + ], 667 + "name": "monitors_to_pages_monitor_id_page_id_pk" 668 + } 669 + }, 670 + "uniqueConstraints": {} 671 + }, 672 + "user": { 673 + "name": "user", 674 + "columns": { 675 + "id": { 676 + "name": "id", 677 + "type": "integer", 678 + "primaryKey": true, 679 + "notNull": true, 680 + "autoincrement": false 681 + }, 682 + "tenant_id": { 683 + "name": "tenant_id", 684 + "type": "text(256)", 685 + "primaryKey": false, 686 + "notNull": false, 687 + "autoincrement": false 688 + }, 689 + "first_name": { 690 + "name": "first_name", 691 + "type": "text", 692 + "primaryKey": false, 693 + "notNull": false, 694 + "autoincrement": false, 695 + "default": "''" 696 + }, 697 + "last_name": { 698 + "name": "last_name", 699 + "type": "text", 700 + "primaryKey": false, 701 + "notNull": false, 702 + "autoincrement": false, 703 + "default": "''" 704 + }, 705 + "email": { 706 + "name": "email", 707 + "type": "text", 708 + "primaryKey": false, 709 + "notNull": false, 710 + "autoincrement": false, 711 + "default": "''" 712 + }, 713 + "photo_url": { 714 + "name": "photo_url", 715 + "type": "text", 716 + "primaryKey": false, 717 + "notNull": false, 718 + "autoincrement": false, 719 + "default": "''" 720 + }, 721 + "created_at": { 722 + "name": "created_at", 723 + "type": "integer", 724 + "primaryKey": false, 725 + "notNull": false, 726 + "autoincrement": false, 727 + "default": "(strftime('%s', 'now'))" 728 + }, 729 + "updated_at": { 730 + "name": "updated_at", 731 + "type": "integer", 732 + "primaryKey": false, 733 + "notNull": false, 734 + "autoincrement": false, 735 + "default": "(strftime('%s', 'now'))" 736 + } 737 + }, 738 + "indexes": { 739 + "user_tenant_id_unique": { 740 + "name": "user_tenant_id_unique", 741 + "columns": [ 742 + "tenant_id" 743 + ], 744 + "isUnique": true 745 + } 746 + }, 747 + "foreignKeys": {}, 748 + "compositePrimaryKeys": {}, 749 + "uniqueConstraints": {} 750 + }, 751 + "users_to_workspaces": { 752 + "name": "users_to_workspaces", 753 + "columns": { 754 + "user_id": { 755 + "name": "user_id", 756 + "type": "integer", 757 + "primaryKey": false, 758 + "notNull": true, 759 + "autoincrement": false 760 + }, 761 + "workspace_id": { 762 + "name": "workspace_id", 763 + "type": "integer", 764 + "primaryKey": false, 765 + "notNull": true, 766 + "autoincrement": false 767 + }, 768 + "role": { 769 + "name": "role", 770 + "type": "text", 771 + "primaryKey": false, 772 + "notNull": true, 773 + "autoincrement": false, 774 + "default": "'member'" 775 + }, 776 + "created_at": { 777 + "name": "created_at", 778 + "type": "integer", 779 + "primaryKey": false, 780 + "notNull": false, 781 + "autoincrement": false, 782 + "default": "(strftime('%s', 'now'))" 783 + } 784 + }, 785 + "indexes": {}, 786 + "foreignKeys": { 787 + "users_to_workspaces_user_id_user_id_fk": { 788 + "name": "users_to_workspaces_user_id_user_id_fk", 789 + "tableFrom": "users_to_workspaces", 790 + "tableTo": "user", 791 + "columnsFrom": [ 792 + "user_id" 793 + ], 794 + "columnsTo": [ 795 + "id" 796 + ], 797 + "onDelete": "no action", 798 + "onUpdate": "no action" 799 + }, 800 + "users_to_workspaces_workspace_id_workspace_id_fk": { 801 + "name": "users_to_workspaces_workspace_id_workspace_id_fk", 802 + "tableFrom": "users_to_workspaces", 803 + "tableTo": "workspace", 804 + "columnsFrom": [ 805 + "workspace_id" 806 + ], 807 + "columnsTo": [ 808 + "id" 809 + ], 810 + "onDelete": "no action", 811 + "onUpdate": "no action" 812 + } 813 + }, 814 + "compositePrimaryKeys": { 815 + "users_to_workspaces_user_id_workspace_id_pk": { 816 + "columns": [ 817 + "user_id", 818 + "workspace_id" 819 + ], 820 + "name": "users_to_workspaces_user_id_workspace_id_pk" 821 + } 822 + }, 823 + "uniqueConstraints": {} 824 + }, 825 + "page_subscriber": { 826 + "name": "page_subscriber", 827 + "columns": { 828 + "id": { 829 + "name": "id", 830 + "type": "integer", 831 + "primaryKey": true, 832 + "notNull": true, 833 + "autoincrement": false 834 + }, 835 + "email": { 836 + "name": "email", 837 + "type": "text", 838 + "primaryKey": false, 839 + "notNull": true, 840 + "autoincrement": false 841 + }, 842 + "page_id": { 843 + "name": "page_id", 844 + "type": "integer", 845 + "primaryKey": false, 846 + "notNull": true, 847 + "autoincrement": false 848 + }, 849 + "token": { 850 + "name": "token", 851 + "type": "text", 852 + "primaryKey": false, 853 + "notNull": false, 854 + "autoincrement": false 855 + }, 856 + "accepted_at": { 857 + "name": "accepted_at", 858 + "type": "integer", 859 + "primaryKey": false, 860 + "notNull": false, 861 + "autoincrement": false 862 + }, 863 + "expires_at": { 864 + "name": "expires_at", 865 + "type": "integer", 866 + "primaryKey": false, 867 + "notNull": false, 868 + "autoincrement": false 869 + }, 870 + "created_at": { 871 + "name": "created_at", 872 + "type": "integer", 873 + "primaryKey": false, 874 + "notNull": false, 875 + "autoincrement": false, 876 + "default": "(strftime('%s', 'now'))" 877 + }, 878 + "updated_at": { 879 + "name": "updated_at", 880 + "type": "integer", 881 + "primaryKey": false, 882 + "notNull": false, 883 + "autoincrement": false, 884 + "default": "(strftime('%s', 'now'))" 885 + } 886 + }, 887 + "indexes": {}, 888 + "foreignKeys": { 889 + "page_subscriber_page_id_page_id_fk": { 890 + "name": "page_subscriber_page_id_page_id_fk", 891 + "tableFrom": "page_subscriber", 892 + "tableTo": "page", 893 + "columnsFrom": [ 894 + "page_id" 895 + ], 896 + "columnsTo": [ 897 + "id" 898 + ], 899 + "onDelete": "no action", 900 + "onUpdate": "no action" 901 + } 902 + }, 903 + "compositePrimaryKeys": {}, 904 + "uniqueConstraints": {} 905 + }, 906 + "workspace": { 907 + "name": "workspace", 908 + "columns": { 909 + "id": { 910 + "name": "id", 911 + "type": "integer", 912 + "primaryKey": true, 913 + "notNull": true, 914 + "autoincrement": false 915 + }, 916 + "slug": { 917 + "name": "slug", 918 + "type": "text", 919 + "primaryKey": false, 920 + "notNull": true, 921 + "autoincrement": false 922 + }, 923 + "name": { 924 + "name": "name", 925 + "type": "text", 926 + "primaryKey": false, 927 + "notNull": false, 928 + "autoincrement": false 929 + }, 930 + "stripe_id": { 931 + "name": "stripe_id", 932 + "type": "text(256)", 933 + "primaryKey": false, 934 + "notNull": false, 935 + "autoincrement": false 936 + }, 937 + "subscription_id": { 938 + "name": "subscription_id", 939 + "type": "text", 940 + "primaryKey": false, 941 + "notNull": false, 942 + "autoincrement": false 943 + }, 944 + "plan": { 945 + "name": "plan", 946 + "type": "text", 947 + "primaryKey": false, 948 + "notNull": false, 949 + "autoincrement": false 950 + }, 951 + "ends_at": { 952 + "name": "ends_at", 953 + "type": "integer", 954 + "primaryKey": false, 955 + "notNull": false, 956 + "autoincrement": false 957 + }, 958 + "paid_until": { 959 + "name": "paid_until", 960 + "type": "integer", 961 + "primaryKey": false, 962 + "notNull": false, 963 + "autoincrement": false 964 + }, 965 + "created_at": { 966 + "name": "created_at", 967 + "type": "integer", 968 + "primaryKey": false, 969 + "notNull": false, 970 + "autoincrement": false, 971 + "default": "(strftime('%s', 'now'))" 972 + }, 973 + "updated_at": { 974 + "name": "updated_at", 975 + "type": "integer", 976 + "primaryKey": false, 977 + "notNull": false, 978 + "autoincrement": false, 979 + "default": "(strftime('%s', 'now'))" 980 + } 981 + }, 982 + "indexes": { 983 + "workspace_slug_unique": { 984 + "name": "workspace_slug_unique", 985 + "columns": [ 986 + "slug" 987 + ], 988 + "isUnique": true 989 + }, 990 + "workspace_stripe_id_unique": { 991 + "name": "workspace_stripe_id_unique", 992 + "columns": [ 993 + "stripe_id" 994 + ], 995 + "isUnique": true 996 + } 997 + }, 998 + "foreignKeys": {}, 999 + "compositePrimaryKeys": {}, 1000 + "uniqueConstraints": {} 1001 + }, 1002 + "notification": { 1003 + "name": "notification", 1004 + "columns": { 1005 + "id": { 1006 + "name": "id", 1007 + "type": "integer", 1008 + "primaryKey": true, 1009 + "notNull": true, 1010 + "autoincrement": false 1011 + }, 1012 + "name": { 1013 + "name": "name", 1014 + "type": "text", 1015 + "primaryKey": false, 1016 + "notNull": true, 1017 + "autoincrement": false 1018 + }, 1019 + "provider": { 1020 + "name": "provider", 1021 + "type": "text", 1022 + "primaryKey": false, 1023 + "notNull": true, 1024 + "autoincrement": false 1025 + }, 1026 + "data": { 1027 + "name": "data", 1028 + "type": "text", 1029 + "primaryKey": false, 1030 + "notNull": false, 1031 + "autoincrement": false, 1032 + "default": "'{}'" 1033 + }, 1034 + "workspace_id": { 1035 + "name": "workspace_id", 1036 + "type": "integer", 1037 + "primaryKey": false, 1038 + "notNull": false, 1039 + "autoincrement": false 1040 + }, 1041 + "created_at": { 1042 + "name": "created_at", 1043 + "type": "integer", 1044 + "primaryKey": false, 1045 + "notNull": false, 1046 + "autoincrement": false, 1047 + "default": "(strftime('%s', 'now'))" 1048 + }, 1049 + "updated_at": { 1050 + "name": "updated_at", 1051 + "type": "integer", 1052 + "primaryKey": false, 1053 + "notNull": false, 1054 + "autoincrement": false, 1055 + "default": "(strftime('%s', 'now'))" 1056 + } 1057 + }, 1058 + "indexes": {}, 1059 + "foreignKeys": { 1060 + "notification_workspace_id_workspace_id_fk": { 1061 + "name": "notification_workspace_id_workspace_id_fk", 1062 + "tableFrom": "notification", 1063 + "tableTo": "workspace", 1064 + "columnsFrom": [ 1065 + "workspace_id" 1066 + ], 1067 + "columnsTo": [ 1068 + "id" 1069 + ], 1070 + "onDelete": "no action", 1071 + "onUpdate": "no action" 1072 + } 1073 + }, 1074 + "compositePrimaryKeys": {}, 1075 + "uniqueConstraints": {} 1076 + }, 1077 + "notifications_to_monitors": { 1078 + "name": "notifications_to_monitors", 1079 + "columns": { 1080 + "monitor_id": { 1081 + "name": "monitor_id", 1082 + "type": "integer", 1083 + "primaryKey": false, 1084 + "notNull": true, 1085 + "autoincrement": false 1086 + }, 1087 + "notification_id": { 1088 + "name": "notification_id", 1089 + "type": "integer", 1090 + "primaryKey": false, 1091 + "notNull": true, 1092 + "autoincrement": false 1093 + }, 1094 + "created_at": { 1095 + "name": "created_at", 1096 + "type": "integer", 1097 + "primaryKey": false, 1098 + "notNull": false, 1099 + "autoincrement": false, 1100 + "default": "(strftime('%s', 'now'))" 1101 + } 1102 + }, 1103 + "indexes": {}, 1104 + "foreignKeys": { 1105 + "notifications_to_monitors_monitor_id_monitor_id_fk": { 1106 + "name": "notifications_to_monitors_monitor_id_monitor_id_fk", 1107 + "tableFrom": "notifications_to_monitors", 1108 + "tableTo": "monitor", 1109 + "columnsFrom": [ 1110 + "monitor_id" 1111 + ], 1112 + "columnsTo": [ 1113 + "id" 1114 + ], 1115 + "onDelete": "cascade", 1116 + "onUpdate": "no action" 1117 + }, 1118 + "notifications_to_monitors_notification_id_notification_id_fk": { 1119 + "name": "notifications_to_monitors_notification_id_notification_id_fk", 1120 + "tableFrom": "notifications_to_monitors", 1121 + "tableTo": "notification", 1122 + "columnsFrom": [ 1123 + "notification_id" 1124 + ], 1125 + "columnsTo": [ 1126 + "id" 1127 + ], 1128 + "onDelete": "cascade", 1129 + "onUpdate": "no action" 1130 + } 1131 + }, 1132 + "compositePrimaryKeys": { 1133 + "notifications_to_monitors_monitor_id_notification_id_pk": { 1134 + "columns": [ 1135 + "monitor_id", 1136 + "notification_id" 1137 + ], 1138 + "name": "notifications_to_monitors_monitor_id_notification_id_pk" 1139 + } 1140 + }, 1141 + "uniqueConstraints": {} 1142 + }, 1143 + "monitor_status": { 1144 + "name": "monitor_status", 1145 + "columns": { 1146 + "monitor_id": { 1147 + "name": "monitor_id", 1148 + "type": "integer", 1149 + "primaryKey": false, 1150 + "notNull": true, 1151 + "autoincrement": false 1152 + }, 1153 + "region": { 1154 + "name": "region", 1155 + "type": "text", 1156 + "primaryKey": false, 1157 + "notNull": true, 1158 + "autoincrement": false, 1159 + "default": "''" 1160 + }, 1161 + "status": { 1162 + "name": "status", 1163 + "type": "text", 1164 + "primaryKey": false, 1165 + "notNull": true, 1166 + "autoincrement": false, 1167 + "default": "'active'" 1168 + }, 1169 + "created_at": { 1170 + "name": "created_at", 1171 + "type": "integer", 1172 + "primaryKey": false, 1173 + "notNull": false, 1174 + "autoincrement": false, 1175 + "default": "(strftime('%s', 'now'))" 1176 + }, 1177 + "updated_at": { 1178 + "name": "updated_at", 1179 + "type": "integer", 1180 + "primaryKey": false, 1181 + "notNull": false, 1182 + "autoincrement": false, 1183 + "default": "(strftime('%s', 'now'))" 1184 + } 1185 + }, 1186 + "indexes": { 1187 + "monitor_status_idx": { 1188 + "name": "monitor_status_idx", 1189 + "columns": [ 1190 + "monitor_id", 1191 + "region" 1192 + ], 1193 + "isUnique": false 1194 + } 1195 + }, 1196 + "foreignKeys": { 1197 + "monitor_status_monitor_id_monitor_id_fk": { 1198 + "name": "monitor_status_monitor_id_monitor_id_fk", 1199 + "tableFrom": "monitor_status", 1200 + "tableTo": "monitor", 1201 + "columnsFrom": [ 1202 + "monitor_id" 1203 + ], 1204 + "columnsTo": [ 1205 + "id" 1206 + ], 1207 + "onDelete": "cascade", 1208 + "onUpdate": "no action" 1209 + } 1210 + }, 1211 + "compositePrimaryKeys": { 1212 + "monitor_status_monitor_id_region_pk": { 1213 + "columns": [ 1214 + "monitor_id", 1215 + "region" 1216 + ], 1217 + "name": "monitor_status_monitor_id_region_pk" 1218 + } 1219 + }, 1220 + "uniqueConstraints": {} 1221 + }, 1222 + "invitation": { 1223 + "name": "invitation", 1224 + "columns": { 1225 + "id": { 1226 + "name": "id", 1227 + "type": "integer", 1228 + "primaryKey": true, 1229 + "notNull": true, 1230 + "autoincrement": false 1231 + }, 1232 + "email": { 1233 + "name": "email", 1234 + "type": "text", 1235 + "primaryKey": false, 1236 + "notNull": true, 1237 + "autoincrement": false 1238 + }, 1239 + "role": { 1240 + "name": "role", 1241 + "type": "text", 1242 + "primaryKey": false, 1243 + "notNull": true, 1244 + "autoincrement": false, 1245 + "default": "'member'" 1246 + }, 1247 + "workspace_id": { 1248 + "name": "workspace_id", 1249 + "type": "integer", 1250 + "primaryKey": false, 1251 + "notNull": true, 1252 + "autoincrement": false 1253 + }, 1254 + "token": { 1255 + "name": "token", 1256 + "type": "text", 1257 + "primaryKey": false, 1258 + "notNull": true, 1259 + "autoincrement": false 1260 + }, 1261 + "expires_at": { 1262 + "name": "expires_at", 1263 + "type": "integer", 1264 + "primaryKey": false, 1265 + "notNull": true, 1266 + "autoincrement": false 1267 + }, 1268 + "created_at": { 1269 + "name": "created_at", 1270 + "type": "integer", 1271 + "primaryKey": false, 1272 + "notNull": false, 1273 + "autoincrement": false, 1274 + "default": "(strftime('%s', 'now'))" 1275 + }, 1276 + "accepted_at": { 1277 + "name": "accepted_at", 1278 + "type": "integer", 1279 + "primaryKey": false, 1280 + "notNull": false, 1281 + "autoincrement": false 1282 + } 1283 + }, 1284 + "indexes": {}, 1285 + "foreignKeys": {}, 1286 + "compositePrimaryKeys": {}, 1287 + "uniqueConstraints": {} 1288 + }, 1289 + "incident": { 1290 + "name": "incident", 1291 + "columns": { 1292 + "id": { 1293 + "name": "id", 1294 + "type": "integer", 1295 + "primaryKey": true, 1296 + "notNull": true, 1297 + "autoincrement": false 1298 + }, 1299 + "title": { 1300 + "name": "title", 1301 + "type": "text", 1302 + "primaryKey": false, 1303 + "notNull": true, 1304 + "autoincrement": false, 1305 + "default": "''" 1306 + }, 1307 + "summary": { 1308 + "name": "summary", 1309 + "type": "text", 1310 + "primaryKey": false, 1311 + "notNull": true, 1312 + "autoincrement": false, 1313 + "default": "''" 1314 + }, 1315 + "status": { 1316 + "name": "status", 1317 + "type": "text", 1318 + "primaryKey": false, 1319 + "notNull": true, 1320 + "autoincrement": false, 1321 + "default": "'triage'" 1322 + }, 1323 + "monitor_id": { 1324 + "name": "monitor_id", 1325 + "type": "integer", 1326 + "primaryKey": false, 1327 + "notNull": false, 1328 + "autoincrement": false 1329 + }, 1330 + "workspace_id": { 1331 + "name": "workspace_id", 1332 + "type": "integer", 1333 + "primaryKey": false, 1334 + "notNull": false, 1335 + "autoincrement": false 1336 + }, 1337 + "started_at": { 1338 + "name": "started_at", 1339 + "type": "integer", 1340 + "primaryKey": false, 1341 + "notNull": true, 1342 + "autoincrement": false, 1343 + "default": "(strftime('%s', 'now'))" 1344 + }, 1345 + "acknowledged_at": { 1346 + "name": "acknowledged_at", 1347 + "type": "integer", 1348 + "primaryKey": false, 1349 + "notNull": false, 1350 + "autoincrement": false 1351 + }, 1352 + "acknowledged_by": { 1353 + "name": "acknowledged_by", 1354 + "type": "integer", 1355 + "primaryKey": false, 1356 + "notNull": false, 1357 + "autoincrement": false 1358 + }, 1359 + "resolved_at": { 1360 + "name": "resolved_at", 1361 + "type": "integer", 1362 + "primaryKey": false, 1363 + "notNull": false, 1364 + "autoincrement": false 1365 + }, 1366 + "resolved_by": { 1367 + "name": "resolved_by", 1368 + "type": "integer", 1369 + "primaryKey": false, 1370 + "notNull": false, 1371 + "autoincrement": false 1372 + }, 1373 + "auto_resolved": { 1374 + "name": "auto_resolved", 1375 + "type": "integer", 1376 + "primaryKey": false, 1377 + "notNull": false, 1378 + "autoincrement": false, 1379 + "default": false 1380 + }, 1381 + "created_at": { 1382 + "name": "created_at", 1383 + "type": "integer", 1384 + "primaryKey": false, 1385 + "notNull": false, 1386 + "autoincrement": false, 1387 + "default": "(strftime('%s', 'now'))" 1388 + }, 1389 + "updated_at": { 1390 + "name": "updated_at", 1391 + "type": "integer", 1392 + "primaryKey": false, 1393 + "notNull": false, 1394 + "autoincrement": false, 1395 + "default": "(strftime('%s', 'now'))" 1396 + } 1397 + }, 1398 + "indexes": { 1399 + "incident_id_monitor_id_started_at_unique": { 1400 + "name": "incident_id_monitor_id_started_at_unique", 1401 + "columns": [ 1402 + "id", 1403 + "monitor_id", 1404 + "started_at" 1405 + ], 1406 + "isUnique": true 1407 + } 1408 + }, 1409 + "foreignKeys": { 1410 + "incident_monitor_id_monitor_id_fk": { 1411 + "name": "incident_monitor_id_monitor_id_fk", 1412 + "tableFrom": "incident", 1413 + "tableTo": "monitor", 1414 + "columnsFrom": [ 1415 + "monitor_id" 1416 + ], 1417 + "columnsTo": [ 1418 + "id" 1419 + ], 1420 + "onDelete": "set default", 1421 + "onUpdate": "no action" 1422 + }, 1423 + "incident_workspace_id_workspace_id_fk": { 1424 + "name": "incident_workspace_id_workspace_id_fk", 1425 + "tableFrom": "incident", 1426 + "tableTo": "workspace", 1427 + "columnsFrom": [ 1428 + "workspace_id" 1429 + ], 1430 + "columnsTo": [ 1431 + "id" 1432 + ], 1433 + "onDelete": "no action", 1434 + "onUpdate": "no action" 1435 + }, 1436 + "incident_acknowledged_by_user_id_fk": { 1437 + "name": "incident_acknowledged_by_user_id_fk", 1438 + "tableFrom": "incident", 1439 + "tableTo": "user", 1440 + "columnsFrom": [ 1441 + "acknowledged_by" 1442 + ], 1443 + "columnsTo": [ 1444 + "id" 1445 + ], 1446 + "onDelete": "no action", 1447 + "onUpdate": "no action" 1448 + }, 1449 + "incident_resolved_by_user_id_fk": { 1450 + "name": "incident_resolved_by_user_id_fk", 1451 + "tableFrom": "incident", 1452 + "tableTo": "user", 1453 + "columnsFrom": [ 1454 + "resolved_by" 1455 + ], 1456 + "columnsTo": [ 1457 + "id" 1458 + ], 1459 + "onDelete": "no action", 1460 + "onUpdate": "no action" 1461 + } 1462 + }, 1463 + "compositePrimaryKeys": {}, 1464 + "uniqueConstraints": {} 1465 + } 1466 + }, 1467 + "enums": {}, 1468 + "_meta": { 1469 + "schemas": {}, 1470 + "tables": {}, 1471 + "columns": {} 1472 + } 1473 + }
+1472
packages/db/drizzle/meta/0020_snapshot.json
··· 1 + { 2 + "version": "5", 3 + "dialect": "sqlite", 4 + "id": "47000fd1-f273-4406-8380-803a0a63bc59", 5 + "prevId": "fed3b3e4-d55d-4370-b39b-c837512a6d8e", 6 + "tables": { 7 + "status_report_to_monitors": { 8 + "name": "status_report_to_monitors", 9 + "columns": { 10 + "monitor_id": { 11 + "name": "monitor_id", 12 + "type": "integer", 13 + "primaryKey": false, 14 + "notNull": true, 15 + "autoincrement": false 16 + }, 17 + "status_report_id": { 18 + "name": "status_report_id", 19 + "type": "integer", 20 + "primaryKey": false, 21 + "notNull": true, 22 + "autoincrement": false 23 + }, 24 + "created_at": { 25 + "name": "created_at", 26 + "type": "integer", 27 + "primaryKey": false, 28 + "notNull": false, 29 + "autoincrement": false, 30 + "default": "(strftime('%s', 'now'))" 31 + } 32 + }, 33 + "indexes": {}, 34 + "foreignKeys": { 35 + "status_report_to_monitors_monitor_id_monitor_id_fk": { 36 + "name": "status_report_to_monitors_monitor_id_monitor_id_fk", 37 + "tableFrom": "status_report_to_monitors", 38 + "tableTo": "monitor", 39 + "columnsFrom": [ 40 + "monitor_id" 41 + ], 42 + "columnsTo": [ 43 + "id" 44 + ], 45 + "onDelete": "cascade", 46 + "onUpdate": "no action" 47 + }, 48 + "status_report_to_monitors_status_report_id_status_report_id_fk": { 49 + "name": "status_report_to_monitors_status_report_id_status_report_id_fk", 50 + "tableFrom": "status_report_to_monitors", 51 + "tableTo": "status_report", 52 + "columnsFrom": [ 53 + "status_report_id" 54 + ], 55 + "columnsTo": [ 56 + "id" 57 + ], 58 + "onDelete": "cascade", 59 + "onUpdate": "no action" 60 + } 61 + }, 62 + "compositePrimaryKeys": { 63 + "status_report_to_monitors_monitor_id_status_report_id_pk": { 64 + "columns": [ 65 + "monitor_id", 66 + "status_report_id" 67 + ], 68 + "name": "status_report_to_monitors_monitor_id_status_report_id_pk" 69 + } 70 + }, 71 + "uniqueConstraints": {} 72 + }, 73 + "status_reports_to_pages": { 74 + "name": "status_reports_to_pages", 75 + "columns": { 76 + "page_id": { 77 + "name": "page_id", 78 + "type": "integer", 79 + "primaryKey": false, 80 + "notNull": true, 81 + "autoincrement": false 82 + }, 83 + "status_report_id": { 84 + "name": "status_report_id", 85 + "type": "integer", 86 + "primaryKey": false, 87 + "notNull": true, 88 + "autoincrement": false 89 + }, 90 + "created_at": { 91 + "name": "created_at", 92 + "type": "integer", 93 + "primaryKey": false, 94 + "notNull": false, 95 + "autoincrement": false, 96 + "default": "(strftime('%s', 'now'))" 97 + } 98 + }, 99 + "indexes": {}, 100 + "foreignKeys": { 101 + "status_reports_to_pages_page_id_page_id_fk": { 102 + "name": "status_reports_to_pages_page_id_page_id_fk", 103 + "tableFrom": "status_reports_to_pages", 104 + "tableTo": "page", 105 + "columnsFrom": [ 106 + "page_id" 107 + ], 108 + "columnsTo": [ 109 + "id" 110 + ], 111 + "onDelete": "cascade", 112 + "onUpdate": "no action" 113 + }, 114 + "status_reports_to_pages_status_report_id_status_report_id_fk": { 115 + "name": "status_reports_to_pages_status_report_id_status_report_id_fk", 116 + "tableFrom": "status_reports_to_pages", 117 + "tableTo": "status_report", 118 + "columnsFrom": [ 119 + "status_report_id" 120 + ], 121 + "columnsTo": [ 122 + "id" 123 + ], 124 + "onDelete": "cascade", 125 + "onUpdate": "no action" 126 + } 127 + }, 128 + "compositePrimaryKeys": { 129 + "status_reports_to_pages_page_id_status_report_id_pk": { 130 + "columns": [ 131 + "page_id", 132 + "status_report_id" 133 + ], 134 + "name": "status_reports_to_pages_page_id_status_report_id_pk" 135 + } 136 + }, 137 + "uniqueConstraints": {} 138 + }, 139 + "status_report": { 140 + "name": "status_report", 141 + "columns": { 142 + "id": { 143 + "name": "id", 144 + "type": "integer", 145 + "primaryKey": true, 146 + "notNull": true, 147 + "autoincrement": false 148 + }, 149 + "status": { 150 + "name": "status", 151 + "type": "text", 152 + "primaryKey": false, 153 + "notNull": true, 154 + "autoincrement": false 155 + }, 156 + "title": { 157 + "name": "title", 158 + "type": "text(256)", 159 + "primaryKey": false, 160 + "notNull": true, 161 + "autoincrement": false 162 + }, 163 + "workspace_id": { 164 + "name": "workspace_id", 165 + "type": "integer", 166 + "primaryKey": false, 167 + "notNull": false, 168 + "autoincrement": false 169 + }, 170 + "created_at": { 171 + "name": "created_at", 172 + "type": "integer", 173 + "primaryKey": false, 174 + "notNull": false, 175 + "autoincrement": false, 176 + "default": "(strftime('%s', 'now'))" 177 + }, 178 + "updated_at": { 179 + "name": "updated_at", 180 + "type": "integer", 181 + "primaryKey": false, 182 + "notNull": false, 183 + "autoincrement": false, 184 + "default": "(strftime('%s', 'now'))" 185 + } 186 + }, 187 + "indexes": {}, 188 + "foreignKeys": { 189 + "status_report_workspace_id_workspace_id_fk": { 190 + "name": "status_report_workspace_id_workspace_id_fk", 191 + "tableFrom": "status_report", 192 + "tableTo": "workspace", 193 + "columnsFrom": [ 194 + "workspace_id" 195 + ], 196 + "columnsTo": [ 197 + "id" 198 + ], 199 + "onDelete": "no action", 200 + "onUpdate": "no action" 201 + } 202 + }, 203 + "compositePrimaryKeys": {}, 204 + "uniqueConstraints": {} 205 + }, 206 + "status_report_update": { 207 + "name": "status_report_update", 208 + "columns": { 209 + "id": { 210 + "name": "id", 211 + "type": "integer", 212 + "primaryKey": true, 213 + "notNull": true, 214 + "autoincrement": false 215 + }, 216 + "status": { 217 + "name": "status", 218 + "type": "text(4)", 219 + "primaryKey": false, 220 + "notNull": true, 221 + "autoincrement": false 222 + }, 223 + "date": { 224 + "name": "date", 225 + "type": "integer", 226 + "primaryKey": false, 227 + "notNull": true, 228 + "autoincrement": false 229 + }, 230 + "message": { 231 + "name": "message", 232 + "type": "text", 233 + "primaryKey": false, 234 + "notNull": true, 235 + "autoincrement": false 236 + }, 237 + "status_report_id": { 238 + "name": "status_report_id", 239 + "type": "integer", 240 + "primaryKey": false, 241 + "notNull": true, 242 + "autoincrement": false 243 + }, 244 + "created_at": { 245 + "name": "created_at", 246 + "type": "integer", 247 + "primaryKey": false, 248 + "notNull": false, 249 + "autoincrement": false, 250 + "default": "(strftime('%s', 'now'))" 251 + }, 252 + "updated_at": { 253 + "name": "updated_at", 254 + "type": "integer", 255 + "primaryKey": false, 256 + "notNull": false, 257 + "autoincrement": false, 258 + "default": "(strftime('%s', 'now'))" 259 + } 260 + }, 261 + "indexes": {}, 262 + "foreignKeys": { 263 + "status_report_update_status_report_id_status_report_id_fk": { 264 + "name": "status_report_update_status_report_id_status_report_id_fk", 265 + "tableFrom": "status_report_update", 266 + "tableTo": "status_report", 267 + "columnsFrom": [ 268 + "status_report_id" 269 + ], 270 + "columnsTo": [ 271 + "id" 272 + ], 273 + "onDelete": "cascade", 274 + "onUpdate": "no action" 275 + } 276 + }, 277 + "compositePrimaryKeys": {}, 278 + "uniqueConstraints": {} 279 + }, 280 + "integration": { 281 + "name": "integration", 282 + "columns": { 283 + "id": { 284 + "name": "id", 285 + "type": "integer", 286 + "primaryKey": true, 287 + "notNull": true, 288 + "autoincrement": false 289 + }, 290 + "name": { 291 + "name": "name", 292 + "type": "text(256)", 293 + "primaryKey": false, 294 + "notNull": true, 295 + "autoincrement": false 296 + }, 297 + "workspace_id": { 298 + "name": "workspace_id", 299 + "type": "integer", 300 + "primaryKey": false, 301 + "notNull": false, 302 + "autoincrement": false 303 + }, 304 + "credential": { 305 + "name": "credential", 306 + "type": "text", 307 + "primaryKey": false, 308 + "notNull": false, 309 + "autoincrement": false 310 + }, 311 + "external_id": { 312 + "name": "external_id", 313 + "type": "text", 314 + "primaryKey": false, 315 + "notNull": true, 316 + "autoincrement": false 317 + }, 318 + "created_at": { 319 + "name": "created_at", 320 + "type": "integer", 321 + "primaryKey": false, 322 + "notNull": false, 323 + "autoincrement": false, 324 + "default": "(strftime('%s', 'now'))" 325 + }, 326 + "updated_at": { 327 + "name": "updated_at", 328 + "type": "integer", 329 + "primaryKey": false, 330 + "notNull": false, 331 + "autoincrement": false, 332 + "default": "(strftime('%s', 'now'))" 333 + }, 334 + "data": { 335 + "name": "data", 336 + "type": "text", 337 + "primaryKey": false, 338 + "notNull": true, 339 + "autoincrement": false 340 + } 341 + }, 342 + "indexes": {}, 343 + "foreignKeys": { 344 + "integration_workspace_id_workspace_id_fk": { 345 + "name": "integration_workspace_id_workspace_id_fk", 346 + "tableFrom": "integration", 347 + "tableTo": "workspace", 348 + "columnsFrom": [ 349 + "workspace_id" 350 + ], 351 + "columnsTo": [ 352 + "id" 353 + ], 354 + "onDelete": "no action", 355 + "onUpdate": "no action" 356 + } 357 + }, 358 + "compositePrimaryKeys": {}, 359 + "uniqueConstraints": {} 360 + }, 361 + "page": { 362 + "name": "page", 363 + "columns": { 364 + "id": { 365 + "name": "id", 366 + "type": "integer", 367 + "primaryKey": true, 368 + "notNull": true, 369 + "autoincrement": false 370 + }, 371 + "workspace_id": { 372 + "name": "workspace_id", 373 + "type": "integer", 374 + "primaryKey": false, 375 + "notNull": true, 376 + "autoincrement": false 377 + }, 378 + "title": { 379 + "name": "title", 380 + "type": "text", 381 + "primaryKey": false, 382 + "notNull": true, 383 + "autoincrement": false 384 + }, 385 + "description": { 386 + "name": "description", 387 + "type": "text", 388 + "primaryKey": false, 389 + "notNull": true, 390 + "autoincrement": false 391 + }, 392 + "icon": { 393 + "name": "icon", 394 + "type": "text(256)", 395 + "primaryKey": false, 396 + "notNull": false, 397 + "autoincrement": false, 398 + "default": "''" 399 + }, 400 + "slug": { 401 + "name": "slug", 402 + "type": "text(256)", 403 + "primaryKey": false, 404 + "notNull": true, 405 + "autoincrement": false 406 + }, 407 + "custom_domain": { 408 + "name": "custom_domain", 409 + "type": "text(256)", 410 + "primaryKey": false, 411 + "notNull": true, 412 + "autoincrement": false 413 + }, 414 + "published": { 415 + "name": "published", 416 + "type": "integer", 417 + "primaryKey": false, 418 + "notNull": false, 419 + "autoincrement": false, 420 + "default": false 421 + }, 422 + "created_at": { 423 + "name": "created_at", 424 + "type": "integer", 425 + "primaryKey": false, 426 + "notNull": false, 427 + "autoincrement": false, 428 + "default": "(strftime('%s', 'now'))" 429 + }, 430 + "updated_at": { 431 + "name": "updated_at", 432 + "type": "integer", 433 + "primaryKey": false, 434 + "notNull": false, 435 + "autoincrement": false, 436 + "default": "(strftime('%s', 'now'))" 437 + } 438 + }, 439 + "indexes": { 440 + "page_slug_unique": { 441 + "name": "page_slug_unique", 442 + "columns": [ 443 + "slug" 444 + ], 445 + "isUnique": true 446 + } 447 + }, 448 + "foreignKeys": { 449 + "page_workspace_id_workspace_id_fk": { 450 + "name": "page_workspace_id_workspace_id_fk", 451 + "tableFrom": "page", 452 + "tableTo": "workspace", 453 + "columnsFrom": [ 454 + "workspace_id" 455 + ], 456 + "columnsTo": [ 457 + "id" 458 + ], 459 + "onDelete": "cascade", 460 + "onUpdate": "no action" 461 + } 462 + }, 463 + "compositePrimaryKeys": {}, 464 + "uniqueConstraints": {} 465 + }, 466 + "monitor": { 467 + "name": "monitor", 468 + "columns": { 469 + "id": { 470 + "name": "id", 471 + "type": "integer", 472 + "primaryKey": true, 473 + "notNull": true, 474 + "autoincrement": false 475 + }, 476 + "job_type": { 477 + "name": "job_type", 478 + "type": "text", 479 + "primaryKey": false, 480 + "notNull": true, 481 + "autoincrement": false, 482 + "default": "'other'" 483 + }, 484 + "periodicity": { 485 + "name": "periodicity", 486 + "type": "text", 487 + "primaryKey": false, 488 + "notNull": true, 489 + "autoincrement": false, 490 + "default": "'other'" 491 + }, 492 + "status": { 493 + "name": "status", 494 + "type": "text", 495 + "primaryKey": false, 496 + "notNull": true, 497 + "autoincrement": false, 498 + "default": "'active'" 499 + }, 500 + "active": { 501 + "name": "active", 502 + "type": "integer", 503 + "primaryKey": false, 504 + "notNull": false, 505 + "autoincrement": false, 506 + "default": false 507 + }, 508 + "regions": { 509 + "name": "regions", 510 + "type": "text", 511 + "primaryKey": false, 512 + "notNull": true, 513 + "autoincrement": false, 514 + "default": "''" 515 + }, 516 + "url": { 517 + "name": "url", 518 + "type": "text(2048)", 519 + "primaryKey": false, 520 + "notNull": true, 521 + "autoincrement": false 522 + }, 523 + "name": { 524 + "name": "name", 525 + "type": "text(256)", 526 + "primaryKey": false, 527 + "notNull": true, 528 + "autoincrement": false, 529 + "default": "''" 530 + }, 531 + "description": { 532 + "name": "description", 533 + "type": "text", 534 + "primaryKey": false, 535 + "notNull": true, 536 + "autoincrement": false, 537 + "default": "''" 538 + }, 539 + "headers": { 540 + "name": "headers", 541 + "type": "text", 542 + "primaryKey": false, 543 + "notNull": false, 544 + "autoincrement": false, 545 + "default": "''" 546 + }, 547 + "body": { 548 + "name": "body", 549 + "type": "text", 550 + "primaryKey": false, 551 + "notNull": false, 552 + "autoincrement": false, 553 + "default": "''" 554 + }, 555 + "method": { 556 + "name": "method", 557 + "type": "text", 558 + "primaryKey": false, 559 + "notNull": false, 560 + "autoincrement": false, 561 + "default": "'GET'" 562 + }, 563 + "workspace_id": { 564 + "name": "workspace_id", 565 + "type": "integer", 566 + "primaryKey": false, 567 + "notNull": false, 568 + "autoincrement": false 569 + }, 570 + "created_at": { 571 + "name": "created_at", 572 + "type": "integer", 573 + "primaryKey": false, 574 + "notNull": false, 575 + "autoincrement": false, 576 + "default": "(strftime('%s', 'now'))" 577 + }, 578 + "updated_at": { 579 + "name": "updated_at", 580 + "type": "integer", 581 + "primaryKey": false, 582 + "notNull": false, 583 + "autoincrement": false, 584 + "default": "(strftime('%s', 'now'))" 585 + } 586 + }, 587 + "indexes": {}, 588 + "foreignKeys": { 589 + "monitor_workspace_id_workspace_id_fk": { 590 + "name": "monitor_workspace_id_workspace_id_fk", 591 + "tableFrom": "monitor", 592 + "tableTo": "workspace", 593 + "columnsFrom": [ 594 + "workspace_id" 595 + ], 596 + "columnsTo": [ 597 + "id" 598 + ], 599 + "onDelete": "no action", 600 + "onUpdate": "no action" 601 + } 602 + }, 603 + "compositePrimaryKeys": {}, 604 + "uniqueConstraints": {} 605 + }, 606 + "monitors_to_pages": { 607 + "name": "monitors_to_pages", 608 + "columns": { 609 + "monitor_id": { 610 + "name": "monitor_id", 611 + "type": "integer", 612 + "primaryKey": false, 613 + "notNull": true, 614 + "autoincrement": false 615 + }, 616 + "page_id": { 617 + "name": "page_id", 618 + "type": "integer", 619 + "primaryKey": false, 620 + "notNull": true, 621 + "autoincrement": false 622 + }, 623 + "created_at": { 624 + "name": "created_at", 625 + "type": "integer", 626 + "primaryKey": false, 627 + "notNull": false, 628 + "autoincrement": false, 629 + "default": "(strftime('%s', 'now'))" 630 + } 631 + }, 632 + "indexes": {}, 633 + "foreignKeys": { 634 + "monitors_to_pages_monitor_id_monitor_id_fk": { 635 + "name": "monitors_to_pages_monitor_id_monitor_id_fk", 636 + "tableFrom": "monitors_to_pages", 637 + "tableTo": "monitor", 638 + "columnsFrom": [ 639 + "monitor_id" 640 + ], 641 + "columnsTo": [ 642 + "id" 643 + ], 644 + "onDelete": "cascade", 645 + "onUpdate": "no action" 646 + }, 647 + "monitors_to_pages_page_id_page_id_fk": { 648 + "name": "monitors_to_pages_page_id_page_id_fk", 649 + "tableFrom": "monitors_to_pages", 650 + "tableTo": "page", 651 + "columnsFrom": [ 652 + "page_id" 653 + ], 654 + "columnsTo": [ 655 + "id" 656 + ], 657 + "onDelete": "cascade", 658 + "onUpdate": "no action" 659 + } 660 + }, 661 + "compositePrimaryKeys": { 662 + "monitors_to_pages_monitor_id_page_id_pk": { 663 + "columns": [ 664 + "monitor_id", 665 + "page_id" 666 + ], 667 + "name": "monitors_to_pages_monitor_id_page_id_pk" 668 + } 669 + }, 670 + "uniqueConstraints": {} 671 + }, 672 + "user": { 673 + "name": "user", 674 + "columns": { 675 + "id": { 676 + "name": "id", 677 + "type": "integer", 678 + "primaryKey": true, 679 + "notNull": true, 680 + "autoincrement": false 681 + }, 682 + "tenant_id": { 683 + "name": "tenant_id", 684 + "type": "text(256)", 685 + "primaryKey": false, 686 + "notNull": false, 687 + "autoincrement": false 688 + }, 689 + "first_name": { 690 + "name": "first_name", 691 + "type": "text", 692 + "primaryKey": false, 693 + "notNull": false, 694 + "autoincrement": false, 695 + "default": "''" 696 + }, 697 + "last_name": { 698 + "name": "last_name", 699 + "type": "text", 700 + "primaryKey": false, 701 + "notNull": false, 702 + "autoincrement": false, 703 + "default": "''" 704 + }, 705 + "email": { 706 + "name": "email", 707 + "type": "text", 708 + "primaryKey": false, 709 + "notNull": false, 710 + "autoincrement": false, 711 + "default": "''" 712 + }, 713 + "photo_url": { 714 + "name": "photo_url", 715 + "type": "text", 716 + "primaryKey": false, 717 + "notNull": false, 718 + "autoincrement": false, 719 + "default": "''" 720 + }, 721 + "created_at": { 722 + "name": "created_at", 723 + "type": "integer", 724 + "primaryKey": false, 725 + "notNull": false, 726 + "autoincrement": false, 727 + "default": "(strftime('%s', 'now'))" 728 + }, 729 + "updated_at": { 730 + "name": "updated_at", 731 + "type": "integer", 732 + "primaryKey": false, 733 + "notNull": false, 734 + "autoincrement": false, 735 + "default": "(strftime('%s', 'now'))" 736 + } 737 + }, 738 + "indexes": { 739 + "user_tenant_id_unique": { 740 + "name": "user_tenant_id_unique", 741 + "columns": [ 742 + "tenant_id" 743 + ], 744 + "isUnique": true 745 + } 746 + }, 747 + "foreignKeys": {}, 748 + "compositePrimaryKeys": {}, 749 + "uniqueConstraints": {} 750 + }, 751 + "users_to_workspaces": { 752 + "name": "users_to_workspaces", 753 + "columns": { 754 + "user_id": { 755 + "name": "user_id", 756 + "type": "integer", 757 + "primaryKey": false, 758 + "notNull": true, 759 + "autoincrement": false 760 + }, 761 + "workspace_id": { 762 + "name": "workspace_id", 763 + "type": "integer", 764 + "primaryKey": false, 765 + "notNull": true, 766 + "autoincrement": false 767 + }, 768 + "role": { 769 + "name": "role", 770 + "type": "text", 771 + "primaryKey": false, 772 + "notNull": true, 773 + "autoincrement": false, 774 + "default": "'member'" 775 + }, 776 + "created_at": { 777 + "name": "created_at", 778 + "type": "integer", 779 + "primaryKey": false, 780 + "notNull": false, 781 + "autoincrement": false, 782 + "default": "(strftime('%s', 'now'))" 783 + } 784 + }, 785 + "indexes": {}, 786 + "foreignKeys": { 787 + "users_to_workspaces_user_id_user_id_fk": { 788 + "name": "users_to_workspaces_user_id_user_id_fk", 789 + "tableFrom": "users_to_workspaces", 790 + "tableTo": "user", 791 + "columnsFrom": [ 792 + "user_id" 793 + ], 794 + "columnsTo": [ 795 + "id" 796 + ], 797 + "onDelete": "no action", 798 + "onUpdate": "no action" 799 + }, 800 + "users_to_workspaces_workspace_id_workspace_id_fk": { 801 + "name": "users_to_workspaces_workspace_id_workspace_id_fk", 802 + "tableFrom": "users_to_workspaces", 803 + "tableTo": "workspace", 804 + "columnsFrom": [ 805 + "workspace_id" 806 + ], 807 + "columnsTo": [ 808 + "id" 809 + ], 810 + "onDelete": "no action", 811 + "onUpdate": "no action" 812 + } 813 + }, 814 + "compositePrimaryKeys": { 815 + "users_to_workspaces_user_id_workspace_id_pk": { 816 + "columns": [ 817 + "user_id", 818 + "workspace_id" 819 + ], 820 + "name": "users_to_workspaces_user_id_workspace_id_pk" 821 + } 822 + }, 823 + "uniqueConstraints": {} 824 + }, 825 + "page_subscriber": { 826 + "name": "page_subscriber", 827 + "columns": { 828 + "id": { 829 + "name": "id", 830 + "type": "integer", 831 + "primaryKey": true, 832 + "notNull": true, 833 + "autoincrement": false 834 + }, 835 + "email": { 836 + "name": "email", 837 + "type": "text", 838 + "primaryKey": false, 839 + "notNull": true, 840 + "autoincrement": false 841 + }, 842 + "page_id": { 843 + "name": "page_id", 844 + "type": "integer", 845 + "primaryKey": false, 846 + "notNull": true, 847 + "autoincrement": false 848 + }, 849 + "token": { 850 + "name": "token", 851 + "type": "text", 852 + "primaryKey": false, 853 + "notNull": false, 854 + "autoincrement": false 855 + }, 856 + "accepted_at": { 857 + "name": "accepted_at", 858 + "type": "integer", 859 + "primaryKey": false, 860 + "notNull": false, 861 + "autoincrement": false 862 + }, 863 + "expires_at": { 864 + "name": "expires_at", 865 + "type": "integer", 866 + "primaryKey": false, 867 + "notNull": false, 868 + "autoincrement": false 869 + }, 870 + "created_at": { 871 + "name": "created_at", 872 + "type": "integer", 873 + "primaryKey": false, 874 + "notNull": false, 875 + "autoincrement": false, 876 + "default": "(strftime('%s', 'now'))" 877 + }, 878 + "updated_at": { 879 + "name": "updated_at", 880 + "type": "integer", 881 + "primaryKey": false, 882 + "notNull": false, 883 + "autoincrement": false, 884 + "default": "(strftime('%s', 'now'))" 885 + } 886 + }, 887 + "indexes": {}, 888 + "foreignKeys": { 889 + "page_subscriber_page_id_page_id_fk": { 890 + "name": "page_subscriber_page_id_page_id_fk", 891 + "tableFrom": "page_subscriber", 892 + "tableTo": "page", 893 + "columnsFrom": [ 894 + "page_id" 895 + ], 896 + "columnsTo": [ 897 + "id" 898 + ], 899 + "onDelete": "no action", 900 + "onUpdate": "no action" 901 + } 902 + }, 903 + "compositePrimaryKeys": {}, 904 + "uniqueConstraints": {} 905 + }, 906 + "workspace": { 907 + "name": "workspace", 908 + "columns": { 909 + "id": { 910 + "name": "id", 911 + "type": "integer", 912 + "primaryKey": true, 913 + "notNull": true, 914 + "autoincrement": false 915 + }, 916 + "slug": { 917 + "name": "slug", 918 + "type": "text", 919 + "primaryKey": false, 920 + "notNull": true, 921 + "autoincrement": false 922 + }, 923 + "name": { 924 + "name": "name", 925 + "type": "text", 926 + "primaryKey": false, 927 + "notNull": false, 928 + "autoincrement": false 929 + }, 930 + "stripe_id": { 931 + "name": "stripe_id", 932 + "type": "text(256)", 933 + "primaryKey": false, 934 + "notNull": false, 935 + "autoincrement": false 936 + }, 937 + "subscription_id": { 938 + "name": "subscription_id", 939 + "type": "text", 940 + "primaryKey": false, 941 + "notNull": false, 942 + "autoincrement": false 943 + }, 944 + "plan": { 945 + "name": "plan", 946 + "type": "text", 947 + "primaryKey": false, 948 + "notNull": false, 949 + "autoincrement": false 950 + }, 951 + "ends_at": { 952 + "name": "ends_at", 953 + "type": "integer", 954 + "primaryKey": false, 955 + "notNull": false, 956 + "autoincrement": false 957 + }, 958 + "paid_until": { 959 + "name": "paid_until", 960 + "type": "integer", 961 + "primaryKey": false, 962 + "notNull": false, 963 + "autoincrement": false 964 + }, 965 + "created_at": { 966 + "name": "created_at", 967 + "type": "integer", 968 + "primaryKey": false, 969 + "notNull": false, 970 + "autoincrement": false, 971 + "default": "(strftime('%s', 'now'))" 972 + }, 973 + "updated_at": { 974 + "name": "updated_at", 975 + "type": "integer", 976 + "primaryKey": false, 977 + "notNull": false, 978 + "autoincrement": false, 979 + "default": "(strftime('%s', 'now'))" 980 + } 981 + }, 982 + "indexes": { 983 + "workspace_slug_unique": { 984 + "name": "workspace_slug_unique", 985 + "columns": [ 986 + "slug" 987 + ], 988 + "isUnique": true 989 + }, 990 + "workspace_stripe_id_unique": { 991 + "name": "workspace_stripe_id_unique", 992 + "columns": [ 993 + "stripe_id" 994 + ], 995 + "isUnique": true 996 + } 997 + }, 998 + "foreignKeys": {}, 999 + "compositePrimaryKeys": {}, 1000 + "uniqueConstraints": {} 1001 + }, 1002 + "notification": { 1003 + "name": "notification", 1004 + "columns": { 1005 + "id": { 1006 + "name": "id", 1007 + "type": "integer", 1008 + "primaryKey": true, 1009 + "notNull": true, 1010 + "autoincrement": false 1011 + }, 1012 + "name": { 1013 + "name": "name", 1014 + "type": "text", 1015 + "primaryKey": false, 1016 + "notNull": true, 1017 + "autoincrement": false 1018 + }, 1019 + "provider": { 1020 + "name": "provider", 1021 + "type": "text", 1022 + "primaryKey": false, 1023 + "notNull": true, 1024 + "autoincrement": false 1025 + }, 1026 + "data": { 1027 + "name": "data", 1028 + "type": "text", 1029 + "primaryKey": false, 1030 + "notNull": false, 1031 + "autoincrement": false, 1032 + "default": "'{}'" 1033 + }, 1034 + "workspace_id": { 1035 + "name": "workspace_id", 1036 + "type": "integer", 1037 + "primaryKey": false, 1038 + "notNull": false, 1039 + "autoincrement": false 1040 + }, 1041 + "created_at": { 1042 + "name": "created_at", 1043 + "type": "integer", 1044 + "primaryKey": false, 1045 + "notNull": false, 1046 + "autoincrement": false, 1047 + "default": "(strftime('%s', 'now'))" 1048 + }, 1049 + "updated_at": { 1050 + "name": "updated_at", 1051 + "type": "integer", 1052 + "primaryKey": false, 1053 + "notNull": false, 1054 + "autoincrement": false, 1055 + "default": "(strftime('%s', 'now'))" 1056 + } 1057 + }, 1058 + "indexes": {}, 1059 + "foreignKeys": { 1060 + "notification_workspace_id_workspace_id_fk": { 1061 + "name": "notification_workspace_id_workspace_id_fk", 1062 + "tableFrom": "notification", 1063 + "tableTo": "workspace", 1064 + "columnsFrom": [ 1065 + "workspace_id" 1066 + ], 1067 + "columnsTo": [ 1068 + "id" 1069 + ], 1070 + "onDelete": "no action", 1071 + "onUpdate": "no action" 1072 + } 1073 + }, 1074 + "compositePrimaryKeys": {}, 1075 + "uniqueConstraints": {} 1076 + }, 1077 + "notifications_to_monitors": { 1078 + "name": "notifications_to_monitors", 1079 + "columns": { 1080 + "monitor_id": { 1081 + "name": "monitor_id", 1082 + "type": "integer", 1083 + "primaryKey": false, 1084 + "notNull": true, 1085 + "autoincrement": false 1086 + }, 1087 + "notification_id": { 1088 + "name": "notification_id", 1089 + "type": "integer", 1090 + "primaryKey": false, 1091 + "notNull": true, 1092 + "autoincrement": false 1093 + }, 1094 + "created_at": { 1095 + "name": "created_at", 1096 + "type": "integer", 1097 + "primaryKey": false, 1098 + "notNull": false, 1099 + "autoincrement": false, 1100 + "default": "(strftime('%s', 'now'))" 1101 + } 1102 + }, 1103 + "indexes": {}, 1104 + "foreignKeys": { 1105 + "notifications_to_monitors_monitor_id_monitor_id_fk": { 1106 + "name": "notifications_to_monitors_monitor_id_monitor_id_fk", 1107 + "tableFrom": "notifications_to_monitors", 1108 + "tableTo": "monitor", 1109 + "columnsFrom": [ 1110 + "monitor_id" 1111 + ], 1112 + "columnsTo": [ 1113 + "id" 1114 + ], 1115 + "onDelete": "cascade", 1116 + "onUpdate": "no action" 1117 + }, 1118 + "notifications_to_monitors_notification_id_notification_id_fk": { 1119 + "name": "notifications_to_monitors_notification_id_notification_id_fk", 1120 + "tableFrom": "notifications_to_monitors", 1121 + "tableTo": "notification", 1122 + "columnsFrom": [ 1123 + "notification_id" 1124 + ], 1125 + "columnsTo": [ 1126 + "id" 1127 + ], 1128 + "onDelete": "cascade", 1129 + "onUpdate": "no action" 1130 + } 1131 + }, 1132 + "compositePrimaryKeys": { 1133 + "notifications_to_monitors_monitor_id_notification_id_pk": { 1134 + "columns": [ 1135 + "monitor_id", 1136 + "notification_id" 1137 + ], 1138 + "name": "notifications_to_monitors_monitor_id_notification_id_pk" 1139 + } 1140 + }, 1141 + "uniqueConstraints": {} 1142 + }, 1143 + "monitor_status": { 1144 + "name": "monitor_status", 1145 + "columns": { 1146 + "monitor_id": { 1147 + "name": "monitor_id", 1148 + "type": "integer", 1149 + "primaryKey": false, 1150 + "notNull": true, 1151 + "autoincrement": false 1152 + }, 1153 + "region": { 1154 + "name": "region", 1155 + "type": "text", 1156 + "primaryKey": false, 1157 + "notNull": true, 1158 + "autoincrement": false, 1159 + "default": "''" 1160 + }, 1161 + "status": { 1162 + "name": "status", 1163 + "type": "text", 1164 + "primaryKey": false, 1165 + "notNull": true, 1166 + "autoincrement": false, 1167 + "default": "'active'" 1168 + }, 1169 + "created_at": { 1170 + "name": "created_at", 1171 + "type": "integer", 1172 + "primaryKey": false, 1173 + "notNull": false, 1174 + "autoincrement": false, 1175 + "default": "(strftime('%s', 'now'))" 1176 + }, 1177 + "updated_at": { 1178 + "name": "updated_at", 1179 + "type": "integer", 1180 + "primaryKey": false, 1181 + "notNull": false, 1182 + "autoincrement": false, 1183 + "default": "(strftime('%s', 'now'))" 1184 + } 1185 + }, 1186 + "indexes": { 1187 + "monitor_status_idx": { 1188 + "name": "monitor_status_idx", 1189 + "columns": [ 1190 + "monitor_id", 1191 + "region" 1192 + ], 1193 + "isUnique": false 1194 + } 1195 + }, 1196 + "foreignKeys": { 1197 + "monitor_status_monitor_id_monitor_id_fk": { 1198 + "name": "monitor_status_monitor_id_monitor_id_fk", 1199 + "tableFrom": "monitor_status", 1200 + "tableTo": "monitor", 1201 + "columnsFrom": [ 1202 + "monitor_id" 1203 + ], 1204 + "columnsTo": [ 1205 + "id" 1206 + ], 1207 + "onDelete": "cascade", 1208 + "onUpdate": "no action" 1209 + } 1210 + }, 1211 + "compositePrimaryKeys": { 1212 + "monitor_status_monitor_id_region_pk": { 1213 + "columns": [ 1214 + "monitor_id", 1215 + "region" 1216 + ], 1217 + "name": "monitor_status_monitor_id_region_pk" 1218 + } 1219 + }, 1220 + "uniqueConstraints": {} 1221 + }, 1222 + "invitation": { 1223 + "name": "invitation", 1224 + "columns": { 1225 + "id": { 1226 + "name": "id", 1227 + "type": "integer", 1228 + "primaryKey": true, 1229 + "notNull": true, 1230 + "autoincrement": false 1231 + }, 1232 + "email": { 1233 + "name": "email", 1234 + "type": "text", 1235 + "primaryKey": false, 1236 + "notNull": true, 1237 + "autoincrement": false 1238 + }, 1239 + "role": { 1240 + "name": "role", 1241 + "type": "text", 1242 + "primaryKey": false, 1243 + "notNull": true, 1244 + "autoincrement": false, 1245 + "default": "'member'" 1246 + }, 1247 + "workspace_id": { 1248 + "name": "workspace_id", 1249 + "type": "integer", 1250 + "primaryKey": false, 1251 + "notNull": true, 1252 + "autoincrement": false 1253 + }, 1254 + "token": { 1255 + "name": "token", 1256 + "type": "text", 1257 + "primaryKey": false, 1258 + "notNull": true, 1259 + "autoincrement": false 1260 + }, 1261 + "expires_at": { 1262 + "name": "expires_at", 1263 + "type": "integer", 1264 + "primaryKey": false, 1265 + "notNull": true, 1266 + "autoincrement": false 1267 + }, 1268 + "created_at": { 1269 + "name": "created_at", 1270 + "type": "integer", 1271 + "primaryKey": false, 1272 + "notNull": false, 1273 + "autoincrement": false, 1274 + "default": "(strftime('%s', 'now'))" 1275 + }, 1276 + "accepted_at": { 1277 + "name": "accepted_at", 1278 + "type": "integer", 1279 + "primaryKey": false, 1280 + "notNull": false, 1281 + "autoincrement": false 1282 + } 1283 + }, 1284 + "indexes": {}, 1285 + "foreignKeys": {}, 1286 + "compositePrimaryKeys": {}, 1287 + "uniqueConstraints": {} 1288 + }, 1289 + "incident": { 1290 + "name": "incident", 1291 + "columns": { 1292 + "id": { 1293 + "name": "id", 1294 + "type": "integer", 1295 + "primaryKey": true, 1296 + "notNull": true, 1297 + "autoincrement": false 1298 + }, 1299 + "title": { 1300 + "name": "title", 1301 + "type": "text", 1302 + "primaryKey": false, 1303 + "notNull": true, 1304 + "autoincrement": false, 1305 + "default": "''" 1306 + }, 1307 + "summary": { 1308 + "name": "summary", 1309 + "type": "text", 1310 + "primaryKey": false, 1311 + "notNull": true, 1312 + "autoincrement": false, 1313 + "default": "''" 1314 + }, 1315 + "status": { 1316 + "name": "status", 1317 + "type": "text", 1318 + "primaryKey": false, 1319 + "notNull": true, 1320 + "autoincrement": false, 1321 + "default": "'triage'" 1322 + }, 1323 + "monitor_id": { 1324 + "name": "monitor_id", 1325 + "type": "integer", 1326 + "primaryKey": false, 1327 + "notNull": false, 1328 + "autoincrement": false 1329 + }, 1330 + "workspace_id": { 1331 + "name": "workspace_id", 1332 + "type": "integer", 1333 + "primaryKey": false, 1334 + "notNull": false, 1335 + "autoincrement": false 1336 + }, 1337 + "started_at": { 1338 + "name": "started_at", 1339 + "type": "integer", 1340 + "primaryKey": false, 1341 + "notNull": true, 1342 + "autoincrement": false, 1343 + "default": "(strftime('%s', 'now'))" 1344 + }, 1345 + "acknowledged_at": { 1346 + "name": "acknowledged_at", 1347 + "type": "integer", 1348 + "primaryKey": false, 1349 + "notNull": false, 1350 + "autoincrement": false 1351 + }, 1352 + "acknowledged_by": { 1353 + "name": "acknowledged_by", 1354 + "type": "integer", 1355 + "primaryKey": false, 1356 + "notNull": false, 1357 + "autoincrement": false 1358 + }, 1359 + "resolved_at": { 1360 + "name": "resolved_at", 1361 + "type": "integer", 1362 + "primaryKey": false, 1363 + "notNull": false, 1364 + "autoincrement": false 1365 + }, 1366 + "resolved_by": { 1367 + "name": "resolved_by", 1368 + "type": "integer", 1369 + "primaryKey": false, 1370 + "notNull": false, 1371 + "autoincrement": false 1372 + }, 1373 + "auto_resolved": { 1374 + "name": "auto_resolved", 1375 + "type": "integer", 1376 + "primaryKey": false, 1377 + "notNull": false, 1378 + "autoincrement": false, 1379 + "default": false 1380 + }, 1381 + "created_at": { 1382 + "name": "created_at", 1383 + "type": "integer", 1384 + "primaryKey": false, 1385 + "notNull": false, 1386 + "autoincrement": false, 1387 + "default": "(strftime('%s', 'now'))" 1388 + }, 1389 + "updated_at": { 1390 + "name": "updated_at", 1391 + "type": "integer", 1392 + "primaryKey": false, 1393 + "notNull": false, 1394 + "autoincrement": false, 1395 + "default": "(strftime('%s', 'now'))" 1396 + } 1397 + }, 1398 + "indexes": { 1399 + "incident_monitor_id_started_at_unique": { 1400 + "name": "incident_monitor_id_started_at_unique", 1401 + "columns": [ 1402 + "monitor_id", 1403 + "started_at" 1404 + ], 1405 + "isUnique": true 1406 + } 1407 + }, 1408 + "foreignKeys": { 1409 + "incident_monitor_id_monitor_id_fk": { 1410 + "name": "incident_monitor_id_monitor_id_fk", 1411 + "tableFrom": "incident", 1412 + "tableTo": "monitor", 1413 + "columnsFrom": [ 1414 + "monitor_id" 1415 + ], 1416 + "columnsTo": [ 1417 + "id" 1418 + ], 1419 + "onDelete": "set default", 1420 + "onUpdate": "no action" 1421 + }, 1422 + "incident_workspace_id_workspace_id_fk": { 1423 + "name": "incident_workspace_id_workspace_id_fk", 1424 + "tableFrom": "incident", 1425 + "tableTo": "workspace", 1426 + "columnsFrom": [ 1427 + "workspace_id" 1428 + ], 1429 + "columnsTo": [ 1430 + "id" 1431 + ], 1432 + "onDelete": "no action", 1433 + "onUpdate": "no action" 1434 + }, 1435 + "incident_acknowledged_by_user_id_fk": { 1436 + "name": "incident_acknowledged_by_user_id_fk", 1437 + "tableFrom": "incident", 1438 + "tableTo": "user", 1439 + "columnsFrom": [ 1440 + "acknowledged_by" 1441 + ], 1442 + "columnsTo": [ 1443 + "id" 1444 + ], 1445 + "onDelete": "no action", 1446 + "onUpdate": "no action" 1447 + }, 1448 + "incident_resolved_by_user_id_fk": { 1449 + "name": "incident_resolved_by_user_id_fk", 1450 + "tableFrom": "incident", 1451 + "tableTo": "user", 1452 + "columnsFrom": [ 1453 + "resolved_by" 1454 + ], 1455 + "columnsTo": [ 1456 + "id" 1457 + ], 1458 + "onDelete": "no action", 1459 + "onUpdate": "no action" 1460 + } 1461 + }, 1462 + "compositePrimaryKeys": {}, 1463 + "uniqueConstraints": {} 1464 + } 1465 + }, 1466 + "enums": {}, 1467 + "_meta": { 1468 + "schemas": {}, 1469 + "tables": {}, 1470 + "columns": {} 1471 + } 1472 + }
+21
packages/db/drizzle/meta/_journal.json
··· 127 127 "when": 1707411900987, 128 128 "tag": "0017_loose_maggott", 129 129 "breakpoints": true 130 + }, 131 + { 132 + "idx": 18, 133 + "version": "5", 134 + "when": 1707770189561, 135 + "tag": "0018_neat_orphan", 136 + "breakpoints": true 137 + }, 138 + { 139 + "idx": 19, 140 + "version": "5", 141 + "when": 1707899175705, 142 + "tag": "0019_dashing_malcolm_colcord", 143 + "breakpoints": true 144 + }, 145 + { 146 + "idx": 20, 147 + "version": "5", 148 + "when": 1707905605592, 149 + "tag": "0020_flat_bedlam", 150 + "breakpoints": true 130 151 } 131 152 ] 132 153 }
+2 -1
packages/db/package.json
··· 21 21 "devDependencies": { 22 22 "@openstatus/tsconfig": "workspace:*", 23 23 "@types/node": "20.8.0", 24 + "better-sqlite3": "9.4.1", 24 25 "bufferutil": "4.0.7", 25 - "drizzle-kit": "0.19.13", 26 + "drizzle-kit": "0.20.14", 26 27 "encoding": "0.1.13", 27 28 "typescript": "5.2.2", 28 29 "utf-8-validate": "6.0.3"
+4 -7
packages/db/src/schema/incidents/incident.ts
··· 1 1 import { sql } from "drizzle-orm"; 2 - import { 3 - integer, 4 - primaryKey, 5 - sqliteTable, 6 - text, 7 - unique, 8 - } from "drizzle-orm/sqlite-core"; 2 + import { integer, sqliteTable, text, unique } from "drizzle-orm/sqlite-core"; 9 3 10 4 import { monitor } from "../monitors"; 11 5 import { user } from "../users/user"; ··· 48 42 // Who has resolved it 49 43 resolvedAt: integer("resolved_at", { mode: "timestamp" }), 50 44 resolvedBy: integer("resolved_by").references(() => user.id), 45 + 46 + // If the incident was auto resolved 47 + autoResolved: integer("auto_resolved", { mode: "boolean" }).default(false), 51 48 52 49 createdAt: integer("created_at", { mode: "timestamp" }).default( 53 50 sql`(strftime('%s', 'now'))`,
+3 -1
packages/db/src/seed.mts
··· 88 88 }, 89 89 ]) 90 90 .run(); 91 - 91 + 92 92 await db 93 93 .insert(page) 94 94 .values({ ··· 164 164 workspaceId: 1, 165 165 monitorId: 1, 166 166 createdAt: new Date(), 167 + startedAt: new Date(), 167 168 }) 168 169 .run(); 169 170 ··· 174 175 workspaceId: 1, 175 176 monitorId: 1, 176 177 createdAt: new Date(), 178 + startedAt: new Date(Date.now() + 1000), 177 179 }) 178 180 .run(); 179 181 await db
+27 -2
packages/notifications/discord/src/index.ts
··· 15 15 }); 16 16 }; 17 17 18 - export const sendDiscordMessage = async ({ 18 + export const sendAlert = async ({ 19 19 monitor, 20 20 notification, 21 21 statusCode, ··· 24 24 monitor: Monitor; 25 25 notification: Notification; 26 26 statusCode?: number; 27 - region: string; 28 27 message?: string; 29 28 }) => { 30 29 const notificationData = JSON.parse(notification.data); ··· 38 37 Your monitor with url ${monitor.url} is down with ${ 39 38 statusCode ? `status code ${statusCode}` : `error message ${message}` 40 39 }.`, 40 + webhookUrl, 41 + ); 42 + } catch (err) { 43 + console.error(err); 44 + // Do something 45 + } 46 + }; 47 + 48 + export const sendRecovery = async ({ 49 + monitor, 50 + notification, 51 + statusCode, 52 + message, 53 + }: { 54 + monitor: Monitor; 55 + notification: Notification; 56 + statusCode?: number; 57 + message?: string; 58 + }) => { 59 + const notificationData = JSON.parse(notification.data); 60 + const { discord: webhookUrl } = notificationData; // webhook url 61 + const { name } = monitor; 62 + 63 + try { 64 + await postToWebhook( 65 + `Your monitor ${name}|${monitor.url} is up again 🎉`, 41 66 webhookUrl, 42 67 ); 43 68 } catch (err) {
+41 -6
packages/notifications/email/src/index.ts
··· 3 3 import { env } from "../env"; 4 4 import { EmailConfigurationSchema } from "./schema/config"; 5 5 6 - export const send = async ({ 6 + export const sendAlert = async ({ 7 7 monitor, 8 8 notification, 9 - region, 10 9 statusCode, 11 10 message, 12 11 }: { 13 12 monitor: Monitor; 14 13 notification: Notification; 15 14 statusCode?: number; 16 - region: string; 17 15 message?: string; 18 16 }) => { 19 17 // FIXME: ··· 31 29 from: "Notifications <ping@openstatus.dev>", 32 30 33 31 subject: `Your monitor ${monitor.name} is down 🚨`, 34 - html: `<p>Hi,<br><br>Your monitor ${ 35 - monitor.name 36 - } is down in ${region}. </p><p>URL : ${monitor.url}</p> ${ 32 + html: `<p>Hi,<br><br>Your monitor ${monitor.name} is down. </p><p>URL : ${ 33 + monitor.url 34 + }</p> ${ 37 35 statusCode 38 36 ? `<p>Status Code: ${statusCode}</p>` 39 37 : `<p>Error message: ${message}</p>` ··· 47 45 // return NextResponse.json(data); 48 46 } 49 47 }; 48 + 49 + export const sendRecovery = async ({ 50 + monitor, 51 + notification, 52 + statusCode, 53 + message, 54 + }: { 55 + monitor: Monitor; 56 + notification: Notification; 57 + statusCode?: number; 58 + message?: string; 59 + }) => { 60 + // FIXME: 61 + const config = EmailConfigurationSchema.parse(JSON.parse(notification.data)); 62 + const { email } = config; 63 + 64 + const res = await fetch("https://api.resend.com/emails", { 65 + method: "POST", 66 + headers: { 67 + "Content-Type": "application/json", 68 + Authorization: `Bearer ${env.RESEND_API_KEY}`, 69 + }, 70 + body: JSON.stringify({ 71 + to: email, 72 + from: "Notifications <ping@openstatus.dev>", 73 + 74 + subject: `Your monitor ${monitor.name} is back up 🎉`, 75 + html: `<p>Hi,<br><br>Your monitor ${monitor.name} is up again </p><p>URL : ${monitor.url}</p> <p>OpenStatus 🏓 </p>`, 76 + }), 77 + }); 78 + 79 + if (res.ok) { 80 + const data = await res.json(); 81 + console.log(data); 82 + // return NextResponse.json(data); 83 + } 84 + };
+49 -6
packages/notifications/slack/src/index.ts
··· 12 12 } 13 13 }; 14 14 15 - export const sendSlackMessage = async ({ 15 + export const sendAlert = async ({ 16 16 monitor, 17 17 notification, 18 - region, 19 18 statusCode, 20 19 message, 21 20 }: { 22 21 monitor: Monitor; 23 22 notification: Notification; 24 23 statusCode?: number; 25 - region: string; 26 24 message?: string; 27 25 }) => { 28 26 const notificationData = JSON.parse(notification.data); ··· 37 35 type: "section", 38 36 text: { 39 37 type: "mrkdwn", 40 - text: `Your monitor <${ 41 - monitor.url 42 - }/|${name}> is down in ${region} with ${ 38 + text: `Your monitor <${monitor.url}/|${name}> with ${ 43 39 statusCode 44 40 ? `status code ${statusCode}` 45 41 : `error message ${message}` 46 42 } 🚨 \n\n Powered by <https://www.openstatus.dev/|OpenStatus>.`, 43 + }, 44 + accessory: { 45 + type: "button", 46 + text: { 47 + type: "plain_text", 48 + text: "Open Monitor", 49 + emoji: true, 50 + }, 51 + value: `monitor_url_${monitor.url}`, 52 + url: monitor.url, 53 + }, 54 + }, 55 + ], 56 + }, 57 + webhookUrl, 58 + ); 59 + } catch (err) { 60 + console.log(err); 61 + // Do something 62 + } 63 + }; 64 + 65 + export const sendRecovery = async ({ 66 + monitor, 67 + notification, 68 + statusCode, 69 + message, 70 + }: { 71 + monitor: Monitor; 72 + notification: Notification; 73 + statusCode?: number; 74 + message?: string; 75 + }) => { 76 + const notificationData = JSON.parse(notification.data); 77 + const { slack: webhookUrl } = notificationData; // webhook url 78 + const { name } = monitor; 79 + 80 + try { 81 + await postToWebhook( 82 + { 83 + blocks: [ 84 + { 85 + type: "section", 86 + text: { 87 + type: "mrkdwn", 88 + text: `Your monitor <${monitor.url}/|${name}> is up again 89 + 🚀 \n\n Powered by <https://www.openstatus.dev/|OpenStatus>.`, 47 90 }, 48 91 accessory: { 49 92 type: "button",
+42 -4
packages/notifications/twillio-sms/src/index.ts
··· 3 3 import { env } from "./env"; 4 4 import { SmsConfigurationSchema } from "./schema/config"; 5 5 6 - export const sendTextMessage = async ({ 6 + export const sendAlert = async ({ 7 7 monitor, 8 8 notification, 9 - region, 10 9 statusCode, 11 10 message, 12 11 }: { 13 12 monitor: Monitor; 14 13 notification: Notification; 15 14 statusCode?: number; 16 - region: string; 17 15 message?: string; 18 16 }) => { 19 17 const notificationData = SmsConfigurationSchema.parse( ··· 26 24 body.set("From", "+14807252613"); 27 25 body.set( 28 26 "Body", 29 - `Your monitor ${name} / ${monitor.url} is down in ${region} with ${ 27 + `Your monitor ${name} / ${monitor.url} is down with ${ 30 28 statusCode ? `status code ${statusCode}` : `error: ${message}` 31 29 }`, 32 30 ); ··· 49 47 // Do something 50 48 } 51 49 }; 50 + 51 + export const sendRecovery = async ({ 52 + monitor, 53 + notification, 54 + statusCode, 55 + message, 56 + }: { 57 + monitor: Monitor; 58 + notification: Notification; 59 + statusCode?: number; 60 + message?: string; 61 + }) => { 62 + const notificationData = SmsConfigurationSchema.parse( 63 + JSON.parse(notification.data), 64 + ); 65 + const { name } = monitor; 66 + 67 + const body = new FormData(); 68 + body.set("To", notificationData.phoneNumber); 69 + body.set("From", "+14807252613"); 70 + body.set("Body", `Your monitor ${name} / ${monitor.url} is up again`); 71 + 72 + try { 73 + fetch( 74 + `https://api.twilio.com/2010-04-01/Accounts/${env.TWILLIO_ACCOUNT_ID}/Messages.json`, 75 + { 76 + method: "post", 77 + body, 78 + headers: { 79 + Authorization: `Basic ${btoa( 80 + `${env.TWILLIO_ACCOUNT_ID}:${env.TWILLIO_AUTH_TOKEN}`, 81 + )}`, 82 + }, 83 + }, 84 + ); 85 + } catch (err) { 86 + console.log(err); 87 + // Do something 88 + } 89 + };
-32
packages/notifications/twillio-sms/src/test.ts
··· 1 - import { sendTextMessage } from "."; 2 - 3 - await sendTextMessage({ 4 - monitor: { 5 - id: 0, 6 - name: "Localhost", 7 - jobType: "website", 8 - periodicity: "other", 9 - status: "active", 10 - active: null, 11 - regions: [], 12 - url: "http://localhost:3000", 13 - description: "", 14 - headers: [], 15 - body: "", 16 - method: "GET", 17 - createdAt: null, 18 - updatedAt: null, 19 - workspaceId: null, 20 - }, 21 - notification: { 22 - id: 0, 23 - name: "", 24 - data: '{"phoneNumber":"+33651831127"}', 25 - createdAt: null, 26 - updatedAt: null, 27 - workspaceId: null, 28 - provider: "email", 29 - }, 30 - region: "Johannesburg, South Africa.", 31 - statusCode: 418, 32 - });
+248 -167
pnpm-lock.yaml
··· 16 16 version: link:packages/config/eslint 17 17 '@turbo/gen': 18 18 specifier: 1.10.12 19 - version: 1.10.12(@types/node@20.11.17)(typescript@5.2.2) 19 + version: 1.10.12(@types/node@20.8.0)(typescript@5.2.2) 20 20 eslint: 21 21 specifier: 8.50.0 22 22 version: 8.50.0 ··· 214 214 version: 0.6.3 215 215 contentlayer: 216 216 specifier: 0.3.4 217 - version: 0.3.4(esbuild@0.20.0) 217 + version: 0.3.4(esbuild@0.19.12) 218 218 date-fns: 219 219 specifier: 2.30.0 220 220 version: 2.30.0 ··· 238 238 version: 14.1.0(@babel/core@7.23.2)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 239 239 next-contentlayer: 240 240 specifier: 0.3.4 241 - version: 0.3.4(contentlayer@0.3.4)(esbuild@0.20.0)(next@14.1.0)(react-dom@18.2.0)(react@18.2.0) 241 + version: 0.3.4(contentlayer@0.3.4)(esbuild@0.19.12)(next@14.1.0)(react-dom@18.2.0)(react@18.2.0) 242 242 next-plausible: 243 243 specifier: 3.12.0 244 244 version: 3.12.0(next@14.1.0)(react-dom@18.2.0)(react@18.2.0) ··· 464 464 version: 16.3.1 465 465 drizzle-orm: 466 466 specifier: 0.29.3 467 - version: 0.29.3(@libsql/client@0.4.3) 467 + version: 0.29.3(@libsql/client@0.4.3)(better-sqlite3@9.4.1) 468 468 drizzle-zod: 469 469 specifier: 0.5.1 470 470 version: 0.5.1(drizzle-orm@0.29.3)(zod@3.22.2) ··· 478 478 '@types/node': 479 479 specifier: 20.8.0 480 480 version: 20.8.0 481 + better-sqlite3: 482 + specifier: 9.4.1 483 + version: 9.4.1 481 484 bufferutil: 482 485 specifier: 4.0.7 483 486 version: 4.0.7 484 487 drizzle-kit: 485 - specifier: 0.19.13 486 - version: 0.19.13 488 + specifier: 0.20.14 489 + version: 0.20.14 487 490 encoding: 488 491 specifier: 0.1.13 489 492 version: 0.1.13 ··· 1262 1265 commander: 9.4.1 1263 1266 dev: false 1264 1267 1265 - /@contentlayer/cli@0.3.4(esbuild@0.20.0): 1268 + /@contentlayer/cli@0.3.4(esbuild@0.19.12): 1266 1269 resolution: {integrity: sha512-vNDwgLuhYNu+m70NZ3XK9kexKNguuxPXg7Yvzj3B34cEilQjjzSrcTY/i+AIQm9V7uT5GGshx9ukzPf+SmoszQ==} 1267 1270 dependencies: 1268 - '@contentlayer/core': 0.3.4(esbuild@0.20.0) 1271 + '@contentlayer/core': 0.3.4(esbuild@0.19.12) 1269 1272 '@contentlayer/utils': 0.3.4 1270 1273 clipanion: 3.2.1(typanion@3.14.0) 1271 1274 typanion: 3.14.0 ··· 1276 1279 - supports-color 1277 1280 dev: false 1278 1281 1279 - /@contentlayer/client@0.3.4(esbuild@0.20.0): 1282 + /@contentlayer/client@0.3.4(esbuild@0.19.12): 1280 1283 resolution: {integrity: sha512-QSlLyc3y4PtdC5lFw0L4wTZUH8BQnv2nk37hNCsPAqGf+dRO7TLAzdc+2/mVIRgK+vSH+pSOzjLsQpFxxXRTZA==} 1281 1284 dependencies: 1282 - '@contentlayer/core': 0.3.4(esbuild@0.20.0) 1285 + '@contentlayer/core': 0.3.4(esbuild@0.19.12) 1283 1286 transitivePeerDependencies: 1284 1287 - '@effect-ts/otel-node' 1285 1288 - esbuild ··· 1287 1290 - supports-color 1288 1291 dev: false 1289 1292 1290 - /@contentlayer/core@0.3.4(esbuild@0.20.0): 1293 + /@contentlayer/core@0.3.4(esbuild@0.19.12): 1291 1294 resolution: {integrity: sha512-o68oBLwfYZ+2vtgfk1lgHxOl3LoxvRNiUfeQ8IWFWy/L4wnIkKIqLZX01zlRE5IzYM+ZMMN5V0cKQlO7DsyR9g==} 1292 1295 peerDependencies: 1293 1296 esbuild: 0.17.x || 0.18.x ··· 1301 1304 '@contentlayer/utils': 0.3.4 1302 1305 camel-case: 4.1.2 1303 1306 comment-json: 4.2.3 1304 - esbuild: 0.20.0 1307 + esbuild: 0.19.12 1305 1308 gray-matter: 4.0.3 1306 - mdx-bundler: 9.2.1(esbuild@0.20.0) 1309 + mdx-bundler: 9.2.1(esbuild@0.19.12) 1307 1310 rehype-stringify: 9.0.4 1308 1311 remark-frontmatter: 4.0.1 1309 1312 remark-parse: 10.0.2 ··· 1316 1319 - supports-color 1317 1320 dev: false 1318 1321 1319 - /@contentlayer/source-files@0.3.4(esbuild@0.20.0): 1322 + /@contentlayer/source-files@0.3.4(esbuild@0.19.12): 1320 1323 resolution: {integrity: sha512-4njyn0OFPu7WY4tAjMxiJgWOKeiHuBOGdQ36EYE03iij/pPPRbiWbL+cmLccYXUFEW58mDwpqROZZm6pnxjRDQ==} 1321 1324 dependencies: 1322 - '@contentlayer/core': 0.3.4(esbuild@0.20.0) 1325 + '@contentlayer/core': 0.3.4(esbuild@0.19.12) 1323 1326 '@contentlayer/utils': 0.3.4 1324 1327 chokidar: 3.5.3 1325 1328 fast-glob: 3.3.1 ··· 1337 1340 - supports-color 1338 1341 dev: false 1339 1342 1340 - /@contentlayer/source-remote-files@0.3.4(esbuild@0.20.0): 1343 + /@contentlayer/source-remote-files@0.3.4(esbuild@0.19.12): 1341 1344 resolution: {integrity: sha512-cyiv4sNUySZvR0uAKlM+kSAELzNd2h2QT1R2e41dRKbwOUVxeLfmGiLugr0aVac6Q3xYcD99dbHyR1xWPV+w9w==} 1342 1345 dependencies: 1343 - '@contentlayer/core': 0.3.4(esbuild@0.20.0) 1344 - '@contentlayer/source-files': 0.3.4(esbuild@0.20.0) 1346 + '@contentlayer/core': 0.3.4(esbuild@0.19.12) 1347 + '@contentlayer/source-files': 0.3.4(esbuild@0.19.12) 1345 1348 '@contentlayer/utils': 0.3.4 1346 1349 transitivePeerDependencies: 1347 1350 - '@effect-ts/otel-node' ··· 1355 1358 peerDependencies: 1356 1359 '@effect-ts/otel-node': '*' 1357 1360 peerDependenciesMeta: 1358 - '@effect-ts/core': 1359 - optional: true 1360 - '@effect-ts/otel': 1361 - optional: true 1362 1361 '@effect-ts/otel-node': 1363 1362 optional: true 1364 1363 dependencies: ··· 1390 1389 '@jridgewell/trace-mapping': 0.3.9 1391 1390 dev: true 1392 1391 1393 - /@drizzle-team/studio@0.0.5: 1394 - resolution: {integrity: sha512-ps5qF0tMxWRVu+V5gvCRrQNqlY92aTnIKdq27gm9LZMSdaKYZt6AVvSK1dlUMzs6Rt0Jm80b+eWct6xShBKhIw==} 1392 + /@drizzle-team/studio@0.0.39: 1393 + resolution: {integrity: sha512-c5Hkm7MmQC2n5qAsKShjQrHoqlfGslB8+qWzsGGZ+2dHMRTNG60UuzalF0h0rvBax5uzPXuGkYLGaQ+TUX3yMw==} 1394 + dependencies: 1395 + superjson: 2.2.1 1395 1396 dev: true 1396 1397 1397 1398 /@effect-ts/core@0.60.5: ··· 1466 1467 get-tsconfig: 4.7.2 1467 1468 dev: true 1468 1469 1469 - /@esbuild-plugins/node-resolve@0.1.4(esbuild@0.20.0): 1470 + /@esbuild-plugins/node-resolve@0.1.4(esbuild@0.19.12): 1470 1471 resolution: {integrity: sha512-haFQ0qhxEpqtWWY0kx1Y5oE3sMyO1PcoSiWEPrAw6tm/ZOOLXjSs6Q+v1v9eyuVF0nNt50YEvrcrvENmyoMv5g==} 1471 1472 peerDependencies: 1472 1473 esbuild: '*' 1473 1474 dependencies: 1474 1475 '@types/resolve': 1.20.4 1475 1476 debug: 4.3.4 1476 - esbuild: 0.20.0 1477 + esbuild: 0.19.12 1477 1478 escape-string-regexp: 4.0.0 1478 1479 resolve: 1.22.8 1479 1480 transitivePeerDependencies: 1480 1481 - supports-color 1481 1482 dev: false 1482 1483 1483 - /@esbuild/aix-ppc64@0.20.0: 1484 - resolution: {integrity: sha512-fGFDEctNh0CcSwsiRPxiaqX0P5rq+AqE0SRhYGZ4PX46Lg1FNR6oCxJghf8YgY0WQEgQuh3lErUFE4KxLeRmmw==} 1484 + /@esbuild/aix-ppc64@0.19.12: 1485 + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} 1485 1486 engines: {node: '>=12'} 1486 1487 cpu: [ppc64] 1487 1488 os: [aix] 1488 1489 requiresBuild: true 1489 - dev: false 1490 1490 optional: true 1491 1491 1492 1492 /@esbuild/android-arm64@0.16.4: ··· 1507 1507 dev: true 1508 1508 optional: true 1509 1509 1510 - /@esbuild/android-arm64@0.20.0: 1511 - resolution: {integrity: sha512-aVpnM4lURNkp0D3qPoAzSG92VXStYmoVPOgXveAUoQBWRSuQzt51yvSju29J6AHPmwY1BjH49uR29oyfH1ra8Q==} 1510 + /@esbuild/android-arm64@0.19.12: 1511 + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} 1512 1512 engines: {node: '>=12'} 1513 1513 cpu: [arm64] 1514 1514 os: [android] 1515 1515 requiresBuild: true 1516 - dev: false 1517 1516 optional: true 1518 1517 1519 1518 /@esbuild/android-arm@0.16.4: ··· 1534 1533 dev: true 1535 1534 optional: true 1536 1535 1537 - /@esbuild/android-arm@0.20.0: 1538 - resolution: {integrity: sha512-3bMAfInvByLHfJwYPJRlpTeaQA75n8C/QKpEaiS4HrFWFiJlNI0vzq/zCjBrhAYcPyVPG7Eo9dMrcQXuqmNk5g==} 1536 + /@esbuild/android-arm@0.19.12: 1537 + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} 1539 1538 engines: {node: '>=12'} 1540 1539 cpu: [arm] 1541 1540 os: [android] 1542 1541 requiresBuild: true 1543 - dev: false 1544 1542 optional: true 1545 1543 1546 1544 /@esbuild/android-x64@0.16.4: ··· 1561 1559 dev: true 1562 1560 optional: true 1563 1561 1564 - /@esbuild/android-x64@0.20.0: 1565 - resolution: {integrity: sha512-uK7wAnlRvjkCPzh8jJ+QejFyrP8ObKuR5cBIsQZ+qbMunwR8sbd8krmMbxTLSrDhiPZaJYKQAU5Y3iMDcZPhyQ==} 1562 + /@esbuild/android-x64@0.19.12: 1563 + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} 1566 1564 engines: {node: '>=12'} 1567 1565 cpu: [x64] 1568 1566 os: [android] 1569 1567 requiresBuild: true 1570 - dev: false 1571 1568 optional: true 1572 1569 1573 1570 /@esbuild/darwin-arm64@0.16.4: ··· 1588 1585 dev: true 1589 1586 optional: true 1590 1587 1591 - /@esbuild/darwin-arm64@0.20.0: 1592 - resolution: {integrity: sha512-AjEcivGAlPs3UAcJedMa9qYg9eSfU6FnGHJjT8s346HSKkrcWlYezGE8VaO2xKfvvlZkgAhyvl06OJOxiMgOYQ==} 1588 + /@esbuild/darwin-arm64@0.19.12: 1589 + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} 1593 1590 engines: {node: '>=12'} 1594 1591 cpu: [arm64] 1595 1592 os: [darwin] 1596 1593 requiresBuild: true 1597 - dev: false 1598 1594 optional: true 1599 1595 1600 1596 /@esbuild/darwin-x64@0.16.4: ··· 1615 1611 dev: true 1616 1612 optional: true 1617 1613 1618 - /@esbuild/darwin-x64@0.20.0: 1619 - resolution: {integrity: sha512-bsgTPoyYDnPv8ER0HqnJggXK6RyFy4PH4rtsId0V7Efa90u2+EifxytE9pZnsDgExgkARy24WUQGv9irVbTvIw==} 1614 + /@esbuild/darwin-x64@0.19.12: 1615 + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} 1620 1616 engines: {node: '>=12'} 1621 1617 cpu: [x64] 1622 1618 os: [darwin] 1623 1619 requiresBuild: true 1624 - dev: false 1625 1620 optional: true 1626 1621 1627 1622 /@esbuild/freebsd-arm64@0.16.4: ··· 1642 1637 dev: true 1643 1638 optional: true 1644 1639 1645 - /@esbuild/freebsd-arm64@0.20.0: 1646 - resolution: {integrity: sha512-kQ7jYdlKS335mpGbMW5tEe3IrQFIok9r84EM3PXB8qBFJPSc6dpWfrtsC/y1pyrz82xfUIn5ZrnSHQQsd6jebQ==} 1640 + /@esbuild/freebsd-arm64@0.19.12: 1641 + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} 1647 1642 engines: {node: '>=12'} 1648 1643 cpu: [arm64] 1649 1644 os: [freebsd] 1650 1645 requiresBuild: true 1651 - dev: false 1652 1646 optional: true 1653 1647 1654 1648 /@esbuild/freebsd-x64@0.16.4: ··· 1669 1663 dev: true 1670 1664 optional: true 1671 1665 1672 - /@esbuild/freebsd-x64@0.20.0: 1673 - resolution: {integrity: sha512-uG8B0WSepMRsBNVXAQcHf9+Ko/Tr+XqmK7Ptel9HVmnykupXdS4J7ovSQUIi0tQGIndhbqWLaIL/qO/cWhXKyQ==} 1666 + /@esbuild/freebsd-x64@0.19.12: 1667 + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} 1674 1668 engines: {node: '>=12'} 1675 1669 cpu: [x64] 1676 1670 os: [freebsd] 1677 1671 requiresBuild: true 1678 - dev: false 1679 1672 optional: true 1680 1673 1681 1674 /@esbuild/linux-arm64@0.16.4: ··· 1696 1689 dev: true 1697 1690 optional: true 1698 1691 1699 - /@esbuild/linux-arm64@0.20.0: 1700 - resolution: {integrity: sha512-uTtyYAP5veqi2z9b6Gr0NUoNv9F/rOzI8tOD5jKcCvRUn7T60Bb+42NDBCWNhMjkQzI0qqwXkQGo1SY41G52nw==} 1692 + /@esbuild/linux-arm64@0.19.12: 1693 + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} 1701 1694 engines: {node: '>=12'} 1702 1695 cpu: [arm64] 1703 1696 os: [linux] 1704 1697 requiresBuild: true 1705 - dev: false 1706 1698 optional: true 1707 1699 1708 1700 /@esbuild/linux-arm@0.16.4: ··· 1723 1715 dev: true 1724 1716 optional: true 1725 1717 1726 - /@esbuild/linux-arm@0.20.0: 1727 - resolution: {integrity: sha512-2ezuhdiZw8vuHf1HKSf4TIk80naTbP9At7sOqZmdVwvvMyuoDiZB49YZKLsLOfKIr77+I40dWpHVeY5JHpIEIg==} 1718 + /@esbuild/linux-arm@0.19.12: 1719 + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} 1728 1720 engines: {node: '>=12'} 1729 1721 cpu: [arm] 1730 1722 os: [linux] 1731 1723 requiresBuild: true 1732 - dev: false 1733 1724 optional: true 1734 1725 1735 1726 /@esbuild/linux-ia32@0.16.4: ··· 1750 1741 dev: true 1751 1742 optional: true 1752 1743 1753 - /@esbuild/linux-ia32@0.20.0: 1754 - resolution: {integrity: sha512-c88wwtfs8tTffPaoJ+SQn3y+lKtgTzyjkD8NgsyCtCmtoIC8RDL7PrJU05an/e9VuAke6eJqGkoMhJK1RY6z4w==} 1744 + /@esbuild/linux-ia32@0.19.12: 1745 + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} 1755 1746 engines: {node: '>=12'} 1756 1747 cpu: [ia32] 1757 1748 os: [linux] 1758 1749 requiresBuild: true 1759 - dev: false 1760 1750 optional: true 1761 1751 1762 1752 /@esbuild/linux-loong64@0.16.4: ··· 1777 1767 dev: true 1778 1768 optional: true 1779 1769 1780 - /@esbuild/linux-loong64@0.20.0: 1781 - resolution: {integrity: sha512-lR2rr/128/6svngnVta6JN4gxSXle/yZEZL3o4XZ6esOqhyR4wsKyfu6qXAL04S4S5CgGfG+GYZnjFd4YiG3Aw==} 1770 + /@esbuild/linux-loong64@0.19.12: 1771 + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} 1782 1772 engines: {node: '>=12'} 1783 1773 cpu: [loong64] 1784 1774 os: [linux] 1785 1775 requiresBuild: true 1786 - dev: false 1787 1776 optional: true 1788 1777 1789 1778 /@esbuild/linux-mips64el@0.16.4: ··· 1804 1793 dev: true 1805 1794 optional: true 1806 1795 1807 - /@esbuild/linux-mips64el@0.20.0: 1808 - resolution: {integrity: sha512-9Sycc+1uUsDnJCelDf6ZNqgZQoK1mJvFtqf2MUz4ujTxGhvCWw+4chYfDLPepMEvVL9PDwn6HrXad5yOrNzIsQ==} 1796 + /@esbuild/linux-mips64el@0.19.12: 1797 + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} 1809 1798 engines: {node: '>=12'} 1810 1799 cpu: [mips64el] 1811 1800 os: [linux] 1812 1801 requiresBuild: true 1813 - dev: false 1814 1802 optional: true 1815 1803 1816 1804 /@esbuild/linux-ppc64@0.16.4: ··· 1831 1819 dev: true 1832 1820 optional: true 1833 1821 1834 - /@esbuild/linux-ppc64@0.20.0: 1835 - resolution: {integrity: sha512-CoWSaaAXOZd+CjbUTdXIJE/t7Oz+4g90A3VBCHLbfuc5yUQU/nFDLOzQsN0cdxgXd97lYW/psIIBdjzQIwTBGw==} 1822 + /@esbuild/linux-ppc64@0.19.12: 1823 + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} 1836 1824 engines: {node: '>=12'} 1837 1825 cpu: [ppc64] 1838 1826 os: [linux] 1839 1827 requiresBuild: true 1840 - dev: false 1841 1828 optional: true 1842 1829 1843 1830 /@esbuild/linux-riscv64@0.16.4: ··· 1858 1845 dev: true 1859 1846 optional: true 1860 1847 1861 - /@esbuild/linux-riscv64@0.20.0: 1862 - resolution: {integrity: sha512-mlb1hg/eYRJUpv8h/x+4ShgoNLL8wgZ64SUr26KwglTYnwAWjkhR2GpoKftDbPOCnodA9t4Y/b68H4J9XmmPzA==} 1848 + /@esbuild/linux-riscv64@0.19.12: 1849 + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} 1863 1850 engines: {node: '>=12'} 1864 1851 cpu: [riscv64] 1865 1852 os: [linux] 1866 1853 requiresBuild: true 1867 - dev: false 1868 1854 optional: true 1869 1855 1870 1856 /@esbuild/linux-s390x@0.16.4: ··· 1885 1871 dev: true 1886 1872 optional: true 1887 1873 1888 - /@esbuild/linux-s390x@0.20.0: 1889 - resolution: {integrity: sha512-fgf9ubb53xSnOBqyvWEY6ukBNRl1mVX1srPNu06B6mNsNK20JfH6xV6jECzrQ69/VMiTLvHMicQR/PgTOgqJUQ==} 1874 + /@esbuild/linux-s390x@0.19.12: 1875 + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} 1890 1876 engines: {node: '>=12'} 1891 1877 cpu: [s390x] 1892 1878 os: [linux] 1893 1879 requiresBuild: true 1894 - dev: false 1895 1880 optional: true 1896 1881 1897 1882 /@esbuild/linux-x64@0.16.4: ··· 1912 1897 dev: true 1913 1898 optional: true 1914 1899 1915 - /@esbuild/linux-x64@0.20.0: 1916 - resolution: {integrity: sha512-H9Eu6MGse++204XZcYsse1yFHmRXEWgadk2N58O/xd50P9EvFMLJTQLg+lB4E1cF2xhLZU5luSWtGTb0l9UeSg==} 1900 + /@esbuild/linux-x64@0.19.12: 1901 + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} 1917 1902 engines: {node: '>=12'} 1918 1903 cpu: [x64] 1919 1904 os: [linux] 1920 1905 requiresBuild: true 1921 - dev: false 1922 1906 optional: true 1923 1907 1924 1908 /@esbuild/netbsd-x64@0.16.4: ··· 1939 1923 dev: true 1940 1924 optional: true 1941 1925 1942 - /@esbuild/netbsd-x64@0.20.0: 1943 - resolution: {integrity: sha512-lCT675rTN1v8Fo+RGrE5KjSnfY0x9Og4RN7t7lVrN3vMSjy34/+3na0q7RIfWDAj0e0rCh0OL+P88lu3Rt21MQ==} 1926 + /@esbuild/netbsd-x64@0.19.12: 1927 + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} 1944 1928 engines: {node: '>=12'} 1945 1929 cpu: [x64] 1946 1930 os: [netbsd] 1947 1931 requiresBuild: true 1948 - dev: false 1949 1932 optional: true 1950 1933 1951 1934 /@esbuild/openbsd-x64@0.16.4: ··· 1966 1949 dev: true 1967 1950 optional: true 1968 1951 1969 - /@esbuild/openbsd-x64@0.20.0: 1970 - resolution: {integrity: sha512-HKoUGXz/TOVXKQ+67NhxyHv+aDSZf44QpWLa3I1lLvAwGq8x1k0T+e2HHSRvxWhfJrFxaaqre1+YyzQ99KixoA==} 1952 + /@esbuild/openbsd-x64@0.19.12: 1953 + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} 1971 1954 engines: {node: '>=12'} 1972 1955 cpu: [x64] 1973 1956 os: [openbsd] 1974 1957 requiresBuild: true 1975 - dev: false 1976 1958 optional: true 1977 1959 1978 1960 /@esbuild/sunos-x64@0.16.4: ··· 1993 1975 dev: true 1994 1976 optional: true 1995 1977 1996 - /@esbuild/sunos-x64@0.20.0: 1997 - resolution: {integrity: sha512-GDwAqgHQm1mVoPppGsoq4WJwT3vhnz/2N62CzhvApFD1eJyTroob30FPpOZabN+FgCjhG+AgcZyOPIkR8dfD7g==} 1978 + /@esbuild/sunos-x64@0.19.12: 1979 + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} 1998 1980 engines: {node: '>=12'} 1999 1981 cpu: [x64] 2000 1982 os: [sunos] 2001 1983 requiresBuild: true 2002 - dev: false 2003 1984 optional: true 2004 1985 2005 1986 /@esbuild/win32-arm64@0.16.4: ··· 2020 2001 dev: true 2021 2002 optional: true 2022 2003 2023 - /@esbuild/win32-arm64@0.20.0: 2024 - resolution: {integrity: sha512-0vYsP8aC4TvMlOQYozoksiaxjlvUcQrac+muDqj1Fxy6jh9l9CZJzj7zmh8JGfiV49cYLTorFLxg7593pGldwQ==} 2004 + /@esbuild/win32-arm64@0.19.12: 2005 + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} 2025 2006 engines: {node: '>=12'} 2026 2007 cpu: [arm64] 2027 2008 os: [win32] 2028 2009 requiresBuild: true 2029 - dev: false 2030 2010 optional: true 2031 2011 2032 2012 /@esbuild/win32-ia32@0.16.4: ··· 2047 2027 dev: true 2048 2028 optional: true 2049 2029 2050 - /@esbuild/win32-ia32@0.20.0: 2051 - resolution: {integrity: sha512-p98u4rIgfh4gdpV00IqknBD5pC84LCub+4a3MO+zjqvU5MVXOc3hqR2UgT2jI2nh3h8s9EQxmOsVI3tyzv1iFg==} 2030 + /@esbuild/win32-ia32@0.19.12: 2031 + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} 2052 2032 engines: {node: '>=12'} 2053 2033 cpu: [ia32] 2054 2034 os: [win32] 2055 2035 requiresBuild: true 2056 - dev: false 2057 2036 optional: true 2058 2037 2059 2038 /@esbuild/win32-x64@0.16.4: ··· 2074 2053 dev: true 2075 2054 optional: true 2076 2055 2077 - /@esbuild/win32-x64@0.20.0: 2078 - resolution: {integrity: sha512-NgJnesu1RtWihtTtXGFMU5YSE6JyyHPMxCwBZK7a6/8d31GuSo9l0Ss7w1Jw5QnKUawG6UEehs883kcXf5fYwg==} 2056 + /@esbuild/win32-x64@0.19.12: 2057 + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} 2079 2058 engines: {node: '>=12'} 2080 2059 cpu: [x64] 2081 2060 os: [win32] 2082 2061 requiresBuild: true 2083 - dev: false 2084 2062 optional: true 2085 2063 2086 2064 /@eslint-community/eslint-utils@4.4.0(eslint@8.50.0): ··· 2547 2525 unist-util-visit: 1.4.1 2548 2526 dev: false 2549 2527 2550 - /@mdx-js/esbuild@2.3.0(esbuild@0.20.0): 2528 + /@mdx-js/esbuild@2.3.0(esbuild@0.19.12): 2551 2529 resolution: {integrity: sha512-r/vsqsM0E+U4Wr0DK+0EfmABE/eg+8ITW4DjvYdh3ve/tK2safaqHArNnaqbOk1DjYGrhxtoXoGaM3BY8fGBTA==} 2552 2530 peerDependencies: 2553 2531 esbuild: '>=0.11.0' 2554 2532 dependencies: 2555 2533 '@mdx-js/mdx': 2.3.0 2556 - esbuild: 0.20.0 2534 + esbuild: 0.19.12 2557 2535 node-fetch: 3.3.2 2558 2536 vfile: 5.3.7 2559 2537 transitivePeerDependencies: ··· 5076 5054 resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} 5077 5055 dev: true 5078 5056 5079 - /@turbo/gen@1.10.12(@types/node@20.11.17)(typescript@5.2.2): 5057 + /@turbo/gen@1.10.12(@types/node@20.8.0)(typescript@5.2.2): 5080 5058 resolution: {integrity: sha512-noop5+3MBFsgPQ7O2vQpS6YYiah+ZrOioa4cDDpZceUVsKVXvUHFmC2nEVyKSJZhO/8SLvbDE/esB/MGw5b2tw==} 5081 5059 hasBin: true 5082 5060 dependencies: ··· 5088 5066 node-plop: 0.26.3 5089 5067 proxy-agent: 6.3.1 5090 5068 semver: 7.5.4 5091 - ts-node: 10.9.1(@types/node@20.11.17)(typescript@5.2.2) 5069 + ts-node: 10.9.1(@types/node@20.8.0)(typescript@5.2.2) 5092 5070 update-check: 1.5.4 5093 5071 validate-npm-package-name: 5.0.0 5094 5072 transitivePeerDependencies: ··· 5335 5313 /@types/node@16.18.6: 5336 5314 resolution: {integrity: sha512-vmYJF0REqDyyU0gviezF/KHq/fYaUbFhkcNbQCuPGFQj6VTbXuHZoxs/Y7mutWe73C8AC6l9fFu8mSYiBAqkGA==} 5337 5315 dev: false 5338 - 5339 - /@types/node@20.11.17: 5340 - resolution: {integrity: sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw==} 5341 - dependencies: 5342 - undici-types: 5.26.5 5343 - dev: true 5344 5316 5345 5317 /@types/node@20.8.0: 5346 5318 resolution: {integrity: sha512-LzcWltT83s1bthcvjBmiBvGJiiUe84NWRHkw+ZV6Fr41z2FbIzvc815dk2nQ3RAKMuN2fkenM/z3Xv2QzEpYxQ==} ··· 6014 5986 resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} 6015 5987 dev: false 6016 5988 5989 + /better-sqlite3@9.4.1: 5990 + resolution: {integrity: sha512-QpqiQeMI4WkE+dQ68zTMX5OzlPGc7lXIDP1iKUt4Omt9PdaVgzKYxHIJRIzt1E+RUBQoFmkip/IbvzyrxehAIg==} 5991 + requiresBuild: true 5992 + dependencies: 5993 + bindings: 1.5.0 5994 + prebuild-install: 7.1.1 5995 + 6017 5996 /bignumber.js@9.1.2: 6018 5997 resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==} 6019 5998 dev: false ··· 6022 6001 resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} 6023 6002 engines: {node: '>=8'} 6024 6003 6004 + /bindings@1.5.0: 6005 + resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} 6006 + dependencies: 6007 + file-uri-to-path: 1.0.0 6008 + 6025 6009 /bl@4.1.0: 6026 6010 resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} 6027 6011 dependencies: ··· 6273 6257 optionalDependencies: 6274 6258 fsevents: 2.3.3 6275 6259 6260 + /chownr@1.1.4: 6261 + resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} 6262 + 6276 6263 /ci-info@3.9.0: 6277 6264 resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} 6278 6265 engines: {node: '>=8'} ··· 6470 6457 engines: {node: '>= 0.6'} 6471 6458 dev: false 6472 6459 6473 - /contentlayer@0.3.4(esbuild@0.20.0): 6460 + /contentlayer@0.3.4(esbuild@0.19.12): 6474 6461 resolution: {integrity: sha512-FYDdTUFaN4yqep0waswrhcXjmMJnPD5iXDTtxcUCGdklfuIrXM2xLx51xl748cHmGA6IsC+27YZFxU6Ym13QIA==} 6475 6462 engines: {node: '>=14.18'} 6476 6463 hasBin: true 6477 6464 requiresBuild: true 6478 6465 dependencies: 6479 - '@contentlayer/cli': 0.3.4(esbuild@0.20.0) 6480 - '@contentlayer/client': 0.3.4(esbuild@0.20.0) 6481 - '@contentlayer/core': 0.3.4(esbuild@0.20.0) 6482 - '@contentlayer/source-files': 0.3.4(esbuild@0.20.0) 6483 - '@contentlayer/source-remote-files': 0.3.4(esbuild@0.20.0) 6466 + '@contentlayer/cli': 0.3.4(esbuild@0.19.12) 6467 + '@contentlayer/client': 0.3.4(esbuild@0.19.12) 6468 + '@contentlayer/core': 0.3.4(esbuild@0.19.12) 6469 + '@contentlayer/source-files': 0.3.4(esbuild@0.19.12) 6470 + '@contentlayer/source-remote-files': 0.3.4(esbuild@0.19.12) 6484 6471 '@contentlayer/utils': 0.3.4 6485 6472 transitivePeerDependencies: 6486 6473 - '@effect-ts/otel-node' ··· 6502 6489 engines: {node: '>=12.13'} 6503 6490 dependencies: 6504 6491 is-what: 4.1.15 6505 - dev: false 6506 6492 6507 6493 /core-js-pure@3.33.1: 6508 6494 resolution: {integrity: sha512-wCXGbLjnsP10PlK/thHSQlOLlLKNEkaWbTzVvHHZ79fZNeN1gUmw2gBlpItxPv/pvqldevEXFh/d5stdNvl6EQ==} ··· 6720 6706 dependencies: 6721 6707 character-entities: 2.0.2 6722 6708 6709 + /decompress-response@6.0.0: 6710 + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} 6711 + engines: {node: '>=10'} 6712 + dependencies: 6713 + mimic-response: 3.1.0 6714 + 6723 6715 /deep-extend@0.6.0: 6724 6716 resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} 6725 6717 engines: {node: '>=4.0.0'} 6726 - dev: true 6727 6718 6728 6719 /deep-is@0.1.4: 6729 6720 resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} ··· 6810 6801 resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} 6811 6802 engines: {node: '>=8'} 6812 6803 requiresBuild: true 6813 - dev: false 6814 - optional: true 6815 6804 6816 6805 /detect-node-es@1.1.0: 6817 6806 resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} ··· 6949 6938 wordwrap: 1.0.0 6950 6939 dev: true 6951 6940 6952 - /drizzle-kit@0.19.13: 6953 - resolution: {integrity: sha512-Rba5VW1O2JfJlwVBeZ8Zwt2E2us5oZ08PQBDiVSGlug53TOc8hzXjblZFuF+dnll9/RQEHrkzBmJFgqTvn5Rxg==} 6941 + /drizzle-kit@0.20.14: 6942 + resolution: {integrity: sha512-0fHv3YIEaUcSVPSGyaaBfOi9bmpajjhbJNdPsRMIUvYdLVxBu9eGjH8mRc3Qk7HVmEidFc/lhG1YyJhoXrn5yA==} 6954 6943 hasBin: true 6955 6944 dependencies: 6956 - '@drizzle-team/studio': 0.0.5 6945 + '@drizzle-team/studio': 0.0.39 6957 6946 '@esbuild-kit/esm-loader': 2.6.5 6958 6947 camelcase: 7.0.1 6959 6948 chalk: 5.3.0 6960 6949 commander: 9.5.0 6961 - esbuild: 0.18.20 6962 - esbuild-register: 3.5.0(esbuild@0.18.20) 6950 + env-paths: 3.0.0 6951 + esbuild: 0.19.12 6952 + esbuild-register: 3.5.0(esbuild@0.19.12) 6963 6953 glob: 8.1.0 6964 6954 hanji: 0.0.5 6965 6955 json-diff: 0.9.0 6966 6956 minimatch: 7.4.6 6957 + semver: 7.5.4 6967 6958 zod: 3.22.2 6968 6959 transitivePeerDependencies: 6969 6960 - supports-color 6970 6961 dev: true 6971 6962 6972 - /drizzle-orm@0.29.3(@libsql/client@0.4.3): 6963 + /drizzle-orm@0.29.3(@libsql/client@0.4.3)(better-sqlite3@9.4.1): 6973 6964 resolution: {integrity: sha512-uSE027csliGSGYD0pqtM+SAQATMREb3eSM/U8s6r+Y0RFwTKwftnwwSkqx3oS65UBgqDOM0gMTl5UGNpt6lW0A==} 6974 6965 peerDependencies: 6975 6966 '@aws-sdk/client-rds-data': '>=3' ··· 7041 7032 optional: true 7042 7033 dependencies: 7043 7034 '@libsql/client': 0.4.3(bufferutil@4.0.7)(encoding@0.1.13)(utf-8-validate@6.0.3) 7035 + better-sqlite3: 9.4.1 7044 7036 dev: false 7045 7037 7046 7038 /drizzle-zod@0.5.1(drizzle-orm@0.29.3)(zod@3.22.2): ··· 7049 7041 drizzle-orm: '>=0.23.13' 7050 7042 zod: '*' 7051 7043 dependencies: 7052 - drizzle-orm: 0.29.3(@libsql/client@0.4.3) 7044 + drizzle-orm: 0.29.3(@libsql/client@0.4.3)(better-sqlite3@9.4.1) 7053 7045 zod: 3.22.2 7054 7046 dev: false 7055 7047 ··· 7102 7094 resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} 7103 7095 dependencies: 7104 7096 once: 1.4.0 7105 - dev: false 7106 7097 7107 7098 /enhanced-resolve@5.15.0: 7108 7099 resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} ··· 7117 7108 engines: {node: '>=0.12'} 7118 7109 dev: false 7119 7110 7111 + /env-paths@3.0.0: 7112 + resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} 7113 + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} 7114 + dev: true 7115 + 7120 7116 /error-ex@1.3.2: 7121 7117 resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} 7122 7118 dependencies: ··· 7249 7245 es6-symbol: 3.1.3 7250 7246 dev: true 7251 7247 7252 - /esbuild-register@3.5.0(esbuild@0.18.20): 7248 + /esbuild-register@3.5.0(esbuild@0.19.12): 7253 7249 resolution: {integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==} 7254 7250 peerDependencies: 7255 7251 esbuild: '>=0.12 <1' 7256 7252 dependencies: 7257 7253 debug: 4.3.4 7258 - esbuild: 0.18.20 7254 + esbuild: 0.19.12 7259 7255 transitivePeerDependencies: 7260 7256 - supports-color 7261 7257 dev: true ··· 7320 7316 '@esbuild/win32-x64': 0.18.20 7321 7317 dev: true 7322 7318 7323 - /esbuild@0.20.0: 7324 - resolution: {integrity: sha512-6iwE3Y2RVYCME1jLpBqq7LQWK3MW6vjV2bZy6gt/WrqkY+WE74Spyc0ThAOYpMtITvnjX09CrC6ym7A/m9mebA==} 7319 + /esbuild@0.19.12: 7320 + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} 7325 7321 engines: {node: '>=12'} 7326 7322 hasBin: true 7327 7323 requiresBuild: true 7328 7324 optionalDependencies: 7329 - '@esbuild/aix-ppc64': 0.20.0 7330 - '@esbuild/android-arm': 0.20.0 7331 - '@esbuild/android-arm64': 0.20.0 7332 - '@esbuild/android-x64': 0.20.0 7333 - '@esbuild/darwin-arm64': 0.20.0 7334 - '@esbuild/darwin-x64': 0.20.0 7335 - '@esbuild/freebsd-arm64': 0.20.0 7336 - '@esbuild/freebsd-x64': 0.20.0 7337 - '@esbuild/linux-arm': 0.20.0 7338 - '@esbuild/linux-arm64': 0.20.0 7339 - '@esbuild/linux-ia32': 0.20.0 7340 - '@esbuild/linux-loong64': 0.20.0 7341 - '@esbuild/linux-mips64el': 0.20.0 7342 - '@esbuild/linux-ppc64': 0.20.0 7343 - '@esbuild/linux-riscv64': 0.20.0 7344 - '@esbuild/linux-s390x': 0.20.0 7345 - '@esbuild/linux-x64': 0.20.0 7346 - '@esbuild/netbsd-x64': 0.20.0 7347 - '@esbuild/openbsd-x64': 0.20.0 7348 - '@esbuild/sunos-x64': 0.20.0 7349 - '@esbuild/win32-arm64': 0.20.0 7350 - '@esbuild/win32-ia32': 0.20.0 7351 - '@esbuild/win32-x64': 0.20.0 7352 - dev: false 7325 + '@esbuild/aix-ppc64': 0.19.12 7326 + '@esbuild/android-arm': 0.19.12 7327 + '@esbuild/android-arm64': 0.19.12 7328 + '@esbuild/android-x64': 0.19.12 7329 + '@esbuild/darwin-arm64': 0.19.12 7330 + '@esbuild/darwin-x64': 0.19.12 7331 + '@esbuild/freebsd-arm64': 0.19.12 7332 + '@esbuild/freebsd-x64': 0.19.12 7333 + '@esbuild/linux-arm': 0.19.12 7334 + '@esbuild/linux-arm64': 0.19.12 7335 + '@esbuild/linux-ia32': 0.19.12 7336 + '@esbuild/linux-loong64': 0.19.12 7337 + '@esbuild/linux-mips64el': 0.19.12 7338 + '@esbuild/linux-ppc64': 0.19.12 7339 + '@esbuild/linux-riscv64': 0.19.12 7340 + '@esbuild/linux-s390x': 0.19.12 7341 + '@esbuild/linux-x64': 0.19.12 7342 + '@esbuild/netbsd-x64': 0.19.12 7343 + '@esbuild/openbsd-x64': 0.19.12 7344 + '@esbuild/sunos-x64': 0.19.12 7345 + '@esbuild/win32-arm64': 0.19.12 7346 + '@esbuild/win32-ia32': 0.19.12 7347 + '@esbuild/win32-x64': 0.19.12 7353 7348 7354 7349 /escalade@3.1.1: 7355 7350 resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} ··· 7766 7761 signal-exit: 3.0.7 7767 7762 strip-final-newline: 2.0.0 7768 7763 7764 + /expand-template@2.0.3: 7765 + resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} 7766 + engines: {node: '>=6'} 7767 + 7769 7768 /ext@1.7.0: 7770 7769 resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} 7771 7770 dependencies: ··· 7851 7850 dependencies: 7852 7851 flat-cache: 3.1.1 7853 7852 7853 + /file-uri-to-path@1.0.0: 7854 + resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} 7855 + 7854 7856 /fill-range@7.0.1: 7855 7857 resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} 7856 7858 engines: {node: '>=8'} ··· 7940 7942 resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} 7941 7943 dev: true 7942 7944 7945 + /fs-constants@1.0.0: 7946 + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} 7947 + 7943 7948 /fs-extra@10.1.0: 7944 7949 resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} 7945 7950 engines: {node: '>=12'} ··· 8073 8078 transitivePeerDependencies: 8074 8079 - supports-color 8075 8080 dev: true 8081 + 8082 + /github-from-package@0.0.0: 8083 + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} 8076 8084 8077 8085 /github-slugger@2.0.0: 8078 8086 resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} ··· 9071 9079 /is-what@4.1.15: 9072 9080 resolution: {integrity: sha512-uKua1wfy3Yt+YqsD6mTUEa2zSi3G1oPlqTflgaPJ7z63vUGN5pxFpnQfeSLMFnJDEsdvOtkp1rUWkYjB4YfhgA==} 9073 9081 engines: {node: '>=12.13'} 9074 - dev: false 9075 9082 9076 9083 /is-whitespace@0.3.0: 9077 9084 resolution: {integrity: sha512-RydPhl4S6JwAyj0JJjshWJEFG6hNye3pZFBRZaTUfZFwGHxzppNaNOVgQuS/E/SlhrApuMXrpnK1EEIXfdo3Dg==} ··· 9790 9797 dependencies: 9791 9798 '@types/mdast': 3.0.14 9792 9799 9793 - /mdx-bundler@9.2.1(esbuild@0.20.0): 9800 + /mdx-bundler@9.2.1(esbuild@0.19.12): 9794 9801 resolution: {integrity: sha512-hWEEip1KU9MCNqeH2rqwzAZ1pdqPPbfkx9OTJjADqGPQz4t9BO85fhI7AP9gVYrpmfArf9/xJZUN0yBErg/G/Q==} 9795 9802 engines: {node: '>=14', npm: '>=6'} 9796 9803 peerDependencies: 9797 9804 esbuild: 0.* 9798 9805 dependencies: 9799 9806 '@babel/runtime': 7.23.2 9800 - '@esbuild-plugins/node-resolve': 0.1.4(esbuild@0.20.0) 9807 + '@esbuild-plugins/node-resolve': 0.1.4(esbuild@0.19.12) 9801 9808 '@fal-works/esbuild-plugin-global-externals': 2.1.2 9802 - '@mdx-js/esbuild': 2.3.0(esbuild@0.20.0) 9803 - esbuild: 0.20.0 9809 + '@mdx-js/esbuild': 2.3.0(esbuild@0.19.12) 9810 + esbuild: 0.19.12 9804 9811 gray-matter: 4.0.3 9805 9812 remark-frontmatter: 4.0.1 9806 9813 remark-mdx-frontmatter: 1.1.1 ··· 10209 10216 resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} 10210 10217 engines: {node: '>=6'} 10211 10218 10219 + /mimic-response@3.1.0: 10220 + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} 10221 + engines: {node: '>=10'} 10222 + 10212 10223 /min-indent@1.0.1: 10213 10224 resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} 10214 10225 engines: {node: '>=4'} ··· 10255 10266 engines: {node: '>=16 || 14 >=14.17'} 10256 10267 dev: false 10257 10268 10269 + /mkdirp-classic@0.5.3: 10270 + resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} 10271 + 10258 10272 /mkdirp@0.5.6: 10259 10273 resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} 10260 10274 hasBin: true ··· 10299 10313 engines: {node: ^18 || >=20} 10300 10314 hasBin: true 10301 10315 dev: false 10316 + 10317 + /napi-build-utils@1.0.2: 10318 + resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} 10302 10319 10303 10320 /natural-compare@1.4.0: 10304 10321 resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} ··· 10312 10329 engines: {node: '>= 0.4.0'} 10313 10330 dev: true 10314 10331 10315 - /next-contentlayer@0.3.4(contentlayer@0.3.4)(esbuild@0.20.0)(next@14.1.0)(react-dom@18.2.0)(react@18.2.0): 10332 + /next-contentlayer@0.3.4(contentlayer@0.3.4)(esbuild@0.19.12)(next@14.1.0)(react-dom@18.2.0)(react@18.2.0): 10316 10333 resolution: {integrity: sha512-UtUCwgAl159KwfhNaOwyiI7Lg6sdioyKMeh+E7jxx0CJ29JuXGxBEYmCI6+72NxFGIFZKx8lvttbbQhbnYWYSw==} 10317 10334 peerDependencies: 10318 10335 contentlayer: 0.3.4 ··· 10320 10337 react: '*' 10321 10338 react-dom: '*' 10322 10339 dependencies: 10323 - '@contentlayer/core': 0.3.4(esbuild@0.20.0) 10340 + '@contentlayer/core': 0.3.4(esbuild@0.19.12) 10324 10341 '@contentlayer/utils': 0.3.4 10325 - contentlayer: 0.3.4(esbuild@0.20.0) 10342 + contentlayer: 0.3.4(esbuild@0.19.12) 10326 10343 next: 14.1.0(@babel/core@7.23.2)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 10327 10344 react: 18.2.0 10328 10345 react-dom: 18.2.0(react@18.2.0) ··· 10413 10430 tslib: 2.6.2 10414 10431 dev: false 10415 10432 10433 + /node-abi@3.54.0: 10434 + resolution: {integrity: sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA==} 10435 + engines: {node: '>=10'} 10436 + dependencies: 10437 + semver: 7.5.4 10438 + 10416 10439 /node-domexception@1.0.0: 10417 10440 resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} 10418 10441 engines: {node: '>=10.5.0'} ··· 10983 11006 picocolors: 1.0.0 10984 11007 source-map-js: 1.0.2 10985 11008 11009 + /prebuild-install@7.1.1: 11010 + resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==} 11011 + engines: {node: '>=10'} 11012 + hasBin: true 11013 + dependencies: 11014 + detect-libc: 2.0.2 11015 + expand-template: 2.0.3 11016 + github-from-package: 0.0.0 11017 + minimist: 1.2.8 11018 + mkdirp-classic: 0.5.3 11019 + napi-build-utils: 1.0.2 11020 + node-abi: 3.54.0 11021 + pump: 3.0.0 11022 + rc: 1.2.8 11023 + simple-get: 4.0.1 11024 + tar-fs: 2.1.1 11025 + tunnel-agent: 0.6.0 11026 + 10986 11027 /prelude-ls@1.2.1: 10987 11028 resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} 10988 11029 engines: {node: '>= 0.8.0'} ··· 11137 11178 resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} 11138 11179 dev: false 11139 11180 11181 + /pump@3.0.0: 11182 + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} 11183 + dependencies: 11184 + end-of-stream: 1.4.4 11185 + once: 1.4.0 11186 + 11140 11187 /punycode@2.3.0: 11141 11188 resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} 11142 11189 engines: {node: '>=6'} ··· 11198 11245 ini: 1.3.8 11199 11246 minimist: 1.2.8 11200 11247 strip-json-comments: 2.0.1 11201 - dev: true 11202 11248 11203 11249 /react-day-picker@8.10.0(date-fns@2.30.0)(react@18.2.0): 11204 11250 resolution: {integrity: sha512-mz+qeyrOM7++1NCb1ARXmkjMkzWVh2GL9YiPbRjKe0zHccvekk4HE+0MPOZOrosn8r8zTHIIeOUXTmXRqmkRmg==} ··· 11942 11988 engines: {node: '>=14'} 11943 11989 dev: false 11944 11990 11991 + /simple-concat@1.0.1: 11992 + resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} 11993 + 11994 + /simple-get@4.0.1: 11995 + resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} 11996 + dependencies: 11997 + decompress-response: 6.0.0 11998 + once: 1.4.0 11999 + simple-concat: 1.0.1 12000 + 11945 12001 /sisteransi@1.0.5: 11946 12002 resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} 11947 12003 dev: true ··· 12212 12268 /strip-json-comments@2.0.1: 12213 12269 resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} 12214 12270 engines: {node: '>=0.10.0'} 12215 - dev: true 12216 12271 12217 12272 /strip-json-comments@3.1.1: 12218 12273 resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} ··· 12284 12339 dependencies: 12285 12340 copy-anything: 3.0.5 12286 12341 dev: false 12342 + 12343 + /superjson@2.2.1: 12344 + resolution: {integrity: sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA==} 12345 + engines: {node: '>=16'} 12346 + dependencies: 12347 + copy-anything: 3.0.5 12348 + dev: true 12287 12349 12288 12350 /supports-color@2.0.0: 12289 12351 resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} ··· 12443 12505 engines: {node: '>=6'} 12444 12506 dev: false 12445 12507 12508 + /tar-fs@2.1.1: 12509 + resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} 12510 + dependencies: 12511 + chownr: 1.1.4 12512 + mkdirp-classic: 0.5.3 12513 + pump: 3.0.0 12514 + tar-stream: 2.2.0 12515 + 12516 + /tar-stream@2.2.0: 12517 + resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} 12518 + engines: {node: '>=6'} 12519 + dependencies: 12520 + bl: 4.1.0 12521 + end-of-stream: 1.4.4 12522 + fs-constants: 1.0.0 12523 + inherits: 2.0.4 12524 + readable-stream: 3.6.2 12525 + 12446 12526 /teeny-request@9.0.0: 12447 12527 resolution: {integrity: sha512-resvxdc6Mgb7YEThw6G6bExlXKkv6+YbuzGg9xuXxSgxJF7Ozs+o8Y9+2R3sArdWdW8nOokoQb1yrpFB0pQK2g==} 12448 12528 engines: {node: '>=14'} ··· 12613 12693 /ts-interface-checker@0.1.13: 12614 12694 resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} 12615 12695 12616 - /ts-node@10.9.1(@types/node@20.11.17)(typescript@5.2.2): 12696 + /ts-node@10.9.1(@types/node@20.8.0)(typescript@5.2.2): 12617 12697 resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} 12618 12698 hasBin: true 12619 12699 peerDependencies: ··· 12632 12712 '@tsconfig/node12': 1.0.11 12633 12713 '@tsconfig/node14': 1.0.3 12634 12714 '@tsconfig/node16': 1.0.4 12635 - '@types/node': 20.11.17 12715 + '@types/node': 20.8.0 12636 12716 acorn: 8.10.0 12637 12717 acorn-walk: 8.2.0 12638 12718 arg: 4.1.0 ··· 12704 12784 - supports-color 12705 12785 - ts-node 12706 12786 dev: true 12787 + 12788 + /tunnel-agent@0.6.0: 12789 + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} 12790 + dependencies: 12791 + safe-buffer: 5.2.1 12707 12792 12708 12793 /turbo-darwin-64@1.10.12: 12709 12794 resolution: {integrity: sha512-vmDfGVPl5/aFenAbOj3eOx3ePNcWVUyZwYr7taRl0ZBbmv2TzjRiFotO4vrKCiTVnbqjQqAFQWY2ugbqCI1kOQ==} ··· 12908 12993 has-symbols: 1.0.3 12909 12994 which-boxed-primitive: 1.0.2 12910 12995 dev: false 12911 - 12912 - /undici-types@5.26.5: 12913 - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} 12914 - dev: true 12915 12996 12916 12997 /undici@5.25.1: 12917 12998 resolution: {integrity: sha512-nTw6b2G2OqP6btYPyghCgV4hSwjJlL/78FMJatVLCa3otj6PCOQSt6dVtYt82OtNqFz8XsnJ+vsXLADPXjPhqw==}