@oneuptime/cli 14.0.84 → 14.0.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +10 -10
  2. package/build/dist/Index.js +2753 -1356
  3. package/package.json +1 -1
@@ -101890,10 +101890,6 @@ var Permission = /* @__PURE__ */ ((Permission3) => {
101890
101890
  Permission3["EditRunbookSecret"] = "EditRunbookSecret";
101891
101891
  Permission3["DeleteRunbookSecret"] = "DeleteRunbookSecret";
101892
101892
  Permission3["ReadRunbookSecret"] = "ReadRunbookSecret";
101893
- Permission3["CreateRunbookCredential"] = "CreateRunbookCredential";
101894
- Permission3["EditRunbookCredential"] = "EditRunbookCredential";
101895
- Permission3["DeleteRunbookCredential"] = "DeleteRunbookCredential";
101896
- Permission3["ReadRunbookCredential"] = "ReadRunbookCredential";
101897
101893
  Permission3["CreateStatusPageGroup"] = "CreateStatusPageGroup";
101898
101894
  Permission3["DeleteStatusPageGroup"] = "DeleteStatusPageGroup";
101899
101895
  Permission3["EditStatusPageGroup"] = "EditStatusPageGroup";
@@ -101951,6 +101947,10 @@ var Permission = /* @__PURE__ */ ((Permission3) => {
101951
101947
  Permission3["EditIncidentState"] = "EditIncidentState";
101952
101948
  Permission3["ReadIncidentState"] = "ReadIncidentState";
101953
101949
  Permission3["DeleteIncidentState"] = "DeleteIncidentState";
101950
+ Permission3["CreateIncidentPostmortemStatus"] = "CreateIncidentPostmortemStatus";
101951
+ Permission3["EditIncidentPostmortemStatus"] = "EditIncidentPostmortemStatus";
101952
+ Permission3["ReadIncidentPostmortemStatus"] = "ReadIncidentPostmortemStatus";
101953
+ Permission3["DeleteIncidentPostmortemStatus"] = "DeleteIncidentPostmortemStatus";
101954
101954
  Permission3["CreateAlertState"] = "CreateAlertState";
101955
101955
  Permission3["EditAlertState"] = "EditAlertState";
101956
101956
  Permission3["ReadAlertState"] = "ReadAlertState";
@@ -103752,6 +103752,42 @@ var PermissionHelper = class _PermissionHelper {
103752
103752
  isRolePermission: false,
103753
103753
  group: "Incident" /* Incident */
103754
103754
  },
103755
+ {
103756
+ permission: "CreateIncidentPostmortemStatus" /* CreateIncidentPostmortemStatus */,
103757
+ title: "Create Postmortem Status",
103758
+ description: "This permission can create postmortem statuses of this project.",
103759
+ isAssignableToTenant: true,
103760
+ isAccessControlPermission: false,
103761
+ isRolePermission: false,
103762
+ group: "Incident" /* Incident */
103763
+ },
103764
+ {
103765
+ permission: "DeleteIncidentPostmortemStatus" /* DeleteIncidentPostmortemStatus */,
103766
+ title: "Delete Postmortem Status",
103767
+ description: "This permission can delete postmortem statuses of this project.",
103768
+ isAssignableToTenant: true,
103769
+ isAccessControlPermission: false,
103770
+ isRolePermission: false,
103771
+ group: "Incident" /* Incident */
103772
+ },
103773
+ {
103774
+ permission: "EditIncidentPostmortemStatus" /* EditIncidentPostmortemStatus */,
103775
+ title: "Edit Postmortem Status",
103776
+ description: "This permission can edit postmortem statuses of this project.",
103777
+ isAssignableToTenant: true,
103778
+ isAccessControlPermission: false,
103779
+ isRolePermission: false,
103780
+ group: "Incident" /* Incident */
103781
+ },
103782
+ {
103783
+ permission: "ReadIncidentPostmortemStatus" /* ReadIncidentPostmortemStatus */,
103784
+ title: "Read Postmortem Status",
103785
+ description: "This permission can read postmortem statuses of this project.",
103786
+ isAssignableToTenant: true,
103787
+ isAccessControlPermission: false,
103788
+ isRolePermission: false,
103789
+ group: "Incident" /* Incident */
103790
+ },
103755
103791
  {
103756
103792
  permission: "CreateAlertState" /* CreateAlertState */,
103757
103793
  title: "Create Alert State",
@@ -105493,42 +105529,6 @@ var PermissionHelper = class _PermissionHelper {
105493
105529
  isRolePermission: false,
105494
105530
  group: "Runbook" /* Runbook */
105495
105531
  },
105496
- {
105497
- permission: "CreateRunbookCredential" /* CreateRunbookCredential */,
105498
- title: "Create Runbook Credential",
105499
- description: "This permission can create runbook credentials (SSH keys, Kubernetes service account tokens).",
105500
- isAssignableToTenant: true,
105501
- isAccessControlPermission: false,
105502
- isRolePermission: false,
105503
- group: "Runbook" /* Runbook */
105504
- },
105505
- {
105506
- permission: "DeleteRunbookCredential" /* DeleteRunbookCredential */,
105507
- title: "Delete Runbook Credential",
105508
- description: "This permission can delete runbook credentials.",
105509
- isAssignableToTenant: true,
105510
- isAccessControlPermission: false,
105511
- isRolePermission: false,
105512
- group: "Runbook" /* Runbook */
105513
- },
105514
- {
105515
- permission: "EditRunbookCredential" /* EditRunbookCredential */,
105516
- title: "Edit Runbook Credential",
105517
- description: "This permission can edit runbook credentials.",
105518
- isAssignableToTenant: true,
105519
- isAccessControlPermission: false,
105520
- isRolePermission: false,
105521
- group: "Runbook" /* Runbook */
105522
- },
105523
- {
105524
- permission: "ReadRunbookCredential" /* ReadRunbookCredential */,
105525
- title: "Read Runbook Credential",
105526
- description: "This permission can read runbook credentials. Secret values are never returned by the API.",
105527
- isAssignableToTenant: true,
105528
- isAccessControlPermission: false,
105529
- isRolePermission: false,
105530
- group: "Runbook" /* Runbook */
105531
- },
105532
105532
  {
105533
105533
  permission: "ReadAuditLog" /* ReadAuditLog */,
105534
105534
  title: "Read Audit Log",
@@ -146806,6 +146806,31 @@ var TableBillingAccessControl_default = /* @__PURE__ */ __name((accessControl) =
146806
146806
  };
146807
146807
  }, "default");
146808
146808
 
146809
+ // ../Common/Types/Database/EnableAuditLog.ts
146810
+ var EnableAuditLog_default = /* @__PURE__ */ __name((enableAuditLogOn = {
146811
+ create: true,
146812
+ update: true,
146813
+ delete: true
146814
+ }) => {
146815
+ return (ctr) => {
146816
+ const config = {
146817
+ create: enableAuditLogOn.create ?? true,
146818
+ update: enableAuditLogOn.update ?? true,
146819
+ delete: enableAuditLogOn.delete ?? true
146820
+ };
146821
+ if (enableAuditLogOn.rootResource) {
146822
+ config.rootResource = { ...enableAuditLogOn.rootResource };
146823
+ }
146824
+ if (enableAuditLogOn.ignoreColumns) {
146825
+ config.ignoreColumns = [...enableAuditLogOn.ignoreColumns];
146826
+ }
146827
+ if (enableAuditLogOn.resourceNameRelation) {
146828
+ config.resourceNameRelation = enableAuditLogOn.resourceNameRelation;
146829
+ }
146830
+ ctr.prototype.enableAuditLogOn = config;
146831
+ };
146832
+ }, "default");
146833
+
146809
146834
  // ../Common/Types/Database/EnableMCP.ts
146810
146835
  var EnableMCP_default = /* @__PURE__ */ __name(() => {
146811
146836
  return (ctr) => {
@@ -146869,6 +146894,10 @@ var AlertSeverity = class extends DatabaseBaseModel {
146869
146894
  this.deletedByUserId = void 0;
146870
146895
  this.color = void 0;
146871
146896
  this.order = void 0;
146897
+ this.isArchived = void 0;
146898
+ this.archivedAt = void 0;
146899
+ this.archivedByUser = void 0;
146900
+ this.archivedByUserId = void 0;
146872
146901
  }
146873
146902
  };
146874
146903
  __name(AlertSeverity, "AlertSeverity");
@@ -147307,18 +147336,8 @@ __decorateClass([
147307
147336
  type: ColumnType_default.SmallNumber
147308
147337
  })
147309
147338
  ], AlertSeverity.prototype, "order", 2);
147310
- AlertSeverity = __decorateClass([
147311
- TableBillingAccessControl_default({
147312
- create: "Growth" /* Growth */,
147313
- read: "Free" /* Free */,
147314
- update: "Growth" /* Growth */,
147315
- delete: "Growth" /* Growth */
147316
- }),
147317
- EnableDocumentation_default(),
147318
- EnableMCP_default(),
147319
- TenantColumn_default("projectId"),
147320
- ListOrderColumn_default({ column: "order", scopeColumns: ["projectId"] }),
147321
- TableAccessControl_default({
147339
+ __decorateClass([
147340
+ ColumnAccessControl_default({
147322
147341
  create: [
147323
147342
  Permission_default.ProjectOwner,
147324
147343
  Permission_default.ProjectAdmin,
@@ -147338,12 +147357,6 @@ AlertSeverity = __decorateClass([
147338
147357
  Permission_default.SecurityViewer,
147339
147358
  Permission_default.ReadAlertSeverity
147340
147359
  ],
147341
- delete: [
147342
- Permission_default.ProjectOwner,
147343
- Permission_default.ProjectAdmin,
147344
- Permission_default.AlertAdmin,
147345
- Permission_default.DeleteAlertSeverity
147346
- ],
147347
147360
  update: [
147348
147361
  Permission_default.ProjectOwner,
147349
147362
  Permission_default.ProjectAdmin,
@@ -147351,204 +147364,365 @@ AlertSeverity = __decorateClass([
147351
147364
  Permission_default.EditAlertSeverity
147352
147365
  ]
147353
147366
  }),
147354
- EnableWorkflow_default({
147355
- create: true,
147356
- delete: true,
147357
- update: true,
147358
- read: true
147359
- }),
147360
- CrudApiEndpoint_default(new Route("/alert-severity")),
147361
- SlugifyColumn_default("name", "slug"),
147362
- TableMetadata_default({
147363
- tableName: "AlertSeverity",
147364
- singularName: "Alert Severity",
147365
- pluralName: "Alert Severities",
147366
- icon: IconProp_default.Alert,
147367
- tableDescription: "Manage alert severity for your project (Created, Acknowledged for example). Add / edit or remove severities."
147368
- }),
147369
- Entity({
147370
- name: "AlertSeverity"
147367
+ TableColumn_default({
147368
+ isDefaultValueColumn: true,
147369
+ required: true,
147370
+ type: TableColumnType_default.Boolean,
147371
+ canReadOnRelationQuery: true,
147372
+ title: "Is Archived",
147373
+ description: "Archived severities stay on the alerts and episodes that have them, but can't be picked again. A project keeps at least one severity that is not archived.",
147374
+ defaultValue: false,
147375
+ example: false
147371
147376
  }),
147372
- Index(["projectId", "order"])
147373
- ], AlertSeverity);
147374
-
147375
- // ../Common/Models/DatabaseModels/IncidentSeverity.ts
147376
- var IncidentSeverity = class extends DatabaseBaseModel {
147377
- constructor() {
147378
- super(...arguments);
147379
- this.project = void 0;
147380
- this.projectId = void 0;
147381
- this.name = void 0;
147382
- this.slug = void 0;
147383
- this.description = void 0;
147384
- this.createdByUser = void 0;
147385
- this.createdByUserId = void 0;
147386
- this.deletedByUser = void 0;
147387
- this.deletedByUserId = void 0;
147388
- this.color = void 0;
147389
- this.order = void 0;
147390
- }
147391
- };
147392
- __name(IncidentSeverity, "IncidentSeverity");
147377
+ Column({
147378
+ type: ColumnType_default.Boolean,
147379
+ nullable: false,
147380
+ default: false
147381
+ })
147382
+ ], AlertSeverity.prototype, "isArchived", 2);
147393
147383
  __decorateClass([
147394
147384
  ColumnAccessControl_default({
147395
- create: [
147385
+ create: [],
147386
+ read: [
147396
147387
  Permission_default.ProjectOwner,
147397
147388
  Permission_default.ProjectAdmin,
147398
- Permission_default.IncidentAdmin,
147399
- Permission_default.CreateIncidentSeverity
147389
+ Permission_default.ProjectMember,
147390
+ Permission_default.Viewer,
147391
+ Permission_default.AlertAdmin,
147392
+ Permission_default.AlertMember,
147393
+ Permission_default.AlertViewer,
147394
+ Permission_default.SecurityAdmin,
147395
+ Permission_default.SecurityMember,
147396
+ Permission_default.SecurityViewer,
147397
+ Permission_default.ReadAlertSeverity
147400
147398
  ],
147399
+ update: []
147400
+ }),
147401
+ TableColumn_default({
147402
+ required: false,
147403
+ type: TableColumnType_default.Date,
147404
+ title: "Archived At",
147405
+ description: "When this alert severity was archived. Empty while it is not archived."
147406
+ }),
147407
+ Column({
147408
+ type: ColumnType_default.Date,
147409
+ nullable: true
147410
+ })
147411
+ ], AlertSeverity.prototype, "archivedAt", 2);
147412
+ __decorateClass([
147413
+ ColumnAccessControl_default({
147414
+ create: [],
147401
147415
  read: [
147402
147416
  Permission_default.ProjectOwner,
147403
147417
  Permission_default.ProjectAdmin,
147404
147418
  Permission_default.ProjectMember,
147405
147419
  Permission_default.Viewer,
147406
- Permission_default.IncidentAdmin,
147407
- Permission_default.IncidentMember,
147408
- Permission_default.IncidentViewer,
147420
+ Permission_default.AlertAdmin,
147421
+ Permission_default.AlertMember,
147422
+ Permission_default.AlertViewer,
147409
147423
  Permission_default.SecurityAdmin,
147410
147424
  Permission_default.SecurityMember,
147411
147425
  Permission_default.SecurityViewer,
147412
- Permission_default.ReadIncidentSeverity
147426
+ Permission_default.ReadAlertSeverity
147413
147427
  ],
147414
147428
  update: []
147415
147429
  }),
147416
147430
  TableColumn_default({
147417
- manyToOneRelationColumn: "projectId",
147431
+ manyToOneRelationColumn: "archivedByUserId",
147418
147432
  type: TableColumnType_default.Entity,
147419
- // Lazy: Project imports IncidentSeverity back (see modelTypeThunk).
147420
- modelTypeThunk: /* @__PURE__ */ __name(() => {
147421
- return Project;
147422
- }, "modelTypeThunk"),
147423
- title: "Project",
147424
- description: "Relation to Project Resource in which this object belongs"
147433
+ modelType: User_default,
147434
+ title: "Archived by User",
147435
+ description: "Relation to User who archived this object (if this object was archived by a User)"
147425
147436
  }),
147426
147437
  ManyToOne(
147427
147438
  () => {
147428
- return Project;
147439
+ return User_default;
147429
147440
  },
147430
147441
  {
147431
147442
  eager: false,
147432
147443
  nullable: true,
147433
- onDelete: "CASCADE",
147444
+ onDelete: "SET NULL",
147434
147445
  orphanedRowAction: "nullify"
147435
147446
  }
147436
147447
  ),
147437
- JoinColumn({ name: "projectId" })
147438
- ], IncidentSeverity.prototype, "project", 2);
147448
+ JoinColumn({ name: "archivedByUserId" })
147449
+ ], AlertSeverity.prototype, "archivedByUser", 2);
147439
147450
  __decorateClass([
147440
147451
  ColumnAccessControl_default({
147441
- create: [
147442
- Permission_default.ProjectOwner,
147443
- Permission_default.ProjectAdmin,
147444
- Permission_default.IncidentAdmin,
147445
- Permission_default.CreateIncidentSeverity
147446
- ],
147452
+ create: [],
147447
147453
  read: [
147448
147454
  Permission_default.ProjectOwner,
147449
147455
  Permission_default.ProjectAdmin,
147450
147456
  Permission_default.ProjectMember,
147451
147457
  Permission_default.Viewer,
147452
- Permission_default.IncidentAdmin,
147453
- Permission_default.IncidentMember,
147454
- Permission_default.IncidentViewer,
147458
+ Permission_default.AlertAdmin,
147459
+ Permission_default.AlertMember,
147460
+ Permission_default.AlertViewer,
147455
147461
  Permission_default.SecurityAdmin,
147456
147462
  Permission_default.SecurityMember,
147457
147463
  Permission_default.SecurityViewer,
147458
- Permission_default.ReadIncidentSeverity
147464
+ Permission_default.ReadAlertSeverity
147459
147465
  ],
147460
147466
  update: []
147461
147467
  }),
147462
- Index(),
147463
147468
  TableColumn_default({
147464
147469
  type: TableColumnType_default.ObjectID,
147465
- required: true,
147466
- canReadOnRelationQuery: true,
147467
- title: "Project ID",
147468
- description: "ID of your OneUptime Project in which this object belongs",
147469
- example: "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
147470
+ title: "Archived by User ID",
147471
+ description: "User ID who archived this object (if this object was archived by a User)"
147470
147472
  }),
147471
147473
  Column({
147472
147474
  type: ColumnType_default.ObjectID,
147473
- nullable: false,
147475
+ nullable: true,
147474
147476
  transformer: ObjectID.getDatabaseTransformer()
147475
147477
  })
147476
- ], IncidentSeverity.prototype, "projectId", 2);
147477
- __decorateClass([
147478
- ColumnAccessControl_default({
147478
+ ], AlertSeverity.prototype, "archivedByUserId", 2);
147479
+ AlertSeverity = __decorateClass([
147480
+ TableBillingAccessControl_default({
147481
+ create: "Growth" /* Growth */,
147482
+ read: "Free" /* Free */,
147483
+ update: "Growth" /* Growth */,
147484
+ delete: "Growth" /* Growth */
147485
+ }),
147486
+ EnableDocumentation_default(),
147487
+ EnableMCP_default(),
147488
+ TenantColumn_default("projectId"),
147489
+ ListOrderColumn_default({ column: "order", scopeColumns: ["projectId"] }),
147490
+ TableAccessControl_default({
147479
147491
  create: [
147480
147492
  Permission_default.ProjectOwner,
147481
147493
  Permission_default.ProjectAdmin,
147482
- Permission_default.IncidentAdmin,
147483
- Permission_default.CreateIncidentSeverity
147494
+ Permission_default.AlertAdmin,
147495
+ Permission_default.CreateAlertSeverity
147484
147496
  ],
147485
147497
  read: [
147486
147498
  Permission_default.ProjectOwner,
147487
147499
  Permission_default.ProjectAdmin,
147488
147500
  Permission_default.ProjectMember,
147489
147501
  Permission_default.Viewer,
147490
- Permission_default.IncidentAdmin,
147491
- Permission_default.IncidentMember,
147492
- Permission_default.IncidentViewer,
147502
+ Permission_default.AlertAdmin,
147503
+ Permission_default.AlertMember,
147504
+ Permission_default.AlertViewer,
147493
147505
  Permission_default.SecurityAdmin,
147494
147506
  Permission_default.SecurityMember,
147495
147507
  Permission_default.SecurityViewer,
147496
- Permission_default.ReadIncidentSeverity
147508
+ Permission_default.ReadAlertSeverity
147509
+ ],
147510
+ delete: [
147511
+ Permission_default.ProjectOwner,
147512
+ Permission_default.ProjectAdmin,
147513
+ Permission_default.AlertAdmin,
147514
+ Permission_default.DeleteAlertSeverity
147497
147515
  ],
147498
147516
  update: [
147499
147517
  Permission_default.ProjectOwner,
147500
147518
  Permission_default.ProjectAdmin,
147501
- Permission_default.IncidentAdmin,
147502
- Permission_default.EditIncidentSeverity
147519
+ Permission_default.AlertAdmin,
147520
+ Permission_default.EditAlertSeverity
147503
147521
  ]
147504
147522
  }),
147505
- TableColumn_default({
147506
- required: true,
147507
- type: TableColumnType_default.ShortText,
147508
- canReadOnRelationQuery: true,
147509
- title: "Name",
147510
- description: "Any friendly name of this object",
147511
- example: "Critical"
147512
- }),
147513
- Column({
147514
- nullable: false,
147515
- type: ColumnType_default.ShortText,
147516
- length: ColumnLength_default.ShortText
147523
+ EnableWorkflow_default({
147524
+ create: true,
147525
+ delete: true,
147526
+ update: true,
147527
+ read: true
147517
147528
  }),
147518
- UniqueColumnBy_default("projectId")
147519
- ], IncidentSeverity.prototype, "name", 2);
147520
- __decorateClass([
147521
- ColumnAccessControl_default({
147522
- create: [],
147523
- read: [
147524
- Permission_default.ProjectOwner,
147525
- Permission_default.ProjectAdmin,
147526
- Permission_default.ProjectMember,
147527
- Permission_default.Viewer,
147528
- Permission_default.IncidentAdmin,
147529
- Permission_default.IncidentMember,
147530
- Permission_default.IncidentViewer,
147531
- Permission_default.SecurityAdmin,
147532
- Permission_default.SecurityMember,
147533
- Permission_default.SecurityViewer,
147534
- Permission_default.ReadIncidentSeverity
147535
- ],
147536
- update: []
147529
+ EnableAuditLog_default(),
147530
+ CrudApiEndpoint_default(new Route("/alert-severity")),
147531
+ SlugifyColumn_default("name", "slug"),
147532
+ TableMetadata_default({
147533
+ tableName: "AlertSeverity",
147534
+ singularName: "Alert Severity",
147535
+ pluralName: "Alert Severities",
147536
+ icon: IconProp_default.Alert,
147537
+ tableDescription: "Manage alert severity for your project (Created, Acknowledged for example). Add / edit or remove severities."
147537
147538
  }),
147538
- TableColumn_default({
147539
- required: true,
147540
- unique: true,
147541
- type: TableColumnType_default.Slug,
147542
- computed: true,
147543
- title: "Slug",
147544
- description: "Friendly globally unique name for your object"
147539
+ Entity({
147540
+ name: "AlertSeverity"
147545
147541
  }),
147546
- Column({
147547
- nullable: false,
147548
- type: ColumnType_default.Slug,
147549
- length: ColumnLength_default.Slug
147550
- })
147551
- ], IncidentSeverity.prototype, "slug", 2);
147542
+ Index(["projectId", "order"])
147543
+ ], AlertSeverity);
147544
+
147545
+ // ../Common/Models/DatabaseModels/IncidentSeverity.ts
147546
+ var IncidentSeverity = class extends DatabaseBaseModel {
147547
+ constructor() {
147548
+ super(...arguments);
147549
+ this.project = void 0;
147550
+ this.projectId = void 0;
147551
+ this.name = void 0;
147552
+ this.slug = void 0;
147553
+ this.description = void 0;
147554
+ this.createdByUser = void 0;
147555
+ this.createdByUserId = void 0;
147556
+ this.deletedByUser = void 0;
147557
+ this.deletedByUserId = void 0;
147558
+ this.color = void 0;
147559
+ this.order = void 0;
147560
+ this.isArchived = void 0;
147561
+ this.archivedAt = void 0;
147562
+ this.archivedByUser = void 0;
147563
+ this.archivedByUserId = void 0;
147564
+ }
147565
+ };
147566
+ __name(IncidentSeverity, "IncidentSeverity");
147567
+ __decorateClass([
147568
+ ColumnAccessControl_default({
147569
+ create: [
147570
+ Permission_default.ProjectOwner,
147571
+ Permission_default.ProjectAdmin,
147572
+ Permission_default.IncidentAdmin,
147573
+ Permission_default.CreateIncidentSeverity
147574
+ ],
147575
+ read: [
147576
+ Permission_default.ProjectOwner,
147577
+ Permission_default.ProjectAdmin,
147578
+ Permission_default.ProjectMember,
147579
+ Permission_default.Viewer,
147580
+ Permission_default.IncidentAdmin,
147581
+ Permission_default.IncidentMember,
147582
+ Permission_default.IncidentViewer,
147583
+ Permission_default.SecurityAdmin,
147584
+ Permission_default.SecurityMember,
147585
+ Permission_default.SecurityViewer,
147586
+ Permission_default.ReadIncidentSeverity
147587
+ ],
147588
+ update: []
147589
+ }),
147590
+ TableColumn_default({
147591
+ manyToOneRelationColumn: "projectId",
147592
+ type: TableColumnType_default.Entity,
147593
+ // Lazy: Project imports IncidentSeverity back (see modelTypeThunk).
147594
+ modelTypeThunk: /* @__PURE__ */ __name(() => {
147595
+ return Project;
147596
+ }, "modelTypeThunk"),
147597
+ title: "Project",
147598
+ description: "Relation to Project Resource in which this object belongs"
147599
+ }),
147600
+ ManyToOne(
147601
+ () => {
147602
+ return Project;
147603
+ },
147604
+ {
147605
+ eager: false,
147606
+ nullable: true,
147607
+ onDelete: "CASCADE",
147608
+ orphanedRowAction: "nullify"
147609
+ }
147610
+ ),
147611
+ JoinColumn({ name: "projectId" })
147612
+ ], IncidentSeverity.prototype, "project", 2);
147613
+ __decorateClass([
147614
+ ColumnAccessControl_default({
147615
+ create: [
147616
+ Permission_default.ProjectOwner,
147617
+ Permission_default.ProjectAdmin,
147618
+ Permission_default.IncidentAdmin,
147619
+ Permission_default.CreateIncidentSeverity
147620
+ ],
147621
+ read: [
147622
+ Permission_default.ProjectOwner,
147623
+ Permission_default.ProjectAdmin,
147624
+ Permission_default.ProjectMember,
147625
+ Permission_default.Viewer,
147626
+ Permission_default.IncidentAdmin,
147627
+ Permission_default.IncidentMember,
147628
+ Permission_default.IncidentViewer,
147629
+ Permission_default.SecurityAdmin,
147630
+ Permission_default.SecurityMember,
147631
+ Permission_default.SecurityViewer,
147632
+ Permission_default.ReadIncidentSeverity
147633
+ ],
147634
+ update: []
147635
+ }),
147636
+ Index(),
147637
+ TableColumn_default({
147638
+ type: TableColumnType_default.ObjectID,
147639
+ required: true,
147640
+ canReadOnRelationQuery: true,
147641
+ title: "Project ID",
147642
+ description: "ID of your OneUptime Project in which this object belongs",
147643
+ example: "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
147644
+ }),
147645
+ Column({
147646
+ type: ColumnType_default.ObjectID,
147647
+ nullable: false,
147648
+ transformer: ObjectID.getDatabaseTransformer()
147649
+ })
147650
+ ], IncidentSeverity.prototype, "projectId", 2);
147651
+ __decorateClass([
147652
+ ColumnAccessControl_default({
147653
+ create: [
147654
+ Permission_default.ProjectOwner,
147655
+ Permission_default.ProjectAdmin,
147656
+ Permission_default.IncidentAdmin,
147657
+ Permission_default.CreateIncidentSeverity
147658
+ ],
147659
+ read: [
147660
+ Permission_default.ProjectOwner,
147661
+ Permission_default.ProjectAdmin,
147662
+ Permission_default.ProjectMember,
147663
+ Permission_default.Viewer,
147664
+ Permission_default.IncidentAdmin,
147665
+ Permission_default.IncidentMember,
147666
+ Permission_default.IncidentViewer,
147667
+ Permission_default.SecurityAdmin,
147668
+ Permission_default.SecurityMember,
147669
+ Permission_default.SecurityViewer,
147670
+ Permission_default.ReadIncidentSeverity
147671
+ ],
147672
+ update: [
147673
+ Permission_default.ProjectOwner,
147674
+ Permission_default.ProjectAdmin,
147675
+ Permission_default.IncidentAdmin,
147676
+ Permission_default.EditIncidentSeverity
147677
+ ]
147678
+ }),
147679
+ TableColumn_default({
147680
+ required: true,
147681
+ type: TableColumnType_default.ShortText,
147682
+ canReadOnRelationQuery: true,
147683
+ title: "Name",
147684
+ description: "Any friendly name of this object",
147685
+ example: "Critical"
147686
+ }),
147687
+ Column({
147688
+ nullable: false,
147689
+ type: ColumnType_default.ShortText,
147690
+ length: ColumnLength_default.ShortText
147691
+ }),
147692
+ UniqueColumnBy_default("projectId")
147693
+ ], IncidentSeverity.prototype, "name", 2);
147694
+ __decorateClass([
147695
+ ColumnAccessControl_default({
147696
+ create: [],
147697
+ read: [
147698
+ Permission_default.ProjectOwner,
147699
+ Permission_default.ProjectAdmin,
147700
+ Permission_default.ProjectMember,
147701
+ Permission_default.Viewer,
147702
+ Permission_default.IncidentAdmin,
147703
+ Permission_default.IncidentMember,
147704
+ Permission_default.IncidentViewer,
147705
+ Permission_default.SecurityAdmin,
147706
+ Permission_default.SecurityMember,
147707
+ Permission_default.SecurityViewer,
147708
+ Permission_default.ReadIncidentSeverity
147709
+ ],
147710
+ update: []
147711
+ }),
147712
+ TableColumn_default({
147713
+ required: true,
147714
+ unique: true,
147715
+ type: TableColumnType_default.Slug,
147716
+ computed: true,
147717
+ title: "Slug",
147718
+ description: "Friendly globally unique name for your object"
147719
+ }),
147720
+ Column({
147721
+ nullable: false,
147722
+ type: ColumnType_default.Slug,
147723
+ length: ColumnLength_default.Slug
147724
+ })
147725
+ ], IncidentSeverity.prototype, "slug", 2);
147552
147726
  __decorateClass([
147553
147727
  ColumnAccessControl_default({
147554
147728
  create: [
@@ -147825,6 +147999,146 @@ __decorateClass([
147825
147999
  type: ColumnType_default.SmallNumber
147826
148000
  })
147827
148001
  ], IncidentSeverity.prototype, "order", 2);
148002
+ __decorateClass([
148003
+ ColumnAccessControl_default({
148004
+ create: [
148005
+ Permission_default.ProjectOwner,
148006
+ Permission_default.ProjectAdmin,
148007
+ Permission_default.IncidentAdmin,
148008
+ Permission_default.CreateIncidentSeverity
148009
+ ],
148010
+ read: [
148011
+ Permission_default.ProjectOwner,
148012
+ Permission_default.ProjectAdmin,
148013
+ Permission_default.ProjectMember,
148014
+ Permission_default.Viewer,
148015
+ Permission_default.IncidentAdmin,
148016
+ Permission_default.IncidentMember,
148017
+ Permission_default.IncidentViewer,
148018
+ Permission_default.SecurityAdmin,
148019
+ Permission_default.SecurityMember,
148020
+ Permission_default.SecurityViewer,
148021
+ Permission_default.ReadIncidentSeverity
148022
+ ],
148023
+ update: [
148024
+ Permission_default.ProjectOwner,
148025
+ Permission_default.ProjectAdmin,
148026
+ Permission_default.IncidentAdmin,
148027
+ Permission_default.EditIncidentSeverity
148028
+ ]
148029
+ }),
148030
+ TableColumn_default({
148031
+ isDefaultValueColumn: true,
148032
+ required: true,
148033
+ type: TableColumnType_default.Boolean,
148034
+ canReadOnRelationQuery: true,
148035
+ title: "Is Archived",
148036
+ description: "Archived severities stay on the incidents and episodes that have them, but can't be picked again. A project keeps at least one severity that is not archived.",
148037
+ defaultValue: false,
148038
+ example: false
148039
+ }),
148040
+ Column({
148041
+ type: ColumnType_default.Boolean,
148042
+ nullable: false,
148043
+ default: false
148044
+ })
148045
+ ], IncidentSeverity.prototype, "isArchived", 2);
148046
+ __decorateClass([
148047
+ ColumnAccessControl_default({
148048
+ create: [],
148049
+ read: [
148050
+ Permission_default.ProjectOwner,
148051
+ Permission_default.ProjectAdmin,
148052
+ Permission_default.ProjectMember,
148053
+ Permission_default.Viewer,
148054
+ Permission_default.IncidentAdmin,
148055
+ Permission_default.IncidentMember,
148056
+ Permission_default.IncidentViewer,
148057
+ Permission_default.SecurityAdmin,
148058
+ Permission_default.SecurityMember,
148059
+ Permission_default.SecurityViewer,
148060
+ Permission_default.ReadIncidentSeverity
148061
+ ],
148062
+ update: []
148063
+ }),
148064
+ TableColumn_default({
148065
+ required: false,
148066
+ type: TableColumnType_default.Date,
148067
+ title: "Archived At",
148068
+ description: "When this incident severity was archived. Empty while it is not archived."
148069
+ }),
148070
+ Column({
148071
+ type: ColumnType_default.Date,
148072
+ nullable: true
148073
+ })
148074
+ ], IncidentSeverity.prototype, "archivedAt", 2);
148075
+ __decorateClass([
148076
+ ColumnAccessControl_default({
148077
+ create: [],
148078
+ read: [
148079
+ Permission_default.ProjectOwner,
148080
+ Permission_default.ProjectAdmin,
148081
+ Permission_default.ProjectMember,
148082
+ Permission_default.Viewer,
148083
+ Permission_default.IncidentAdmin,
148084
+ Permission_default.IncidentMember,
148085
+ Permission_default.IncidentViewer,
148086
+ Permission_default.SecurityAdmin,
148087
+ Permission_default.SecurityMember,
148088
+ Permission_default.SecurityViewer,
148089
+ Permission_default.ReadIncidentSeverity
148090
+ ],
148091
+ update: []
148092
+ }),
148093
+ TableColumn_default({
148094
+ manyToOneRelationColumn: "archivedByUserId",
148095
+ type: TableColumnType_default.Entity,
148096
+ modelType: User_default,
148097
+ title: "Archived by User",
148098
+ description: "Relation to User who archived this object (if this object was archived by a User)"
148099
+ }),
148100
+ ManyToOne(
148101
+ () => {
148102
+ return User_default;
148103
+ },
148104
+ {
148105
+ eager: false,
148106
+ nullable: true,
148107
+ onDelete: "SET NULL",
148108
+ orphanedRowAction: "nullify"
148109
+ }
148110
+ ),
148111
+ JoinColumn({ name: "archivedByUserId" })
148112
+ ], IncidentSeverity.prototype, "archivedByUser", 2);
148113
+ __decorateClass([
148114
+ ColumnAccessControl_default({
148115
+ create: [],
148116
+ read: [
148117
+ Permission_default.ProjectOwner,
148118
+ Permission_default.ProjectAdmin,
148119
+ Permission_default.ProjectMember,
148120
+ Permission_default.Viewer,
148121
+ Permission_default.IncidentAdmin,
148122
+ Permission_default.IncidentMember,
148123
+ Permission_default.IncidentViewer,
148124
+ Permission_default.SecurityAdmin,
148125
+ Permission_default.SecurityMember,
148126
+ Permission_default.SecurityViewer,
148127
+ Permission_default.ReadIncidentSeverity
148128
+ ],
148129
+ update: []
148130
+ }),
148131
+ TableColumn_default({
148132
+ type: TableColumnType_default.ObjectID,
148133
+ title: "Archived by User ID",
148134
+ description: "User ID who archived this object (if this object was archived by a User)"
148135
+ }),
148136
+ Column({
148137
+ type: ColumnType_default.ObjectID,
148138
+ nullable: true,
148139
+ transformer: ObjectID.getDatabaseTransformer()
148140
+ })
148141
+ ], IncidentSeverity.prototype, "archivedByUserId", 2);
147828
148142
  IncidentSeverity = __decorateClass([
147829
148143
  TableBillingAccessControl_default({
147830
148144
  create: "Growth" /* Growth */,
@@ -147875,6 +148189,7 @@ IncidentSeverity = __decorateClass([
147875
148189
  update: true,
147876
148190
  read: true
147877
148191
  }),
148192
+ EnableAuditLog_default(),
147878
148193
  CrudApiEndpoint_default(new Route("/incident-severity")),
147879
148194
  SlugifyColumn_default("name", "slug"),
147880
148195
  TableMetadata_default({
@@ -148599,10 +148914,6 @@ var Project = class extends TenantModel {
148599
148914
  this.resolveLinkedAlertsWhenIncidentResolved = void 0;
148600
148915
  this.limitIncidentsToOneEpisode = void 0;
148601
148916
  this.limitAlertsToOneEpisode = void 0;
148602
- this.enableIncidentInstrumentationFixTasks = void 0;
148603
- this.enableAlertInstrumentationFixTasks = void 0;
148604
- this.enableAutomaticIncidentCodeFixes = void 0;
148605
- this.enableAutomaticAlertCodeFixes = void 0;
148606
148917
  this.enableAiInsights = void 0;
148607
148918
  this.enableInsightFixTasks = void 0;
148608
148919
  this.autoArchiveNonActionableExceptions = void 0;
@@ -150533,7 +150844,7 @@ __decorateClass([
150533
150844
  isDefaultValueColumn: true,
150534
150845
  type: TableColumnType_default.Boolean,
150535
150846
  title: "Enable Automatic Incident Remediation",
150536
- description: "When enabled, OneUptime fixes new incidents automatically: OneUptime AI fixes each one on the Kubernetes clusters and infrastructure it is linked to, the way each one's AI agent page allows, and Auto Remediation Rules - when there are any - choose which incidents are fixed, which runbooks run and whether a person approves first. Off by default, for new projects too. Any AI investigation of the incident settles first. Requires AI to be enabled. It also holds the incident pull-request switches, enableAutomaticIncidentCodeFixes and enableIncidentInstrumentationFixTasks: they open pull requests only while this is on. The dashboard turns them on and off with it; through the API, set them in the same request.",
150847
+ description: "When enabled, OneUptime fixes new incidents automatically: OneUptime AI fixes each one on the Kubernetes clusters and infrastructure it is linked to, the way each one's AI agent page allows, and Auto Remediation Rules - when there are any - choose which incidents are fixed, which runbooks run and whether a person approves first. Off by default, for new projects too. Any AI investigation of the incident settles first. Requires AI to be enabled. Fix and telemetry pull requests open only while this is on, as each Auto Remediation Rule says (openCodeFixPullRequests, openTelemetryPullRequests - on by default, and on with no rule).",
150537
150848
  defaultValue: false,
150538
150849
  example: true
150539
150850
  }),
@@ -150562,7 +150873,7 @@ __decorateClass([
150562
150873
  isDefaultValueColumn: true,
150563
150874
  type: TableColumnType_default.Boolean,
150564
150875
  title: "Enable Automatic Alert Remediation",
150565
- description: "When enabled, OneUptime fixes new alerts automatically: OneUptime AI fixes each one on the Kubernetes clusters and infrastructure it is linked to, the way each one's AI agent page allows, and Auto Remediation Rules - when there are any - choose which alerts are fixed, which runbooks run and whether a person approves first. Off by default, for new projects too. Any AI investigation of the alert settles first. Requires AI to be enabled. It also holds the alert pull-request switches, enableAutomaticAlertCodeFixes and enableAlertInstrumentationFixTasks: they open pull requests only while this is on. The dashboard turns them on and off with it; through the API, set them in the same request.",
150876
+ description: "When enabled, OneUptime fixes new alerts automatically: OneUptime AI fixes each one on the Kubernetes clusters and infrastructure it is linked to, the way each one's AI agent page allows, and Auto Remediation Rules - when there are any - choose which alerts are fixed, which runbooks run and whether a person approves first. Off by default, for new projects too. Any AI investigation of the alert settles first. Requires AI to be enabled. Fix and telemetry pull requests open only while this is on, as each Auto Remediation Rule says (openCodeFixPullRequests, openTelemetryPullRequests - on by default, and on with no rule).",
150566
150877
  defaultValue: false,
150567
150878
  example: true
150568
150879
  }),
@@ -150717,122 +151028,6 @@ __decorateClass([
150717
151028
  type: ColumnType_default.Boolean
150718
151029
  })
150719
151030
  ], Project.prototype, "limitAlertsToOneEpisode", 2);
150720
- __decorateClass([
150721
- ColumnAccessControl_default({
150722
- create: [Permission_default.User],
150723
- read: [
150724
- Permission_default.ProjectOwner,
150725
- Permission_default.ProjectAdmin,
150726
- Permission_default.ProjectMember,
150727
- Permission_default.Viewer,
150728
- Permission_default.ReadProject,
150729
- Permission_default.UnAuthorizedSsoUser,
150730
- Permission_default.ProjectUser
150731
- ],
150732
- update: [Permission_default.ProjectOwner, Permission_default.ProjectAdmin]
150733
- }),
150734
- TableColumn_default({
150735
- required: true,
150736
- isDefaultValueColumn: true,
150737
- type: TableColumnType_default.Boolean,
150738
- title: "Enable Incident Instrumentation Fix Tasks",
150739
- description: "When enabled, an incident AI investigation that ends inconclusive (telemetry was insufficient to determine a root cause) automatically queues an AI agent task that opens a pull request adding the missing instrumentation to the implicated code paths. Requires a repository connected through the GitHub App. Pull requests are always human-reviewed \u2014 nothing merges automatically. Part of fixing: it acts only while enableAutomaticIncidentRemediation (Fix new incidents automatically) is on, and the dashboard turns it on and off with that switch. Off for new projects.",
150740
- defaultValue: false,
150741
- example: true
150742
- }),
150743
- Column({
150744
- nullable: false,
150745
- default: false,
150746
- type: ColumnType_default.Boolean
150747
- })
150748
- ], Project.prototype, "enableIncidentInstrumentationFixTasks", 2);
150749
- __decorateClass([
150750
- ColumnAccessControl_default({
150751
- create: [Permission_default.User],
150752
- read: [
150753
- Permission_default.ProjectOwner,
150754
- Permission_default.ProjectAdmin,
150755
- Permission_default.ProjectMember,
150756
- Permission_default.Viewer,
150757
- Permission_default.ReadProject,
150758
- Permission_default.UnAuthorizedSsoUser,
150759
- Permission_default.ProjectUser
150760
- ],
150761
- update: [Permission_default.ProjectOwner, Permission_default.ProjectAdmin]
150762
- }),
150763
- TableColumn_default({
150764
- required: true,
150765
- isDefaultValueColumn: true,
150766
- type: TableColumnType_default.Boolean,
150767
- title: "Enable Alert Instrumentation Fix Tasks",
150768
- description: "When enabled, an alert AI investigation that ends inconclusive (telemetry was insufficient to determine a root cause) automatically queues an AI agent task that opens a pull request adding the missing instrumentation to the implicated code paths. Requires a repository connected through the GitHub App. Pull requests are always human-reviewed \u2014 nothing merges automatically. Part of fixing: it acts only while enableAutomaticAlertRemediation (Fix new alerts automatically) is on, and the dashboard turns it on and off with that switch. Off for new projects.",
150769
- defaultValue: false,
150770
- example: true
150771
- }),
150772
- Column({
150773
- nullable: false,
150774
- default: false,
150775
- type: ColumnType_default.Boolean
150776
- })
150777
- ], Project.prototype, "enableAlertInstrumentationFixTasks", 2);
150778
- __decorateClass([
150779
- ColumnAccessControl_default({
150780
- create: [Permission_default.User],
150781
- read: [
150782
- Permission_default.ProjectOwner,
150783
- Permission_default.ProjectAdmin,
150784
- Permission_default.ProjectMember,
150785
- Permission_default.Viewer,
150786
- Permission_default.ReadProject,
150787
- Permission_default.UnAuthorizedSsoUser,
150788
- Permission_default.ProjectUser
150789
- ],
150790
- update: [Permission_default.ProjectOwner, Permission_default.ProjectAdmin]
150791
- }),
150792
- TableColumn_default({
150793
- required: true,
150794
- isDefaultValueColumn: true,
150795
- type: TableColumnType_default.Boolean,
150796
- title: "Enable Automatic Incident Code Fixes",
150797
- description: "When enabled, an incident AI investigation that ends with a confident, evidenced root cause analysis and recommends a repository code change automatically queues an AI agent task that opens a fix pull request, ready for review, from that analysis \u2014 the automatic form of the 'Open Fix PR from this analysis' button. Operational, infrastructure, external, user-error and inconclusive findings do not offer or open code-fix pull requests. Requires a repository connected through the GitHub App and a Runner with the code-fix capability. Pull requests are always human-reviewed \u2014 nothing merges automatically. Part of fixing: it acts only while enableAutomaticIncidentRemediation (Fix new incidents automatically) is on, and the dashboard turns it on and off with that switch. Off for new projects.",
150798
- defaultValue: false,
150799
- example: true
150800
- }),
150801
- Column({
150802
- nullable: false,
150803
- default: false,
150804
- type: ColumnType_default.Boolean
150805
- })
150806
- ], Project.prototype, "enableAutomaticIncidentCodeFixes", 2);
150807
- __decorateClass([
150808
- ColumnAccessControl_default({
150809
- create: [Permission_default.User],
150810
- read: [
150811
- Permission_default.ProjectOwner,
150812
- Permission_default.ProjectAdmin,
150813
- Permission_default.ProjectMember,
150814
- Permission_default.Viewer,
150815
- Permission_default.ReadProject,
150816
- Permission_default.UnAuthorizedSsoUser,
150817
- Permission_default.ProjectUser
150818
- ],
150819
- update: [Permission_default.ProjectOwner, Permission_default.ProjectAdmin]
150820
- }),
150821
- TableColumn_default({
150822
- required: true,
150823
- isDefaultValueColumn: true,
150824
- type: TableColumnType_default.Boolean,
150825
- title: "Enable Automatic Alert Code Fixes",
150826
- description: "When enabled, an alert AI investigation that ends with a confident, evidenced root cause analysis and recommends a repository code change automatically queues an AI agent task that opens a fix pull request, ready for review, from that analysis \u2014 the automatic form of the 'Open Fix PR from this analysis' button. Operational, infrastructure, external, user-error and inconclusive findings do not offer or open code-fix pull requests. Requires a repository connected through the GitHub App and a Runner with the code-fix capability. Pull requests are always human-reviewed \u2014 nothing merges automatically. Part of fixing: it acts only while enableAutomaticAlertRemediation (Fix new alerts automatically) is on, and the dashboard turns it on and off with that switch. Off for new projects.",
150827
- defaultValue: false,
150828
- example: true
150829
- }),
150830
- Column({
150831
- nullable: false,
150832
- default: false,
150833
- type: ColumnType_default.Boolean
150834
- })
150835
- ], Project.prototype, "enableAutomaticAlertCodeFixes", 2);
150836
151031
  __decorateClass([
150837
151032
  ColumnAccessControl_default({
150838
151033
  create: [Permission_default.User],
@@ -152550,31 +152745,6 @@ var AccessControlModel = class extends DatabaseBaseModel {
152550
152745
  }
152551
152746
  };
152552
152747
 
152553
- // ../Common/Types/Database/EnableAuditLog.ts
152554
- var EnableAuditLog_default = /* @__PURE__ */ __name((enableAuditLogOn = {
152555
- create: true,
152556
- update: true,
152557
- delete: true
152558
- }) => {
152559
- return (ctr) => {
152560
- const config = {
152561
- create: enableAuditLogOn.create ?? true,
152562
- update: enableAuditLogOn.update ?? true,
152563
- delete: enableAuditLogOn.delete ?? true
152564
- };
152565
- if (enableAuditLogOn.rootResource) {
152566
- config.rootResource = { ...enableAuditLogOn.rootResource };
152567
- }
152568
- if (enableAuditLogOn.ignoreColumns) {
152569
- config.ignoreColumns = [...enableAuditLogOn.ignoreColumns];
152570
- }
152571
- if (enableAuditLogOn.resourceNameRelation) {
152572
- config.resourceNameRelation = enableAuditLogOn.resourceNameRelation;
152573
- }
152574
- ctr.prototype.enableAuditLogOn = config;
152575
- };
152576
- }, "default");
152577
-
152578
152748
  // ../Common/Models/DatabaseModels/Label.ts
152579
152749
  var Label = class extends AccessControlModel {
152580
152750
  constructor() {
@@ -152589,6 +152759,10 @@ var Label = class extends AccessControlModel {
152589
152759
  this.deletedByUser = void 0;
152590
152760
  this.deletedByUserId = void 0;
152591
152761
  this.color = void 0;
152762
+ this.isArchived = void 0;
152763
+ this.archivedAt = void 0;
152764
+ this.archivedByUser = void 0;
152765
+ this.archivedByUserId = void 0;
152592
152766
  }
152593
152767
  };
152594
152768
  __name(Label, "Label");
@@ -152953,6 +153127,136 @@ __decorateClass([
152953
153127
  transformer: Color.getDatabaseTransformer()
152954
153128
  })
152955
153129
  ], Label.prototype, "color", 2);
153130
+ __decorateClass([
153131
+ ColumnAccessControl_default({
153132
+ create: [
153133
+ Permission_default.ProjectOwner,
153134
+ Permission_default.ProjectAdmin,
153135
+ Permission_default.CreateProjectLabel
153136
+ ],
153137
+ read: [
153138
+ Permission_default.ProjectOwner,
153139
+ Permission_default.ProjectAdmin,
153140
+ Permission_default.ProjectMember,
153141
+ Permission_default.Viewer,
153142
+ Permission_default.ProjectUser,
153143
+ Permission_default.SettingsAdmin,
153144
+ Permission_default.SettingsMember,
153145
+ Permission_default.SettingsViewer,
153146
+ Permission_default.ReadProjectLabel
153147
+ ],
153148
+ update: [
153149
+ Permission_default.ProjectOwner,
153150
+ Permission_default.ProjectAdmin,
153151
+ Permission_default.EditProjectLabel
153152
+ ]
153153
+ }),
153154
+ TableColumn_default({
153155
+ isDefaultValueColumn: true,
153156
+ required: true,
153157
+ type: TableColumnType_default.Boolean,
153158
+ canReadOnRelationQuery: true,
153159
+ title: "Is Archived",
153160
+ description: "Archived labels stay on everything that has them, but can't be added to anything again.",
153161
+ defaultValue: false,
153162
+ example: false
153163
+ }),
153164
+ Column({
153165
+ type: ColumnType_default.Boolean,
153166
+ nullable: false,
153167
+ default: false
153168
+ })
153169
+ ], Label.prototype, "isArchived", 2);
153170
+ __decorateClass([
153171
+ ColumnAccessControl_default({
153172
+ create: [],
153173
+ read: [
153174
+ Permission_default.ProjectOwner,
153175
+ Permission_default.ProjectAdmin,
153176
+ Permission_default.ProjectMember,
153177
+ Permission_default.Viewer,
153178
+ Permission_default.ProjectUser,
153179
+ Permission_default.SettingsAdmin,
153180
+ Permission_default.SettingsMember,
153181
+ Permission_default.SettingsViewer,
153182
+ Permission_default.ReadProjectLabel
153183
+ ],
153184
+ update: []
153185
+ }),
153186
+ TableColumn_default({
153187
+ required: false,
153188
+ type: TableColumnType_default.Date,
153189
+ title: "Archived At",
153190
+ description: "When this label was archived. Empty while it is not archived."
153191
+ }),
153192
+ Column({
153193
+ type: ColumnType_default.Date,
153194
+ nullable: true
153195
+ })
153196
+ ], Label.prototype, "archivedAt", 2);
153197
+ __decorateClass([
153198
+ ColumnAccessControl_default({
153199
+ create: [],
153200
+ read: [
153201
+ Permission_default.ProjectOwner,
153202
+ Permission_default.ProjectAdmin,
153203
+ Permission_default.ProjectMember,
153204
+ Permission_default.Viewer,
153205
+ Permission_default.ProjectUser,
153206
+ Permission_default.SettingsAdmin,
153207
+ Permission_default.SettingsMember,
153208
+ Permission_default.SettingsViewer,
153209
+ Permission_default.ReadProjectLabel
153210
+ ],
153211
+ update: []
153212
+ }),
153213
+ TableColumn_default({
153214
+ manyToOneRelationColumn: "archivedByUserId",
153215
+ type: TableColumnType_default.Entity,
153216
+ modelType: User_default,
153217
+ title: "Archived by User",
153218
+ description: "Relation to User who archived this object (if this object was archived by a User)"
153219
+ }),
153220
+ ManyToOne(
153221
+ () => {
153222
+ return User_default;
153223
+ },
153224
+ {
153225
+ eager: false,
153226
+ nullable: true,
153227
+ onDelete: "SET NULL",
153228
+ orphanedRowAction: "nullify"
153229
+ }
153230
+ ),
153231
+ JoinColumn({ name: "archivedByUserId" })
153232
+ ], Label.prototype, "archivedByUser", 2);
153233
+ __decorateClass([
153234
+ ColumnAccessControl_default({
153235
+ create: [],
153236
+ read: [
153237
+ Permission_default.ProjectOwner,
153238
+ Permission_default.ProjectAdmin,
153239
+ Permission_default.ProjectMember,
153240
+ Permission_default.Viewer,
153241
+ Permission_default.ProjectUser,
153242
+ Permission_default.SettingsAdmin,
153243
+ Permission_default.SettingsMember,
153244
+ Permission_default.SettingsViewer,
153245
+ Permission_default.ReadProjectLabel
153246
+ ],
153247
+ update: []
153248
+ }),
153249
+ TableColumn_default({
153250
+ type: TableColumnType_default.ObjectID,
153251
+ title: "Archived by User ID",
153252
+ description: "User ID who archived this object (if this object was archived by a User)"
153253
+ }),
153254
+ Column({
153255
+ type: ColumnType_default.ObjectID,
153256
+ nullable: true,
153257
+ transformer: ObjectID.getDatabaseTransformer()
153258
+ })
153259
+ ], Label.prototype, "archivedByUserId", 2);
152956
153260
  Label = __decorateClass([
152957
153261
  TableBillingAccessControl_default({
152958
153262
  create: "Growth" /* Growth */,
@@ -153437,7 +153741,7 @@ __decorateClass([
153437
153741
  required: true,
153438
153742
  type: TableColumnType_default.Boolean,
153439
153743
  title: "Runs AI Remediation Commands",
153440
- description: "Whether OneUptime AI may run commands through this Runner: read-only kubectl while investigating a cluster it is bound to, and policy-checked remediation commands (Bash, SSH, kubectl) that either match an allowlist or wait for one-click human approval. Set by OneUptime: on once an auto remediation rule picks this Runner or a Kubernetes cluster's AI settings bind it, and on for the in-cluster Runner the Kubernetes agent chart installs.",
153744
+ description: "Whether OneUptime AI may run commands through this Runner: read-only kubectl while investigating a cluster it is bound to, and policy-checked remediation commands (Bash, kubectl) that either match an allowlist or wait for one-click human approval. Set by OneUptime: on once an auto remediation rule picks this Runner, and on for the in-cluster Runner the Kubernetes agent chart installs.",
153441
153745
  defaultValue: false,
153442
153746
  isDefaultValueColumn: true
153443
153747
  }),
@@ -153763,622 +154067,6 @@ Runner = __decorateClass([
153763
154067
  })
153764
154068
  ], Runner);
153765
154069
 
153766
- // ../Common/Models/DatabaseModels/RunbookCredential.ts
153767
- var RunbookCredential = class extends DatabaseBaseModel {
153768
- constructor() {
153769
- super(...arguments);
153770
- this.project = void 0;
153771
- this.projectId = void 0;
153772
- this.name = void 0;
153773
- this.description = void 0;
153774
- this.credentialType = void 0;
153775
- this.sshHostname = void 0;
153776
- this.sshPort = void 0;
153777
- this.sshUsername = void 0;
153778
- this.sshPrivateKey = void 0;
153779
- this.sshPassphrase = void 0;
153780
- this.sshPassword = void 0;
153781
- this.kubernetesApiServerUrl = void 0;
153782
- this.kubernetesServiceAccountToken = void 0;
153783
- this.kubernetesCaCertificate = void 0;
153784
- this.runners = void 0;
153785
- this.createdByUser = void 0;
153786
- this.createdByUserId = void 0;
153787
- this.deletedByUser = void 0;
153788
- this.deletedByUserId = void 0;
153789
- }
153790
- };
153791
- __name(RunbookCredential, "RunbookCredential");
153792
- __decorateClass([
153793
- ColumnAccessControl_default({
153794
- create: [
153795
- Permission_default.ProjectOwner,
153796
- Permission_default.ProjectAdmin,
153797
- Permission_default.CreateRunbookCredential
153798
- ],
153799
- read: [
153800
- Permission_default.ProjectOwner,
153801
- Permission_default.ProjectAdmin,
153802
- Permission_default.ReadRunbookCredential
153803
- ],
153804
- update: []
153805
- }),
153806
- TableColumn_default({
153807
- manyToOneRelationColumn: "projectId",
153808
- type: TableColumnType_default.Entity,
153809
- modelType: Project,
153810
- title: "Project",
153811
- description: "Relation to Project Resource in which this object belongs"
153812
- }),
153813
- ManyToOne(
153814
- () => {
153815
- return Project;
153816
- },
153817
- {
153818
- eager: false,
153819
- nullable: true,
153820
- onDelete: "CASCADE",
153821
- orphanedRowAction: "nullify"
153822
- }
153823
- ),
153824
- JoinColumn({ name: "projectId" })
153825
- ], RunbookCredential.prototype, "project", 2);
153826
- __decorateClass([
153827
- ColumnAccessControl_default({
153828
- create: [
153829
- Permission_default.ProjectOwner,
153830
- Permission_default.ProjectAdmin,
153831
- Permission_default.CreateRunbookCredential
153832
- ],
153833
- read: [
153834
- Permission_default.ProjectOwner,
153835
- Permission_default.ProjectAdmin,
153836
- Permission_default.ReadRunbookCredential
153837
- ],
153838
- update: []
153839
- }),
153840
- Index(),
153841
- TableColumn_default({
153842
- type: TableColumnType_default.ObjectID,
153843
- required: true,
153844
- canReadOnRelationQuery: true,
153845
- title: "Project ID",
153846
- description: "ID of your OneUptime Project in which this object belongs"
153847
- }),
153848
- Column({
153849
- type: ColumnType_default.ObjectID,
153850
- nullable: false,
153851
- transformer: ObjectID.getDatabaseTransformer()
153852
- })
153853
- ], RunbookCredential.prototype, "projectId", 2);
153854
- __decorateClass([
153855
- ColumnAccessControl_default({
153856
- create: [
153857
- Permission_default.ProjectOwner,
153858
- Permission_default.ProjectAdmin,
153859
- Permission_default.CreateRunbookCredential
153860
- ],
153861
- read: [
153862
- Permission_default.ProjectOwner,
153863
- Permission_default.ProjectAdmin,
153864
- Permission_default.ReadRunbookCredential
153865
- ],
153866
- update: [
153867
- Permission_default.ProjectOwner,
153868
- Permission_default.ProjectAdmin,
153869
- Permission_default.EditRunbookCredential
153870
- ]
153871
- }),
153872
- TableColumn_default({
153873
- required: true,
153874
- type: TableColumnType_default.ShortText,
153875
- canReadOnRelationQuery: true,
153876
- title: "Name",
153877
- description: "Any friendly name of this object",
153878
- example: "prod-cluster"
153879
- }),
153880
- Column({
153881
- nullable: false,
153882
- type: ColumnType_default.ShortText,
153883
- length: ColumnLength_default.ShortText
153884
- }),
153885
- UniqueColumnBy_default("projectId")
153886
- ], RunbookCredential.prototype, "name", 2);
153887
- __decorateClass([
153888
- ColumnAccessControl_default({
153889
- create: [
153890
- Permission_default.ProjectOwner,
153891
- Permission_default.ProjectAdmin,
153892
- Permission_default.CreateRunbookCredential
153893
- ],
153894
- read: [
153895
- Permission_default.ProjectOwner,
153896
- Permission_default.ProjectAdmin,
153897
- Permission_default.ReadRunbookCredential
153898
- ],
153899
- update: [
153900
- Permission_default.ProjectOwner,
153901
- Permission_default.ProjectAdmin,
153902
- Permission_default.EditRunbookCredential
153903
- ]
153904
- }),
153905
- TableColumn_default({
153906
- required: false,
153907
- type: TableColumnType_default.LongText,
153908
- title: "Description",
153909
- description: "Friendly description that will help you remember"
153910
- }),
153911
- Column({
153912
- nullable: true,
153913
- type: ColumnType_default.LongText,
153914
- length: ColumnLength_default.LongText
153915
- })
153916
- ], RunbookCredential.prototype, "description", 2);
153917
- __decorateClass([
153918
- ColumnAccessControl_default({
153919
- create: [
153920
- Permission_default.ProjectOwner,
153921
- Permission_default.ProjectAdmin,
153922
- Permission_default.CreateRunbookCredential
153923
- ],
153924
- read: [
153925
- Permission_default.ProjectOwner,
153926
- Permission_default.ProjectAdmin,
153927
- Permission_default.ReadRunbookCredential
153928
- ],
153929
- update: []
153930
- }),
153931
- TableColumn_default({
153932
- required: true,
153933
- type: TableColumnType_default.ShortText,
153934
- canReadOnRelationQuery: true,
153935
- title: "Credential Type",
153936
- description: "SSH, or Kubernetes.",
153937
- example: "SSH"
153938
- }),
153939
- Column({
153940
- nullable: false,
153941
- type: ColumnType_default.ShortText
153942
- })
153943
- ], RunbookCredential.prototype, "credentialType", 2);
153944
- __decorateClass([
153945
- ColumnAccessControl_default({
153946
- create: [
153947
- Permission_default.ProjectOwner,
153948
- Permission_default.ProjectAdmin,
153949
- Permission_default.CreateRunbookCredential
153950
- ],
153951
- read: [
153952
- Permission_default.ProjectOwner,
153953
- Permission_default.ProjectAdmin,
153954
- Permission_default.ReadRunbookCredential
153955
- ],
153956
- update: [
153957
- Permission_default.ProjectOwner,
153958
- Permission_default.ProjectAdmin,
153959
- Permission_default.EditRunbookCredential
153960
- ]
153961
- }),
153962
- TableColumn_default({
153963
- required: false,
153964
- type: TableColumnType_default.ShortText,
153965
- title: "SSH Hostname",
153966
- description: "Hostname or IP address the Runner connects to.",
153967
- example: "10.0.4.21"
153968
- }),
153969
- Column({
153970
- nullable: true,
153971
- type: ColumnType_default.ShortText,
153972
- length: ColumnLength_default.ShortText
153973
- })
153974
- ], RunbookCredential.prototype, "sshHostname", 2);
153975
- __decorateClass([
153976
- ColumnAccessControl_default({
153977
- create: [
153978
- Permission_default.ProjectOwner,
153979
- Permission_default.ProjectAdmin,
153980
- Permission_default.CreateRunbookCredential
153981
- ],
153982
- read: [
153983
- Permission_default.ProjectOwner,
153984
- Permission_default.ProjectAdmin,
153985
- Permission_default.ReadRunbookCredential
153986
- ],
153987
- update: [
153988
- Permission_default.ProjectOwner,
153989
- Permission_default.ProjectAdmin,
153990
- Permission_default.EditRunbookCredential
153991
- ]
153992
- }),
153993
- TableColumn_default({
153994
- required: false,
153995
- type: TableColumnType_default.Number,
153996
- title: "SSH Port",
153997
- description: "Defaults to 22 when unset.",
153998
- example: 22
153999
- }),
154000
- Column({
154001
- nullable: true,
154002
- type: ColumnType_default.Number
154003
- })
154004
- ], RunbookCredential.prototype, "sshPort", 2);
154005
- __decorateClass([
154006
- ColumnAccessControl_default({
154007
- create: [
154008
- Permission_default.ProjectOwner,
154009
- Permission_default.ProjectAdmin,
154010
- Permission_default.CreateRunbookCredential
154011
- ],
154012
- read: [
154013
- Permission_default.ProjectOwner,
154014
- Permission_default.ProjectAdmin,
154015
- Permission_default.ReadRunbookCredential
154016
- ],
154017
- update: [
154018
- Permission_default.ProjectOwner,
154019
- Permission_default.ProjectAdmin,
154020
- Permission_default.EditRunbookCredential
154021
- ]
154022
- }),
154023
- TableColumn_default({
154024
- required: false,
154025
- type: TableColumnType_default.ShortText,
154026
- title: "SSH Username",
154027
- description: "The user the Runner authenticates as.",
154028
- example: "deploy"
154029
- }),
154030
- Column({
154031
- nullable: true,
154032
- type: ColumnType_default.ShortText,
154033
- length: ColumnLength_default.ShortText
154034
- })
154035
- ], RunbookCredential.prototype, "sshUsername", 2);
154036
- __decorateClass([
154037
- ColumnAccessControl_default({
154038
- create: [
154039
- Permission_default.ProjectOwner,
154040
- Permission_default.ProjectAdmin,
154041
- Permission_default.CreateRunbookCredential
154042
- ],
154043
- read: [],
154044
- update: [
154045
- Permission_default.ProjectOwner,
154046
- Permission_default.ProjectAdmin,
154047
- Permission_default.EditRunbookCredential
154048
- ]
154049
- }),
154050
- TableColumn_default({
154051
- required: false,
154052
- type: TableColumnType_default.VeryLongText,
154053
- encrypted: true,
154054
- title: "SSH Private Key",
154055
- description: "PEM private key used to authenticate. Encrypted at rest and never returned by the API."
154056
- }),
154057
- Column({
154058
- nullable: true,
154059
- type: ColumnType_default.VeryLongText
154060
- })
154061
- ], RunbookCredential.prototype, "sshPrivateKey", 2);
154062
- __decorateClass([
154063
- ColumnAccessControl_default({
154064
- create: [
154065
- Permission_default.ProjectOwner,
154066
- Permission_default.ProjectAdmin,
154067
- Permission_default.CreateRunbookCredential
154068
- ],
154069
- read: [],
154070
- update: [
154071
- Permission_default.ProjectOwner,
154072
- Permission_default.ProjectAdmin,
154073
- Permission_default.EditRunbookCredential
154074
- ]
154075
- }),
154076
- TableColumn_default({
154077
- required: false,
154078
- type: TableColumnType_default.VeryLongText,
154079
- encrypted: true,
154080
- title: "SSH Private Key Passphrase",
154081
- description: "Passphrase protecting the private key, when it has one. Encrypted at rest and never returned by the API."
154082
- }),
154083
- Column({
154084
- nullable: true,
154085
- type: ColumnType_default.VeryLongText
154086
- })
154087
- ], RunbookCredential.prototype, "sshPassphrase", 2);
154088
- __decorateClass([
154089
- ColumnAccessControl_default({
154090
- create: [
154091
- Permission_default.ProjectOwner,
154092
- Permission_default.ProjectAdmin,
154093
- Permission_default.CreateRunbookCredential
154094
- ],
154095
- read: [],
154096
- update: [
154097
- Permission_default.ProjectOwner,
154098
- Permission_default.ProjectAdmin,
154099
- Permission_default.EditRunbookCredential
154100
- ]
154101
- }),
154102
- TableColumn_default({
154103
- required: false,
154104
- type: TableColumnType_default.VeryLongText,
154105
- encrypted: true,
154106
- title: "SSH Password",
154107
- description: "Password authentication, for hosts without key access. Encrypted at rest and never returned by the API."
154108
- }),
154109
- Column({
154110
- nullable: true,
154111
- type: ColumnType_default.VeryLongText
154112
- })
154113
- ], RunbookCredential.prototype, "sshPassword", 2);
154114
- __decorateClass([
154115
- ColumnAccessControl_default({
154116
- create: [
154117
- Permission_default.ProjectOwner,
154118
- Permission_default.ProjectAdmin,
154119
- Permission_default.CreateRunbookCredential
154120
- ],
154121
- read: [
154122
- Permission_default.ProjectOwner,
154123
- Permission_default.ProjectAdmin,
154124
- Permission_default.ReadRunbookCredential
154125
- ],
154126
- update: [
154127
- Permission_default.ProjectOwner,
154128
- Permission_default.ProjectAdmin,
154129
- Permission_default.EditRunbookCredential
154130
- ]
154131
- }),
154132
- TableColumn_default({
154133
- required: false,
154134
- type: TableColumnType_default.ShortText,
154135
- title: "Kubernetes API Server URL",
154136
- description: "For example https://10.0.0.1:6443",
154137
- example: "https://10.0.0.1:6443"
154138
- }),
154139
- Column({
154140
- nullable: true,
154141
- type: ColumnType_default.ShortText,
154142
- length: ColumnLength_default.LongText
154143
- })
154144
- ], RunbookCredential.prototype, "kubernetesApiServerUrl", 2);
154145
- __decorateClass([
154146
- ColumnAccessControl_default({
154147
- create: [
154148
- Permission_default.ProjectOwner,
154149
- Permission_default.ProjectAdmin,
154150
- Permission_default.CreateRunbookCredential
154151
- ],
154152
- read: [],
154153
- update: [
154154
- Permission_default.ProjectOwner,
154155
- Permission_default.ProjectAdmin,
154156
- Permission_default.EditRunbookCredential
154157
- ]
154158
- }),
154159
- TableColumn_default({
154160
- required: false,
154161
- type: TableColumnType_default.VeryLongText,
154162
- encrypted: true,
154163
- title: "Kubernetes Service Account Token",
154164
- description: "Bearer token of a service account bound to a role that permits only the actions your runbooks need. Encrypted at rest and never returned by the API."
154165
- }),
154166
- Column({
154167
- nullable: true,
154168
- type: ColumnType_default.VeryLongText
154169
- })
154170
- ], RunbookCredential.prototype, "kubernetesServiceAccountToken", 2);
154171
- __decorateClass([
154172
- ColumnAccessControl_default({
154173
- create: [
154174
- Permission_default.ProjectOwner,
154175
- Permission_default.ProjectAdmin,
154176
- Permission_default.CreateRunbookCredential
154177
- ],
154178
- read: [
154179
- Permission_default.ProjectOwner,
154180
- Permission_default.ProjectAdmin,
154181
- Permission_default.ReadRunbookCredential
154182
- ],
154183
- update: [
154184
- Permission_default.ProjectOwner,
154185
- Permission_default.ProjectAdmin,
154186
- Permission_default.EditRunbookCredential
154187
- ]
154188
- }),
154189
- TableColumn_default({
154190
- required: false,
154191
- type: TableColumnType_default.VeryLongText,
154192
- title: "Kubernetes CA Certificate",
154193
- description: "PEM certificate authority for the API server. Leave empty only if the API server presents a certificate your Runner already trusts."
154194
- }),
154195
- Column({
154196
- nullable: true,
154197
- type: ColumnType_default.VeryLongText
154198
- })
154199
- ], RunbookCredential.prototype, "kubernetesCaCertificate", 2);
154200
- __decorateClass([
154201
- ColumnAccessControl_default({
154202
- create: [
154203
- Permission_default.ProjectOwner,
154204
- Permission_default.ProjectAdmin,
154205
- Permission_default.CreateRunbookCredential
154206
- ],
154207
- read: [
154208
- Permission_default.ProjectOwner,
154209
- Permission_default.ProjectAdmin,
154210
- Permission_default.ReadRunbookCredential
154211
- ],
154212
- update: [
154213
- Permission_default.ProjectOwner,
154214
- Permission_default.ProjectAdmin,
154215
- Permission_default.EditRunbookCredential
154216
- ]
154217
- }),
154218
- TableColumn_default({
154219
- required: false,
154220
- type: TableColumnType_default.EntityArray,
154221
- modelType: Runner,
154222
- title: "Runners",
154223
- description: "The Runners allowed to use this credential. A command that uses it must run on one of them."
154224
- }),
154225
- ManyToMany(
154226
- () => {
154227
- return Runner;
154228
- },
154229
- { eager: false }
154230
- ),
154231
- JoinTable({
154232
- name: "RunbookCredentialRunner",
154233
- inverseJoinColumn: {
154234
- name: "runnerId",
154235
- referencedColumnName: "_id"
154236
- },
154237
- joinColumn: {
154238
- name: "runbookCredentialId",
154239
- referencedColumnName: "_id"
154240
- }
154241
- })
154242
- ], RunbookCredential.prototype, "runners", 2);
154243
- __decorateClass([
154244
- ColumnAccessControl_default({
154245
- create: [],
154246
- read: [
154247
- Permission_default.ProjectOwner,
154248
- Permission_default.ProjectAdmin,
154249
- Permission_default.ReadRunbookCredential
154250
- ],
154251
- update: []
154252
- }),
154253
- TableColumn_default({
154254
- manyToOneRelationColumn: "createdByUserId",
154255
- type: TableColumnType_default.Entity,
154256
- modelType: User_default,
154257
- title: "Created by User",
154258
- description: "Relation to User who created this object (if this object was created by a User)"
154259
- }),
154260
- ManyToOne(
154261
- () => {
154262
- return User_default;
154263
- },
154264
- {
154265
- eager: false,
154266
- nullable: true,
154267
- onDelete: "SET NULL",
154268
- orphanedRowAction: "nullify"
154269
- }
154270
- ),
154271
- JoinColumn({ name: "createdByUserId" })
154272
- ], RunbookCredential.prototype, "createdByUser", 2);
154273
- __decorateClass([
154274
- ColumnAccessControl_default({
154275
- create: [],
154276
- read: [
154277
- Permission_default.ProjectOwner,
154278
- Permission_default.ProjectAdmin,
154279
- Permission_default.ReadRunbookCredential
154280
- ],
154281
- update: []
154282
- }),
154283
- TableColumn_default({
154284
- type: TableColumnType_default.ObjectID,
154285
- title: "Created by User ID",
154286
- description: "User ID who created this object (if this object was created by a User)"
154287
- }),
154288
- Column({
154289
- type: ColumnType_default.ObjectID,
154290
- nullable: true,
154291
- transformer: ObjectID.getDatabaseTransformer()
154292
- })
154293
- ], RunbookCredential.prototype, "createdByUserId", 2);
154294
- __decorateClass([
154295
- ColumnAccessControl_default({
154296
- create: [],
154297
- read: [],
154298
- update: []
154299
- }),
154300
- TableColumn_default({
154301
- manyToOneRelationColumn: "deletedByUserId",
154302
- type: TableColumnType_default.Entity,
154303
- title: "Deleted by User",
154304
- description: "Relation to User who deleted this object (if this object was deleted by a User)",
154305
- modelType: User_default
154306
- }),
154307
- ManyToOne(
154308
- () => {
154309
- return User_default;
154310
- },
154311
- {
154312
- cascade: false,
154313
- eager: false,
154314
- nullable: true,
154315
- onDelete: "SET NULL",
154316
- orphanedRowAction: "nullify"
154317
- }
154318
- ),
154319
- JoinColumn({ name: "deletedByUserId" })
154320
- ], RunbookCredential.prototype, "deletedByUser", 2);
154321
- __decorateClass([
154322
- ColumnAccessControl_default({
154323
- create: [],
154324
- read: [],
154325
- update: []
154326
- }),
154327
- TableColumn_default({
154328
- type: TableColumnType_default.ObjectID,
154329
- title: "Deleted by User ID",
154330
- description: "User ID who deleted this object (if this object was deleted by a User)"
154331
- }),
154332
- Column({
154333
- type: ColumnType_default.ObjectID,
154334
- nullable: true,
154335
- transformer: ObjectID.getDatabaseTransformer()
154336
- })
154337
- ], RunbookCredential.prototype, "deletedByUserId", 2);
154338
- RunbookCredential = __decorateClass([
154339
- EnableDocumentation_default(),
154340
- TableBillingAccessControl_default({
154341
- create: "Growth" /* Growth */,
154342
- read: "Growth" /* Growth */,
154343
- update: "Growth" /* Growth */,
154344
- delete: "Growth" /* Growth */
154345
- }),
154346
- TenantColumn_default("projectId"),
154347
- TableAccessControl_default({
154348
- create: [
154349
- Permission_default.ProjectOwner,
154350
- Permission_default.ProjectAdmin,
154351
- Permission_default.CreateRunbookCredential
154352
- ],
154353
- read: [
154354
- Permission_default.ProjectOwner,
154355
- Permission_default.ProjectAdmin,
154356
- Permission_default.ReadRunbookCredential
154357
- ],
154358
- delete: [
154359
- Permission_default.ProjectOwner,
154360
- Permission_default.ProjectAdmin,
154361
- Permission_default.DeleteRunbookCredential
154362
- ],
154363
- update: [
154364
- Permission_default.ProjectOwner,
154365
- Permission_default.ProjectAdmin,
154366
- Permission_default.EditRunbookCredential
154367
- ]
154368
- }),
154369
- CrudApiEndpoint_default(new Route("/runbook-credential")),
154370
- TableMetadata_default({
154371
- tableName: "RunbookCredential",
154372
- singularName: "Runbook Credential",
154373
- pluralName: "Runbook Credentials",
154374
- icon: IconProp_default.Key,
154375
- tableDescription: "What OneUptime AI's commands reach through your Runners: an SSH host, or a Kubernetes cluster's API server. Secret material is encrypted at rest and can never be read back through the API; it is decrypted only when handed to an assigned Runner as it claims a command."
154376
- }),
154377
- Entity({
154378
- name: "RunbookCredential"
154379
- })
154380
- ], RunbookCredential);
154381
-
154382
154070
  // ../Common/Types/Kubernetes/KubernetesClusterAiAccess.ts
154383
154071
  var DEFAULT_KUBECTL_TIMEOUT_MS = 30 * 1e3;
154384
154072
  var MAX_KUBECTL_TIMEOUT_MS = 2 * 60 * 1e3;
@@ -154413,8 +154101,6 @@ var KubernetesCluster = class extends DatabaseBaseModel {
154413
154101
  this.telemetryRetentionConfig = void 0;
154414
154102
  this.aiAccessRunner = void 0;
154415
154103
  this.aiAccessRunnerId = void 0;
154416
- this.aiAccessCredential = void 0;
154417
- this.aiAccessCredentialId = void 0;
154418
154104
  this.isAiInvestigationEnabled = void 0;
154419
154105
  this.aiRemediationMode = void 0;
154420
154106
  this.aiKubectlCommandAllowlist = void 0;
@@ -155334,7 +155020,7 @@ __decorateClass([
155334
155020
  type: TableColumnType_default.Entity,
155335
155021
  modelType: Runner,
155336
155022
  title: "AI Access Runner",
155337
- description: "The Runner OneUptime AI uses to run kubectl against this cluster \u2014 the in-cluster Runner installed by the Kubernetes agent chart (which binds itself here when it first registers, unless a Runner was bound here before), or any Runner you created that holds a Kubernetes credential for this cluster. Another cluster's in-cluster Runner cannot be bound. Binding a Runner, or switching to a different one, needs Project Owner, Project Admin or Edit Auto Remediation Rule; anyone who may edit the cluster can clear it."
155023
+ description: "The in-cluster Runner an older Kubernetes agent chart installed, which binds itself here when it first registers (unless a Runner was bound here before) and runs OneUptime AI's kubectl while the cluster's Kubernetes AI agent is not online. Only this cluster's own in-cluster Runner can be bound. Binding it again needs Project Owner, Project Admin or Edit Auto Remediation Rule; anyone who may edit the cluster can clear it."
155338
155024
  }),
155339
155025
  ManyToOne(
155340
155026
  () => {
@@ -155377,7 +155063,7 @@ __decorateClass([
155377
155063
  required: false,
155378
155064
  canReadOnRelationQuery: true,
155379
155065
  title: "AI Access Runner ID",
155380
- description: "ID of the Runner OneUptime AI uses to run kubectl against this cluster. Another cluster's in-cluster Runner cannot be bound. Binding a Runner, or switching to a different one, needs Project Owner, Project Admin or Edit Auto Remediation Rule; anyone who may edit the cluster can clear it."
155066
+ description: "ID of the in-cluster Runner an older Kubernetes agent chart installed on this cluster. Only this cluster's own in-cluster Runner can be bound. Binding it again needs Project Owner, Project Admin or Edit Auto Remediation Rule; anyone who may edit the cluster can clear it."
155381
155067
  }),
155382
155068
  Column({
155383
155069
  type: ColumnType_default.ObjectID,
@@ -155385,83 +155071,6 @@ __decorateClass([
155385
155071
  transformer: ObjectID.getDatabaseTransformer()
155386
155072
  })
155387
155073
  ], KubernetesCluster.prototype, "aiAccessRunnerId", 2);
155388
- __decorateClass([
155389
- ColumnAccessControl_default({
155390
- create: [],
155391
- read: [
155392
- Permission_default.ProjectOwner,
155393
- Permission_default.ProjectAdmin,
155394
- Permission_default.ProjectMember,
155395
- Permission_default.Viewer,
155396
- Permission_default.SettingsAdmin,
155397
- Permission_default.SettingsMember,
155398
- Permission_default.SettingsViewer,
155399
- Permission_default.ReadKubernetesCluster
155400
- ],
155401
- update: [
155402
- Permission_default.ProjectOwner,
155403
- Permission_default.ProjectAdmin,
155404
- Permission_default.ProjectMember,
155405
- Permission_default.SettingsAdmin,
155406
- Permission_default.SettingsMember,
155407
- Permission_default.EditKubernetesCluster
155408
- ]
155409
- }),
155410
- TableColumn_default({
155411
- manyToOneRelationColumn: "aiAccessCredentialId",
155412
- type: TableColumnType_default.Entity,
155413
- modelType: RunbookCredential,
155414
- title: "AI Access Credential",
155415
- description: "The Kubernetes credential (API server URL and ServiceAccount token) the AI access Runner uses for this cluster; it must be a Kubernetes credential of this project that is assigned to that Runner. Leave empty for the in-cluster Runner, which uses its own ServiceAccount and is never given a credential. Binding a credential needs Project Owner, Project Admin or Edit Auto Remediation Rule, and also permission to read credentials (Project Owner, Project Admin or Read Runbook Credential); anyone who may edit the cluster can clear it."
155416
- }),
155417
- ManyToOne(
155418
- () => {
155419
- return RunbookCredential;
155420
- },
155421
- {
155422
- eager: false,
155423
- nullable: true,
155424
- onDelete: "SET NULL",
155425
- orphanedRowAction: "nullify"
155426
- }
155427
- ),
155428
- JoinColumn({ name: "aiAccessCredentialId" })
155429
- ], KubernetesCluster.prototype, "aiAccessCredential", 2);
155430
- __decorateClass([
155431
- ColumnAccessControl_default({
155432
- create: [],
155433
- read: [
155434
- Permission_default.ProjectOwner,
155435
- Permission_default.ProjectAdmin,
155436
- Permission_default.ProjectMember,
155437
- Permission_default.Viewer,
155438
- Permission_default.SettingsAdmin,
155439
- Permission_default.SettingsMember,
155440
- Permission_default.SettingsViewer,
155441
- Permission_default.ReadKubernetesCluster
155442
- ],
155443
- update: [
155444
- Permission_default.ProjectOwner,
155445
- Permission_default.ProjectAdmin,
155446
- Permission_default.ProjectMember,
155447
- Permission_default.SettingsAdmin,
155448
- Permission_default.SettingsMember,
155449
- Permission_default.EditKubernetesCluster
155450
- ]
155451
- }),
155452
- TableColumn_default({
155453
- type: TableColumnType_default.ObjectID,
155454
- required: false,
155455
- canReadOnRelationQuery: true,
155456
- title: "AI Access Credential ID",
155457
- description: "ID of the Kubernetes credential the AI access Runner uses for this cluster; the credential must be assigned to that Runner. Empty for the in-cluster Runner, which is never given a credential. Binding a credential needs Project Owner, Project Admin or Edit Auto Remediation Rule, and also permission to read credentials (Project Owner, Project Admin or Read Runbook Credential); anyone who may edit the cluster can clear it."
155458
- }),
155459
- Column({
155460
- type: ColumnType_default.ObjectID,
155461
- nullable: true,
155462
- transformer: ObjectID.getDatabaseTransformer()
155463
- })
155464
- ], KubernetesCluster.prototype, "aiAccessCredentialId", 2);
155465
155074
  __decorateClass([
155466
155075
  ColumnAccessControl_default({
155467
155076
  create: [],
@@ -176225,6 +175834,10 @@ var MonitorStatus = class extends DatabaseBaseModel {
176225
175834
  this.isOperationalState = void 0;
176226
175835
  this.isOfflineState = void 0;
176227
175836
  this.priority = void 0;
175837
+ this.isArchived = void 0;
175838
+ this.archivedAt = void 0;
175839
+ this.archivedByUser = void 0;
175840
+ this.archivedByUserId = void 0;
176228
175841
  }
176229
175842
  };
176230
175843
  __name(MonitorStatus, "MonitorStatus");
@@ -176700,6 +176313,134 @@ __decorateClass([
176700
176313
  type: ColumnType_default.Number
176701
176314
  })
176702
176315
  ], MonitorStatus.prototype, "priority", 2);
176316
+ __decorateClass([
176317
+ ColumnAccessControl_default({
176318
+ create: [
176319
+ Permission_default.ProjectOwner,
176320
+ Permission_default.ProjectAdmin,
176321
+ Permission_default.MonitorAdmin,
176322
+ Permission_default.CreateProjectMonitorStatus
176323
+ ],
176324
+ read: [
176325
+ Permission_default.ProjectOwner,
176326
+ Permission_default.ProjectAdmin,
176327
+ Permission_default.ProjectMember,
176328
+ Permission_default.Viewer,
176329
+ Permission_default.MonitorAdmin,
176330
+ Permission_default.MonitorMember,
176331
+ Permission_default.MonitorViewer,
176332
+ Permission_default.ReadProjectMonitorStatus
176333
+ ],
176334
+ update: [
176335
+ Permission_default.ProjectOwner,
176336
+ Permission_default.ProjectAdmin,
176337
+ Permission_default.MonitorAdmin,
176338
+ Permission_default.EditProjectMonitorStatus
176339
+ ]
176340
+ }),
176341
+ TableColumn_default({
176342
+ isDefaultValueColumn: true,
176343
+ required: true,
176344
+ type: TableColumnType_default.Boolean,
176345
+ canReadOnRelationQuery: true,
176346
+ title: "Is Archived",
176347
+ description: "Archived statuses stay on the monitors that are in them, but can't be picked again. The operational and offline statuses can't be archived.",
176348
+ defaultValue: false,
176349
+ example: false
176350
+ }),
176351
+ Column({
176352
+ type: ColumnType_default.Boolean,
176353
+ nullable: false,
176354
+ default: false
176355
+ })
176356
+ ], MonitorStatus.prototype, "isArchived", 2);
176357
+ __decorateClass([
176358
+ ColumnAccessControl_default({
176359
+ create: [],
176360
+ read: [
176361
+ Permission_default.ProjectOwner,
176362
+ Permission_default.ProjectAdmin,
176363
+ Permission_default.ProjectMember,
176364
+ Permission_default.Viewer,
176365
+ Permission_default.MonitorAdmin,
176366
+ Permission_default.MonitorMember,
176367
+ Permission_default.MonitorViewer,
176368
+ Permission_default.ReadProjectMonitorStatus
176369
+ ],
176370
+ update: []
176371
+ }),
176372
+ TableColumn_default({
176373
+ required: false,
176374
+ type: TableColumnType_default.Date,
176375
+ title: "Archived At",
176376
+ description: "When this monitor status was archived. Empty while it is not archived."
176377
+ }),
176378
+ Column({
176379
+ type: ColumnType_default.Date,
176380
+ nullable: true
176381
+ })
176382
+ ], MonitorStatus.prototype, "archivedAt", 2);
176383
+ __decorateClass([
176384
+ ColumnAccessControl_default({
176385
+ create: [],
176386
+ read: [
176387
+ Permission_default.ProjectOwner,
176388
+ Permission_default.ProjectAdmin,
176389
+ Permission_default.ProjectMember,
176390
+ Permission_default.Viewer,
176391
+ Permission_default.MonitorAdmin,
176392
+ Permission_default.MonitorMember,
176393
+ Permission_default.MonitorViewer,
176394
+ Permission_default.ReadProjectMonitorStatus
176395
+ ],
176396
+ update: []
176397
+ }),
176398
+ TableColumn_default({
176399
+ manyToOneRelationColumn: "archivedByUserId",
176400
+ type: TableColumnType_default.Entity,
176401
+ modelType: User_default,
176402
+ title: "Archived by User",
176403
+ description: "Relation to User who archived this object (if this object was archived by a User)"
176404
+ }),
176405
+ ManyToOne(
176406
+ () => {
176407
+ return User_default;
176408
+ },
176409
+ {
176410
+ eager: false,
176411
+ nullable: true,
176412
+ onDelete: "SET NULL",
176413
+ orphanedRowAction: "nullify"
176414
+ }
176415
+ ),
176416
+ JoinColumn({ name: "archivedByUserId" })
176417
+ ], MonitorStatus.prototype, "archivedByUser", 2);
176418
+ __decorateClass([
176419
+ ColumnAccessControl_default({
176420
+ create: [],
176421
+ read: [
176422
+ Permission_default.ProjectOwner,
176423
+ Permission_default.ProjectAdmin,
176424
+ Permission_default.ProjectMember,
176425
+ Permission_default.Viewer,
176426
+ Permission_default.MonitorAdmin,
176427
+ Permission_default.MonitorMember,
176428
+ Permission_default.MonitorViewer,
176429
+ Permission_default.ReadProjectMonitorStatus
176430
+ ],
176431
+ update: []
176432
+ }),
176433
+ TableColumn_default({
176434
+ type: TableColumnType_default.ObjectID,
176435
+ title: "Archived by User ID",
176436
+ description: "User ID who archived this object (if this object was archived by a User)"
176437
+ }),
176438
+ Column({
176439
+ type: ColumnType_default.ObjectID,
176440
+ nullable: true,
176441
+ transformer: ObjectID.getDatabaseTransformer()
176442
+ })
176443
+ ], MonitorStatus.prototype, "archivedByUserId", 2);
176703
176444
  MonitorStatus = __decorateClass([
176704
176445
  TableBillingAccessControl_default({
176705
176446
  create: "Growth" /* Growth */,
@@ -176747,6 +176488,7 @@ MonitorStatus = __decorateClass([
176747
176488
  update: true,
176748
176489
  read: true
176749
176490
  }),
176491
+ EnableAuditLog_default(),
176750
176492
  CrudApiEndpoint_default(new Route("/monitor-status")),
176751
176493
  SlugifyColumn_default("name", "slug"),
176752
176494
  TableMetadata_default({
@@ -231200,6 +230942,10 @@ var IncidentRole = class extends DatabaseBaseModel {
231200
230942
  this.isPrimaryRole = void 0;
231201
230943
  this.isDeleteable = void 0;
231202
230944
  this.canAssignMultipleUsers = void 0;
230945
+ this.isArchived = void 0;
230946
+ this.archivedAt = void 0;
230947
+ this.archivedByUser = void 0;
230948
+ this.archivedByUserId = void 0;
231203
230949
  }
231204
230950
  };
231205
230951
  __name(IncidentRole, "IncidentRole");
@@ -231716,6 +231462,138 @@ __decorateClass([
231716
231462
  default: false
231717
231463
  })
231718
231464
  ], IncidentRole.prototype, "canAssignMultipleUsers", 2);
231465
+ __decorateClass([
231466
+ ColumnAccessControl_default({
231467
+ create: [
231468
+ Permission_default.ProjectOwner,
231469
+ Permission_default.ProjectAdmin,
231470
+ Permission_default.ProjectMember,
231471
+ Permission_default.IncidentAdmin,
231472
+ Permission_default.IncidentMember,
231473
+ Permission_default.CreateIncidentRole
231474
+ ],
231475
+ read: [
231476
+ Permission_default.ProjectOwner,
231477
+ Permission_default.ProjectAdmin,
231478
+ Permission_default.ProjectMember,
231479
+ Permission_default.Viewer,
231480
+ Permission_default.IncidentAdmin,
231481
+ Permission_default.IncidentMember,
231482
+ Permission_default.IncidentViewer,
231483
+ Permission_default.ReadIncidentRole
231484
+ ],
231485
+ update: [
231486
+ Permission_default.ProjectOwner,
231487
+ Permission_default.ProjectAdmin,
231488
+ Permission_default.ProjectMember,
231489
+ Permission_default.IncidentAdmin,
231490
+ Permission_default.IncidentMember,
231491
+ Permission_default.EditIncidentRole
231492
+ ]
231493
+ }),
231494
+ TableColumn_default({
231495
+ isDefaultValueColumn: true,
231496
+ required: true,
231497
+ type: TableColumnType_default.Boolean,
231498
+ canReadOnRelationQuery: true,
231499
+ title: "Is Archived",
231500
+ description: "Archived roles stay on the incidents people hold them on, but nobody can be given them again. The primary role can't be archived.",
231501
+ defaultValue: false,
231502
+ example: false
231503
+ }),
231504
+ Column({
231505
+ type: ColumnType_default.Boolean,
231506
+ nullable: false,
231507
+ default: false
231508
+ })
231509
+ ], IncidentRole.prototype, "isArchived", 2);
231510
+ __decorateClass([
231511
+ ColumnAccessControl_default({
231512
+ create: [],
231513
+ read: [
231514
+ Permission_default.ProjectOwner,
231515
+ Permission_default.ProjectAdmin,
231516
+ Permission_default.ProjectMember,
231517
+ Permission_default.Viewer,
231518
+ Permission_default.IncidentAdmin,
231519
+ Permission_default.IncidentMember,
231520
+ Permission_default.IncidentViewer,
231521
+ Permission_default.ReadIncidentRole
231522
+ ],
231523
+ update: []
231524
+ }),
231525
+ TableColumn_default({
231526
+ required: false,
231527
+ type: TableColumnType_default.Date,
231528
+ title: "Archived At",
231529
+ description: "When this incident role was archived. Empty while it is not archived."
231530
+ }),
231531
+ Column({
231532
+ type: ColumnType_default.Date,
231533
+ nullable: true
231534
+ })
231535
+ ], IncidentRole.prototype, "archivedAt", 2);
231536
+ __decorateClass([
231537
+ ColumnAccessControl_default({
231538
+ create: [],
231539
+ read: [
231540
+ Permission_default.ProjectOwner,
231541
+ Permission_default.ProjectAdmin,
231542
+ Permission_default.ProjectMember,
231543
+ Permission_default.Viewer,
231544
+ Permission_default.IncidentAdmin,
231545
+ Permission_default.IncidentMember,
231546
+ Permission_default.IncidentViewer,
231547
+ Permission_default.ReadIncidentRole
231548
+ ],
231549
+ update: []
231550
+ }),
231551
+ TableColumn_default({
231552
+ manyToOneRelationColumn: "archivedByUserId",
231553
+ type: TableColumnType_default.Entity,
231554
+ modelType: User_default,
231555
+ title: "Archived by User",
231556
+ description: "Relation to User who archived this object (if this object was archived by a User)"
231557
+ }),
231558
+ ManyToOne(
231559
+ () => {
231560
+ return User_default;
231561
+ },
231562
+ {
231563
+ eager: false,
231564
+ nullable: true,
231565
+ onDelete: "SET NULL",
231566
+ orphanedRowAction: "nullify"
231567
+ }
231568
+ ),
231569
+ JoinColumn({ name: "archivedByUserId" })
231570
+ ], IncidentRole.prototype, "archivedByUser", 2);
231571
+ __decorateClass([
231572
+ ColumnAccessControl_default({
231573
+ create: [],
231574
+ read: [
231575
+ Permission_default.ProjectOwner,
231576
+ Permission_default.ProjectAdmin,
231577
+ Permission_default.ProjectMember,
231578
+ Permission_default.Viewer,
231579
+ Permission_default.IncidentAdmin,
231580
+ Permission_default.IncidentMember,
231581
+ Permission_default.IncidentViewer,
231582
+ Permission_default.ReadIncidentRole
231583
+ ],
231584
+ update: []
231585
+ }),
231586
+ TableColumn_default({
231587
+ type: TableColumnType_default.ObjectID,
231588
+ title: "Archived by User ID",
231589
+ description: "User ID who archived this object (if this object was archived by a User)"
231590
+ }),
231591
+ Column({
231592
+ type: ColumnType_default.ObjectID,
231593
+ nullable: true,
231594
+ transformer: ObjectID.getDatabaseTransformer()
231595
+ })
231596
+ ], IncidentRole.prototype, "archivedByUserId", 2);
231719
231597
  IncidentRole = __decorateClass([
231720
231598
  TableBillingAccessControl_default({
231721
231599
  create: "Growth" /* Growth */,
@@ -231767,6 +231645,7 @@ IncidentRole = __decorateClass([
231767
231645
  update: true,
231768
231646
  read: true
231769
231647
  }),
231648
+ EnableAuditLog_default(),
231770
231649
  CrudApiEndpoint_default(new Route("/incident-role")),
231771
231650
  SlugifyColumn_default("name", "slug"),
231772
231651
  TableMetadata_default({
@@ -234397,6 +234276,10 @@ var IncidentState = class extends DatabaseBaseModel {
234397
234276
  this.isAcknowledgedState = void 0;
234398
234277
  this.isResolvedState = void 0;
234399
234278
  this.order = void 0;
234279
+ this.isArchived = void 0;
234280
+ this.archivedAt = void 0;
234281
+ this.archivedByUser = void 0;
234282
+ this.archivedByUserId = void 0;
234400
234283
  }
234401
234284
  };
234402
234285
  __name(IncidentState, "IncidentState");
@@ -234905,6 +234788,134 @@ __decorateClass([
234905
234788
  type: ColumnType_default.SmallNumber
234906
234789
  })
234907
234790
  ], IncidentState.prototype, "order", 2);
234791
+ __decorateClass([
234792
+ ColumnAccessControl_default({
234793
+ create: [
234794
+ Permission_default.ProjectOwner,
234795
+ Permission_default.ProjectAdmin,
234796
+ Permission_default.IncidentAdmin,
234797
+ Permission_default.CreateIncidentState
234798
+ ],
234799
+ read: [
234800
+ Permission_default.ProjectOwner,
234801
+ Permission_default.ProjectAdmin,
234802
+ Permission_default.ProjectMember,
234803
+ Permission_default.Viewer,
234804
+ Permission_default.IncidentAdmin,
234805
+ Permission_default.IncidentMember,
234806
+ Permission_default.IncidentViewer,
234807
+ Permission_default.ReadIncidentState
234808
+ ],
234809
+ update: [
234810
+ Permission_default.ProjectOwner,
234811
+ Permission_default.ProjectAdmin,
234812
+ Permission_default.IncidentAdmin,
234813
+ Permission_default.EditIncidentState
234814
+ ]
234815
+ }),
234816
+ TableColumn_default({
234817
+ isDefaultValueColumn: true,
234818
+ required: true,
234819
+ type: TableColumnType_default.Boolean,
234820
+ canReadOnRelationQuery: true,
234821
+ title: "Is Archived",
234822
+ description: "Archived states stay on the incidents and episodes that are in them, but can't be picked again. The created, acknowledged and resolved states can't be archived.",
234823
+ defaultValue: false,
234824
+ example: false
234825
+ }),
234826
+ Column({
234827
+ type: ColumnType_default.Boolean,
234828
+ nullable: false,
234829
+ default: false
234830
+ })
234831
+ ], IncidentState.prototype, "isArchived", 2);
234832
+ __decorateClass([
234833
+ ColumnAccessControl_default({
234834
+ create: [],
234835
+ read: [
234836
+ Permission_default.ProjectOwner,
234837
+ Permission_default.ProjectAdmin,
234838
+ Permission_default.ProjectMember,
234839
+ Permission_default.Viewer,
234840
+ Permission_default.IncidentAdmin,
234841
+ Permission_default.IncidentMember,
234842
+ Permission_default.IncidentViewer,
234843
+ Permission_default.ReadIncidentState
234844
+ ],
234845
+ update: []
234846
+ }),
234847
+ TableColumn_default({
234848
+ required: false,
234849
+ type: TableColumnType_default.Date,
234850
+ title: "Archived At",
234851
+ description: "When this incident state was archived. Empty while it is not archived."
234852
+ }),
234853
+ Column({
234854
+ type: ColumnType_default.Date,
234855
+ nullable: true
234856
+ })
234857
+ ], IncidentState.prototype, "archivedAt", 2);
234858
+ __decorateClass([
234859
+ ColumnAccessControl_default({
234860
+ create: [],
234861
+ read: [
234862
+ Permission_default.ProjectOwner,
234863
+ Permission_default.ProjectAdmin,
234864
+ Permission_default.ProjectMember,
234865
+ Permission_default.Viewer,
234866
+ Permission_default.IncidentAdmin,
234867
+ Permission_default.IncidentMember,
234868
+ Permission_default.IncidentViewer,
234869
+ Permission_default.ReadIncidentState
234870
+ ],
234871
+ update: []
234872
+ }),
234873
+ TableColumn_default({
234874
+ manyToOneRelationColumn: "archivedByUserId",
234875
+ type: TableColumnType_default.Entity,
234876
+ modelType: User_default,
234877
+ title: "Archived by User",
234878
+ description: "Relation to User who archived this object (if this object was archived by a User)"
234879
+ }),
234880
+ ManyToOne(
234881
+ () => {
234882
+ return User_default;
234883
+ },
234884
+ {
234885
+ eager: false,
234886
+ nullable: true,
234887
+ onDelete: "SET NULL",
234888
+ orphanedRowAction: "nullify"
234889
+ }
234890
+ ),
234891
+ JoinColumn({ name: "archivedByUserId" })
234892
+ ], IncidentState.prototype, "archivedByUser", 2);
234893
+ __decorateClass([
234894
+ ColumnAccessControl_default({
234895
+ create: [],
234896
+ read: [
234897
+ Permission_default.ProjectOwner,
234898
+ Permission_default.ProjectAdmin,
234899
+ Permission_default.ProjectMember,
234900
+ Permission_default.Viewer,
234901
+ Permission_default.IncidentAdmin,
234902
+ Permission_default.IncidentMember,
234903
+ Permission_default.IncidentViewer,
234904
+ Permission_default.ReadIncidentState
234905
+ ],
234906
+ update: []
234907
+ }),
234908
+ TableColumn_default({
234909
+ type: TableColumnType_default.ObjectID,
234910
+ title: "Archived by User ID",
234911
+ description: "User ID who archived this object (if this object was archived by a User)"
234912
+ }),
234913
+ Column({
234914
+ type: ColumnType_default.ObjectID,
234915
+ nullable: true,
234916
+ transformer: ObjectID.getDatabaseTransformer()
234917
+ })
234918
+ ], IncidentState.prototype, "archivedByUserId", 2);
234908
234919
  IncidentState = __decorateClass([
234909
234920
  TableBillingAccessControl_default({
234910
234921
  create: "Growth" /* Growth */,
@@ -234952,6 +234963,7 @@ IncidentState = __decorateClass([
234952
234963
  update: true,
234953
234964
  read: true
234954
234965
  }),
234966
+ EnableAuditLog_default(),
234955
234967
  CrudApiEndpoint_default(new Route("/incident-state")),
234956
234968
  SlugifyColumn_default("name", "slug"),
234957
234969
  TableMetadata_default({
@@ -236756,6 +236768,728 @@ IncidentEpisode = __decorateClass([
236756
236768
  })
236757
236769
  ], IncidentEpisode);
236758
236770
 
236771
+ // ../Common/Models/DatabaseModels/IncidentPostmortemStatus.ts
236772
+ var IncidentPostmortemStatus = class extends DatabaseBaseModel {
236773
+ constructor() {
236774
+ super(...arguments);
236775
+ this.project = void 0;
236776
+ this.projectId = void 0;
236777
+ this.name = void 0;
236778
+ this.slug = void 0;
236779
+ this.description = void 0;
236780
+ this.createdByUser = void 0;
236781
+ this.createdByUserId = void 0;
236782
+ this.deletedByUser = void 0;
236783
+ this.deletedByUserId = void 0;
236784
+ this.color = void 0;
236785
+ this.isNotStartedStatus = void 0;
236786
+ this.isDraftStatus = void 0;
236787
+ this.isCompletedStatus = void 0;
236788
+ this.order = void 0;
236789
+ this.isArchived = void 0;
236790
+ this.archivedAt = void 0;
236791
+ this.archivedByUser = void 0;
236792
+ this.archivedByUserId = void 0;
236793
+ }
236794
+ };
236795
+ __name(IncidentPostmortemStatus, "IncidentPostmortemStatus");
236796
+ __decorateClass([
236797
+ ColumnAccessControl_default({
236798
+ create: [
236799
+ Permission_default.ProjectOwner,
236800
+ Permission_default.ProjectAdmin,
236801
+ Permission_default.IncidentAdmin,
236802
+ Permission_default.CreateIncidentPostmortemStatus
236803
+ ],
236804
+ read: [
236805
+ Permission_default.ProjectOwner,
236806
+ Permission_default.ProjectAdmin,
236807
+ Permission_default.ProjectMember,
236808
+ Permission_default.Viewer,
236809
+ Permission_default.IncidentAdmin,
236810
+ Permission_default.IncidentMember,
236811
+ Permission_default.IncidentViewer,
236812
+ Permission_default.ReadIncidentPostmortemStatus
236813
+ ],
236814
+ update: []
236815
+ }),
236816
+ TableColumn_default({
236817
+ manyToOneRelationColumn: "projectId",
236818
+ type: TableColumnType_default.Entity,
236819
+ modelType: Project,
236820
+ title: "Project",
236821
+ description: "Relation to Project Resource in which this object belongs"
236822
+ }),
236823
+ ManyToOne(
236824
+ () => {
236825
+ return Project;
236826
+ },
236827
+ {
236828
+ eager: false,
236829
+ nullable: true,
236830
+ onDelete: "CASCADE",
236831
+ orphanedRowAction: "nullify"
236832
+ }
236833
+ ),
236834
+ JoinColumn({ name: "projectId" })
236835
+ ], IncidentPostmortemStatus.prototype, "project", 2);
236836
+ __decorateClass([
236837
+ ColumnAccessControl_default({
236838
+ create: [
236839
+ Permission_default.ProjectOwner,
236840
+ Permission_default.ProjectAdmin,
236841
+ Permission_default.IncidentAdmin,
236842
+ Permission_default.CreateIncidentPostmortemStatus
236843
+ ],
236844
+ read: [
236845
+ Permission_default.ProjectOwner,
236846
+ Permission_default.ProjectAdmin,
236847
+ Permission_default.ProjectMember,
236848
+ Permission_default.Viewer,
236849
+ Permission_default.IncidentAdmin,
236850
+ Permission_default.IncidentMember,
236851
+ Permission_default.IncidentViewer,
236852
+ Permission_default.ReadIncidentPostmortemStatus
236853
+ ],
236854
+ update: []
236855
+ }),
236856
+ Index(),
236857
+ TableColumn_default({
236858
+ type: TableColumnType_default.ObjectID,
236859
+ required: true,
236860
+ canReadOnRelationQuery: true,
236861
+ title: "Project ID",
236862
+ description: "ID of your OneUptime Project in which this object belongs",
236863
+ example: "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
236864
+ }),
236865
+ Column({
236866
+ type: ColumnType_default.ObjectID,
236867
+ nullable: false,
236868
+ transformer: ObjectID.getDatabaseTransformer()
236869
+ })
236870
+ ], IncidentPostmortemStatus.prototype, "projectId", 2);
236871
+ __decorateClass([
236872
+ ColumnAccessControl_default({
236873
+ create: [
236874
+ Permission_default.ProjectOwner,
236875
+ Permission_default.ProjectAdmin,
236876
+ Permission_default.IncidentAdmin,
236877
+ Permission_default.CreateIncidentPostmortemStatus
236878
+ ],
236879
+ read: [
236880
+ Permission_default.ProjectOwner,
236881
+ Permission_default.ProjectAdmin,
236882
+ Permission_default.ProjectMember,
236883
+ Permission_default.Viewer,
236884
+ Permission_default.IncidentAdmin,
236885
+ Permission_default.IncidentMember,
236886
+ Permission_default.IncidentViewer,
236887
+ Permission_default.ReadIncidentPostmortemStatus
236888
+ ],
236889
+ update: [
236890
+ Permission_default.ProjectOwner,
236891
+ Permission_default.ProjectAdmin,
236892
+ Permission_default.IncidentAdmin,
236893
+ Permission_default.EditIncidentPostmortemStatus
236894
+ ]
236895
+ }),
236896
+ TableColumn_default({
236897
+ required: true,
236898
+ type: TableColumnType_default.ShortText,
236899
+ canReadOnRelationQuery: true,
236900
+ title: "Name",
236901
+ description: "Any friendly name of this object",
236902
+ example: "In Review"
236903
+ }),
236904
+ Column({
236905
+ nullable: false,
236906
+ type: ColumnType_default.ShortText,
236907
+ length: ColumnLength_default.ShortText
236908
+ }),
236909
+ UniqueColumnBy_default("projectId")
236910
+ ], IncidentPostmortemStatus.prototype, "name", 2);
236911
+ __decorateClass([
236912
+ ColumnAccessControl_default({
236913
+ create: [],
236914
+ read: [
236915
+ Permission_default.ProjectOwner,
236916
+ Permission_default.ProjectAdmin,
236917
+ Permission_default.ProjectMember,
236918
+ Permission_default.Viewer,
236919
+ Permission_default.IncidentAdmin,
236920
+ Permission_default.IncidentMember,
236921
+ Permission_default.IncidentViewer,
236922
+ Permission_default.ReadIncidentPostmortemStatus
236923
+ ],
236924
+ update: []
236925
+ }),
236926
+ TableColumn_default({
236927
+ required: true,
236928
+ unique: true,
236929
+ type: TableColumnType_default.Slug,
236930
+ computed: true,
236931
+ title: "Slug",
236932
+ description: "Friendly globally unique name for your object"
236933
+ }),
236934
+ Column({
236935
+ nullable: false,
236936
+ type: ColumnType_default.Slug,
236937
+ length: ColumnLength_default.Slug
236938
+ })
236939
+ ], IncidentPostmortemStatus.prototype, "slug", 2);
236940
+ __decorateClass([
236941
+ ColumnAccessControl_default({
236942
+ create: [
236943
+ Permission_default.ProjectOwner,
236944
+ Permission_default.ProjectAdmin,
236945
+ Permission_default.IncidentAdmin,
236946
+ Permission_default.CreateIncidentPostmortemStatus
236947
+ ],
236948
+ read: [
236949
+ Permission_default.ProjectOwner,
236950
+ Permission_default.ProjectAdmin,
236951
+ Permission_default.ProjectMember,
236952
+ Permission_default.Viewer,
236953
+ Permission_default.IncidentAdmin,
236954
+ Permission_default.IncidentMember,
236955
+ Permission_default.IncidentViewer,
236956
+ Permission_default.ReadIncidentPostmortemStatus
236957
+ ],
236958
+ update: [
236959
+ Permission_default.ProjectOwner,
236960
+ Permission_default.ProjectAdmin,
236961
+ Permission_default.IncidentAdmin,
236962
+ Permission_default.EditIncidentPostmortemStatus
236963
+ ]
236964
+ }),
236965
+ TableColumn_default({
236966
+ required: false,
236967
+ type: TableColumnType_default.LongText,
236968
+ title: "Description",
236969
+ description: "Friendly description that will help you remember",
236970
+ example: "The postmortem is written and waiting for the team's review."
236971
+ }),
236972
+ Column({
236973
+ nullable: true,
236974
+ type: ColumnType_default.LongText,
236975
+ length: ColumnLength_default.LongText
236976
+ })
236977
+ ], IncidentPostmortemStatus.prototype, "description", 2);
236978
+ __decorateClass([
236979
+ ColumnAccessControl_default({
236980
+ create: [
236981
+ Permission_default.ProjectOwner,
236982
+ Permission_default.ProjectAdmin,
236983
+ Permission_default.IncidentAdmin,
236984
+ Permission_default.CreateIncidentPostmortemStatus
236985
+ ],
236986
+ read: [
236987
+ Permission_default.ProjectOwner,
236988
+ Permission_default.ProjectAdmin,
236989
+ Permission_default.ProjectMember,
236990
+ Permission_default.Viewer,
236991
+ Permission_default.IncidentAdmin,
236992
+ Permission_default.IncidentMember,
236993
+ Permission_default.IncidentViewer,
236994
+ Permission_default.ReadIncidentPostmortemStatus
236995
+ ],
236996
+ update: []
236997
+ }),
236998
+ TableColumn_default({
236999
+ manyToOneRelationColumn: "createdByUserId",
237000
+ type: TableColumnType_default.Entity,
237001
+ modelType: User_default,
237002
+ title: "Created by User",
237003
+ description: "Relation to User who created this object (if this object was created by a User)"
237004
+ }),
237005
+ ManyToOne(
237006
+ () => {
237007
+ return User_default;
237008
+ },
237009
+ {
237010
+ eager: false,
237011
+ nullable: true,
237012
+ onDelete: "SET NULL",
237013
+ orphanedRowAction: "nullify"
237014
+ }
237015
+ ),
237016
+ JoinColumn({ name: "createdByUserId" })
237017
+ ], IncidentPostmortemStatus.prototype, "createdByUser", 2);
237018
+ __decorateClass([
237019
+ ColumnAccessControl_default({
237020
+ create: [
237021
+ Permission_default.ProjectOwner,
237022
+ Permission_default.ProjectAdmin,
237023
+ Permission_default.IncidentAdmin,
237024
+ Permission_default.CreateIncidentPostmortemStatus
237025
+ ],
237026
+ read: [
237027
+ Permission_default.ProjectOwner,
237028
+ Permission_default.ProjectAdmin,
237029
+ Permission_default.ProjectMember,
237030
+ Permission_default.Viewer,
237031
+ Permission_default.IncidentAdmin,
237032
+ Permission_default.IncidentMember,
237033
+ Permission_default.IncidentViewer,
237034
+ Permission_default.ReadIncidentPostmortemStatus
237035
+ ],
237036
+ update: []
237037
+ }),
237038
+ TableColumn_default({
237039
+ type: TableColumnType_default.ObjectID,
237040
+ title: "Created by User ID",
237041
+ description: "User ID who created this object (if this object was created by a User)"
237042
+ }),
237043
+ Column({
237044
+ type: ColumnType_default.ObjectID,
237045
+ nullable: true,
237046
+ transformer: ObjectID.getDatabaseTransformer()
237047
+ })
237048
+ ], IncidentPostmortemStatus.prototype, "createdByUserId", 2);
237049
+ __decorateClass([
237050
+ ColumnAccessControl_default({
237051
+ create: [],
237052
+ read: [
237053
+ Permission_default.ProjectOwner,
237054
+ Permission_default.ProjectAdmin,
237055
+ Permission_default.ProjectMember,
237056
+ Permission_default.Viewer,
237057
+ Permission_default.IncidentAdmin,
237058
+ Permission_default.IncidentMember,
237059
+ Permission_default.IncidentViewer,
237060
+ Permission_default.ReadIncidentPostmortemStatus
237061
+ ],
237062
+ update: []
237063
+ }),
237064
+ TableColumn_default({
237065
+ manyToOneRelationColumn: "deletedByUserId",
237066
+ type: TableColumnType_default.Entity,
237067
+ title: "Deleted by User",
237068
+ modelType: User_default,
237069
+ description: "Relation to User who deleted this object (if this object was deleted by a User)"
237070
+ }),
237071
+ ManyToOne(
237072
+ () => {
237073
+ return User_default;
237074
+ },
237075
+ {
237076
+ cascade: false,
237077
+ eager: false,
237078
+ nullable: true,
237079
+ onDelete: "SET NULL",
237080
+ orphanedRowAction: "nullify"
237081
+ }
237082
+ ),
237083
+ JoinColumn({ name: "deletedByUserId" })
237084
+ ], IncidentPostmortemStatus.prototype, "deletedByUser", 2);
237085
+ __decorateClass([
237086
+ ColumnAccessControl_default({
237087
+ create: [],
237088
+ read: [
237089
+ Permission_default.ProjectOwner,
237090
+ Permission_default.ProjectAdmin,
237091
+ Permission_default.ProjectMember,
237092
+ Permission_default.Viewer,
237093
+ Permission_default.IncidentAdmin,
237094
+ Permission_default.IncidentMember,
237095
+ Permission_default.IncidentViewer,
237096
+ Permission_default.ReadIncidentPostmortemStatus
237097
+ ],
237098
+ update: []
237099
+ }),
237100
+ TableColumn_default({
237101
+ type: TableColumnType_default.ObjectID,
237102
+ title: "Deleted by User ID",
237103
+ description: "User ID who deleted this object (if this object was deleted by a User)"
237104
+ }),
237105
+ Column({
237106
+ type: ColumnType_default.ObjectID,
237107
+ nullable: true,
237108
+ transformer: ObjectID.getDatabaseTransformer()
237109
+ })
237110
+ ], IncidentPostmortemStatus.prototype, "deletedByUserId", 2);
237111
+ __decorateClass([
237112
+ ColumnAccessControl_default({
237113
+ create: [
237114
+ Permission_default.ProjectOwner,
237115
+ Permission_default.ProjectAdmin,
237116
+ Permission_default.IncidentAdmin,
237117
+ Permission_default.CreateIncidentPostmortemStatus
237118
+ ],
237119
+ read: [
237120
+ Permission_default.ProjectOwner,
237121
+ Permission_default.ProjectAdmin,
237122
+ Permission_default.ProjectMember,
237123
+ Permission_default.Viewer,
237124
+ Permission_default.IncidentAdmin,
237125
+ Permission_default.IncidentMember,
237126
+ Permission_default.IncidentViewer,
237127
+ Permission_default.ReadIncidentPostmortemStatus
237128
+ ],
237129
+ update: [
237130
+ Permission_default.ProjectOwner,
237131
+ Permission_default.ProjectAdmin,
237132
+ Permission_default.IncidentAdmin,
237133
+ Permission_default.EditIncidentPostmortemStatus
237134
+ ]
237135
+ }),
237136
+ ColorField_default(),
237137
+ TableColumn_default({
237138
+ title: "Color",
237139
+ required: true,
237140
+ unique: false,
237141
+ type: TableColumnType_default.Color,
237142
+ canReadOnRelationQuery: true,
237143
+ description: "Color of this resource in Hex (#32a852 for example)"
237144
+ }),
237145
+ Column({
237146
+ type: ColumnType_default.Color,
237147
+ length: ColumnLength_default.Color,
237148
+ unique: false,
237149
+ nullable: false,
237150
+ transformer: Color.getDatabaseTransformer()
237151
+ })
237152
+ ], IncidentPostmortemStatus.prototype, "color", 2);
237153
+ __decorateClass([
237154
+ ColumnAccessControl_default({
237155
+ create: [
237156
+ Permission_default.ProjectOwner,
237157
+ Permission_default.ProjectAdmin,
237158
+ Permission_default.IncidentAdmin,
237159
+ Permission_default.CreateIncidentPostmortemStatus
237160
+ ],
237161
+ read: [
237162
+ Permission_default.ProjectOwner,
237163
+ Permission_default.ProjectAdmin,
237164
+ Permission_default.ProjectMember,
237165
+ Permission_default.Viewer,
237166
+ Permission_default.IncidentAdmin,
237167
+ Permission_default.IncidentMember,
237168
+ Permission_default.IncidentViewer,
237169
+ Permission_default.ReadIncidentPostmortemStatus
237170
+ ],
237171
+ update: [
237172
+ Permission_default.ProjectOwner,
237173
+ Permission_default.ProjectAdmin,
237174
+ Permission_default.IncidentAdmin,
237175
+ Permission_default.EditIncidentPostmortemStatus
237176
+ ]
237177
+ }),
237178
+ TableColumn_default({
237179
+ isDefaultValueColumn: false,
237180
+ type: TableColumnType_default.Boolean,
237181
+ canReadOnRelationQuery: true,
237182
+ title: "Is Not Started Status",
237183
+ description: "Is it the status a new incident's postmortem starts in? A project has one, and it can't be deleted or archived."
237184
+ }),
237185
+ Column({
237186
+ type: ColumnType_default.Boolean,
237187
+ default: false
237188
+ })
237189
+ ], IncidentPostmortemStatus.prototype, "isNotStartedStatus", 2);
237190
+ __decorateClass([
237191
+ ColumnAccessControl_default({
237192
+ create: [
237193
+ Permission_default.ProjectOwner,
237194
+ Permission_default.ProjectAdmin,
237195
+ Permission_default.IncidentAdmin,
237196
+ Permission_default.CreateIncidentPostmortemStatus
237197
+ ],
237198
+ read: [
237199
+ Permission_default.ProjectOwner,
237200
+ Permission_default.ProjectAdmin,
237201
+ Permission_default.ProjectMember,
237202
+ Permission_default.Viewer,
237203
+ Permission_default.IncidentAdmin,
237204
+ Permission_default.IncidentMember,
237205
+ Permission_default.IncidentViewer,
237206
+ Permission_default.ReadIncidentPostmortemStatus
237207
+ ],
237208
+ update: [
237209
+ Permission_default.ProjectOwner,
237210
+ Permission_default.ProjectAdmin,
237211
+ Permission_default.IncidentAdmin,
237212
+ Permission_default.EditIncidentPostmortemStatus
237213
+ ]
237214
+ }),
237215
+ TableColumn_default({
237216
+ isDefaultValueColumn: false,
237217
+ type: TableColumnType_default.Boolean,
237218
+ canReadOnRelationQuery: true,
237219
+ title: "Is Draft Status",
237220
+ description: "Is it the status a postmortem moves to once its note is written? A project has one, and it can't be deleted or archived."
237221
+ }),
237222
+ Column({
237223
+ type: ColumnType_default.Boolean,
237224
+ default: false
237225
+ })
237226
+ ], IncidentPostmortemStatus.prototype, "isDraftStatus", 2);
237227
+ __decorateClass([
237228
+ ColumnAccessControl_default({
237229
+ create: [
237230
+ Permission_default.ProjectOwner,
237231
+ Permission_default.ProjectAdmin,
237232
+ Permission_default.IncidentAdmin,
237233
+ Permission_default.CreateIncidentPostmortemStatus
237234
+ ],
237235
+ read: [
237236
+ Permission_default.ProjectOwner,
237237
+ Permission_default.ProjectAdmin,
237238
+ Permission_default.ProjectMember,
237239
+ Permission_default.Viewer,
237240
+ Permission_default.IncidentAdmin,
237241
+ Permission_default.IncidentMember,
237242
+ Permission_default.IncidentViewer,
237243
+ Permission_default.ReadIncidentPostmortemStatus
237244
+ ],
237245
+ update: [
237246
+ Permission_default.ProjectOwner,
237247
+ Permission_default.ProjectAdmin,
237248
+ Permission_default.IncidentAdmin,
237249
+ Permission_default.EditIncidentPostmortemStatus
237250
+ ]
237251
+ }),
237252
+ TableColumn_default({
237253
+ isDefaultValueColumn: false,
237254
+ type: TableColumnType_default.Boolean,
237255
+ canReadOnRelationQuery: true,
237256
+ title: "Is Completed Status",
237257
+ description: "Is it the status a postmortem moves to once it is published on a status page? A postmortem in this status, or in one below it, counts as done. A project has one, and it can't be deleted or archived."
237258
+ }),
237259
+ Column({
237260
+ type: ColumnType_default.Boolean,
237261
+ default: false
237262
+ })
237263
+ ], IncidentPostmortemStatus.prototype, "isCompletedStatus", 2);
237264
+ __decorateClass([
237265
+ ColumnAccessControl_default({
237266
+ create: [
237267
+ Permission_default.ProjectOwner,
237268
+ Permission_default.ProjectAdmin,
237269
+ Permission_default.IncidentAdmin,
237270
+ Permission_default.CreateIncidentPostmortemStatus
237271
+ ],
237272
+ read: [
237273
+ Permission_default.ProjectOwner,
237274
+ Permission_default.ProjectAdmin,
237275
+ Permission_default.ProjectMember,
237276
+ Permission_default.Viewer,
237277
+ Permission_default.IncidentAdmin,
237278
+ Permission_default.IncidentMember,
237279
+ Permission_default.IncidentViewer,
237280
+ Permission_default.ReadIncidentPostmortemStatus
237281
+ ],
237282
+ update: [
237283
+ Permission_default.ProjectOwner,
237284
+ Permission_default.ProjectAdmin,
237285
+ Permission_default.IncidentAdmin,
237286
+ Permission_default.EditIncidentPostmortemStatus
237287
+ ]
237288
+ }),
237289
+ TableColumn_default({
237290
+ isDefaultValueColumn: false,
237291
+ type: TableColumnType_default.SmallNumber,
237292
+ canReadOnRelationQuery: true,
237293
+ title: "Order",
237294
+ required: false,
237295
+ description: "Where this status sits in the project's list of postmortem statuses: 1 is the top. A postmortem in the completed status, or in a status below it, counts as done; one above it is still owed. So the not started, draft and completed statuses have to stay in that order. A new status without a number goes just above the completed status. Setting a number moves the status to that place, and the ones in between shift by one. In the dashboard, drag the rows to reorder them."
237296
+ }),
237297
+ Column({
237298
+ type: ColumnType_default.SmallNumber
237299
+ })
237300
+ ], IncidentPostmortemStatus.prototype, "order", 2);
237301
+ __decorateClass([
237302
+ ColumnAccessControl_default({
237303
+ create: [
237304
+ Permission_default.ProjectOwner,
237305
+ Permission_default.ProjectAdmin,
237306
+ Permission_default.IncidentAdmin,
237307
+ Permission_default.CreateIncidentPostmortemStatus
237308
+ ],
237309
+ read: [
237310
+ Permission_default.ProjectOwner,
237311
+ Permission_default.ProjectAdmin,
237312
+ Permission_default.ProjectMember,
237313
+ Permission_default.Viewer,
237314
+ Permission_default.IncidentAdmin,
237315
+ Permission_default.IncidentMember,
237316
+ Permission_default.IncidentViewer,
237317
+ Permission_default.ReadIncidentPostmortemStatus
237318
+ ],
237319
+ update: [
237320
+ Permission_default.ProjectOwner,
237321
+ Permission_default.ProjectAdmin,
237322
+ Permission_default.IncidentAdmin,
237323
+ Permission_default.EditIncidentPostmortemStatus
237324
+ ]
237325
+ }),
237326
+ TableColumn_default({
237327
+ isDefaultValueColumn: true,
237328
+ required: true,
237329
+ type: TableColumnType_default.Boolean,
237330
+ canReadOnRelationQuery: true,
237331
+ title: "Is Archived",
237332
+ description: "Archived statuses stay on the incidents whose postmortems are in them, but can't be picked again. The not started, draft and completed statuses can't be archived.",
237333
+ defaultValue: false,
237334
+ example: false
237335
+ }),
237336
+ Column({
237337
+ type: ColumnType_default.Boolean,
237338
+ nullable: false,
237339
+ default: false
237340
+ })
237341
+ ], IncidentPostmortemStatus.prototype, "isArchived", 2);
237342
+ __decorateClass([
237343
+ ColumnAccessControl_default({
237344
+ create: [],
237345
+ read: [
237346
+ Permission_default.ProjectOwner,
237347
+ Permission_default.ProjectAdmin,
237348
+ Permission_default.ProjectMember,
237349
+ Permission_default.Viewer,
237350
+ Permission_default.IncidentAdmin,
237351
+ Permission_default.IncidentMember,
237352
+ Permission_default.IncidentViewer,
237353
+ Permission_default.ReadIncidentPostmortemStatus
237354
+ ],
237355
+ update: []
237356
+ }),
237357
+ TableColumn_default({
237358
+ required: false,
237359
+ type: TableColumnType_default.Date,
237360
+ title: "Archived At",
237361
+ description: "When this postmortem status was archived. Empty while it is not archived."
237362
+ }),
237363
+ Column({
237364
+ type: ColumnType_default.Date,
237365
+ nullable: true
237366
+ })
237367
+ ], IncidentPostmortemStatus.prototype, "archivedAt", 2);
237368
+ __decorateClass([
237369
+ ColumnAccessControl_default({
237370
+ create: [],
237371
+ read: [
237372
+ Permission_default.ProjectOwner,
237373
+ Permission_default.ProjectAdmin,
237374
+ Permission_default.ProjectMember,
237375
+ Permission_default.Viewer,
237376
+ Permission_default.IncidentAdmin,
237377
+ Permission_default.IncidentMember,
237378
+ Permission_default.IncidentViewer,
237379
+ Permission_default.ReadIncidentPostmortemStatus
237380
+ ],
237381
+ update: []
237382
+ }),
237383
+ TableColumn_default({
237384
+ manyToOneRelationColumn: "archivedByUserId",
237385
+ type: TableColumnType_default.Entity,
237386
+ modelType: User_default,
237387
+ title: "Archived by User",
237388
+ description: "Relation to User who archived this object (if this object was archived by a User)"
237389
+ }),
237390
+ ManyToOne(
237391
+ () => {
237392
+ return User_default;
237393
+ },
237394
+ {
237395
+ eager: false,
237396
+ nullable: true,
237397
+ onDelete: "SET NULL",
237398
+ orphanedRowAction: "nullify"
237399
+ }
237400
+ ),
237401
+ JoinColumn({ name: "archivedByUserId" })
237402
+ ], IncidentPostmortemStatus.prototype, "archivedByUser", 2);
237403
+ __decorateClass([
237404
+ ColumnAccessControl_default({
237405
+ create: [],
237406
+ read: [
237407
+ Permission_default.ProjectOwner,
237408
+ Permission_default.ProjectAdmin,
237409
+ Permission_default.ProjectMember,
237410
+ Permission_default.Viewer,
237411
+ Permission_default.IncidentAdmin,
237412
+ Permission_default.IncidentMember,
237413
+ Permission_default.IncidentViewer,
237414
+ Permission_default.ReadIncidentPostmortemStatus
237415
+ ],
237416
+ update: []
237417
+ }),
237418
+ TableColumn_default({
237419
+ type: TableColumnType_default.ObjectID,
237420
+ title: "Archived by User ID",
237421
+ description: "User ID who archived this object (if this object was archived by a User)"
237422
+ }),
237423
+ Column({
237424
+ type: ColumnType_default.ObjectID,
237425
+ nullable: true,
237426
+ transformer: ObjectID.getDatabaseTransformer()
237427
+ })
237428
+ ], IncidentPostmortemStatus.prototype, "archivedByUserId", 2);
237429
+ IncidentPostmortemStatus = __decorateClass([
237430
+ TableBillingAccessControl_default({
237431
+ create: "Growth" /* Growth */,
237432
+ read: "Free" /* Free */,
237433
+ update: "Growth" /* Growth */,
237434
+ delete: "Free" /* Free */
237435
+ }),
237436
+ EnableDocumentation_default(),
237437
+ EnableMCP_default(),
237438
+ TenantColumn_default("projectId"),
237439
+ ListOrderColumn_default({ column: "order", scopeColumns: ["projectId"] }),
237440
+ TableAccessControl_default({
237441
+ create: [
237442
+ Permission_default.ProjectOwner,
237443
+ Permission_default.ProjectAdmin,
237444
+ Permission_default.IncidentAdmin,
237445
+ Permission_default.CreateIncidentPostmortemStatus
237446
+ ],
237447
+ read: [
237448
+ Permission_default.ProjectOwner,
237449
+ Permission_default.ProjectAdmin,
237450
+ Permission_default.ProjectMember,
237451
+ Permission_default.Viewer,
237452
+ Permission_default.IncidentAdmin,
237453
+ Permission_default.IncidentMember,
237454
+ Permission_default.IncidentViewer,
237455
+ Permission_default.ReadIncidentPostmortemStatus
237456
+ ],
237457
+ delete: [
237458
+ Permission_default.ProjectOwner,
237459
+ Permission_default.ProjectAdmin,
237460
+ Permission_default.IncidentAdmin,
237461
+ Permission_default.DeleteIncidentPostmortemStatus
237462
+ ],
237463
+ update: [
237464
+ Permission_default.ProjectOwner,
237465
+ Permission_default.ProjectAdmin,
237466
+ Permission_default.IncidentAdmin,
237467
+ Permission_default.EditIncidentPostmortemStatus
237468
+ ]
237469
+ }),
237470
+ EnableWorkflow_default({
237471
+ create: true,
237472
+ delete: true,
237473
+ update: true,
237474
+ read: true
237475
+ }),
237476
+ EnableAuditLog_default(),
237477
+ CrudApiEndpoint_default(new Route("/incident-postmortem-status")),
237478
+ SlugifyColumn_default("name", "slug"),
237479
+ TableMetadata_default({
237480
+ tableName: "IncidentPostmortemStatus",
237481
+ singularName: "Postmortem Status",
237482
+ pluralName: "Postmortem Statuses",
237483
+ icon: IconProp_default.ClipboardDocumentCheck,
237484
+ tableDescription: "Manage the statuses an incident's postmortem moves through (Not Started, Draft, Completed for example). Add, edit, reorder or archive them."
237485
+ }),
237486
+ Entity({
237487
+ name: "IncidentPostmortemStatus"
237488
+ }),
237489
+ Index(["projectId", "isNotStartedStatus"]),
237490
+ Index(["projectId", "order"])
237491
+ ], IncidentPostmortemStatus);
237492
+
236759
237493
  // ../Common/Types/ServiceLevelObjective/SliType.ts
236760
237494
  var SliType = /* @__PURE__ */ ((SliType2) => {
236761
237495
  SliType2["MonitorUptime"] = "Monitor Uptime";
@@ -239324,6 +240058,7 @@ __decorateClass([
239324
240058
  title: "Transport",
239325
240059
  description: "How OneUptime delivers mail for this config. 'SMTP' uses the hostname/port. 'Microsoft Graph' sends via the Microsoft Graph REST API \u2014 use this when your Microsoft 365 tenant has SMTP AUTH disabled.",
239326
240060
  defaultValue: MailTransportType_default.SMTP,
240061
+ isDefaultValueColumn: true,
239327
240062
  example: "SMTP"
239328
240063
  }),
239329
240064
  Column({
@@ -239362,6 +240097,7 @@ __decorateClass([
239362
240097
  title: "Authentication Type",
239363
240098
  description: "The type of authentication to use for this SMTP server. Options: Username and Password, OAuth, or None.",
239364
240099
  defaultValue: SMTPAuthenticationType_default.UsernamePassword,
240100
+ isDefaultValueColumn: true,
239365
240101
  example: "Username and Password"
239366
240102
  }),
239367
240103
  Column({
@@ -243698,6 +244434,8 @@ var Incident = class extends DatabaseBaseModel {
243698
244434
  this.notifySubscribersOnPostmortemPublished = void 0;
243699
244435
  this.postmortemPostedAt = void 0;
243700
244436
  this.postmortemAttachments = void 0;
244437
+ this.postmortemStatus = void 0;
244438
+ this.postmortemStatusId = void 0;
243701
244439
  this.createdStateLog = void 0;
243702
244440
  this.createdCriteriaId = void 0;
243703
244441
  this.createdIncidentTemplateId = void 0;
@@ -245783,69 +246521,151 @@ __decorateClass([
245783
246521
  ]
245784
246522
  }),
245785
246523
  TableColumn_default({
245786
- isDefaultValueColumn: false,
246524
+ isDefaultValueColumn: false,
246525
+ required: false,
246526
+ type: TableColumnType_default.JSON,
246527
+ title: "Custom Fields",
246528
+ description: "The incident's custom field values, keyed by each incident custom field's name. When a user or an API key creates or updates an incident, each value it sets or changes must fit its field - a number for a Number field, true or false for a Boolean, one of the options for a Dropdown, and so on - or the request is refused. Values left as they were, keys that are not the name of a field and empty values are not checked. Required on Create is not enforced here: it applies to the dashboard's Declare Incident form only."
246529
+ }),
246530
+ Column({
246531
+ type: ColumnType_default.JSON,
246532
+ nullable: true
246533
+ })
246534
+ ], Incident.prototype, "customFields", 2);
246535
+ __decorateClass([
246536
+ ColumnAccessControl_default({ create: [], read: [], update: [] }),
246537
+ TableColumn_default({
246538
+ required: false,
246539
+ type: TableColumnType_default.JSON,
246540
+ title: "AI Investigation Decision",
246541
+ description: "Internal: the reason automatic AI investigation did not start when this record was created."
246542
+ }),
246543
+ Column({ type: ColumnType_default.JSON, nullable: true })
246544
+ ], Incident.prototype, "aiInvestigationDecision", 2);
246545
+ __decorateClass([
246546
+ ColumnAccessControl_default({ create: [], read: [], update: [] }),
246547
+ TableColumn_default({
246548
+ required: false,
246549
+ type: TableColumnType_default.Date,
246550
+ title: "AI Investigation Waits Until",
246551
+ description: "Internal: while an investigation rule makes OneUptime AI wait before it investigates this record, when the wait ends."
246552
+ }),
246553
+ Column({ type: ColumnType_default.Date, nullable: true })
246554
+ ], Incident.prototype, "aiInvestigationWaitUntil", 2);
246555
+ __decorateClass([
246556
+ ColumnAccessControl_default({
246557
+ create: [],
246558
+ read: [
246559
+ Permission_default.ProjectOwner,
246560
+ Permission_default.ProjectAdmin,
246561
+ Permission_default.ProjectMember,
246562
+ Permission_default.Viewer,
246563
+ Permission_default.IncidentAdmin,
246564
+ Permission_default.IncidentMember,
246565
+ Permission_default.IncidentViewer,
246566
+ Permission_default.ReadProjectIncident
246567
+ ],
246568
+ update: []
246569
+ }),
246570
+ Index(),
246571
+ TableColumn_default({
246572
+ type: TableColumnType_default.Boolean,
246573
+ computed: true,
246574
+ hideColumnInDocumentation: true,
246575
+ required: true,
246576
+ isDefaultValueColumn: true,
246577
+ title: "Are Owners Notified Of Resource Creation?",
246578
+ description: "Are owners notified of when this resource is created?",
246579
+ defaultValue: false
246580
+ }),
246581
+ Column({
246582
+ type: ColumnType_default.Boolean,
246583
+ nullable: false,
246584
+ default: false
246585
+ })
246586
+ ], Incident.prototype, "isOwnerNotifiedOfResourceCreation", 2);
246587
+ __decorateClass([
246588
+ ColumnAccessControl_default({
246589
+ create: [
246590
+ Permission_default.ProjectOwner,
246591
+ Permission_default.ProjectAdmin,
246592
+ Permission_default.ProjectMember,
246593
+ Permission_default.IncidentAdmin,
246594
+ Permission_default.IncidentMember,
246595
+ Permission_default.CreateProjectIncident
246596
+ ],
246597
+ read: [
246598
+ Permission_default.ProjectOwner,
246599
+ Permission_default.ProjectAdmin,
246600
+ Permission_default.ProjectMember,
246601
+ Permission_default.Viewer,
246602
+ Permission_default.IncidentAdmin,
246603
+ Permission_default.IncidentMember,
246604
+ Permission_default.IncidentViewer,
246605
+ Permission_default.ReadProjectIncident
246606
+ ],
246607
+ update: [
246608
+ Permission_default.ProjectOwner,
246609
+ Permission_default.ProjectAdmin,
246610
+ Permission_default.ProjectMember,
246611
+ Permission_default.IncidentAdmin,
246612
+ Permission_default.IncidentMember,
246613
+ Permission_default.EditProjectIncident
246614
+ ]
246615
+ }),
246616
+ TableColumn_default({
246617
+ type: TableColumnType_default.Markdown,
246618
+ required: false,
246619
+ isDefaultValueColumn: false,
246620
+ title: "Root Cause",
246621
+ description: "What is the root cause of this incident?"
246622
+ }),
246623
+ Column({
246624
+ type: ColumnType_default.Markdown,
246625
+ nullable: true
246626
+ })
246627
+ ], Incident.prototype, "rootCause", 2);
246628
+ __decorateClass([
246629
+ ColumnAccessControl_default({
246630
+ create: [
246631
+ Permission_default.ProjectOwner,
246632
+ Permission_default.ProjectAdmin,
246633
+ Permission_default.ProjectMember,
246634
+ Permission_default.IncidentAdmin,
246635
+ Permission_default.IncidentMember,
246636
+ Permission_default.CreateProjectIncident
246637
+ ],
246638
+ read: [
246639
+ Permission_default.ProjectOwner,
246640
+ Permission_default.ProjectAdmin,
246641
+ Permission_default.ProjectMember,
246642
+ Permission_default.Viewer,
246643
+ Permission_default.IncidentAdmin,
246644
+ Permission_default.IncidentMember,
246645
+ Permission_default.IncidentViewer,
246646
+ Permission_default.ReadProjectIncident
246647
+ ],
246648
+ update: [
246649
+ Permission_default.ProjectOwner,
246650
+ Permission_default.ProjectAdmin,
246651
+ Permission_default.ProjectMember,
246652
+ Permission_default.IncidentAdmin,
246653
+ Permission_default.IncidentMember,
246654
+ Permission_default.EditProjectIncident
246655
+ ]
246656
+ }),
246657
+ TableColumn_default({
246658
+ type: TableColumnType_default.Markdown,
245787
246659
  required: false,
245788
- type: TableColumnType_default.JSON,
245789
- title: "Custom Fields",
245790
- description: "The incident's custom field values, keyed by each incident custom field's name. When a user or an API key creates or updates an incident, each value it sets or changes must fit its field - a number for a Number field, true or false for a Boolean, one of the options for a Dropdown, and so on - or the request is refused. Values left as they were, keys that are not the name of a field and empty values are not checked. Required on Create is not enforced here: it applies to the dashboard's Declare Incident form only."
246660
+ isDefaultValueColumn: false,
246661
+ title: "Postmortem Note",
246662
+ description: "Document the postmortem summary for this incident."
245791
246663
  }),
245792
246664
  Column({
245793
- type: ColumnType_default.JSON,
246665
+ type: ColumnType_default.Markdown,
245794
246666
  nullable: true
245795
246667
  })
245796
- ], Incident.prototype, "customFields", 2);
245797
- __decorateClass([
245798
- ColumnAccessControl_default({ create: [], read: [], update: [] }),
245799
- TableColumn_default({
245800
- required: false,
245801
- type: TableColumnType_default.JSON,
245802
- title: "AI Investigation Decision",
245803
- description: "Internal: the reason automatic AI investigation did not start when this record was created."
245804
- }),
245805
- Column({ type: ColumnType_default.JSON, nullable: true })
245806
- ], Incident.prototype, "aiInvestigationDecision", 2);
245807
- __decorateClass([
245808
- ColumnAccessControl_default({ create: [], read: [], update: [] }),
245809
- TableColumn_default({
245810
- required: false,
245811
- type: TableColumnType_default.Date,
245812
- title: "AI Investigation Waits Until",
245813
- description: "Internal: while an investigation rule makes OneUptime AI wait before it investigates this record, when the wait ends."
245814
- }),
245815
- Column({ type: ColumnType_default.Date, nullable: true })
245816
- ], Incident.prototype, "aiInvestigationWaitUntil", 2);
245817
- __decorateClass([
245818
- ColumnAccessControl_default({
245819
- create: [],
245820
- read: [
245821
- Permission_default.ProjectOwner,
245822
- Permission_default.ProjectAdmin,
245823
- Permission_default.ProjectMember,
245824
- Permission_default.Viewer,
245825
- Permission_default.IncidentAdmin,
245826
- Permission_default.IncidentMember,
245827
- Permission_default.IncidentViewer,
245828
- Permission_default.ReadProjectIncident
245829
- ],
245830
- update: []
245831
- }),
245832
- Index(),
245833
- TableColumn_default({
245834
- type: TableColumnType_default.Boolean,
245835
- computed: true,
245836
- hideColumnInDocumentation: true,
245837
- required: true,
245838
- isDefaultValueColumn: true,
245839
- title: "Are Owners Notified Of Resource Creation?",
245840
- description: "Are owners notified of when this resource is created?",
245841
- defaultValue: false
245842
- }),
245843
- Column({
245844
- type: ColumnType_default.Boolean,
245845
- nullable: false,
245846
- default: false
245847
- })
245848
- ], Incident.prototype, "isOwnerNotifiedOfResourceCreation", 2);
246668
+ ], Incident.prototype, "postmortemNote", 2);
245849
246669
  __decorateClass([
245850
246670
  ColumnAccessControl_default({
245851
246671
  create: [
@@ -245876,17 +246696,17 @@ __decorateClass([
245876
246696
  ]
245877
246697
  }),
245878
246698
  TableColumn_default({
245879
- type: TableColumnType_default.Markdown,
245880
- required: false,
245881
- isDefaultValueColumn: false,
245882
- title: "Root Cause",
245883
- description: "What is the root cause of this incident?"
246699
+ type: TableColumnType_default.Boolean,
246700
+ title: "Show postmortem on status page?",
246701
+ description: "Should the postmortem note and attachments be visible on the status page once published?",
246702
+ defaultValue: false,
246703
+ isDefaultValueColumn: true
245884
246704
  }),
245885
246705
  Column({
245886
- type: ColumnType_default.Markdown,
245887
- nullable: true
246706
+ type: ColumnType_default.Boolean,
246707
+ default: false
245888
246708
  })
245889
- ], Incident.prototype, "rootCause", 2);
246709
+ ], Incident.prototype, "showPostmortemOnStatusPage", 2);
245890
246710
  __decorateClass([
245891
246711
  ColumnAccessControl_default({
245892
246712
  create: [
@@ -245917,17 +246737,17 @@ __decorateClass([
245917
246737
  ]
245918
246738
  }),
245919
246739
  TableColumn_default({
245920
- type: TableColumnType_default.Markdown,
245921
- required: false,
245922
- isDefaultValueColumn: false,
245923
- title: "Postmortem Note",
245924
- description: "Document the postmortem summary for this incident."
246740
+ type: TableColumnType_default.Boolean,
246741
+ title: "Notify Subscribers on Postmortem Published",
246742
+ description: "Should subscribers be notified when the postmortem is published?",
246743
+ defaultValue: true,
246744
+ isDefaultValueColumn: true
245925
246745
  }),
245926
246746
  Column({
245927
- type: ColumnType_default.Markdown,
245928
- nullable: true
246747
+ type: ColumnType_default.Boolean,
246748
+ default: true
245929
246749
  })
245930
- ], Incident.prototype, "postmortemNote", 2);
246750
+ ], Incident.prototype, "notifySubscribersOnPostmortemPublished", 2);
245931
246751
  __decorateClass([
245932
246752
  ColumnAccessControl_default({
245933
246753
  create: [
@@ -245958,17 +246778,16 @@ __decorateClass([
245958
246778
  ]
245959
246779
  }),
245960
246780
  TableColumn_default({
245961
- type: TableColumnType_default.Boolean,
245962
- title: "Show postmortem on status page?",
245963
- description: "Should the postmortem note and attachments be visible on the status page once published?",
245964
- defaultValue: false,
245965
- isDefaultValueColumn: true
246781
+ type: TableColumnType_default.Date,
246782
+ title: "Postmortem Posted At",
246783
+ description: "Timestamp that will be shown alongside the published postmortem on the status page.",
246784
+ required: false
245966
246785
  }),
245967
246786
  Column({
245968
- type: ColumnType_default.Boolean,
245969
- default: false
246787
+ type: ColumnType_default.Date,
246788
+ nullable: true
245970
246789
  })
245971
- ], Incident.prototype, "showPostmortemOnStatusPage", 2);
246790
+ ], Incident.prototype, "postmortemPostedAt", 2);
245972
246791
  __decorateClass([
245973
246792
  ColumnAccessControl_default({
245974
246793
  create: [
@@ -245999,17 +246818,27 @@ __decorateClass([
245999
246818
  ]
246000
246819
  }),
246001
246820
  TableColumn_default({
246002
- type: TableColumnType_default.Boolean,
246003
- title: "Notify Subscribers on Postmortem Published",
246004
- description: "Should subscribers be notified when the postmortem is published?",
246005
- defaultValue: true,
246006
- isDefaultValueColumn: true
246821
+ type: TableColumnType_default.EntityArray,
246822
+ modelType: File,
246823
+ title: "Postmortem Attachments",
246824
+ description: "Files that accompany the postmortem note and can be shared publicly when enabled.",
246825
+ required: false
246007
246826
  }),
246008
- Column({
246009
- type: ColumnType_default.Boolean,
246010
- default: true
246827
+ ManyToMany(() => {
246828
+ return File;
246829
+ }),
246830
+ JoinTable({
246831
+ name: "IncidentPostmortemAttachmentFile",
246832
+ joinColumn: {
246833
+ name: "incidentId",
246834
+ referencedColumnName: "_id"
246835
+ },
246836
+ inverseJoinColumn: {
246837
+ name: "fileId",
246838
+ referencedColumnName: "_id"
246839
+ }
246011
246840
  })
246012
- ], Incident.prototype, "notifySubscribersOnPostmortemPublished", 2);
246841
+ ], Incident.prototype, "postmortemAttachments", 2);
246013
246842
  __decorateClass([
246014
246843
  ColumnAccessControl_default({
246015
246844
  create: [
@@ -246040,16 +246869,24 @@ __decorateClass([
246040
246869
  ]
246041
246870
  }),
246042
246871
  TableColumn_default({
246043
- type: TableColumnType_default.Date,
246044
- title: "Postmortem Posted At",
246045
- description: "Timestamp that will be shown alongside the published postmortem on the status page.",
246046
- required: false
246872
+ manyToOneRelationColumn: "postmortemStatusId",
246873
+ type: TableColumnType_default.Entity,
246874
+ modelType: IncidentPostmortemStatus,
246875
+ title: "Postmortem Status",
246876
+ description: "How far the incident's postmortem has come: Not Started, Draft, Completed or another of the project's postmortem statuses."
246047
246877
  }),
246048
- Column({
246049
- type: ColumnType_default.Date,
246050
- nullable: true
246051
- })
246052
- ], Incident.prototype, "postmortemPostedAt", 2);
246878
+ ManyToOne(
246879
+ () => {
246880
+ return IncidentPostmortemStatus;
246881
+ },
246882
+ {
246883
+ eager: false,
246884
+ nullable: true,
246885
+ orphanedRowAction: "nullify"
246886
+ }
246887
+ ),
246888
+ JoinColumn({ name: "postmortemStatusId" })
246889
+ ], Incident.prototype, "postmortemStatus", 2);
246053
246890
  __decorateClass([
246054
246891
  ColumnAccessControl_default({
246055
246892
  create: [
@@ -246079,28 +246916,21 @@ __decorateClass([
246079
246916
  Permission_default.EditProjectIncident
246080
246917
  ]
246081
246918
  }),
246919
+ Index(),
246082
246920
  TableColumn_default({
246083
- type: TableColumnType_default.EntityArray,
246084
- modelType: File,
246085
- title: "Postmortem Attachments",
246086
- description: "Files that accompany the postmortem note and can be shared publicly when enabled.",
246087
- required: false
246088
- }),
246089
- ManyToMany(() => {
246090
- return File;
246921
+ type: TableColumnType_default.ObjectID,
246922
+ required: false,
246923
+ canReadOnRelationQuery: true,
246924
+ title: "Postmortem Status ID",
246925
+ description: "ID of the incident's postmortem status. Left out on create, the postmortem starts in the project's not started status - or its draft status when the incident is created with a postmortem note, its completed status when that note is published on a status page.",
246926
+ example: "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
246091
246927
  }),
246092
- JoinTable({
246093
- name: "IncidentPostmortemAttachmentFile",
246094
- joinColumn: {
246095
- name: "incidentId",
246096
- referencedColumnName: "_id"
246097
- },
246098
- inverseJoinColumn: {
246099
- name: "fileId",
246100
- referencedColumnName: "_id"
246101
- }
246928
+ Column({
246929
+ type: ColumnType_default.ObjectID,
246930
+ nullable: true,
246931
+ transformer: ObjectID.getDatabaseTransformer()
246102
246932
  })
246103
- ], Incident.prototype, "postmortemAttachments", 2);
246933
+ ], Incident.prototype, "postmortemStatusId", 2);
246104
246934
  __decorateClass([
246105
246935
  ColumnAccessControl_default({
246106
246936
  create: [],
@@ -247021,6 +247851,7 @@ Incident = __decorateClass([
247021
247851
  }
247022
247852
  }),
247023
247853
  Index(["projectId", "currentIncidentStateId"]),
247854
+ Index(["projectId", "postmortemStatusId"]),
247024
247855
  Index(["aiInvestigationWaitUntil"], {
247025
247856
  where: '"aiInvestigationWaitUntil" IS NOT NULL AND "deletedAt" IS NULL'
247026
247857
  })
@@ -247883,6 +248714,10 @@ var AlertState = class extends DatabaseBaseModel {
247883
248714
  this.isAcknowledgedState = void 0;
247884
248715
  this.isResolvedState = void 0;
247885
248716
  this.order = void 0;
248717
+ this.isArchived = void 0;
248718
+ this.archivedAt = void 0;
248719
+ this.archivedByUser = void 0;
248720
+ this.archivedByUserId = void 0;
247886
248721
  }
247887
248722
  };
247888
248723
  __name(AlertState, "AlertState");
@@ -248278,16 +249113,90 @@ __decorateClass([
248278
249113
  }),
248279
249114
  TableColumn_default({
248280
249115
  isDefaultValueColumn: false,
248281
- type: TableColumnType_default.Boolean,
249116
+ type: TableColumnType_default.Boolean,
249117
+ canReadOnRelationQuery: true,
249118
+ title: "Is Acknowledged State",
249119
+ description: "Is it the acknowledged state of the alert?"
249120
+ }),
249121
+ Column({
249122
+ type: ColumnType_default.Boolean,
249123
+ default: false
249124
+ })
249125
+ ], AlertState.prototype, "isAcknowledgedState", 2);
249126
+ __decorateClass([
249127
+ ColumnAccessControl_default({
249128
+ create: [
249129
+ Permission_default.ProjectOwner,
249130
+ Permission_default.ProjectAdmin,
249131
+ Permission_default.AlertAdmin,
249132
+ Permission_default.CreateAlertState
249133
+ ],
249134
+ read: [
249135
+ Permission_default.ProjectOwner,
249136
+ Permission_default.ProjectAdmin,
249137
+ Permission_default.ProjectMember,
249138
+ Permission_default.Viewer,
249139
+ Permission_default.AlertAdmin,
249140
+ Permission_default.AlertMember,
249141
+ Permission_default.AlertViewer,
249142
+ Permission_default.ReadAlertState
249143
+ ],
249144
+ update: [
249145
+ Permission_default.ProjectOwner,
249146
+ Permission_default.ProjectAdmin,
249147
+ Permission_default.AlertAdmin,
249148
+ Permission_default.EditAlertState
249149
+ ]
249150
+ }),
249151
+ TableColumn_default({
249152
+ isDefaultValueColumn: false,
249153
+ type: TableColumnType_default.Boolean,
249154
+ canReadOnRelationQuery: true,
249155
+ title: "Is Resolved State",
249156
+ description: "Is it the resolved state of the alert?"
249157
+ }),
249158
+ Column({
249159
+ type: ColumnType_default.Boolean,
249160
+ default: false
249161
+ })
249162
+ ], AlertState.prototype, "isResolvedState", 2);
249163
+ __decorateClass([
249164
+ ColumnAccessControl_default({
249165
+ create: [
249166
+ Permission_default.ProjectOwner,
249167
+ Permission_default.ProjectAdmin,
249168
+ Permission_default.AlertAdmin,
249169
+ Permission_default.CreateAlertState
249170
+ ],
249171
+ read: [
249172
+ Permission_default.ProjectOwner,
249173
+ Permission_default.ProjectAdmin,
249174
+ Permission_default.ProjectMember,
249175
+ Permission_default.Viewer,
249176
+ Permission_default.AlertAdmin,
249177
+ Permission_default.AlertMember,
249178
+ Permission_default.AlertViewer,
249179
+ Permission_default.ReadAlertState
249180
+ ],
249181
+ update: [
249182
+ Permission_default.ProjectOwner,
249183
+ Permission_default.ProjectAdmin,
249184
+ Permission_default.AlertAdmin,
249185
+ Permission_default.EditAlertState
249186
+ ]
249187
+ }),
249188
+ TableColumn_default({
249189
+ isDefaultValueColumn: false,
249190
+ type: TableColumnType_default.SmallNumber,
248282
249191
  canReadOnRelationQuery: true,
248283
- title: "Is Acknowledged State",
248284
- description: "Is it the acknowledged state of the alert?"
249192
+ title: "Order",
249193
+ required: false,
249194
+ description: "Where this state sits in the project's list of alert states: 1 is the top. Alerts only ever move down the list, and an alert in a state at or below the acknowledged (or resolved) state counts as acknowledged (or resolved), so the created, acknowledged and resolved states have to stay in that order. A new state without a number goes just above the resolved state. Setting a number moves the state to that place, and the ones in between shift by one. In the dashboard, drag the rows to reorder them."
248285
249195
  }),
248286
249196
  Column({
248287
- type: ColumnType_default.Boolean,
248288
- default: false
249197
+ type: ColumnType_default.SmallNumber
248289
249198
  })
248290
- ], AlertState.prototype, "isAcknowledgedState", 2);
249199
+ ], AlertState.prototype, "order", 2);
248291
249200
  __decorateClass([
248292
249201
  ColumnAccessControl_default({
248293
249202
  create: [
@@ -248314,25 +249223,50 @@ __decorateClass([
248314
249223
  ]
248315
249224
  }),
248316
249225
  TableColumn_default({
248317
- isDefaultValueColumn: false,
249226
+ isDefaultValueColumn: true,
249227
+ required: true,
248318
249228
  type: TableColumnType_default.Boolean,
248319
249229
  canReadOnRelationQuery: true,
248320
- title: "Is Resolved State",
248321
- description: "Is it the resolved state of the alert?"
249230
+ title: "Is Archived",
249231
+ description: "Archived states stay on the alerts and episodes that are in them, but can't be picked again. The created, acknowledged and resolved states can't be archived.",
249232
+ defaultValue: false,
249233
+ example: false
248322
249234
  }),
248323
249235
  Column({
248324
249236
  type: ColumnType_default.Boolean,
249237
+ nullable: false,
248325
249238
  default: false
248326
249239
  })
248327
- ], AlertState.prototype, "isResolvedState", 2);
249240
+ ], AlertState.prototype, "isArchived", 2);
248328
249241
  __decorateClass([
248329
249242
  ColumnAccessControl_default({
248330
- create: [
249243
+ create: [],
249244
+ read: [
248331
249245
  Permission_default.ProjectOwner,
248332
249246
  Permission_default.ProjectAdmin,
249247
+ Permission_default.ProjectMember,
249248
+ Permission_default.Viewer,
248333
249249
  Permission_default.AlertAdmin,
248334
- Permission_default.CreateAlertState
249250
+ Permission_default.AlertMember,
249251
+ Permission_default.AlertViewer,
249252
+ Permission_default.ReadAlertState
248335
249253
  ],
249254
+ update: []
249255
+ }),
249256
+ TableColumn_default({
249257
+ required: false,
249258
+ type: TableColumnType_default.Date,
249259
+ title: "Archived At",
249260
+ description: "When this alert state was archived. Empty while it is not archived."
249261
+ }),
249262
+ Column({
249263
+ type: ColumnType_default.Date,
249264
+ nullable: true
249265
+ })
249266
+ ], AlertState.prototype, "archivedAt", 2);
249267
+ __decorateClass([
249268
+ ColumnAccessControl_default({
249269
+ create: [],
248336
249270
  read: [
248337
249271
  Permission_default.ProjectOwner,
248338
249272
  Permission_default.ProjectAdmin,
@@ -248343,25 +249277,54 @@ __decorateClass([
248343
249277
  Permission_default.AlertViewer,
248344
249278
  Permission_default.ReadAlertState
248345
249279
  ],
248346
- update: [
249280
+ update: []
249281
+ }),
249282
+ TableColumn_default({
249283
+ manyToOneRelationColumn: "archivedByUserId",
249284
+ type: TableColumnType_default.Entity,
249285
+ modelType: User_default,
249286
+ title: "Archived by User",
249287
+ description: "Relation to User who archived this object (if this object was archived by a User)"
249288
+ }),
249289
+ ManyToOne(
249290
+ () => {
249291
+ return User_default;
249292
+ },
249293
+ {
249294
+ eager: false,
249295
+ nullable: true,
249296
+ onDelete: "SET NULL",
249297
+ orphanedRowAction: "nullify"
249298
+ }
249299
+ ),
249300
+ JoinColumn({ name: "archivedByUserId" })
249301
+ ], AlertState.prototype, "archivedByUser", 2);
249302
+ __decorateClass([
249303
+ ColumnAccessControl_default({
249304
+ create: [],
249305
+ read: [
248347
249306
  Permission_default.ProjectOwner,
248348
249307
  Permission_default.ProjectAdmin,
249308
+ Permission_default.ProjectMember,
249309
+ Permission_default.Viewer,
248349
249310
  Permission_default.AlertAdmin,
248350
- Permission_default.EditAlertState
248351
- ]
249311
+ Permission_default.AlertMember,
249312
+ Permission_default.AlertViewer,
249313
+ Permission_default.ReadAlertState
249314
+ ],
249315
+ update: []
248352
249316
  }),
248353
249317
  TableColumn_default({
248354
- isDefaultValueColumn: false,
248355
- type: TableColumnType_default.SmallNumber,
248356
- canReadOnRelationQuery: true,
248357
- title: "Order",
248358
- required: false,
248359
- description: "Where this state sits in the project's list of alert states: 1 is the top. Alerts only ever move down the list, and an alert in a state at or below the acknowledged (or resolved) state counts as acknowledged (or resolved), so the created, acknowledged and resolved states have to stay in that order. A new state without a number goes just above the resolved state. Setting a number moves the state to that place, and the ones in between shift by one. In the dashboard, drag the rows to reorder them."
249318
+ type: TableColumnType_default.ObjectID,
249319
+ title: "Archived by User ID",
249320
+ description: "User ID who archived this object (if this object was archived by a User)"
248360
249321
  }),
248361
249322
  Column({
248362
- type: ColumnType_default.SmallNumber
249323
+ type: ColumnType_default.ObjectID,
249324
+ nullable: true,
249325
+ transformer: ObjectID.getDatabaseTransformer()
248363
249326
  })
248364
- ], AlertState.prototype, "order", 2);
249327
+ ], AlertState.prototype, "archivedByUserId", 2);
248365
249328
  AlertState = __decorateClass([
248366
249329
  TableBillingAccessControl_default({
248367
249330
  create: "Growth" /* Growth */,
@@ -248409,6 +249372,7 @@ AlertState = __decorateClass([
248409
249372
  update: true,
248410
249373
  read: true
248411
249374
  }),
249375
+ EnableAuditLog_default(),
248412
249376
  CrudApiEndpoint_default(new Route("/alert-state")),
248413
249377
  TableMetadata_default({
248414
249378
  tableName: "AlertState",
@@ -256426,6 +257390,10 @@ var ScheduledMaintenanceState = class extends DatabaseBaseModel {
256426
257390
  this.isEndedState = void 0;
256427
257391
  this.isResolvedState = void 0;
256428
257392
  this.order = void 0;
257393
+ this.isArchived = void 0;
257394
+ this.archivedAt = void 0;
257395
+ this.archivedByUser = void 0;
257396
+ this.archivedByUserId = void 0;
256429
257397
  }
256430
257398
  };
256431
257399
  __name(ScheduledMaintenanceState, "ScheduledMaintenanceState");
@@ -256972,6 +257940,134 @@ __decorateClass([
256972
257940
  type: ColumnType_default.SmallNumber
256973
257941
  })
256974
257942
  ], ScheduledMaintenanceState.prototype, "order", 2);
257943
+ __decorateClass([
257944
+ ColumnAccessControl_default({
257945
+ create: [
257946
+ Permission_default.ProjectOwner,
257947
+ Permission_default.ProjectAdmin,
257948
+ Permission_default.ScheduledMaintenanceAdmin,
257949
+ Permission_default.CreateScheduledMaintenanceState
257950
+ ],
257951
+ read: [
257952
+ Permission_default.ProjectOwner,
257953
+ Permission_default.ProjectAdmin,
257954
+ Permission_default.ProjectMember,
257955
+ Permission_default.Viewer,
257956
+ Permission_default.ScheduledMaintenanceAdmin,
257957
+ Permission_default.ScheduledMaintenanceMember,
257958
+ Permission_default.ScheduledMaintenanceViewer,
257959
+ Permission_default.ReadScheduledMaintenanceState
257960
+ ],
257961
+ update: [
257962
+ Permission_default.ProjectOwner,
257963
+ Permission_default.ProjectAdmin,
257964
+ Permission_default.ScheduledMaintenanceAdmin,
257965
+ Permission_default.EditScheduledMaintenanceState
257966
+ ]
257967
+ }),
257968
+ TableColumn_default({
257969
+ isDefaultValueColumn: true,
257970
+ required: true,
257971
+ type: TableColumnType_default.Boolean,
257972
+ canReadOnRelationQuery: true,
257973
+ title: "Is Archived",
257974
+ description: "Archived states stay on the maintenance events that are in them, but can't be picked again. The scheduled, ongoing, ended and completed states can't be archived.",
257975
+ defaultValue: false,
257976
+ example: false
257977
+ }),
257978
+ Column({
257979
+ type: ColumnType_default.Boolean,
257980
+ nullable: false,
257981
+ default: false
257982
+ })
257983
+ ], ScheduledMaintenanceState.prototype, "isArchived", 2);
257984
+ __decorateClass([
257985
+ ColumnAccessControl_default({
257986
+ create: [],
257987
+ read: [
257988
+ Permission_default.ProjectOwner,
257989
+ Permission_default.ProjectAdmin,
257990
+ Permission_default.ProjectMember,
257991
+ Permission_default.Viewer,
257992
+ Permission_default.ScheduledMaintenanceAdmin,
257993
+ Permission_default.ScheduledMaintenanceMember,
257994
+ Permission_default.ScheduledMaintenanceViewer,
257995
+ Permission_default.ReadScheduledMaintenanceState
257996
+ ],
257997
+ update: []
257998
+ }),
257999
+ TableColumn_default({
258000
+ required: false,
258001
+ type: TableColumnType_default.Date,
258002
+ title: "Archived At",
258003
+ description: "When this scheduled maintenance state was archived. Empty while it is not archived."
258004
+ }),
258005
+ Column({
258006
+ type: ColumnType_default.Date,
258007
+ nullable: true
258008
+ })
258009
+ ], ScheduledMaintenanceState.prototype, "archivedAt", 2);
258010
+ __decorateClass([
258011
+ ColumnAccessControl_default({
258012
+ create: [],
258013
+ read: [
258014
+ Permission_default.ProjectOwner,
258015
+ Permission_default.ProjectAdmin,
258016
+ Permission_default.ProjectMember,
258017
+ Permission_default.Viewer,
258018
+ Permission_default.ScheduledMaintenanceAdmin,
258019
+ Permission_default.ScheduledMaintenanceMember,
258020
+ Permission_default.ScheduledMaintenanceViewer,
258021
+ Permission_default.ReadScheduledMaintenanceState
258022
+ ],
258023
+ update: []
258024
+ }),
258025
+ TableColumn_default({
258026
+ manyToOneRelationColumn: "archivedByUserId",
258027
+ type: TableColumnType_default.Entity,
258028
+ modelType: User_default,
258029
+ title: "Archived by User",
258030
+ description: "Relation to User who archived this object (if this object was archived by a User)"
258031
+ }),
258032
+ ManyToOne(
258033
+ () => {
258034
+ return User_default;
258035
+ },
258036
+ {
258037
+ eager: false,
258038
+ nullable: true,
258039
+ onDelete: "SET NULL",
258040
+ orphanedRowAction: "nullify"
258041
+ }
258042
+ ),
258043
+ JoinColumn({ name: "archivedByUserId" })
258044
+ ], ScheduledMaintenanceState.prototype, "archivedByUser", 2);
258045
+ __decorateClass([
258046
+ ColumnAccessControl_default({
258047
+ create: [],
258048
+ read: [
258049
+ Permission_default.ProjectOwner,
258050
+ Permission_default.ProjectAdmin,
258051
+ Permission_default.ProjectMember,
258052
+ Permission_default.Viewer,
258053
+ Permission_default.ScheduledMaintenanceAdmin,
258054
+ Permission_default.ScheduledMaintenanceMember,
258055
+ Permission_default.ScheduledMaintenanceViewer,
258056
+ Permission_default.ReadScheduledMaintenanceState
258057
+ ],
258058
+ update: []
258059
+ }),
258060
+ TableColumn_default({
258061
+ type: TableColumnType_default.ObjectID,
258062
+ title: "Archived by User ID",
258063
+ description: "User ID who archived this object (if this object was archived by a User)"
258064
+ }),
258065
+ Column({
258066
+ type: ColumnType_default.ObjectID,
258067
+ nullable: true,
258068
+ transformer: ObjectID.getDatabaseTransformer()
258069
+ })
258070
+ ], ScheduledMaintenanceState.prototype, "archivedByUserId", 2);
256975
258071
  ScheduledMaintenanceState = __decorateClass([
256976
258072
  TableBillingAccessControl_default({
256977
258073
  create: "Growth" /* Growth */,
@@ -257019,6 +258115,7 @@ ScheduledMaintenanceState = __decorateClass([
257019
258115
  update: true,
257020
258116
  read: true
257021
258117
  }),
258118
+ EnableAuditLog_default(),
257022
258119
  CrudApiEndpoint_default(new Route("/scheduled-maintenance-state")),
257023
258120
  SlugifyColumn_default("name", "slug"),
257024
258121
  TableMetadata_default({
@@ -276343,7 +277440,8 @@ __decorateClass([
276343
277440
  type: TableColumnType_default.Number,
276344
277441
  canReadOnRelationQuery: true,
276345
277442
  description: "Number of logs per page for this saved view.",
276346
- defaultValue: 100
277443
+ defaultValue: 100,
277444
+ isDefaultValueColumn: true
276347
277445
  }),
276348
277446
  Column({
276349
277447
  type: ColumnType_default.Number,
@@ -276422,7 +277520,8 @@ __decorateClass([
276422
277520
  canReadOnRelationQuery: true,
276423
277521
  title: "Is Default",
276424
277522
  description: "Whether this saved log view should be applied by default.",
276425
- defaultValue: false
277523
+ defaultValue: false,
277524
+ isDefaultValueColumn: true
276426
277525
  }),
276427
277526
  Column({
276428
277527
  nullable: false,
@@ -276803,7 +277902,8 @@ __decorateClass([
276803
277902
  canReadOnRelationQuery: true,
276804
277903
  title: "Is Default",
276805
277904
  description: "Whether this saved metric view should be applied by default.",
276806
- defaultValue: false
277905
+ defaultValue: false,
277906
+ isDefaultValueColumn: true
276807
277907
  }),
276808
277908
  Column({
276809
277909
  nullable: false,
@@ -277222,7 +278322,8 @@ __decorateClass([
277222
278322
  canReadOnRelationQuery: true,
277223
278323
  title: "Is Default",
277224
278324
  description: "Whether this saved trace view should be applied by default.",
277225
- defaultValue: false
278325
+ defaultValue: false,
278326
+ isDefaultValueColumn: true
277226
278327
  }),
277227
278328
  Column({
277228
278329
  nullable: false,
@@ -278031,7 +279132,8 @@ __decorateClass([
278031
279132
  canReadOnRelationQuery: true,
278032
279133
  title: "Enabled",
278033
279134
  description: "Whether this processor is active.",
278034
- defaultValue: true
279135
+ defaultValue: true,
279136
+ isDefaultValueColumn: true
278035
279137
  }),
278036
279138
  Column({
278037
279139
  nullable: false,
@@ -278968,7 +280070,8 @@ __decorateClass([
278968
280070
  canReadOnRelationQuery: true,
278969
280071
  title: "Enabled",
278970
280072
  description: "Whether this detection rule is evaluated.",
278971
- defaultValue: true
280073
+ defaultValue: true,
280074
+ isDefaultValueColumn: true
278972
280075
  }),
278973
280076
  Column({
278974
280077
  nullable: false,
@@ -278988,7 +280091,8 @@ __decorateClass([
278988
280091
  type: TableColumnType_default.Number,
278989
280092
  canReadOnRelationQuery: true,
278990
280093
  description: "How often this rule is evaluated, in minutes. The evaluation window covers the time since the previous evaluation.",
278991
- defaultValue: 1
280094
+ defaultValue: 1,
280095
+ isDefaultValueColumn: true
278992
280096
  }),
278993
280097
  Column({
278994
280098
  type: ColumnType_default.Number,
@@ -279072,7 +280176,8 @@ __decorateClass([
279072
280176
  canReadOnRelationQuery: true,
279073
280177
  title: "Create Alerts",
279074
280178
  description: "Whether matches open OneUptime alerts.",
279075
- defaultValue: true
280179
+ defaultValue: true,
280180
+ isDefaultValueColumn: true
279076
280181
  }),
279077
280182
  Column({
279078
280183
  nullable: false,
@@ -279092,7 +280197,8 @@ __decorateClass([
279092
280197
  canReadOnRelationQuery: true,
279093
280198
  title: "Write Detection Findings",
279094
280199
  description: "Whether matches also write a Detection Finding security event back into the events table.",
279095
- defaultValue: true
280200
+ defaultValue: true,
280201
+ isDefaultValueColumn: true
279096
280202
  }),
279097
280203
  Column({
279098
280204
  nullable: false,
@@ -279611,7 +280717,8 @@ __decorateClass([
279611
280717
  canReadOnRelationQuery: true,
279612
280718
  title: "Enabled",
279613
280719
  description: "Whether this connection is polled on its schedule.",
279614
- defaultValue: true
280720
+ defaultValue: true,
280721
+ isDefaultValueColumn: true
279615
280722
  }),
279616
280723
  Column({
279617
280724
  nullable: false,
@@ -279631,7 +280738,8 @@ __decorateClass([
279631
280738
  type: TableColumnType_default.Number,
279632
280739
  canReadOnRelationQuery: true,
279633
280740
  description: "How often new records are polled, in minutes.",
279634
- defaultValue: 5
280741
+ defaultValue: 5,
280742
+ isDefaultValueColumn: true
279635
280743
  }),
279636
280744
  Column({
279637
280745
  type: ColumnType_default.Number,
@@ -279651,6 +280759,7 @@ __decorateClass([
279651
280759
  title: "Alerting Records Only",
279652
280760
  description: "For providers that distinguish alerting from non-alerting records: import only the alerting ones.",
279653
280761
  defaultValue: true,
280762
+ isDefaultValueColumn: true,
279654
280763
  canReadOnRelationQuery: true
279655
280764
  }),
279656
280765
  Column({ type: ColumnType_default.Boolean, nullable: false, default: true })
@@ -280637,7 +281746,8 @@ __decorateClass([
280637
281746
  type: TableColumnType_default.Boolean,
280638
281747
  title: "Is Complete",
280639
281748
  description: "False while the record's parts (layers, levels) are still being created.",
280640
- defaultValue: true
281749
+ defaultValue: true,
281750
+ isDefaultValueColumn: true
280641
281751
  }),
280642
281752
  Column({
280643
281753
  nullable: false,
@@ -280717,6 +281827,15 @@ ToolImportRecord = __decorateClass([
280717
281827
  })
280718
281828
  ], ToolImportRecord);
280719
281829
 
281830
+ // ../Common/Types/SecurityEvent/ThreatIntelFeedType.ts
281831
+ var ThreatIntelFeedType = /* @__PURE__ */ ((ThreatIntelFeedType2) => {
281832
+ ThreatIntelFeedType2["Taxii"] = "taxii";
281833
+ ThreatIntelFeedType2["List"] = "list";
281834
+ ThreatIntelFeedType2["GoogleSecOps"] = "google-secops";
281835
+ return ThreatIntelFeedType2;
281836
+ })(ThreatIntelFeedType || {});
281837
+ var ThreatIntelFeedType_default = ThreatIntelFeedType;
281838
+
280720
281839
  // ../Common/Models/DatabaseModels/ThreatIntelFeed.ts
280721
281840
  var createPermissions2 = [
280722
281841
  Permission_default.ProjectOwner,
@@ -280747,7 +281866,12 @@ var ThreatIntelFeed = class extends DatabaseBaseModel {
280747
281866
  this.projectId = void 0;
280748
281867
  this.name = void 0;
280749
281868
  this.description = void 0;
281869
+ this.feedType = void 0;
280750
281870
  this.apiRootUrl = void 0;
281871
+ this.listUrl = void 0;
281872
+ this.indicatorConfidence = void 0;
281873
+ this.securityEventConnection = void 0;
281874
+ this.securityEventConnectionId = void 0;
280751
281875
  this.collectionId = void 0;
280752
281876
  this.apiToken = void 0;
280753
281877
  this.basicAuthUsername = void 0;
@@ -280869,13 +281993,35 @@ __decorateClass([
280869
281993
  }),
280870
281994
  TableColumn_default({
280871
281995
  required: true,
281996
+ type: TableColumnType_default.ShortText,
281997
+ canReadOnRelationQuery: true,
281998
+ title: "Source",
281999
+ description: "Where the indicators come from: a TAXII 2.1 collection (taxii), a list at an https address (list) or Google SecOps (google-secops).",
282000
+ defaultValue: ThreatIntelFeedType_default.Taxii,
282001
+ isDefaultValueColumn: true
282002
+ }),
282003
+ Column({
282004
+ nullable: false,
282005
+ type: ColumnType_default.ShortText,
282006
+ length: ColumnLength_default.ShortText,
282007
+ default: ThreatIntelFeedType_default.Taxii
282008
+ })
282009
+ ], ThreatIntelFeed.prototype, "feedType", 2);
282010
+ __decorateClass([
282011
+ ColumnAccessControl_default({
282012
+ create: createPermissions2,
282013
+ read: readPermissions5,
282014
+ update: updatePermissions2
282015
+ }),
282016
+ TableColumn_default({
282017
+ required: false,
280872
282018
  type: TableColumnType_default.LongText,
280873
282019
  canReadOnRelationQuery: true,
280874
282020
  title: "TAXII API Root URL",
280875
282021
  description: "The TAXII 2.1 API root, e.g. https://taxii.example.com/api1/. Collections are addressed beneath it."
280876
282022
  }),
280877
282023
  Column({
280878
- nullable: false,
282024
+ nullable: true,
280879
282025
  type: ColumnType_default.LongText,
280880
282026
  length: ColumnLength_default.LongText
280881
282027
  })
@@ -280887,14 +282033,97 @@ __decorateClass([
280887
282033
  update: updatePermissions2
280888
282034
  }),
280889
282035
  TableColumn_default({
280890
- required: true,
282036
+ required: false,
282037
+ type: TableColumnType_default.LongText,
282038
+ canReadOnRelationQuery: true,
282039
+ title: "List URL",
282040
+ description: "For a list feed: the https address of the list, one IP address, domain, URL or file hash a line."
282041
+ }),
282042
+ Column({
282043
+ nullable: true,
282044
+ type: ColumnType_default.LongText,
282045
+ length: ColumnLength_default.LongText
282046
+ })
282047
+ ], ThreatIntelFeed.prototype, "listUrl", 2);
282048
+ __decorateClass([
282049
+ ColumnAccessControl_default({
282050
+ create: createPermissions2,
282051
+ read: readPermissions5,
282052
+ update: updatePermissions2
282053
+ }),
282054
+ TableColumn_default({
282055
+ required: false,
282056
+ type: TableColumnType_default.Number,
282057
+ canReadOnRelationQuery: true,
282058
+ title: "Confidence",
282059
+ description: "For a list feed: how sure the list is, 1 to 100, given to each of its indicators. It sets the severity of a match."
282060
+ }),
282061
+ Column({
282062
+ nullable: true,
282063
+ type: ColumnType_default.Number
282064
+ })
282065
+ ], ThreatIntelFeed.prototype, "indicatorConfidence", 2);
282066
+ __decorateClass([
282067
+ ColumnAccessControl_default({
282068
+ create: createPermissions2,
282069
+ read: readPermissions5,
282070
+ update: updatePermissions2
282071
+ }),
282072
+ TableColumn_default({
282073
+ manyToOneRelationColumn: "securityEventConnectionId",
282074
+ type: TableColumnType_default.Entity,
282075
+ modelType: SecurityEventConnection,
282076
+ title: "Google SecOps Connection",
282077
+ description: "For a Google SecOps feed: the connection whose key reads Google SecOps's indicator matches."
282078
+ }),
282079
+ ManyToOne(
282080
+ () => {
282081
+ return SecurityEventConnection;
282082
+ },
282083
+ {
282084
+ eager: false,
282085
+ nullable: true,
282086
+ onDelete: "SET NULL",
282087
+ orphanedRowAction: "nullify"
282088
+ }
282089
+ ),
282090
+ JoinColumn({ name: "securityEventConnectionId" })
282091
+ ], ThreatIntelFeed.prototype, "securityEventConnection", 2);
282092
+ __decorateClass([
282093
+ ColumnAccessControl_default({
282094
+ create: createPermissions2,
282095
+ read: readPermissions5,
282096
+ update: updatePermissions2
282097
+ }),
282098
+ Index(),
282099
+ TableColumn_default({
282100
+ type: TableColumnType_default.ObjectID,
282101
+ required: false,
282102
+ canReadOnRelationQuery: true,
282103
+ title: "Google SecOps Connection ID",
282104
+ description: "For a Google SecOps feed: the ID of the connection whose key reads Google SecOps's indicator matches."
282105
+ }),
282106
+ Column({
282107
+ type: ColumnType_default.ObjectID,
282108
+ nullable: true,
282109
+ transformer: ObjectID.getDatabaseTransformer()
282110
+ })
282111
+ ], ThreatIntelFeed.prototype, "securityEventConnectionId", 2);
282112
+ __decorateClass([
282113
+ ColumnAccessControl_default({
282114
+ create: createPermissions2,
282115
+ read: readPermissions5,
282116
+ update: updatePermissions2
282117
+ }),
282118
+ TableColumn_default({
282119
+ required: false,
280891
282120
  type: TableColumnType_default.ShortText,
280892
282121
  canReadOnRelationQuery: true,
280893
282122
  title: "Collection ID",
280894
282123
  description: "ID of the TAXII collection to poll for indicator objects."
280895
282124
  }),
280896
282125
  Column({
280897
- nullable: false,
282126
+ nullable: true,
280898
282127
  type: ColumnType_default.ShortText,
280899
282128
  length: ColumnLength_default.ShortText
280900
282129
  })
@@ -280966,7 +282195,8 @@ __decorateClass([
280966
282195
  canReadOnRelationQuery: true,
280967
282196
  title: "Enabled",
280968
282197
  description: "Whether this feed is polled and matched.",
280969
- defaultValue: true
282198
+ defaultValue: true,
282199
+ isDefaultValueColumn: true
280970
282200
  }),
280971
282201
  Column({
280972
282202
  nullable: false,
@@ -281215,7 +282445,7 @@ __decorateClass([
281215
282445
  required: false,
281216
282446
  type: TableColumnType_default.LongText,
281217
282447
  canReadOnRelationQuery: true,
281218
- description: "Poll cursor: the TAXII added_after timestamp already ingested, as an ISO string."
282448
+ description: "Poll cursor: for a TAXII feed the added_after timestamp already ingested, for a list feed the hash of the list last written and when, for a Google SecOps feed the end of the window last read."
281219
282449
  }),
281220
282450
  Column({
281221
282451
  type: ColumnType_default.LongText,
@@ -281457,7 +282687,7 @@ ThreatIntelFeed = __decorateClass([
281457
282687
  singularName: "Threat Intel Feed",
281458
282688
  pluralName: "Threat Intel Feeds",
281459
282689
  icon: IconProp_default.ShieldCheck,
281460
- tableDescription: "STIX/TAXII 2.1 threat-intelligence feeds. Indicators are polled on an interval and matched against incoming security events."
282690
+ tableDescription: "Threat-intelligence feeds: TAXII 2.1 collections, lists of indicators and Google SecOps. Indicators are polled and matched against security events."
281461
282691
  }),
281462
282692
  TableAccessControl_default({
281463
282693
  create: createPermissions2,
@@ -284822,7 +286052,8 @@ __decorateClass([
284822
286052
  canReadOnRelationQuery: true,
284823
286053
  title: "Enabled",
284824
286054
  description: "Whether events are sent to this destination.",
284825
- defaultValue: true
286055
+ defaultValue: true,
286056
+ isDefaultValueColumn: true
284826
286057
  }),
284827
286058
  Column({
284828
286059
  nullable: false,
@@ -284842,7 +286073,8 @@ __decorateClass([
284842
286073
  canReadOnRelationQuery: true,
284843
286074
  title: "What to Send",
284844
286075
  description: "'detections' sends what OneUptime found (its detection rules' and threat intel's matches and imported alerts); 'all-events' sends every security event.",
284845
- defaultValue: SecurityEventDestinationScope_default.Detections
286076
+ defaultValue: SecurityEventDestinationScope_default.Detections,
286077
+ isDefaultValueColumn: true
284846
286078
  }),
284847
286079
  Column({
284848
286080
  nullable: false,
@@ -285123,7 +286355,8 @@ __decorateClass([
285123
286355
  canReadOnRelationQuery: true,
285124
286356
  title: "Enabled",
285125
286357
  description: "Whether OneUptime looks for security events in the project's logs.",
285126
- defaultValue: true
286358
+ defaultValue: true,
286359
+ isDefaultValueColumn: true
285127
286360
  }),
285128
286361
  Column({
285129
286362
  nullable: false,
@@ -287104,7 +288337,8 @@ __decorateClass([
287104
288337
  type: TableColumnType_default.ShortText,
287105
288338
  title: "Filter Condition",
287106
288339
  description: "How to combine filters: 'All' requires every filter to match (AND), 'Any' requires at least one to match (OR).",
287107
- defaultValue: FilterCondition_default.All
288340
+ defaultValue: FilterCondition_default.All,
288341
+ isDefaultValueColumn: true
287108
288342
  }),
287109
288343
  Column({
287110
288344
  nullable: false,
@@ -287389,7 +288623,8 @@ __decorateClass([
287389
288623
  canReadOnRelationQuery: true,
287390
288624
  title: "Enabled",
287391
288625
  description: "Whether this rule is active.",
287392
- defaultValue: true
288626
+ defaultValue: true,
288627
+ isDefaultValueColumn: true
287393
288628
  }),
287394
288629
  Column({
287395
288630
  nullable: false,
@@ -289484,7 +290719,8 @@ __decorateClass([
289484
290719
  canReadOnRelationQuery: true,
289485
290720
  title: "Enabled",
289486
290721
  description: "Whether this rule is evaluated by the recording rule cron.",
289487
- defaultValue: true
290722
+ defaultValue: true,
290723
+ isDefaultValueColumn: true
289488
290724
  }),
289489
290725
  Column({
289490
290726
  nullable: false,
@@ -290447,7 +291683,8 @@ __decorateClass([
290447
291683
  canReadOnRelationQuery: true,
290448
291684
  title: "Enabled",
290449
291685
  description: "Whether this processor is active.",
290450
- defaultValue: true
291686
+ defaultValue: true,
291687
+ isDefaultValueColumn: true
290451
291688
  }),
290452
291689
  Column({
290453
291690
  nullable: false,
@@ -292012,7 +293249,8 @@ __decorateClass([
292012
293249
  canReadOnRelationQuery: true,
292013
293250
  title: "Enabled",
292014
293251
  description: "Whether this rule is evaluated by the recording rule cron.",
292015
- defaultValue: true
293252
+ defaultValue: true,
293253
+ isDefaultValueColumn: true
292016
293254
  }),
292017
293255
  Column({
292018
293256
  nullable: false,
@@ -292491,7 +293729,8 @@ __decorateClass([
292491
293729
  canReadOnRelationQuery: true,
292492
293730
  title: "Enabled",
292493
293731
  description: "Whether this rule is evaluated by the log recording rule cron, every minute.",
292494
- defaultValue: true
293732
+ defaultValue: true,
293733
+ isDefaultValueColumn: true
292495
293734
  }),
292496
293735
  Column({
292497
293736
  nullable: false,
@@ -370398,7 +371637,8 @@ __decorateClass([
370398
371637
  type: TableColumnType_default.Boolean,
370399
371638
  title: "Secret",
370400
371639
  description: "Is this variable a secret. If true, then it'll not be in the logs",
370401
- defaultValue: false
371640
+ defaultValue: false,
371641
+ isDefaultValueColumn: true
370402
371642
  }),
370403
371643
  Column({
370404
371644
  nullable: false,
@@ -370434,6 +371674,7 @@ __decorateClass([
370434
371674
  title: "Variable Type",
370435
371675
  description: "Static: the content you save is used as is. OAuth 2.0: OneUptime fetches an access token from your identity provider and refreshes it automatically when a workflow uses it after it has expired.",
370436
371676
  defaultValue: "Static" /* Static */,
371677
+ isDefaultValueColumn: true,
370437
371678
  example: "OAuth 2.0"
370438
371679
  }),
370439
371680
  Column({
@@ -378616,6 +379857,9 @@ var AutoRemediationRule = class extends RuleBaseModel {
378616
379857
  this.externalMcpServers = void 0;
378617
379858
  this.runner = void 0;
378618
379859
  this.runnerId = void 0;
379860
+ this.codeRepositories = void 0;
379861
+ this.openCodeFixPullRequests = void 0;
379862
+ this.openTelemetryPullRequests = void 0;
378619
379863
  this.verificationWindowMinutes = void 0;
378620
379864
  this.autoResolveOnVerifiedRecovery = void 0;
378621
379865
  this.createdByUser = void 0;
@@ -378950,7 +380194,7 @@ __decorateClass([
378950
380194
  required: true,
378951
380195
  type: TableColumnType_default.Boolean,
378952
380196
  title: "Let AI Compose Commands",
378953
- description: "Kept for rules saved before rules were simplified: the AI investigates the incident/alert and composes Bash/SSH commands for the rule's Runner and Command Runners, and the rule does nothing else. Suggest mode proposes a command plan for one-click approval; FullAuto mode may execute commands inline, but only ones matching the command allowlist. A OneUptime AI rule now composes commands on its Runner when it picks one, so new rules leave this off.",
380197
+ description: "Kept for rules saved before rules were simplified: the AI investigates the incident/alert and composes Bash commands for the rule's Runner and Command Runners, and the rule does nothing else. Suggest mode proposes a command plan for one-click approval; FullAuto mode may execute commands inline, but only ones matching the command allowlist. A OneUptime AI rule now composes commands on its Runner when it picks one, so new rules leave this off.",
378954
380198
  defaultValue: false,
378955
380199
  isDefaultValueColumn: true
378956
380200
  }),
@@ -379103,29 +380347,196 @@ __decorateClass([
379103
380347
  }),
379104
380348
  TableColumn_default({
379105
380349
  required: false,
379106
- type: TableColumnType_default.EntityArray,
379107
- modelType: IncidentSeverity,
379108
- title: "Incident Severities",
379109
- description: "Only trigger for incidents with these severities (incident rules only). Leave empty to match any severity."
380350
+ type: TableColumnType_default.EntityArray,
380351
+ modelType: IncidentSeverity,
380352
+ title: "Incident Severities",
380353
+ description: "Only trigger for incidents with these severities (incident rules only). Leave empty to match any severity."
380354
+ }),
380355
+ ManyToMany(
380356
+ () => {
380357
+ return IncidentSeverity;
380358
+ },
380359
+ { eager: false }
380360
+ ),
380361
+ JoinTable({
380362
+ name: "AutoRemediationRuleIncidentSeverity",
380363
+ inverseJoinColumn: {
380364
+ name: "incidentSeverityId",
380365
+ referencedColumnName: "_id"
380366
+ },
380367
+ joinColumn: {
380368
+ name: "autoRemediationRuleId",
380369
+ referencedColumnName: "_id"
380370
+ }
380371
+ })
380372
+ ], AutoRemediationRule.prototype, "incidentSeverities", 2);
380373
+ __decorateClass([
380374
+ ColumnAccessControl_default({
380375
+ create: [
380376
+ Permission_default.ProjectOwner,
380377
+ Permission_default.ProjectAdmin,
380378
+ Permission_default.CreateAutoRemediationRule
380379
+ ],
380380
+ read: [
380381
+ Permission_default.ProjectOwner,
380382
+ Permission_default.ProjectAdmin,
380383
+ Permission_default.ProjectMember,
380384
+ Permission_default.Viewer,
380385
+ Permission_default.ReadAutoRemediationRule
380386
+ ],
380387
+ update: [
380388
+ Permission_default.ProjectOwner,
380389
+ Permission_default.ProjectAdmin,
380390
+ Permission_default.EditAutoRemediationRule
380391
+ ]
380392
+ }),
380393
+ TableColumn_default({
380394
+ required: false,
380395
+ type: TableColumnType_default.EntityArray,
380396
+ modelType: AlertSeverity,
380397
+ title: "Alert Severities",
380398
+ description: "Only trigger for alerts with these severities (alert rules only). Leave empty to match any severity."
380399
+ }),
380400
+ ManyToMany(
380401
+ () => {
380402
+ return AlertSeverity;
380403
+ },
380404
+ { eager: false }
380405
+ ),
380406
+ JoinTable({
380407
+ name: "AutoRemediationRuleAlertSeverity",
380408
+ inverseJoinColumn: {
380409
+ name: "alertSeverityId",
380410
+ referencedColumnName: "_id"
380411
+ },
380412
+ joinColumn: {
380413
+ name: "autoRemediationRuleId",
380414
+ referencedColumnName: "_id"
380415
+ }
380416
+ })
380417
+ ], AutoRemediationRule.prototype, "alertSeverities", 2);
380418
+ __decorateClass([
380419
+ ColumnAccessControl_default({
380420
+ create: [
380421
+ Permission_default.ProjectOwner,
380422
+ Permission_default.ProjectAdmin,
380423
+ Permission_default.CreateAutoRemediationRule
380424
+ ],
380425
+ read: [
380426
+ Permission_default.ProjectOwner,
380427
+ Permission_default.ProjectAdmin,
380428
+ Permission_default.ProjectMember,
380429
+ Permission_default.Viewer,
380430
+ Permission_default.ReadAutoRemediationRule
380431
+ ],
380432
+ update: [
380433
+ Permission_default.ProjectOwner,
380434
+ Permission_default.ProjectAdmin,
380435
+ Permission_default.EditAutoRemediationRule
380436
+ ]
380437
+ }),
380438
+ TableColumn_default({
380439
+ required: false,
380440
+ type: TableColumnType_default.EntityArray,
380441
+ modelType: Label,
380442
+ title: "Labels",
380443
+ description: "Only trigger for incidents/alerts that carry at least one of these labels. Leave empty to match any label."
380444
+ }),
380445
+ ManyToMany(
380446
+ () => {
380447
+ return Label;
380448
+ },
380449
+ { eager: false }
380450
+ ),
380451
+ JoinTable({
380452
+ name: "AutoRemediationRuleLabel",
380453
+ inverseJoinColumn: {
380454
+ name: "labelId",
380455
+ referencedColumnName: "_id"
380456
+ },
380457
+ joinColumn: {
380458
+ name: "autoRemediationRuleId",
380459
+ referencedColumnName: "_id"
380460
+ }
380461
+ })
380462
+ ], AutoRemediationRule.prototype, "labels", 2);
380463
+ __decorateClass([
380464
+ ColumnAccessControl_default({
380465
+ create: [
380466
+ Permission_default.ProjectOwner,
380467
+ Permission_default.ProjectAdmin,
380468
+ Permission_default.CreateAutoRemediationRule
380469
+ ],
380470
+ read: [
380471
+ Permission_default.ProjectOwner,
380472
+ Permission_default.ProjectAdmin,
380473
+ Permission_default.ProjectMember,
380474
+ Permission_default.Viewer,
380475
+ Permission_default.ReadAutoRemediationRule
380476
+ ],
380477
+ update: [
380478
+ Permission_default.ProjectOwner,
380479
+ Permission_default.ProjectAdmin,
380480
+ Permission_default.EditAutoRemediationRule
380481
+ ]
380482
+ }),
380483
+ TableColumn_default({
380484
+ required: false,
380485
+ type: TableColumnType_default.EntityArray,
380486
+ modelType: Label,
380487
+ title: "Monitor Labels",
380488
+ description: "Only trigger when the incident/alert's monitor carries at least one of these labels \u2014 the natural way to scope rules to environments (e.g. staging vs production). Leave empty to match any monitor label."
380489
+ }),
380490
+ ManyToMany(
380491
+ () => {
380492
+ return Label;
380493
+ },
380494
+ { eager: false }
380495
+ ),
380496
+ JoinTable({
380497
+ name: "AutoRemediationRuleMonitorLabel",
380498
+ inverseJoinColumn: {
380499
+ name: "labelId",
380500
+ referencedColumnName: "_id"
380501
+ },
380502
+ joinColumn: {
380503
+ name: "autoRemediationRuleId",
380504
+ referencedColumnName: "_id"
380505
+ }
380506
+ })
380507
+ ], AutoRemediationRule.prototype, "monitorLabels", 2);
380508
+ __decorateClass([
380509
+ ColumnAccessControl_default({
380510
+ create: [
380511
+ Permission_default.ProjectOwner,
380512
+ Permission_default.ProjectAdmin,
380513
+ Permission_default.CreateAutoRemediationRule
380514
+ ],
380515
+ read: [
380516
+ Permission_default.ProjectOwner,
380517
+ Permission_default.ProjectAdmin,
380518
+ Permission_default.ProjectMember,
380519
+ Permission_default.Viewer,
380520
+ Permission_default.ReadAutoRemediationRule
380521
+ ],
380522
+ update: [
380523
+ Permission_default.ProjectOwner,
380524
+ Permission_default.ProjectAdmin,
380525
+ Permission_default.EditAutoRemediationRule
380526
+ ]
380527
+ }),
380528
+ TableColumn_default({
380529
+ required: false,
380530
+ type: TableColumnType_default.LongText,
380531
+ title: "Title Pattern",
380532
+ description: "Case-insensitive regex matched against the entity's title. Leave empty to match any title."
379110
380533
  }),
379111
- ManyToMany(
379112
- () => {
379113
- return IncidentSeverity;
379114
- },
379115
- { eager: false }
379116
- ),
379117
- JoinTable({
379118
- name: "AutoRemediationRuleIncidentSeverity",
379119
- inverseJoinColumn: {
379120
- name: "incidentSeverityId",
379121
- referencedColumnName: "_id"
379122
- },
379123
- joinColumn: {
379124
- name: "autoRemediationRuleId",
379125
- referencedColumnName: "_id"
379126
- }
380534
+ Column({
380535
+ type: ColumnType_default.LongText,
380536
+ nullable: true,
380537
+ length: ColumnLength_default.LongText
379127
380538
  })
379128
- ], AutoRemediationRule.prototype, "incidentSeverities", 2);
380539
+ ], AutoRemediationRule.prototype, "titlePattern", 2);
379129
380540
  __decorateClass([
379130
380541
  ColumnAccessControl_default({
379131
380542
  create: [
@@ -379148,29 +380559,16 @@ __decorateClass([
379148
380559
  }),
379149
380560
  TableColumn_default({
379150
380561
  required: false,
379151
- type: TableColumnType_default.EntityArray,
379152
- modelType: AlertSeverity,
379153
- title: "Alert Severities",
379154
- description: "Only trigger for alerts with these severities (alert rules only). Leave empty to match any severity."
380562
+ type: TableColumnType_default.LongText,
380563
+ title: "Description Pattern",
380564
+ description: "Case-insensitive regex matched against the entity's description. Leave empty to match any description."
379155
380565
  }),
379156
- ManyToMany(
379157
- () => {
379158
- return AlertSeverity;
379159
- },
379160
- { eager: false }
379161
- ),
379162
- JoinTable({
379163
- name: "AutoRemediationRuleAlertSeverity",
379164
- inverseJoinColumn: {
379165
- name: "alertSeverityId",
379166
- referencedColumnName: "_id"
379167
- },
379168
- joinColumn: {
379169
- name: "autoRemediationRuleId",
379170
- referencedColumnName: "_id"
379171
- }
380566
+ Column({
380567
+ type: ColumnType_default.LongText,
380568
+ nullable: true,
380569
+ length: ColumnLength_default.LongText
379172
380570
  })
379173
- ], AutoRemediationRule.prototype, "alertSeverities", 2);
380571
+ ], AutoRemediationRule.prototype, "descriptionPattern", 2);
379174
380572
  __decorateClass([
379175
380573
  ColumnAccessControl_default({
379176
380574
  create: [
@@ -379194,20 +380592,20 @@ __decorateClass([
379194
380592
  TableColumn_default({
379195
380593
  required: false,
379196
380594
  type: TableColumnType_default.EntityArray,
379197
- modelType: Label,
379198
- title: "Labels",
379199
- description: "Only trigger for incidents/alerts that carry at least one of these labels. Leave empty to match any label."
380595
+ modelType: Runbook,
380596
+ title: "Runbooks",
380597
+ description: "The runbooks OneUptime AI may pick and run for this rule. Leave empty to let it pick any of the project's runbooks. A rule whose Fix With is Runbooks starts every one of them for every match instead."
379200
380598
  }),
379201
380599
  ManyToMany(
379202
380600
  () => {
379203
- return Label;
380601
+ return Runbook;
379204
380602
  },
379205
380603
  { eager: false }
379206
380604
  ),
379207
380605
  JoinTable({
379208
- name: "AutoRemediationRuleLabel",
380606
+ name: "AutoRemediationRuleRunbook",
379209
380607
  inverseJoinColumn: {
379210
- name: "labelId",
380608
+ name: "runbookId",
379211
380609
  referencedColumnName: "_id"
379212
380610
  },
379213
380611
  joinColumn: {
@@ -379215,7 +380613,7 @@ __decorateClass([
379215
380613
  referencedColumnName: "_id"
379216
380614
  }
379217
380615
  })
379218
- ], AutoRemediationRule.prototype, "labels", 2);
380616
+ ], AutoRemediationRule.prototype, "runbooks", 2);
379219
380617
  __decorateClass([
379220
380618
  ColumnAccessControl_default({
379221
380619
  create: [
@@ -379239,20 +380637,20 @@ __decorateClass([
379239
380637
  TableColumn_default({
379240
380638
  required: false,
379241
380639
  type: TableColumnType_default.EntityArray,
379242
- modelType: Label,
379243
- title: "Monitor Labels",
379244
- description: "Only trigger when the incident/alert's monitor carries at least one of these labels \u2014 the natural way to scope rules to environments (e.g. staging vs production). Leave empty to match any monitor label."
380640
+ modelType: ExternalMcpServer,
380641
+ title: "MCP Servers",
380642
+ description: "The external MCP servers OneUptime AI may use while it fixes what this rule matches. Leave empty to let it use all of the project's MCP servers; changes through them are then always proposed for approval first."
379245
380643
  }),
379246
380644
  ManyToMany(
379247
380645
  () => {
379248
- return Label;
380646
+ return ExternalMcpServer;
379249
380647
  },
379250
380648
  { eager: false }
379251
380649
  ),
379252
380650
  JoinTable({
379253
- name: "AutoRemediationRuleMonitorLabel",
380651
+ name: "AutoRemediationRuleExternalMcpServer",
379254
380652
  inverseJoinColumn: {
379255
- name: "labelId",
380653
+ name: "externalMcpServerId",
379256
380654
  referencedColumnName: "_id"
379257
380655
  },
379258
380656
  joinColumn: {
@@ -379260,7 +380658,7 @@ __decorateClass([
379260
380658
  referencedColumnName: "_id"
379261
380659
  }
379262
380660
  })
379263
- ], AutoRemediationRule.prototype, "monitorLabels", 2);
380661
+ ], AutoRemediationRule.prototype, "externalMcpServers", 2);
379264
380662
  __decorateClass([
379265
380663
  ColumnAccessControl_default({
379266
380664
  create: [
@@ -379282,17 +380680,25 @@ __decorateClass([
379282
380680
  ]
379283
380681
  }),
379284
380682
  TableColumn_default({
379285
- required: false,
379286
- type: TableColumnType_default.LongText,
379287
- title: "Title Pattern",
379288
- description: "Case-insensitive regex matched against the entity's title. Leave empty to match any title."
380683
+ manyToOneRelationColumn: "runnerId",
380684
+ type: TableColumnType_default.Entity,
380685
+ modelType: Runner,
380686
+ title: "Runner",
380687
+ description: "The Runner OneUptime AI runs this rule's Bash commands on, inside your network. Empty means none: OneUptime AI runs no commands of its own for the rule. Commands on the affected Kubernetes cluster or host always go through its AI agent."
379289
380688
  }),
379290
- Column({
379291
- type: ColumnType_default.LongText,
379292
- nullable: true,
379293
- length: ColumnLength_default.LongText
379294
- })
379295
- ], AutoRemediationRule.prototype, "titlePattern", 2);
380689
+ ManyToOne(
380690
+ () => {
380691
+ return Runner;
380692
+ },
380693
+ {
380694
+ eager: false,
380695
+ nullable: true,
380696
+ onDelete: "SET NULL",
380697
+ orphanedRowAction: "nullify"
380698
+ }
380699
+ ),
380700
+ JoinColumn({ name: "runnerId" })
380701
+ ], AutoRemediationRule.prototype, "runner", 2);
379296
380702
  __decorateClass([
379297
380703
  ColumnAccessControl_default({
379298
380704
  create: [
@@ -379313,18 +380719,20 @@ __decorateClass([
379313
380719
  Permission_default.EditAutoRemediationRule
379314
380720
  ]
379315
380721
  }),
380722
+ Index(),
379316
380723
  TableColumn_default({
380724
+ type: TableColumnType_default.ObjectID,
379317
380725
  required: false,
379318
- type: TableColumnType_default.LongText,
379319
- title: "Description Pattern",
379320
- description: "Case-insensitive regex matched against the entity's description. Leave empty to match any description."
380726
+ canReadOnRelationQuery: true,
380727
+ title: "Runner ID",
380728
+ description: "ID of the Runner OneUptime AI runs this rule's Bash commands on: one of the project's own Runners. Empty means none: OneUptime AI runs no commands of its own for the rule. Commands on the affected Kubernetes cluster or host always go through its AI agent."
379321
380729
  }),
379322
380730
  Column({
379323
- type: ColumnType_default.LongText,
380731
+ type: ColumnType_default.ObjectID,
379324
380732
  nullable: true,
379325
- length: ColumnLength_default.LongText
380733
+ transformer: ObjectID.getDatabaseTransformer()
379326
380734
  })
379327
- ], AutoRemediationRule.prototype, "descriptionPattern", 2);
380735
+ ], AutoRemediationRule.prototype, "runnerId", 2);
379328
380736
  __decorateClass([
379329
380737
  ColumnAccessControl_default({
379330
380738
  create: [
@@ -379348,20 +380756,20 @@ __decorateClass([
379348
380756
  TableColumn_default({
379349
380757
  required: false,
379350
380758
  type: TableColumnType_default.EntityArray,
379351
- modelType: Runbook,
379352
- title: "Runbooks",
379353
- description: "The runbooks OneUptime AI may pick and run for this rule. Leave empty to let it pick any of the project's runbooks. A rule whose Fix With is Runbooks starts every one of them for every match instead."
380759
+ modelType: CodeRepository,
380760
+ title: "Code Repositories",
380761
+ description: "The code repositories OneUptime AI may read while it fixes what this rule matches, and open the rule's pull requests in. Leave empty to let it use every repository the project has connected."
379354
380762
  }),
379355
380763
  ManyToMany(
379356
380764
  () => {
379357
- return Runbook;
380765
+ return CodeRepository;
379358
380766
  },
379359
380767
  { eager: false }
379360
380768
  ),
379361
380769
  JoinTable({
379362
- name: "AutoRemediationRuleRunbook",
380770
+ name: "AutoRemediationRuleCodeRepository",
379363
380771
  inverseJoinColumn: {
379364
- name: "runbookId",
380772
+ name: "codeRepositoryId",
379365
380773
  referencedColumnName: "_id"
379366
380774
  },
379367
380775
  joinColumn: {
@@ -379369,7 +380777,7 @@ __decorateClass([
379369
380777
  referencedColumnName: "_id"
379370
380778
  }
379371
380779
  })
379372
- ], AutoRemediationRule.prototype, "runbooks", 2);
380780
+ ], AutoRemediationRule.prototype, "codeRepositories", 2);
379373
380781
  __decorateClass([
379374
380782
  ColumnAccessControl_default({
379375
380783
  create: [
@@ -379391,30 +380799,20 @@ __decorateClass([
379391
380799
  ]
379392
380800
  }),
379393
380801
  TableColumn_default({
379394
- required: false,
379395
- type: TableColumnType_default.EntityArray,
379396
- modelType: ExternalMcpServer,
379397
- title: "MCP Servers",
379398
- description: "The external MCP servers OneUptime AI may use while it fixes what this rule matches. Leave empty to let it use all of the project's MCP servers; changes through them are then always proposed for approval first."
380802
+ required: true,
380803
+ type: TableColumnType_default.Boolean,
380804
+ title: "Open Fix Pull Requests",
380805
+ description: "When an investigation of an incident or alert this rule matches finds the cause in your code, OneUptime AI opens a pull request with the fix, for review. Nothing is merged. Acts only while fixing new incidents (or alerts) automatically is on. On by default.",
380806
+ defaultValue: true,
380807
+ isDefaultValueColumn: true,
380808
+ example: true
379399
380809
  }),
379400
- ManyToMany(
379401
- () => {
379402
- return ExternalMcpServer;
379403
- },
379404
- { eager: false }
379405
- ),
379406
- JoinTable({
379407
- name: "AutoRemediationRuleExternalMcpServer",
379408
- inverseJoinColumn: {
379409
- name: "externalMcpServerId",
379410
- referencedColumnName: "_id"
379411
- },
379412
- joinColumn: {
379413
- name: "autoRemediationRuleId",
379414
- referencedColumnName: "_id"
379415
- }
380810
+ Column({
380811
+ type: ColumnType_default.Boolean,
380812
+ nullable: false,
380813
+ default: true
379416
380814
  })
379417
- ], AutoRemediationRule.prototype, "externalMcpServers", 2);
380815
+ ], AutoRemediationRule.prototype, "openCodeFixPullRequests", 2);
379418
380816
  __decorateClass([
379419
380817
  ColumnAccessControl_default({
379420
380818
  create: [
@@ -379436,59 +380834,20 @@ __decorateClass([
379436
380834
  ]
379437
380835
  }),
379438
380836
  TableColumn_default({
379439
- manyToOneRelationColumn: "runnerId",
379440
- type: TableColumnType_default.Entity,
379441
- modelType: Runner,
379442
- title: "Runner",
379443
- description: "The Runner OneUptime AI runs this rule's commands on (Bash, SSH), inside your network. Empty means none: OneUptime AI fixes through the AI agent on the affected Kubernetes cluster or host."
379444
- }),
379445
- ManyToOne(
379446
- () => {
379447
- return Runner;
379448
- },
379449
- {
379450
- eager: false,
379451
- nullable: true,
379452
- onDelete: "SET NULL",
379453
- orphanedRowAction: "nullify"
379454
- }
379455
- ),
379456
- JoinColumn({ name: "runnerId" })
379457
- ], AutoRemediationRule.prototype, "runner", 2);
379458
- __decorateClass([
379459
- ColumnAccessControl_default({
379460
- create: [
379461
- Permission_default.ProjectOwner,
379462
- Permission_default.ProjectAdmin,
379463
- Permission_default.CreateAutoRemediationRule
379464
- ],
379465
- read: [
379466
- Permission_default.ProjectOwner,
379467
- Permission_default.ProjectAdmin,
379468
- Permission_default.ProjectMember,
379469
- Permission_default.Viewer,
379470
- Permission_default.ReadAutoRemediationRule
379471
- ],
379472
- update: [
379473
- Permission_default.ProjectOwner,
379474
- Permission_default.ProjectAdmin,
379475
- Permission_default.EditAutoRemediationRule
379476
- ]
379477
- }),
379478
- Index(),
379479
- TableColumn_default({
379480
- type: TableColumnType_default.ObjectID,
379481
- required: false,
379482
- canReadOnRelationQuery: true,
379483
- title: "Runner ID",
379484
- description: "ID of the Runner OneUptime AI runs this rule's commands on: one of the project's own Runners. Empty means none: OneUptime AI fixes through the AI agent on the affected Kubernetes cluster or host."
380837
+ required: true,
380838
+ type: TableColumnType_default.Boolean,
380839
+ title: "Open Telemetry Pull Requests",
380840
+ description: "When missing logs, traces or metrics stop an investigation of an incident or alert this rule matches, OneUptime AI opens a pull request that adds them, for review. Nothing is merged. Acts only while fixing new incidents (or alerts) automatically is on. On by default.",
380841
+ defaultValue: true,
380842
+ isDefaultValueColumn: true,
380843
+ example: true
379485
380844
  }),
379486
380845
  Column({
379487
- type: ColumnType_default.ObjectID,
379488
- nullable: true,
379489
- transformer: ObjectID.getDatabaseTransformer()
380846
+ type: ColumnType_default.Boolean,
380847
+ nullable: false,
380848
+ default: true
379490
380849
  })
379491
- ], AutoRemediationRule.prototype, "runnerId", 2);
380850
+ ], AutoRemediationRule.prototype, "openTelemetryPullRequests", 2);
379492
380851
  __decorateClass([
379493
380852
  ColumnAccessControl_default({
379494
380853
  create: [
@@ -379697,7 +381056,7 @@ AutoRemediationRule = __decorateClass([
379697
381056
  singularName: "Auto Remediation Rule",
379698
381057
  pluralName: "Auto Remediation Rules",
379699
381058
  icon: IconProp_default.Bolt,
379700
- tableDescription: "Which new incidents or alerts OneUptime AI fixes automatically, and whether it asks first. It may run the project's runbooks (only the rule's, when it names some), commands on a Runner the rule picks, and the tools of the project's external MCP servers (only the rule's, when it names some). With no rule, OneUptime AI fixes every one while automatic fixing is on."
381059
+ tableDescription: "Which new incidents or alerts OneUptime AI fixes automatically, and whether it asks first. It may run the project's runbooks (only the rule's, when it names some), Bash commands on a Runner the rule picks, the tools of the project's external MCP servers (only the rule's, when it names some), and open fix and telemetry pull requests in the project's code repositories (only the rule's, when it names some). With no rule, OneUptime AI fixes every one while automatic fixing is on, pull requests included."
379701
381060
  })
379702
381061
  ], AutoRemediationRule);
379703
381062
 
@@ -380965,6 +382324,7 @@ var AIInvestigationRule = class extends RuleBaseModel {
380965
382324
  this.descriptionPattern = void 0;
380966
382325
  this.onlyIfOpenAfterMinutes = void 0;
380967
382326
  this.externalMcpServers = void 0;
382327
+ this.codeRepositories = void 0;
380968
382328
  this.createdByUser = void 0;
380969
382329
  this.createdByUserId = void 0;
380970
382330
  this.deletedByUser = void 0;
@@ -381411,6 +382771,42 @@ __decorateClass([
381411
382771
  }
381412
382772
  })
381413
382773
  ], AIInvestigationRule.prototype, "externalMcpServers", 2);
382774
+ __decorateClass([
382775
+ ColumnAccessControl_default({
382776
+ create: [Permission_default.ProjectOwner, Permission_default.ProjectAdmin],
382777
+ read: [
382778
+ Permission_default.ProjectOwner,
382779
+ Permission_default.ProjectAdmin,
382780
+ Permission_default.ProjectMember,
382781
+ Permission_default.Viewer
382782
+ ],
382783
+ update: [Permission_default.ProjectOwner, Permission_default.ProjectAdmin]
382784
+ }),
382785
+ TableColumn_default({
382786
+ required: false,
382787
+ type: TableColumnType_default.EntityArray,
382788
+ modelType: CodeRepository,
382789
+ title: "Code Repositories",
382790
+ description: "The code repositories OneUptime AI may read while it investigates what this rule matches. Leave empty to let it read every repository the project has connected."
382791
+ }),
382792
+ ManyToMany(
382793
+ () => {
382794
+ return CodeRepository;
382795
+ },
382796
+ { eager: false }
382797
+ ),
382798
+ JoinTable({
382799
+ name: "AIInvestigationRuleCodeRepository",
382800
+ inverseJoinColumn: {
382801
+ name: "codeRepositoryId",
382802
+ referencedColumnName: "_id"
382803
+ },
382804
+ joinColumn: {
382805
+ name: "aiInvestigationRuleId",
382806
+ referencedColumnName: "_id"
382807
+ }
382808
+ })
382809
+ ], AIInvestigationRule.prototype, "codeRepositories", 2);
381414
382810
  __decorateClass([
381415
382811
  ColumnAccessControl_default({
381416
382812
  create: [Permission_default.ProjectOwner, Permission_default.ProjectAdmin],
@@ -446101,6 +447497,7 @@ __decorateClass([
446101
447497
  canReadOnRelationQuery: true,
446102
447498
  description: "Items on page",
446103
447499
  defaultValue: 10,
447500
+ isDefaultValueColumn: true,
446104
447501
  example: 10
446105
447502
  }),
446106
447503
  Column({
@@ -449445,7 +450842,7 @@ __decorateClass([
449445
450842
  ]
449446
450843
  }),
449447
450844
  TableColumn_default({
449448
- isDefaultValueColumn: false,
450845
+ isDefaultValueColumn: true,
449449
450846
  required: true,
449450
450847
  type: TableColumnType_default.Boolean,
449451
450848
  defaultValue: true,
@@ -468516,6 +469913,7 @@ var AllModelTypes = [
468516
469913
  IncidentSeverity,
468517
469914
  IncidentNoteTemplate,
468518
469915
  IncidentPostmortemTemplate,
469916
+ IncidentPostmortemStatus,
468519
469917
  Form,
468520
469918
  FormSubmission,
468521
469919
  AlertState,
@@ -468665,7 +470063,6 @@ var AllModelTypes = [
468665
470063
  RunnerJob,
468666
470064
  RunnerOwnerTeam,
468667
470065
  RunnerOwnerUser,
468668
- RunbookCredential,
468669
470066
  RunbookVariable,
468670
470067
  ProjectSSO,
468671
470068
  ProjectOIDC,