@oneuptime/common 14.0.107 → 14.0.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/DataBiConnection.d.mts +4 -0
- package/Models/DatabaseModels/DataBiConnection.d.ts +4 -0
- package/Models/DatabaseModels/DataBiConnection.js +59 -2
- package/Models/DatabaseModels/Index.js +2 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.mts +20 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.ts +20 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.js +353 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.mjs +2 -0
- package/Models/DatabaseModels/WhatsAppLog.d.mts +3 -0
- package/Models/DatabaseModels/WhatsAppLog.d.ts +3 -0
- package/Models/DatabaseModels/WhatsAppLog.js +62 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.mts +11 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.ts +11 -0
- package/Models/DatabaseModels/WorkspaceUserGroup.js +1 -1
- package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.mts +212 -0
- package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.ts +212 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.mts +3 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.ts +3 -0
- package/Types/AI/AIChatTypes.d.mts +2 -1
- package/Types/AI/AIChatTypes.d.ts +2 -1
- package/Types/AI/AIChatTypes.js +2 -0
- package/Types/AI/InvestigationNotStartedReason.d.mts +7 -0
- package/Types/AI/InvestigationNotStartedReason.d.ts +7 -0
- package/Types/CodeInSentence.d.mts +8 -0
- package/Types/CodeInSentence.d.ts +8 -0
- package/Types/CodeInSentence.js +875 -0
- package/Types/CodeInSentence.mjs +4 -0
- package/Types/Dashboard/DashboardComponentType.d.mts +2 -0
- package/Types/Dashboard/DashboardComponentType.d.ts +2 -0
- package/Types/Dashboard/DashboardComponentType.js +7 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.d.mts +3 -1
- package/Types/Dashboard/DashboardComponents/ComponentArgument.d.ts +3 -1
- package/Types/Dashboard/DashboardComponents/ComponentArgument.js +3 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.mts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.ts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.js +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.mjs +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.mts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.ts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.js +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.mjs +1 -0
- package/Types/Dashboard/PublicDashboardServedSettings.js +15 -7
- package/Types/DataObservability/DataBiRefreshAlert.d.mts +44 -0
- package/Types/DataObservability/DataBiRefreshAlert.d.ts +44 -0
- package/Types/DataObservability/DataBiRefreshAlert.js +206 -0
- package/Types/DataObservability/DataBiRefreshAlert.mjs +12 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.mts +7 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.ts +7 -0
- package/Types/DataObservability/DataObservabilityApiTypes.js +12 -0
- package/Types/DataObservability/DataTableLineage.d.mts +22 -1
- package/Types/DataObservability/DataTableLineage.d.ts +22 -1
- package/Types/DataObservability/DataTableLineage.js +13 -5
- package/Types/DataObservability/DataTableLineage.mjs +2 -0
- package/Types/HashedString.js +9 -2
- package/Types/Monitor/CriteriaFilterValues.d.mts +16 -0
- package/Types/Monitor/CriteriaFilterValues.d.ts +16 -0
- package/Types/Monitor/CriteriaFilterValues.js +324 -0
- package/Types/Monitor/CriteriaFilterValues.mjs +2 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.d.mts +13 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.d.ts +13 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.js +108 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.mjs +3 -0
- package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.mts +1 -0
- package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.ts +1 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +22 -2
- package/Types/Monitor/MonitorStep.js +28 -11
- package/Types/Monitor/MonitorStepMetricMonitor.js +6 -1
- package/Types/Monitor/MonitorStepRollingTime.d.mts +12 -0
- package/Types/Monitor/MonitorStepRollingTime.d.ts +12 -0
- package/Types/Monitor/MonitorStepRollingTime.js +117 -0
- package/Types/Monitor/MonitorStepRollingTime.mjs +2 -0
- package/Types/Monitor/SeriesContext/SeriesLabelDisplay.js +11 -0
- package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.mts +1 -0
- package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.ts +1 -0
- package/Types/Monitor/TelemetryAlertRule.js +7 -2
- package/Types/NotificationRule/NotificationRepeat.d.mts +10 -0
- package/Types/NotificationRule/NotificationRepeat.d.ts +10 -0
- package/Types/NotificationRule/NotificationRepeat.js +51 -0
- package/Types/NotificationRule/NotificationRepeat.mjs +2 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +70 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +70 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +276 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +12 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.mts +9 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.ts +9 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.js +44 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.mjs +5 -0
- package/Types/Probe/ProbeMonitorResponse.d.mts +1 -0
- package/Types/Probe/ProbeMonitorResponse.d.ts +1 -0
- package/Types/ReadingDirection.d.mts +2 -0
- package/Types/ReadingDirection.d.ts +2 -0
- package/Types/ReadingDirection.js +221 -25
- package/Types/ReadingDirection.mjs +2 -0
- package/Types/RollingTime/RollingTimeUtil.d.mts +7 -0
- package/Types/RollingTime/RollingTimeUtil.d.ts +7 -0
- package/Types/RollingTime/RollingTimeUtil.js +240 -71
- package/Types/Rum/ProductAnalyticsSavedViews.d.mts +56 -0
- package/Types/Rum/ProductAnalyticsSavedViews.d.ts +56 -0
- package/Types/Rum/ProductAnalyticsSavedViews.js +219 -0
- package/Types/Rum/ProductAnalyticsSavedViews.mjs +14 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +8 -7
- package/Types/Telemetry/ServiceType.d.mts +1 -0
- package/Types/Telemetry/ServiceType.d.ts +1 -0
- package/Types/Telemetry/ServiceType.js +6 -0
- package/Utils/Crypto.js +10 -3
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.mts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.ts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.js +67 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.mjs +2 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.mts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.ts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.js +68 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.mjs +2 -0
- package/Utils/Dashboard/DashboardWidgetIds.js +6 -1
- package/Utils/Metrics/MetricQueryCloudAggregation.js +2 -4
- package/Utils/Monitor/MonitorRootCauseWording.js +28 -24
- package/Utils/Monitor/MonitorStepMetricQueries.js +2 -1
- package/Utils/Monitor/MonitorStepsValuesUtil.d.mts +13 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.d.ts +13 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.js +80 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.mjs +2 -0
- package/Utils/Slo/SloProjection.d.mts +18 -0
- package/Utils/Slo/SloProjection.d.ts +18 -0
- package/Utils/Slo/SloProjection.js +53 -12
- package/Utils/Slo/SloProjection.mjs +2 -0
- package/Utils/StatusPage/ResourceExplorer.d.mts +0 -10
- package/Utils/StatusPage/ResourceExplorer.d.ts +0 -10
- package/Utils/StatusPage/ResourceExplorer.js +0 -28
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import Project from "./Project.mjs";
|
|
|
2
2
|
import User from "./User.mjs";
|
|
3
3
|
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel.mjs";
|
|
4
4
|
import DataBiTool from "../../Types/DataObservability/DataBiTool.mjs";
|
|
5
|
+
import { JSONArray } from "../../Types/JSON.mjs";
|
|
5
6
|
import ObjectID from "../../Types/ObjectID.mjs";
|
|
6
7
|
export default class DataBiConnection extends BaseModel {
|
|
7
8
|
project?: Project;
|
|
@@ -18,6 +19,9 @@ export default class DataBiConnection extends BaseModel {
|
|
|
18
19
|
lastSyncWarning?: string;
|
|
19
20
|
usageReadFrom?: Date;
|
|
20
21
|
usageReadUntil?: Date;
|
|
22
|
+
alertOnFailedRefreshes?: boolean;
|
|
23
|
+
refreshMonitorId?: ObjectID;
|
|
24
|
+
failedRefreshes?: JSONArray;
|
|
21
25
|
createdByUser?: User;
|
|
22
26
|
createdByUserId?: ObjectID;
|
|
23
27
|
deletedByUser?: User;
|
|
@@ -2,6 +2,7 @@ import Project from "./Project";
|
|
|
2
2
|
import User from "./User";
|
|
3
3
|
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
4
4
|
import DataBiTool from "../../Types/DataObservability/DataBiTool";
|
|
5
|
+
import { JSONArray } from "../../Types/JSON";
|
|
5
6
|
import ObjectID from "../../Types/ObjectID";
|
|
6
7
|
export default class DataBiConnection extends BaseModel {
|
|
7
8
|
project?: Project;
|
|
@@ -18,6 +19,9 @@ export default class DataBiConnection extends BaseModel {
|
|
|
18
19
|
lastSyncWarning?: string;
|
|
19
20
|
usageReadFrom?: Date;
|
|
20
21
|
usageReadUntil?: Date;
|
|
22
|
+
alertOnFailedRefreshes?: boolean;
|
|
23
|
+
refreshMonitorId?: ObjectID;
|
|
24
|
+
failedRefreshes?: JSONArray;
|
|
21
25
|
createdByUser?: User;
|
|
22
26
|
createdByUserId?: ObjectID;
|
|
23
27
|
deletedByUser?: User;
|
|
@@ -42,8 +42,10 @@ const typeorm_1 = require("typeorm");
|
|
|
42
42
|
* may read its dashboards and what they query. Every hour OneUptime reads
|
|
43
43
|
* the tool's dashboards and the tables behind each (DataBiSync), so a late
|
|
44
44
|
* or broken table's alert lists the dashboards people open on it - and, for
|
|
45
|
-
* Power BI, how often each is viewed and when its data last refreshed.
|
|
46
|
-
*
|
|
45
|
+
* Power BI, how often each is viewed and when its data last refreshed. A
|
|
46
|
+
* Power BI tool can also alert on its datasets' failed refreshes, through a
|
|
47
|
+
* monitor OneUptime keeps for it (DataBiRefreshAlerts). The credentials are
|
|
48
|
+
* encrypted at rest and never returned by the API.
|
|
47
49
|
*/
|
|
48
50
|
const readPermissions = [
|
|
49
51
|
Permission_1.default.ProjectOwner,
|
|
@@ -125,6 +127,14 @@ let DataBiConnection = class DataBiConnection extends DatabaseBaseModel_1.defaul
|
|
|
125
127
|
this.lastSyncWarning = undefined;
|
|
126
128
|
this.usageReadFrom = undefined;
|
|
127
129
|
this.usageReadUntil = undefined;
|
|
130
|
+
this.alertOnFailedRefreshes = undefined;
|
|
131
|
+
/*
|
|
132
|
+
* An id, not a relation: the monitor is found by it and checked to be
|
|
133
|
+
* there (DataBiRefreshAlerts), and removed with the tool
|
|
134
|
+
* (DataBiConnectionService).
|
|
135
|
+
*/
|
|
136
|
+
this.refreshMonitorId = undefined;
|
|
137
|
+
this.failedRefreshes = undefined;
|
|
128
138
|
this.createdByUser = undefined;
|
|
129
139
|
this.createdByUserId = undefined;
|
|
130
140
|
this.deletedByUser = undefined;
|
|
@@ -349,6 +359,53 @@ __decorate([
|
|
|
349
359
|
}),
|
|
350
360
|
__metadata("design:type", Date)
|
|
351
361
|
], DataBiConnection.prototype, "usageReadUntil", void 0);
|
|
362
|
+
__decorate([
|
|
363
|
+
(0, ColumnAccessControl_1.default)(editableColumnAccess),
|
|
364
|
+
(0, TableColumn_1.default)({
|
|
365
|
+
type: TableColumnType_1.default.Boolean,
|
|
366
|
+
required: false,
|
|
367
|
+
title: "Alert on Failed Refreshes",
|
|
368
|
+
description: "Whether OneUptime keeps a monitor that opens an alert for each dataset whose refresh failed (Power BI), resolved once a later refresh completes.",
|
|
369
|
+
defaultValue: false,
|
|
370
|
+
}),
|
|
371
|
+
(0, typeorm_1.Column)({
|
|
372
|
+
type: ColumnType_1.default.Boolean,
|
|
373
|
+
nullable: true,
|
|
374
|
+
default: false,
|
|
375
|
+
}),
|
|
376
|
+
__metadata("design:type", Boolean)
|
|
377
|
+
], DataBiConnection.prototype, "alertOnFailedRefreshes", void 0);
|
|
378
|
+
__decorate([
|
|
379
|
+
(0, ColumnAccessControl_1.default)(serverWrittenColumnAccess),
|
|
380
|
+
(0, TableColumn_1.default)({
|
|
381
|
+
type: TableColumnType_1.default.ObjectID,
|
|
382
|
+
required: false,
|
|
383
|
+
computed: true,
|
|
384
|
+
title: "Refresh Monitor ID",
|
|
385
|
+
description: "ID of the Metrics monitor that alerts on the tool's failed refreshes.",
|
|
386
|
+
}),
|
|
387
|
+
(0, typeorm_1.Column)({
|
|
388
|
+
type: ColumnType_1.default.ObjectID,
|
|
389
|
+
nullable: true,
|
|
390
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
391
|
+
}),
|
|
392
|
+
__metadata("design:type", ObjectID_1.default)
|
|
393
|
+
], DataBiConnection.prototype, "refreshMonitorId", void 0);
|
|
394
|
+
__decorate([
|
|
395
|
+
(0, ColumnAccessControl_1.default)(serverWrittenColumnAccess),
|
|
396
|
+
(0, TableColumn_1.default)({
|
|
397
|
+
type: TableColumnType_1.default.JSON,
|
|
398
|
+
required: false,
|
|
399
|
+
computed: true,
|
|
400
|
+
title: "Failed Refreshes",
|
|
401
|
+
description: "The datasets whose last refresh failed or was cancelled (Power BI), each with its error, until a later refresh completes - and for an hour after that, marked recovered.",
|
|
402
|
+
}),
|
|
403
|
+
(0, typeorm_1.Column)({
|
|
404
|
+
type: ColumnType_1.default.JSON,
|
|
405
|
+
nullable: true,
|
|
406
|
+
}),
|
|
407
|
+
__metadata("design:type", Array)
|
|
408
|
+
], DataBiConnection.prototype, "failedRefreshes", void 0);
|
|
352
409
|
__decorate([
|
|
353
410
|
(0, ColumnAccessControl_1.default)(createOnlyColumnAccess),
|
|
354
411
|
(0, TableColumn_1.default)({
|
|
@@ -130,6 +130,7 @@ const RumApplicationClient_1 = __importDefault(require("./RumApplicationClient")
|
|
|
130
130
|
const RumSessionReplayView_1 = __importDefault(require("./RumSessionReplayView"));
|
|
131
131
|
const RumSessionErasureRequest_1 = __importDefault(require("./RumSessionErasureRequest"));
|
|
132
132
|
const RumSessionPin_1 = __importDefault(require("./RumSessionPin"));
|
|
133
|
+
const RumProductAnalyticsSavedView_1 = __importDefault(require("./RumProductAnalyticsSavedView"));
|
|
133
134
|
// API Keys
|
|
134
135
|
const ApiKey_1 = __importDefault(require("./ApiKey"));
|
|
135
136
|
const ApiKeyCustomRole_1 = __importDefault(require("./ApiKeyCustomRole"));
|
|
@@ -1236,6 +1237,7 @@ const AllModelTypes = [
|
|
|
1236
1237
|
RumSessionReplayView_1.default,
|
|
1237
1238
|
RumSessionErasureRequest_1.default,
|
|
1238
1239
|
RumSessionPin_1.default,
|
|
1240
|
+
RumProductAnalyticsSavedView_1.default,
|
|
1239
1241
|
DeletedProject_1.default,
|
|
1240
1242
|
MarketplaceSubscription_1.default,
|
|
1241
1243
|
MarketplaceUsageReport_1.default,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Project from "./Project.mjs";
|
|
2
|
+
import RumApplication from "./RumApplication.mjs";
|
|
3
|
+
import User from "./User.mjs";
|
|
4
|
+
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel.mjs";
|
|
5
|
+
import { JSONObject } from "../../Types/JSON.mjs";
|
|
6
|
+
import ObjectID from "../../Types/ObjectID.mjs";
|
|
7
|
+
import { ProductAnalyticsSavedViewType } from "../../Types/Rum/ProductAnalyticsSavedViews.mjs";
|
|
8
|
+
export default class RumProductAnalyticsSavedView extends BaseModel {
|
|
9
|
+
project?: Project;
|
|
10
|
+
projectId?: ObjectID;
|
|
11
|
+
rumApplication?: RumApplication;
|
|
12
|
+
rumApplicationId?: ObjectID;
|
|
13
|
+
name?: string;
|
|
14
|
+
viewType?: ProductAnalyticsSavedViewType;
|
|
15
|
+
definition?: JSONObject;
|
|
16
|
+
createdByUser?: User;
|
|
17
|
+
createdByUserId?: ObjectID;
|
|
18
|
+
deletedByUser?: User;
|
|
19
|
+
deletedByUserId?: ObjectID;
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Project from "./Project";
|
|
2
|
+
import RumApplication from "./RumApplication";
|
|
3
|
+
import User from "./User";
|
|
4
|
+
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
5
|
+
import { JSONObject } from "../../Types/JSON";
|
|
6
|
+
import ObjectID from "../../Types/ObjectID";
|
|
7
|
+
import { ProductAnalyticsSavedViewType } from "../../Types/Rum/ProductAnalyticsSavedViews";
|
|
8
|
+
export default class RumProductAnalyticsSavedView extends BaseModel {
|
|
9
|
+
project?: Project;
|
|
10
|
+
projectId?: ObjectID;
|
|
11
|
+
rumApplication?: RumApplication;
|
|
12
|
+
rumApplicationId?: ObjectID;
|
|
13
|
+
name?: string;
|
|
14
|
+
viewType?: ProductAnalyticsSavedViewType;
|
|
15
|
+
definition?: JSONObject;
|
|
16
|
+
createdByUser?: User;
|
|
17
|
+
createdByUserId?: ObjectID;
|
|
18
|
+
deletedByUser?: User;
|
|
19
|
+
deletedByUserId?: ObjectID;
|
|
20
|
+
}
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const Project_1 = __importDefault(require("./Project"));
|
|
16
|
+
const RumApplication_1 = __importDefault(require("./RumApplication"));
|
|
17
|
+
const User_1 = __importDefault(require("./User"));
|
|
18
|
+
const DatabaseBaseModel_1 = __importDefault(require("./DatabaseBaseModel/DatabaseBaseModel"));
|
|
19
|
+
const Route_1 = __importDefault(require("../../Types/API/Route"));
|
|
20
|
+
const SubscriptionPlan_1 = require("../../Types/Billing/SubscriptionPlan");
|
|
21
|
+
const ColumnAccessControl_1 = __importDefault(require("../../Types/Database/AccessControl/ColumnAccessControl"));
|
|
22
|
+
const TableAccessControl_1 = __importDefault(require("../../Types/Database/AccessControl/TableAccessControl"));
|
|
23
|
+
const TableBillingAccessControl_1 = __importDefault(require("../../Types/Database/AccessControl/TableBillingAccessControl"));
|
|
24
|
+
const ColumnLength_1 = __importDefault(require("../../Types/Database/ColumnLength"));
|
|
25
|
+
const ColumnType_1 = __importDefault(require("../../Types/Database/ColumnType"));
|
|
26
|
+
const CrudApiEndpoint_1 = __importDefault(require("../../Types/Database/CrudApiEndpoint"));
|
|
27
|
+
const EnableDocumentation_1 = __importDefault(require("../../Types/Database/EnableDocumentation"));
|
|
28
|
+
const TableColumn_1 = __importDefault(require("../../Types/Database/TableColumn"));
|
|
29
|
+
const TableColumnType_1 = __importDefault(require("../../Types/Database/TableColumnType"));
|
|
30
|
+
const TableMetadata_1 = __importDefault(require("../../Types/Database/TableMetadata"));
|
|
31
|
+
const TenantColumn_1 = __importDefault(require("../../Types/Database/TenantColumn"));
|
|
32
|
+
const IconProp_1 = __importDefault(require("../../Types/Icon/IconProp"));
|
|
33
|
+
const ObjectID_1 = __importDefault(require("../../Types/ObjectID"));
|
|
34
|
+
const Permission_1 = __importDefault(require("../../Types/Permission"));
|
|
35
|
+
const ProductAnalyticsSavedViews_1 = require("../../Types/Rum/ProductAnalyticsSavedViews");
|
|
36
|
+
const typeorm_1 = require("typeorm");
|
|
37
|
+
/*
|
|
38
|
+
* A funnel or a retention table a team saved from a RUM application's
|
|
39
|
+
* Funnels or User Retention page (issue #6630), under a name: its
|
|
40
|
+
* definition (Types/Rum/ProductAnalyticsSavedViews), which the page opens
|
|
41
|
+
* again and a dashboard widget reads with the dashboard's time range.
|
|
42
|
+
*
|
|
43
|
+
* Who may see and keep them is who may read what they read. The product
|
|
44
|
+
* analytics reads are /list's (TelemetryAPI's requireSessionReplayListAccess
|
|
45
|
+
* and its SESSION_REPLAY_LIST_PERMISSIONS): whoever can read an
|
|
46
|
+
* application's funnels can save one, and nobody else lists them -
|
|
47
|
+
* Permission.Viewer and the RUM application's read permission are not
|
|
48
|
+
* among them, as they are not among the reads'. A role limited to labels
|
|
49
|
+
* reaches the saved definitions of the applications carrying them: the
|
|
50
|
+
* application the row names (rumApplicationId) carries its labels.
|
|
51
|
+
*
|
|
52
|
+
* The plan is the reads': saving what the project cannot read is not
|
|
53
|
+
* offered either.
|
|
54
|
+
*/
|
|
55
|
+
const ACCESS_PERMISSIONS = [
|
|
56
|
+
Permission_1.default.ProjectOwner,
|
|
57
|
+
Permission_1.default.ProjectAdmin,
|
|
58
|
+
Permission_1.default.TelemetryAdmin,
|
|
59
|
+
Permission_1.default.ReadRumSessionReplay,
|
|
60
|
+
Permission_1.default.ReadRumSessionReplayPayload,
|
|
61
|
+
];
|
|
62
|
+
let RumProductAnalyticsSavedView = class RumProductAnalyticsSavedView extends DatabaseBaseModel_1.default {
|
|
63
|
+
constructor() {
|
|
64
|
+
super(...arguments);
|
|
65
|
+
this.project = undefined;
|
|
66
|
+
this.projectId = undefined;
|
|
67
|
+
this.rumApplication = undefined;
|
|
68
|
+
/*
|
|
69
|
+
* Kept: a saved view is of its application, and moving it to another
|
|
70
|
+
* would carry events and properties that one may not have.
|
|
71
|
+
*/
|
|
72
|
+
this.rumApplicationId = undefined;
|
|
73
|
+
this.name = undefined;
|
|
74
|
+
/*
|
|
75
|
+
* What it is: a funnel or a retention table. Kept: its definition is
|
|
76
|
+
* read as one or the other, and a dashboard widget draws one kind.
|
|
77
|
+
*/
|
|
78
|
+
this.viewType = undefined;
|
|
79
|
+
this.definition = undefined;
|
|
80
|
+
this.createdByUser = undefined;
|
|
81
|
+
/*
|
|
82
|
+
* create: []: OneUptime writes who saved it (UserAttribution), never a
|
|
83
|
+
* request, so an API key cannot put a colleague's name on it.
|
|
84
|
+
*/
|
|
85
|
+
this.createdByUserId = undefined;
|
|
86
|
+
this.deletedByUser = undefined;
|
|
87
|
+
this.deletedByUserId = undefined;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, ColumnAccessControl_1.default)({
|
|
92
|
+
create: ACCESS_PERMISSIONS,
|
|
93
|
+
read: ACCESS_PERMISSIONS,
|
|
94
|
+
update: [],
|
|
95
|
+
}),
|
|
96
|
+
(0, TableColumn_1.default)({
|
|
97
|
+
manyToOneRelationColumn: "projectId",
|
|
98
|
+
type: TableColumnType_1.default.Entity,
|
|
99
|
+
modelType: Project_1.default,
|
|
100
|
+
title: "Project",
|
|
101
|
+
description: "Relation to the project this saved view belongs to.",
|
|
102
|
+
}),
|
|
103
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
104
|
+
return Project_1.default;
|
|
105
|
+
}, {
|
|
106
|
+
eager: false,
|
|
107
|
+
nullable: true,
|
|
108
|
+
onDelete: "CASCADE",
|
|
109
|
+
orphanedRowAction: "nullify",
|
|
110
|
+
}),
|
|
111
|
+
(0, typeorm_1.JoinColumn)({ name: "projectId" }),
|
|
112
|
+
__metadata("design:type", Project_1.default)
|
|
113
|
+
], RumProductAnalyticsSavedView.prototype, "project", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, ColumnAccessControl_1.default)({
|
|
116
|
+
create: ACCESS_PERMISSIONS,
|
|
117
|
+
read: ACCESS_PERMISSIONS,
|
|
118
|
+
update: [],
|
|
119
|
+
}),
|
|
120
|
+
(0, typeorm_1.Index)(),
|
|
121
|
+
(0, TableColumn_1.default)({
|
|
122
|
+
type: TableColumnType_1.default.ObjectID,
|
|
123
|
+
required: true,
|
|
124
|
+
canReadOnRelationQuery: true,
|
|
125
|
+
title: "Project ID",
|
|
126
|
+
description: "ID of the project this saved view belongs to.",
|
|
127
|
+
}),
|
|
128
|
+
(0, typeorm_1.Column)({
|
|
129
|
+
type: ColumnType_1.default.ObjectID,
|
|
130
|
+
nullable: false,
|
|
131
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
132
|
+
}),
|
|
133
|
+
__metadata("design:type", ObjectID_1.default)
|
|
134
|
+
], RumProductAnalyticsSavedView.prototype, "projectId", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, ColumnAccessControl_1.default)({
|
|
137
|
+
create: ACCESS_PERMISSIONS,
|
|
138
|
+
read: ACCESS_PERMISSIONS,
|
|
139
|
+
update: [],
|
|
140
|
+
}),
|
|
141
|
+
(0, TableColumn_1.default)({
|
|
142
|
+
manyToOneRelationColumn: "rumApplicationId",
|
|
143
|
+
type: TableColumnType_1.default.Entity,
|
|
144
|
+
modelType: RumApplication_1.default,
|
|
145
|
+
title: "RUM Application",
|
|
146
|
+
description: "The RUM application whose product analytics this saved view reads.",
|
|
147
|
+
}),
|
|
148
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
149
|
+
return RumApplication_1.default;
|
|
150
|
+
}, {
|
|
151
|
+
eager: false,
|
|
152
|
+
nullable: true,
|
|
153
|
+
onDelete: "CASCADE",
|
|
154
|
+
orphanedRowAction: "nullify",
|
|
155
|
+
}),
|
|
156
|
+
(0, typeorm_1.JoinColumn)({ name: "rumApplicationId" }),
|
|
157
|
+
__metadata("design:type", RumApplication_1.default)
|
|
158
|
+
], RumProductAnalyticsSavedView.prototype, "rumApplication", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, ColumnAccessControl_1.default)({
|
|
161
|
+
create: ACCESS_PERMISSIONS,
|
|
162
|
+
read: ACCESS_PERMISSIONS,
|
|
163
|
+
update: [],
|
|
164
|
+
}),
|
|
165
|
+
(0, typeorm_1.Index)(),
|
|
166
|
+
(0, TableColumn_1.default)({
|
|
167
|
+
type: TableColumnType_1.default.ObjectID,
|
|
168
|
+
required: true,
|
|
169
|
+
canReadOnRelationQuery: true,
|
|
170
|
+
title: "RUM Application ID",
|
|
171
|
+
description: "ID of the RUM application whose product analytics this saved view reads.",
|
|
172
|
+
}),
|
|
173
|
+
(0, typeorm_1.Column)({
|
|
174
|
+
type: ColumnType_1.default.ObjectID,
|
|
175
|
+
nullable: false,
|
|
176
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
177
|
+
}),
|
|
178
|
+
__metadata("design:type", ObjectID_1.default)
|
|
179
|
+
], RumProductAnalyticsSavedView.prototype, "rumApplicationId", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, ColumnAccessControl_1.default)({
|
|
182
|
+
create: ACCESS_PERMISSIONS,
|
|
183
|
+
read: ACCESS_PERMISSIONS,
|
|
184
|
+
update: ACCESS_PERMISSIONS,
|
|
185
|
+
}),
|
|
186
|
+
(0, TableColumn_1.default)({
|
|
187
|
+
required: true,
|
|
188
|
+
type: TableColumnType_1.default.ShortText,
|
|
189
|
+
canReadOnRelationQuery: true,
|
|
190
|
+
title: "Name",
|
|
191
|
+
description: "What the team calls this funnel or retention table.",
|
|
192
|
+
}),
|
|
193
|
+
(0, typeorm_1.Column)({
|
|
194
|
+
nullable: false,
|
|
195
|
+
type: ColumnType_1.default.ShortText,
|
|
196
|
+
length: ColumnLength_1.default.ShortText,
|
|
197
|
+
}),
|
|
198
|
+
__metadata("design:type", String)
|
|
199
|
+
], RumProductAnalyticsSavedView.prototype, "name", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
(0, ColumnAccessControl_1.default)({
|
|
202
|
+
create: ACCESS_PERMISSIONS,
|
|
203
|
+
read: ACCESS_PERMISSIONS,
|
|
204
|
+
update: [],
|
|
205
|
+
}),
|
|
206
|
+
(0, TableColumn_1.default)({
|
|
207
|
+
required: true,
|
|
208
|
+
type: TableColumnType_1.default.ShortText,
|
|
209
|
+
allowedValues: Object.values(ProductAnalyticsSavedViews_1.ProductAnalyticsSavedViewType),
|
|
210
|
+
canReadOnRelationQuery: true,
|
|
211
|
+
title: "View Type",
|
|
212
|
+
description: "What this saved view is: a funnel (funnel) or a retention table (retention).",
|
|
213
|
+
}),
|
|
214
|
+
(0, typeorm_1.Column)({
|
|
215
|
+
nullable: false,
|
|
216
|
+
type: ColumnType_1.default.ShortText,
|
|
217
|
+
length: ColumnLength_1.default.ShortText,
|
|
218
|
+
}),
|
|
219
|
+
__metadata("design:type", String)
|
|
220
|
+
], RumProductAnalyticsSavedView.prototype, "viewType", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
(0, ColumnAccessControl_1.default)({
|
|
223
|
+
create: ACCESS_PERMISSIONS,
|
|
224
|
+
read: ACCESS_PERMISSIONS,
|
|
225
|
+
update: ACCESS_PERMISSIONS,
|
|
226
|
+
}),
|
|
227
|
+
(0, TableColumn_1.default)({
|
|
228
|
+
required: true,
|
|
229
|
+
type: TableColumnType_1.default.JSON,
|
|
230
|
+
title: "Definition",
|
|
231
|
+
description: "What it reads. A funnel: its steps (each an event's kind and name), the time to finish it (windowMs) and its segment (filters). A retention table: its startEvent, returnEvent, period (day, week or month) and segment (filters). The time range is not part of it: a page keeps its own, and a dashboard widget reads the dashboard's.",
|
|
232
|
+
}),
|
|
233
|
+
(0, typeorm_1.Column)({
|
|
234
|
+
type: ColumnType_1.default.JSON,
|
|
235
|
+
nullable: false,
|
|
236
|
+
}),
|
|
237
|
+
__metadata("design:type", Object)
|
|
238
|
+
], RumProductAnalyticsSavedView.prototype, "definition", void 0);
|
|
239
|
+
__decorate([
|
|
240
|
+
(0, ColumnAccessControl_1.default)({
|
|
241
|
+
create: [],
|
|
242
|
+
read: ACCESS_PERMISSIONS,
|
|
243
|
+
update: [],
|
|
244
|
+
}),
|
|
245
|
+
(0, TableColumn_1.default)({
|
|
246
|
+
manyToOneRelationColumn: "createdByUserId",
|
|
247
|
+
type: TableColumnType_1.default.Entity,
|
|
248
|
+
modelType: User_1.default,
|
|
249
|
+
title: "Created By User",
|
|
250
|
+
description: "Relation to the user who saved this view.",
|
|
251
|
+
}),
|
|
252
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
253
|
+
return User_1.default;
|
|
254
|
+
}, {
|
|
255
|
+
eager: false,
|
|
256
|
+
nullable: true,
|
|
257
|
+
onDelete: "SET NULL",
|
|
258
|
+
orphanedRowAction: "nullify",
|
|
259
|
+
}),
|
|
260
|
+
(0, typeorm_1.JoinColumn)({ name: "createdByUserId" }),
|
|
261
|
+
__metadata("design:type", User_1.default)
|
|
262
|
+
], RumProductAnalyticsSavedView.prototype, "createdByUser", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
(0, ColumnAccessControl_1.default)({
|
|
265
|
+
create: [],
|
|
266
|
+
read: ACCESS_PERMISSIONS,
|
|
267
|
+
update: [],
|
|
268
|
+
}),
|
|
269
|
+
(0, TableColumn_1.default)({
|
|
270
|
+
type: TableColumnType_1.default.ObjectID,
|
|
271
|
+
title: "Created By User ID",
|
|
272
|
+
description: "ID of the user who saved this view.",
|
|
273
|
+
}),
|
|
274
|
+
(0, typeorm_1.Column)({
|
|
275
|
+
type: ColumnType_1.default.ObjectID,
|
|
276
|
+
nullable: true,
|
|
277
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
278
|
+
}),
|
|
279
|
+
__metadata("design:type", ObjectID_1.default)
|
|
280
|
+
], RumProductAnalyticsSavedView.prototype, "createdByUserId", void 0);
|
|
281
|
+
__decorate([
|
|
282
|
+
(0, ColumnAccessControl_1.default)({
|
|
283
|
+
create: [],
|
|
284
|
+
read: ACCESS_PERMISSIONS,
|
|
285
|
+
update: [],
|
|
286
|
+
}),
|
|
287
|
+
(0, TableColumn_1.default)({
|
|
288
|
+
manyToOneRelationColumn: "deletedByUserId",
|
|
289
|
+
type: TableColumnType_1.default.Entity,
|
|
290
|
+
modelType: User_1.default,
|
|
291
|
+
title: "Deleted By User",
|
|
292
|
+
description: "Relation to the user who deleted this saved view.",
|
|
293
|
+
}),
|
|
294
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
295
|
+
return User_1.default;
|
|
296
|
+
}, {
|
|
297
|
+
eager: false,
|
|
298
|
+
nullable: true,
|
|
299
|
+
onDelete: "SET NULL",
|
|
300
|
+
orphanedRowAction: "nullify",
|
|
301
|
+
}),
|
|
302
|
+
(0, typeorm_1.JoinColumn)({ name: "deletedByUserId" }),
|
|
303
|
+
__metadata("design:type", User_1.default)
|
|
304
|
+
], RumProductAnalyticsSavedView.prototype, "deletedByUser", void 0);
|
|
305
|
+
__decorate([
|
|
306
|
+
(0, ColumnAccessControl_1.default)({
|
|
307
|
+
create: [],
|
|
308
|
+
read: ACCESS_PERMISSIONS,
|
|
309
|
+
update: [],
|
|
310
|
+
}),
|
|
311
|
+
(0, TableColumn_1.default)({
|
|
312
|
+
type: TableColumnType_1.default.ObjectID,
|
|
313
|
+
title: "Deleted By User ID",
|
|
314
|
+
description: "ID of the user who deleted this saved view.",
|
|
315
|
+
}),
|
|
316
|
+
(0, typeorm_1.Column)({
|
|
317
|
+
type: ColumnType_1.default.ObjectID,
|
|
318
|
+
nullable: true,
|
|
319
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
320
|
+
}),
|
|
321
|
+
__metadata("design:type", ObjectID_1.default)
|
|
322
|
+
], RumProductAnalyticsSavedView.prototype, "deletedByUserId", void 0);
|
|
323
|
+
RumProductAnalyticsSavedView = __decorate([
|
|
324
|
+
(0, EnableDocumentation_1.default)(),
|
|
325
|
+
(0, TableBillingAccessControl_1.default)({
|
|
326
|
+
create: SubscriptionPlan_1.PlanType.Growth,
|
|
327
|
+
read: SubscriptionPlan_1.PlanType.Growth,
|
|
328
|
+
update: SubscriptionPlan_1.PlanType.Growth,
|
|
329
|
+
delete: SubscriptionPlan_1.PlanType.Growth,
|
|
330
|
+
}),
|
|
331
|
+
(0, TenantColumn_1.default)("projectId"),
|
|
332
|
+
(0, TableAccessControl_1.default)({
|
|
333
|
+
create: ACCESS_PERMISSIONS,
|
|
334
|
+
read: ACCESS_PERMISSIONS,
|
|
335
|
+
update: ACCESS_PERMISSIONS,
|
|
336
|
+
delete: ACCESS_PERMISSIONS,
|
|
337
|
+
}),
|
|
338
|
+
(0, CrudApiEndpoint_1.default)(new Route_1.default("/rum-product-analytics-saved-view")),
|
|
339
|
+
(0, TableMetadata_1.default)({
|
|
340
|
+
tableName: "RumProductAnalyticsSavedView",
|
|
341
|
+
singularName: "Saved Product Analytics View",
|
|
342
|
+
pluralName: "Saved Product Analytics Views",
|
|
343
|
+
icon: IconProp_1.default.Bookmark,
|
|
344
|
+
tableDescription: "Funnels and retention tables saved from a RUM application's product analytics, by name, to open again or show on a dashboard.",
|
|
345
|
+
})
|
|
346
|
+
/* How a page lists them: one application's, of one kind. */
|
|
347
|
+
,
|
|
348
|
+
(0, typeorm_1.Index)(["projectId", "rumApplicationId", "viewType"]),
|
|
349
|
+
(0, typeorm_1.Entity)({
|
|
350
|
+
name: "RumProductAnalyticsSavedView",
|
|
351
|
+
})
|
|
352
|
+
], RumProductAnalyticsSavedView);
|
|
353
|
+
exports.default = RumProductAnalyticsSavedView;
|
|
@@ -10,6 +10,7 @@ import OnCallDutyPolicy from "./OnCallDutyPolicy.mjs";
|
|
|
10
10
|
import OnCallDutyPolicyEscalationRule from "./OnCallDutyPolicyEscalationRule.mjs";
|
|
11
11
|
import OnCallDutyPolicySchedule from "./OnCallDutyPolicySchedule.mjs";
|
|
12
12
|
import Team from "./Team.mjs";
|
|
13
|
+
import UserOnCallLogTimeline from "./UserOnCallLogTimeline.mjs";
|
|
13
14
|
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel.mjs";
|
|
14
15
|
import ObjectID from "../../Types/ObjectID.mjs";
|
|
15
16
|
import Phone from "../../Types/Phone.mjs";
|
|
@@ -46,6 +47,8 @@ export default class WhatsAppLog extends BaseModel {
|
|
|
46
47
|
onCallDutyPolicyEscalationRuleId?: ObjectID;
|
|
47
48
|
onCallDutyPolicySchedule?: OnCallDutyPolicySchedule;
|
|
48
49
|
onCallDutyPolicyScheduleId?: ObjectID;
|
|
50
|
+
userOnCallLogTimeline?: UserOnCallLogTimeline;
|
|
51
|
+
userOnCallLogTimelineId?: ObjectID;
|
|
49
52
|
deletedByUser?: User;
|
|
50
53
|
deletedByUserId?: ObjectID;
|
|
51
54
|
}
|
|
@@ -10,6 +10,7 @@ import OnCallDutyPolicy from "./OnCallDutyPolicy";
|
|
|
10
10
|
import OnCallDutyPolicyEscalationRule from "./OnCallDutyPolicyEscalationRule";
|
|
11
11
|
import OnCallDutyPolicySchedule from "./OnCallDutyPolicySchedule";
|
|
12
12
|
import Team from "./Team";
|
|
13
|
+
import UserOnCallLogTimeline from "./UserOnCallLogTimeline";
|
|
13
14
|
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
14
15
|
import ObjectID from "../../Types/ObjectID";
|
|
15
16
|
import Phone from "../../Types/Phone";
|
|
@@ -46,6 +47,8 @@ export default class WhatsAppLog extends BaseModel {
|
|
|
46
47
|
onCallDutyPolicyEscalationRuleId?: ObjectID;
|
|
47
48
|
onCallDutyPolicySchedule?: OnCallDutyPolicySchedule;
|
|
48
49
|
onCallDutyPolicyScheduleId?: ObjectID;
|
|
50
|
+
userOnCallLogTimeline?: UserOnCallLogTimeline;
|
|
51
|
+
userOnCallLogTimelineId?: ObjectID;
|
|
49
52
|
deletedByUser?: User;
|
|
50
53
|
deletedByUserId?: ObjectID;
|
|
51
54
|
}
|
|
@@ -24,6 +24,7 @@ const OnCallDutyPolicy_1 = __importDefault(require("./OnCallDutyPolicy"));
|
|
|
24
24
|
const OnCallDutyPolicyEscalationRule_1 = __importDefault(require("./OnCallDutyPolicyEscalationRule"));
|
|
25
25
|
const OnCallDutyPolicySchedule_1 = __importDefault(require("./OnCallDutyPolicySchedule"));
|
|
26
26
|
const Team_1 = __importDefault(require("./Team"));
|
|
27
|
+
const UserOnCallLogTimeline_1 = __importDefault(require("./UserOnCallLogTimeline"));
|
|
27
28
|
const DatabaseBaseModel_1 = __importDefault(require("./DatabaseBaseModel/DatabaseBaseModel"));
|
|
28
29
|
const Route_1 = __importDefault(require("../../Types/API/Route"));
|
|
29
30
|
const ColumnAccessControl_1 = __importDefault(require("../../Types/Database/AccessControl/ColumnAccessControl"));
|
|
@@ -77,6 +78,8 @@ let WhatsAppLog = class WhatsAppLog extends DatabaseBaseModel_1.default {
|
|
|
77
78
|
this.onCallDutyPolicyEscalationRuleId = undefined;
|
|
78
79
|
this.onCallDutyPolicySchedule = undefined;
|
|
79
80
|
this.onCallDutyPolicyScheduleId = undefined;
|
|
81
|
+
this.userOnCallLogTimeline = undefined;
|
|
82
|
+
this.userOnCallLogTimelineId = undefined;
|
|
80
83
|
this.deletedByUser = undefined;
|
|
81
84
|
this.deletedByUserId = undefined;
|
|
82
85
|
}
|
|
@@ -955,6 +958,65 @@ __decorate([
|
|
|
955
958
|
}),
|
|
956
959
|
__metadata("design:type", ObjectID_1.default)
|
|
957
960
|
], WhatsAppLog.prototype, "onCallDutyPolicyScheduleId", void 0);
|
|
961
|
+
__decorate([
|
|
962
|
+
(0, ColumnAccessControl_1.default)({
|
|
963
|
+
create: [],
|
|
964
|
+
read: [
|
|
965
|
+
Permission_1.default.ProjectOwner,
|
|
966
|
+
Permission_1.default.ProjectAdmin,
|
|
967
|
+
Permission_1.default.ProjectMember,
|
|
968
|
+
Permission_1.default.Viewer,
|
|
969
|
+
Permission_1.default.ReadWhatsAppLog,
|
|
970
|
+
],
|
|
971
|
+
update: [],
|
|
972
|
+
}),
|
|
973
|
+
(0, TableColumn_1.default)({
|
|
974
|
+
manyToOneRelationColumn: "userOnCallLogTimelineId",
|
|
975
|
+
type: TableColumnType_1.default.Entity,
|
|
976
|
+
modelType: UserOnCallLogTimeline_1.default,
|
|
977
|
+
title: "User On-Call Log Timeline",
|
|
978
|
+
description: "On-call notification timeline entry this WhatsApp message was sent for (if any): the message was an on-call page.",
|
|
979
|
+
example: "f1a2b3c4-d5e6-47f8-9a0b-1c2d3e4f5a6b",
|
|
980
|
+
}),
|
|
981
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
982
|
+
return UserOnCallLogTimeline_1.default;
|
|
983
|
+
}, {
|
|
984
|
+
eager: false,
|
|
985
|
+
nullable: true,
|
|
986
|
+
onDelete: "CASCADE",
|
|
987
|
+
orphanedRowAction: "nullify",
|
|
988
|
+
}),
|
|
989
|
+
(0, typeorm_1.JoinColumn)({ name: "userOnCallLogTimelineId" }),
|
|
990
|
+
__metadata("design:type", UserOnCallLogTimeline_1.default)
|
|
991
|
+
], WhatsAppLog.prototype, "userOnCallLogTimeline", void 0);
|
|
992
|
+
__decorate([
|
|
993
|
+
(0, ColumnAccessControl_1.default)({
|
|
994
|
+
create: [],
|
|
995
|
+
read: [
|
|
996
|
+
Permission_1.default.ProjectOwner,
|
|
997
|
+
Permission_1.default.ProjectAdmin,
|
|
998
|
+
Permission_1.default.ProjectMember,
|
|
999
|
+
Permission_1.default.Viewer,
|
|
1000
|
+
Permission_1.default.ReadWhatsAppLog,
|
|
1001
|
+
],
|
|
1002
|
+
update: [],
|
|
1003
|
+
}),
|
|
1004
|
+
(0, typeorm_1.Index)(),
|
|
1005
|
+
(0, TableColumn_1.default)({
|
|
1006
|
+
type: TableColumnType_1.default.ObjectID,
|
|
1007
|
+
required: false,
|
|
1008
|
+
canReadOnRelationQuery: true,
|
|
1009
|
+
title: "User On-Call Log Timeline ID",
|
|
1010
|
+
description: "ID of the on-call notification timeline entry this WhatsApp message was sent for (if any).",
|
|
1011
|
+
example: "f1a2b3c4-d5e6-47f8-9a0b-1c2d3e4f5a6b",
|
|
1012
|
+
}),
|
|
1013
|
+
(0, typeorm_1.Column)({
|
|
1014
|
+
type: ColumnType_1.default.ObjectID,
|
|
1015
|
+
nullable: true,
|
|
1016
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
1017
|
+
}),
|
|
1018
|
+
__metadata("design:type", ObjectID_1.default)
|
|
1019
|
+
], WhatsAppLog.prototype, "userOnCallLogTimelineId", void 0);
|
|
958
1020
|
__decorate([
|
|
959
1021
|
(0, ColumnAccessControl_1.default)({
|
|
960
1022
|
create: [],
|