@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.
Files changed (129) hide show
  1. package/Models/DatabaseModels/DataBiConnection.d.mts +4 -0
  2. package/Models/DatabaseModels/DataBiConnection.d.ts +4 -0
  3. package/Models/DatabaseModels/DataBiConnection.js +59 -2
  4. package/Models/DatabaseModels/Index.js +2 -0
  5. package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.mts +20 -0
  6. package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.ts +20 -0
  7. package/Models/DatabaseModels/RumProductAnalyticsSavedView.js +353 -0
  8. package/Models/DatabaseModels/RumProductAnalyticsSavedView.mjs +2 -0
  9. package/Models/DatabaseModels/WhatsAppLog.d.mts +3 -0
  10. package/Models/DatabaseModels/WhatsAppLog.d.ts +3 -0
  11. package/Models/DatabaseModels/WhatsAppLog.js +62 -0
  12. package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.mts +11 -0
  13. package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.ts +11 -0
  14. package/Models/DatabaseModels/WorkspaceUserGroup.js +1 -1
  15. package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.mts +212 -0
  16. package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.ts +212 -0
  17. package/Server/Utils/Workspace/WorkspaceBase.d.mts +3 -0
  18. package/Server/Utils/Workspace/WorkspaceBase.d.ts +3 -0
  19. package/Types/AI/AIChatTypes.d.mts +2 -1
  20. package/Types/AI/AIChatTypes.d.ts +2 -1
  21. package/Types/AI/AIChatTypes.js +2 -0
  22. package/Types/AI/InvestigationNotStartedReason.d.mts +7 -0
  23. package/Types/AI/InvestigationNotStartedReason.d.ts +7 -0
  24. package/Types/CodeInSentence.d.mts +8 -0
  25. package/Types/CodeInSentence.d.ts +8 -0
  26. package/Types/CodeInSentence.js +875 -0
  27. package/Types/CodeInSentence.mjs +4 -0
  28. package/Types/Dashboard/DashboardComponentType.d.mts +2 -0
  29. package/Types/Dashboard/DashboardComponentType.d.ts +2 -0
  30. package/Types/Dashboard/DashboardComponentType.js +7 -0
  31. package/Types/Dashboard/DashboardComponents/ComponentArgument.d.mts +3 -1
  32. package/Types/Dashboard/DashboardComponents/ComponentArgument.d.ts +3 -1
  33. package/Types/Dashboard/DashboardComponents/ComponentArgument.js +3 -0
  34. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.mts +11 -0
  35. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.ts +11 -0
  36. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.js +2 -0
  37. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.mjs +1 -0
  38. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.mts +11 -0
  39. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.ts +11 -0
  40. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.js +2 -0
  41. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.mjs +1 -0
  42. package/Types/Dashboard/PublicDashboardServedSettings.js +15 -7
  43. package/Types/DataObservability/DataBiRefreshAlert.d.mts +44 -0
  44. package/Types/DataObservability/DataBiRefreshAlert.d.ts +44 -0
  45. package/Types/DataObservability/DataBiRefreshAlert.js +206 -0
  46. package/Types/DataObservability/DataBiRefreshAlert.mjs +12 -0
  47. package/Types/DataObservability/DataObservabilityApiTypes.d.mts +7 -0
  48. package/Types/DataObservability/DataObservabilityApiTypes.d.ts +7 -0
  49. package/Types/DataObservability/DataObservabilityApiTypes.js +12 -0
  50. package/Types/DataObservability/DataTableLineage.d.mts +22 -1
  51. package/Types/DataObservability/DataTableLineage.d.ts +22 -1
  52. package/Types/DataObservability/DataTableLineage.js +13 -5
  53. package/Types/DataObservability/DataTableLineage.mjs +2 -0
  54. package/Types/HashedString.js +9 -2
  55. package/Types/Monitor/CriteriaFilterValues.d.mts +16 -0
  56. package/Types/Monitor/CriteriaFilterValues.d.ts +16 -0
  57. package/Types/Monitor/CriteriaFilterValues.js +324 -0
  58. package/Types/Monitor/CriteriaFilterValues.mjs +2 -0
  59. package/Types/Monitor/DataBiRefreshMonitorStep.d.mts +13 -0
  60. package/Types/Monitor/DataBiRefreshMonitorStep.d.ts +13 -0
  61. package/Types/Monitor/DataBiRefreshMonitorStep.js +108 -0
  62. package/Types/Monitor/DataBiRefreshMonitorStep.mjs +3 -0
  63. package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.mts +1 -0
  64. package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.ts +1 -0
  65. package/Types/Monitor/MonitorCriteriaInstance.js +22 -2
  66. package/Types/Monitor/MonitorStep.js +28 -11
  67. package/Types/Monitor/MonitorStepMetricMonitor.js +6 -1
  68. package/Types/Monitor/MonitorStepRollingTime.d.mts +12 -0
  69. package/Types/Monitor/MonitorStepRollingTime.d.ts +12 -0
  70. package/Types/Monitor/MonitorStepRollingTime.js +117 -0
  71. package/Types/Monitor/MonitorStepRollingTime.mjs +2 -0
  72. package/Types/Monitor/SeriesContext/SeriesLabelDisplay.js +11 -0
  73. package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.mts +1 -0
  74. package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.ts +1 -0
  75. package/Types/Monitor/TelemetryAlertRule.js +7 -2
  76. package/Types/NotificationRule/NotificationRepeat.d.mts +10 -0
  77. package/Types/NotificationRule/NotificationRepeat.d.ts +10 -0
  78. package/Types/NotificationRule/NotificationRepeat.js +51 -0
  79. package/Types/NotificationRule/NotificationRepeat.mjs +2 -0
  80. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +70 -0
  81. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +70 -0
  82. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +276 -0
  83. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +12 -0
  84. package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.mts +9 -0
  85. package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.ts +9 -0
  86. package/Types/OnCallDutyPolicy/OnCallEscalationWait.js +44 -0
  87. package/Types/OnCallDutyPolicy/OnCallEscalationWait.mjs +5 -0
  88. package/Types/Probe/ProbeMonitorResponse.d.mts +1 -0
  89. package/Types/Probe/ProbeMonitorResponse.d.ts +1 -0
  90. package/Types/ReadingDirection.d.mts +2 -0
  91. package/Types/ReadingDirection.d.ts +2 -0
  92. package/Types/ReadingDirection.js +221 -25
  93. package/Types/ReadingDirection.mjs +2 -0
  94. package/Types/RollingTime/RollingTimeUtil.d.mts +7 -0
  95. package/Types/RollingTime/RollingTimeUtil.d.ts +7 -0
  96. package/Types/RollingTime/RollingTimeUtil.js +240 -71
  97. package/Types/Rum/ProductAnalyticsSavedViews.d.mts +56 -0
  98. package/Types/Rum/ProductAnalyticsSavedViews.d.ts +56 -0
  99. package/Types/Rum/ProductAnalyticsSavedViews.js +219 -0
  100. package/Types/Rum/ProductAnalyticsSavedViews.mjs +14 -0
  101. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +8 -7
  102. package/Types/Telemetry/ServiceType.d.mts +1 -0
  103. package/Types/Telemetry/ServiceType.d.ts +1 -0
  104. package/Types/Telemetry/ServiceType.js +6 -0
  105. package/Utils/Crypto.js +10 -3
  106. package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.mts +7 -0
  107. package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.ts +7 -0
  108. package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.js +67 -0
  109. package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.mjs +2 -0
  110. package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.mts +7 -0
  111. package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.ts +7 -0
  112. package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.js +68 -0
  113. package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.mjs +2 -0
  114. package/Utils/Dashboard/DashboardWidgetIds.js +6 -1
  115. package/Utils/Metrics/MetricQueryCloudAggregation.js +2 -4
  116. package/Utils/Monitor/MonitorRootCauseWording.js +28 -24
  117. package/Utils/Monitor/MonitorStepMetricQueries.js +2 -1
  118. package/Utils/Monitor/MonitorStepsValuesUtil.d.mts +13 -0
  119. package/Utils/Monitor/MonitorStepsValuesUtil.d.ts +13 -0
  120. package/Utils/Monitor/MonitorStepsValuesUtil.js +80 -0
  121. package/Utils/Monitor/MonitorStepsValuesUtil.mjs +2 -0
  122. package/Utils/Slo/SloProjection.d.mts +18 -0
  123. package/Utils/Slo/SloProjection.d.ts +18 -0
  124. package/Utils/Slo/SloProjection.js +53 -12
  125. package/Utils/Slo/SloProjection.mjs +2 -0
  126. package/Utils/StatusPage/ResourceExplorer.d.mts +0 -10
  127. package/Utils/StatusPage/ResourceExplorer.d.ts +0 -10
  128. package/Utils/StatusPage/ResourceExplorer.js +0 -28
  129. package/package.json +1 -1
@@ -34,15 +34,26 @@ export interface SlackChannelCacheEntry {
34
34
  id: string;
35
35
  name: string;
36
36
  lastUpdated: string;
37
+ teamId?: string | undefined;
37
38
  }
38
39
  export interface SlackChannelCache {
39
40
  [channelName: string]: SlackChannelCacheEntry;
40
41
  }
42
+ export interface SlackOrganizationWorkspace {
43
+ id: string;
44
+ name: string;
45
+ }
41
46
  export interface SlackMiscData extends MiscData {
42
47
  teamId: string;
43
48
  teamName: string;
44
49
  botUserId: string;
45
50
  channelCache?: SlackChannelCache;
51
+ isEnterpriseInstall?: boolean | undefined;
52
+ enterpriseId?: string | undefined;
53
+ enterpriseName?: string | undefined;
54
+ workspaces?: Array<SlackOrganizationWorkspace> | undefined;
55
+ workspacesReadAt?: string | undefined;
56
+ defaultWorkspaceId?: string | undefined;
46
57
  }
47
58
  export interface MicrosoftTeamsMiscData extends MiscData {
48
59
  tenantId: string;
@@ -34,15 +34,26 @@ export interface SlackChannelCacheEntry {
34
34
  id: string;
35
35
  name: string;
36
36
  lastUpdated: string;
37
+ teamId?: string | undefined;
37
38
  }
38
39
  export interface SlackChannelCache {
39
40
  [channelName: string]: SlackChannelCacheEntry;
40
41
  }
42
+ export interface SlackOrganizationWorkspace {
43
+ id: string;
44
+ name: string;
45
+ }
41
46
  export interface SlackMiscData extends MiscData {
42
47
  teamId: string;
43
48
  teamName: string;
44
49
  botUserId: string;
45
50
  channelCache?: SlackChannelCache;
51
+ isEnterpriseInstall?: boolean | undefined;
52
+ enterpriseId?: string | undefined;
53
+ enterpriseName?: string | undefined;
54
+ workspaces?: Array<SlackOrganizationWorkspace> | undefined;
55
+ workspacesReadAt?: string | undefined;
56
+ defaultWorkspaceId?: string | undefined;
46
57
  }
47
58
  export interface MicrosoftTeamsMiscData extends MiscData {
48
59
  tenantId: string;
@@ -242,7 +242,7 @@ __decorate([
242
242
  required: false,
243
243
  type: TableColumnType_1.default.ShortText,
244
244
  title: "Workspace Team ID",
245
- description: "Microsoft Teams only: the team the tag is in (its Microsoft 365 group id).",
245
+ description: "Microsoft Teams: the team the tag is in (its Microsoft 365 group id). Slack installed for a whole Enterprise organization: the workspace the user group is in (T...). Empty for a Slack user group of a project connected to one workspace.",
246
246
  }),
247
247
  (0, typeorm_1.Column)({
248
248
  nullable: true,
@@ -0,0 +1,212 @@
1
+ import MailTransportType from "../../../Types/Email/MailTransportType.mjs";
2
+ import { OnCallPageChannel } from "../../../Types/OnCallDutyPolicy/OnCallPageChannel.mjs";
3
+ import SmsStatus from "../../../Types/SmsStatus.mjs";
4
+ import WhatsAppStatus from "../../../Types/WhatsAppStatus.mjs";
5
+ export declare enum NotificationDeliveryChannel {
6
+ Email = "email",
7
+ SMS = "sms",
8
+ Call = "call",
9
+ WhatsApp = "whatsapp",
10
+ Telegram = "telegram",
11
+ Push = "push",
12
+ Webhook = "webhook",
13
+ Slack = "slack",
14
+ MicrosoftTeams = "microsoft_teams",
15
+ Mattermost = "mattermost",
16
+ CustomChannel = "custom_channel"
17
+ }
18
+ export declare enum NotificationDeliveryProvider {
19
+ None = "none",
20
+ Twilio = "twilio",
21
+ SmsAndCallGateway = "sms_and_call_gateway",
22
+ SMTP = "smtp",
23
+ SendGrid = "sendgrid",
24
+ AmazonSES = "amazon_ses",
25
+ Mailgun = "mailgun",
26
+ Postmark = "postmark",
27
+ Resend = "resend",
28
+ MicrosoftGraph = "microsoft_graph",
29
+ Expo = "expo",
30
+ PushRelay = "push_relay",
31
+ WebPush = "web_push",
32
+ MetaWhatsApp = "meta_whatsapp",
33
+ TelegramBotApi = "telegram_bot_api",
34
+ Slack = "slack",
35
+ MicrosoftTeams = "microsoft_teams",
36
+ Mattermost = "mattermost",
37
+ Webhook = "webhook",
38
+ CustomChannel = "custom_channel"
39
+ }
40
+ export declare enum NotificationDeliveryOutcome {
41
+ Success = "success",
42
+ Failure = "failure",
43
+ NotSent = "not_sent"
44
+ }
45
+ export declare enum NotificationProviderConfig {
46
+ Global = "global",
47
+ Project = "project"
48
+ }
49
+ export declare enum NotificationTriggerType {
50
+ Incident = "incident",
51
+ Alert = "alert",
52
+ IncidentEpisode = "incident_episode",
53
+ AlertEpisode = "alert_episode"
54
+ }
55
+ export declare enum NotificationTriggerSource {
56
+ Automatic = "automatic",
57
+ Manual = "manual"
58
+ }
59
+ export declare enum OnCallPageStart {
60
+ MonitorDataReceived = "monitor_data_received",
61
+ RecordCreated = "record_created",
62
+ PageStarted = "page_started"
63
+ }
64
+ export declare enum NotificationSchedule {
65
+ RuleWait = "rule_wait",
66
+ Repeat = "repeat",
67
+ Escalation = "escalation",
68
+ PolicyRepeat = "policy_repeat"
69
+ }
70
+ export declare enum NotificationDestination {
71
+ DirectMessage = "direct_message",
72
+ Channel = "channel",
73
+ IncomingWebhook = "incoming_webhook"
74
+ }
75
+ export declare enum NotificationDeliveryStatus {
76
+ Delivered = "delivered",
77
+ Undelivered = "undelivered",
78
+ Failed = "failed",
79
+ Answered = "answered",
80
+ NotAnswered = "not_answered"
81
+ }
82
+ export declare enum NotificationMetricAttribute {
83
+ Channel = "notification.channel",
84
+ Provider = "notification.provider",
85
+ ProviderConfig = "notification.provider.config",
86
+ Outcome = "outcome",
87
+ OnCallPage = "notification.on_call_page",
88
+ CustomChannelId = "notification.custom_channel.id",
89
+ CustomChannelName = "notification.custom_channel.name",
90
+ TriggerType = "notification.trigger.type",
91
+ TriggerSource = "notification.trigger.source",
92
+ MonitorType = "monitor.type",
93
+ PageStart = "notification.page.start",
94
+ Destination = "notification.destination",
95
+ Schedule = "notification.schedule"
96
+ }
97
+ export declare const MAX_CUSTOM_CHANNEL_NAME_LENGTH: number;
98
+ export interface NotificationCustomChannelIdentity {
99
+ id: string;
100
+ name?: string | undefined;
101
+ }
102
+ export interface NotificationDispatchStart {
103
+ channel: NotificationDeliveryChannel;
104
+ provider?: NotificationDeliveryProvider | undefined;
105
+ providerConfig?: NotificationProviderConfig | undefined;
106
+ isOnCallPage?: boolean | undefined;
107
+ customChannel?: NotificationCustomChannelIdentity | undefined;
108
+ destination?: NotificationDestination | undefined;
109
+ }
110
+ export interface NotificationDeliveryReport {
111
+ channel: NotificationDeliveryChannel;
112
+ provider: NotificationDeliveryProvider;
113
+ providerConfig?: NotificationProviderConfig | undefined;
114
+ isOnCallPage: boolean;
115
+ status: NotificationDeliveryStatus;
116
+ timeToStatusInMs?: number | undefined;
117
+ }
118
+ export type NotificationMetricAttributes = Record<string, string>;
119
+ export declare class NotificationDispatch {
120
+ private readonly channel;
121
+ private provider;
122
+ private providerConfig;
123
+ private isOnCallPage;
124
+ private customChannel;
125
+ private readonly destination;
126
+ private outcome;
127
+ private readonly startedAtInNs;
128
+ private isEnded;
129
+ constructor(start: NotificationDispatchStart);
130
+ setProvider(provider: NotificationDeliveryProvider, providerConfig?: NotificationProviderConfig | undefined): void;
131
+ setCustomChannel(customChannel: NotificationCustomChannelIdentity | undefined): void;
132
+ setIsOnCallPage(isOnCallPage: boolean): void;
133
+ markSucceeded(): void;
134
+ markFailed(): void;
135
+ markNotSent(): void;
136
+ getOutcome(): NotificationDeliveryOutcome | undefined;
137
+ getProvider(): NotificationDeliveryProvider;
138
+ isRecorded(): boolean;
139
+ getAttributes(outcome: NotificationDeliveryOutcome): NotificationMetricAttributes;
140
+ end(outcomeIfNotMarked: NotificationDeliveryOutcome): void;
141
+ }
142
+ export default class NotificationDeliveryMetrics {
143
+ static startDispatch(start: NotificationDispatchStart): NotificationDispatch;
144
+ static measureDispatch<T>(start: NotificationDispatchStart, send: (dispatch: NotificationDispatch) => Promise<T>): Promise<T>;
145
+ static recordNotSent(start: NotificationDispatchStart): void;
146
+ static recordFailedBeforeSend(start: NotificationDispatchStart): void;
147
+ private static recordWithoutDuration;
148
+ static recordDelivery(report: NotificationDeliveryReport): void;
149
+ static recordTrigger(data: {
150
+ type: NotificationTriggerType;
151
+ source: NotificationTriggerSource;
152
+ monitorType?: string | undefined;
153
+ }): void;
154
+ static recordTimeToSend(data: {
155
+ channel: NotificationDeliveryChannel;
156
+ customChannel?: NotificationCustomChannelIdentity | undefined;
157
+ triggerType?: NotificationTriggerType | undefined;
158
+ pageStart: OnCallPageStart;
159
+ timeToSendInMs: number;
160
+ }): void;
161
+ static recordSendLag(data: {
162
+ channel: NotificationDeliveryChannel;
163
+ customChannel?: NotificationCustomChannelIdentity | undefined;
164
+ triggerType?: NotificationTriggerType | undefined;
165
+ schedule: NotificationSchedule;
166
+ lagInMs: number;
167
+ }): void;
168
+ static getDispatchAttributes(data: {
169
+ channel: NotificationDeliveryChannel;
170
+ provider: NotificationDeliveryProvider;
171
+ providerConfig: NotificationProviderConfig;
172
+ isOnCallPage: boolean;
173
+ customChannel?: NotificationCustomChannelIdentity | undefined;
174
+ destination?: NotificationDestination | undefined;
175
+ outcome: NotificationDeliveryOutcome;
176
+ }): NotificationMetricAttributes;
177
+ static getDeliveryAttributes(data: {
178
+ channel: NotificationDeliveryChannel;
179
+ provider: NotificationDeliveryProvider;
180
+ providerConfig?: NotificationProviderConfig | undefined;
181
+ isOnCallPage: boolean;
182
+ status: NotificationDeliveryStatus;
183
+ }): NotificationMetricAttributes;
184
+ static getMillisecondsSince(writtenAt: Date | null | undefined, now?: Date): number | undefined;
185
+ static getDeliveryStatusOfSms(status: SmsStatus | null | undefined): NotificationDeliveryStatus | null;
186
+ static getDeliveryStatusOfWhatsApp(status: WhatsAppStatus | null | undefined): NotificationDeliveryStatus | null;
187
+ static getTriggerAttributes(data: {
188
+ type: NotificationTriggerType;
189
+ source: NotificationTriggerSource;
190
+ monitorType?: string | undefined;
191
+ }): NotificationMetricAttributes;
192
+ static getTimeToSendAttributes(data: {
193
+ channel: NotificationDeliveryChannel;
194
+ customChannel?: NotificationCustomChannelIdentity | undefined;
195
+ triggerType?: NotificationTriggerType | undefined;
196
+ pageStart: OnCallPageStart;
197
+ }): NotificationMetricAttributes;
198
+ static getSendLagAttributes(data: {
199
+ channel: NotificationDeliveryChannel;
200
+ customChannel?: NotificationCustomChannelIdentity | undefined;
201
+ triggerType?: NotificationTriggerType | undefined;
202
+ schedule: NotificationSchedule;
203
+ }): NotificationMetricAttributes;
204
+ static getTriggerTypeOf(row: {
205
+ triggeredByIncidentId?: unknown;
206
+ triggeredByAlertId?: unknown;
207
+ triggeredByIncidentEpisodeId?: unknown;
208
+ triggeredByAlertEpisodeId?: unknown;
209
+ }): NotificationTriggerType | undefined;
210
+ static getChannelOfOnCallPage(channel: OnCallPageChannel): NotificationDeliveryChannel | null;
211
+ static getMailProvider(transport: MailTransportType): NotificationDeliveryProvider;
212
+ }
@@ -0,0 +1,212 @@
1
+ import MailTransportType from "../../../Types/Email/MailTransportType";
2
+ import { OnCallPageChannel } from "../../../Types/OnCallDutyPolicy/OnCallPageChannel";
3
+ import SmsStatus from "../../../Types/SmsStatus";
4
+ import WhatsAppStatus from "../../../Types/WhatsAppStatus";
5
+ export declare enum NotificationDeliveryChannel {
6
+ Email = "email",
7
+ SMS = "sms",
8
+ Call = "call",
9
+ WhatsApp = "whatsapp",
10
+ Telegram = "telegram",
11
+ Push = "push",
12
+ Webhook = "webhook",
13
+ Slack = "slack",
14
+ MicrosoftTeams = "microsoft_teams",
15
+ Mattermost = "mattermost",
16
+ CustomChannel = "custom_channel"
17
+ }
18
+ export declare enum NotificationDeliveryProvider {
19
+ None = "none",
20
+ Twilio = "twilio",
21
+ SmsAndCallGateway = "sms_and_call_gateway",
22
+ SMTP = "smtp",
23
+ SendGrid = "sendgrid",
24
+ AmazonSES = "amazon_ses",
25
+ Mailgun = "mailgun",
26
+ Postmark = "postmark",
27
+ Resend = "resend",
28
+ MicrosoftGraph = "microsoft_graph",
29
+ Expo = "expo",
30
+ PushRelay = "push_relay",
31
+ WebPush = "web_push",
32
+ MetaWhatsApp = "meta_whatsapp",
33
+ TelegramBotApi = "telegram_bot_api",
34
+ Slack = "slack",
35
+ MicrosoftTeams = "microsoft_teams",
36
+ Mattermost = "mattermost",
37
+ Webhook = "webhook",
38
+ CustomChannel = "custom_channel"
39
+ }
40
+ export declare enum NotificationDeliveryOutcome {
41
+ Success = "success",
42
+ Failure = "failure",
43
+ NotSent = "not_sent"
44
+ }
45
+ export declare enum NotificationProviderConfig {
46
+ Global = "global",
47
+ Project = "project"
48
+ }
49
+ export declare enum NotificationTriggerType {
50
+ Incident = "incident",
51
+ Alert = "alert",
52
+ IncidentEpisode = "incident_episode",
53
+ AlertEpisode = "alert_episode"
54
+ }
55
+ export declare enum NotificationTriggerSource {
56
+ Automatic = "automatic",
57
+ Manual = "manual"
58
+ }
59
+ export declare enum OnCallPageStart {
60
+ MonitorDataReceived = "monitor_data_received",
61
+ RecordCreated = "record_created",
62
+ PageStarted = "page_started"
63
+ }
64
+ export declare enum NotificationSchedule {
65
+ RuleWait = "rule_wait",
66
+ Repeat = "repeat",
67
+ Escalation = "escalation",
68
+ PolicyRepeat = "policy_repeat"
69
+ }
70
+ export declare enum NotificationDestination {
71
+ DirectMessage = "direct_message",
72
+ Channel = "channel",
73
+ IncomingWebhook = "incoming_webhook"
74
+ }
75
+ export declare enum NotificationDeliveryStatus {
76
+ Delivered = "delivered",
77
+ Undelivered = "undelivered",
78
+ Failed = "failed",
79
+ Answered = "answered",
80
+ NotAnswered = "not_answered"
81
+ }
82
+ export declare enum NotificationMetricAttribute {
83
+ Channel = "notification.channel",
84
+ Provider = "notification.provider",
85
+ ProviderConfig = "notification.provider.config",
86
+ Outcome = "outcome",
87
+ OnCallPage = "notification.on_call_page",
88
+ CustomChannelId = "notification.custom_channel.id",
89
+ CustomChannelName = "notification.custom_channel.name",
90
+ TriggerType = "notification.trigger.type",
91
+ TriggerSource = "notification.trigger.source",
92
+ MonitorType = "monitor.type",
93
+ PageStart = "notification.page.start",
94
+ Destination = "notification.destination",
95
+ Schedule = "notification.schedule"
96
+ }
97
+ export declare const MAX_CUSTOM_CHANNEL_NAME_LENGTH: number;
98
+ export interface NotificationCustomChannelIdentity {
99
+ id: string;
100
+ name?: string | undefined;
101
+ }
102
+ export interface NotificationDispatchStart {
103
+ channel: NotificationDeliveryChannel;
104
+ provider?: NotificationDeliveryProvider | undefined;
105
+ providerConfig?: NotificationProviderConfig | undefined;
106
+ isOnCallPage?: boolean | undefined;
107
+ customChannel?: NotificationCustomChannelIdentity | undefined;
108
+ destination?: NotificationDestination | undefined;
109
+ }
110
+ export interface NotificationDeliveryReport {
111
+ channel: NotificationDeliveryChannel;
112
+ provider: NotificationDeliveryProvider;
113
+ providerConfig?: NotificationProviderConfig | undefined;
114
+ isOnCallPage: boolean;
115
+ status: NotificationDeliveryStatus;
116
+ timeToStatusInMs?: number | undefined;
117
+ }
118
+ export type NotificationMetricAttributes = Record<string, string>;
119
+ export declare class NotificationDispatch {
120
+ private readonly channel;
121
+ private provider;
122
+ private providerConfig;
123
+ private isOnCallPage;
124
+ private customChannel;
125
+ private readonly destination;
126
+ private outcome;
127
+ private readonly startedAtInNs;
128
+ private isEnded;
129
+ constructor(start: NotificationDispatchStart);
130
+ setProvider(provider: NotificationDeliveryProvider, providerConfig?: NotificationProviderConfig | undefined): void;
131
+ setCustomChannel(customChannel: NotificationCustomChannelIdentity | undefined): void;
132
+ setIsOnCallPage(isOnCallPage: boolean): void;
133
+ markSucceeded(): void;
134
+ markFailed(): void;
135
+ markNotSent(): void;
136
+ getOutcome(): NotificationDeliveryOutcome | undefined;
137
+ getProvider(): NotificationDeliveryProvider;
138
+ isRecorded(): boolean;
139
+ getAttributes(outcome: NotificationDeliveryOutcome): NotificationMetricAttributes;
140
+ end(outcomeIfNotMarked: NotificationDeliveryOutcome): void;
141
+ }
142
+ export default class NotificationDeliveryMetrics {
143
+ static startDispatch(start: NotificationDispatchStart): NotificationDispatch;
144
+ static measureDispatch<T>(start: NotificationDispatchStart, send: (dispatch: NotificationDispatch) => Promise<T>): Promise<T>;
145
+ static recordNotSent(start: NotificationDispatchStart): void;
146
+ static recordFailedBeforeSend(start: NotificationDispatchStart): void;
147
+ private static recordWithoutDuration;
148
+ static recordDelivery(report: NotificationDeliveryReport): void;
149
+ static recordTrigger(data: {
150
+ type: NotificationTriggerType;
151
+ source: NotificationTriggerSource;
152
+ monitorType?: string | undefined;
153
+ }): void;
154
+ static recordTimeToSend(data: {
155
+ channel: NotificationDeliveryChannel;
156
+ customChannel?: NotificationCustomChannelIdentity | undefined;
157
+ triggerType?: NotificationTriggerType | undefined;
158
+ pageStart: OnCallPageStart;
159
+ timeToSendInMs: number;
160
+ }): void;
161
+ static recordSendLag(data: {
162
+ channel: NotificationDeliveryChannel;
163
+ customChannel?: NotificationCustomChannelIdentity | undefined;
164
+ triggerType?: NotificationTriggerType | undefined;
165
+ schedule: NotificationSchedule;
166
+ lagInMs: number;
167
+ }): void;
168
+ static getDispatchAttributes(data: {
169
+ channel: NotificationDeliveryChannel;
170
+ provider: NotificationDeliveryProvider;
171
+ providerConfig: NotificationProviderConfig;
172
+ isOnCallPage: boolean;
173
+ customChannel?: NotificationCustomChannelIdentity | undefined;
174
+ destination?: NotificationDestination | undefined;
175
+ outcome: NotificationDeliveryOutcome;
176
+ }): NotificationMetricAttributes;
177
+ static getDeliveryAttributes(data: {
178
+ channel: NotificationDeliveryChannel;
179
+ provider: NotificationDeliveryProvider;
180
+ providerConfig?: NotificationProviderConfig | undefined;
181
+ isOnCallPage: boolean;
182
+ status: NotificationDeliveryStatus;
183
+ }): NotificationMetricAttributes;
184
+ static getMillisecondsSince(writtenAt: Date | null | undefined, now?: Date): number | undefined;
185
+ static getDeliveryStatusOfSms(status: SmsStatus | null | undefined): NotificationDeliveryStatus | null;
186
+ static getDeliveryStatusOfWhatsApp(status: WhatsAppStatus | null | undefined): NotificationDeliveryStatus | null;
187
+ static getTriggerAttributes(data: {
188
+ type: NotificationTriggerType;
189
+ source: NotificationTriggerSource;
190
+ monitorType?: string | undefined;
191
+ }): NotificationMetricAttributes;
192
+ static getTimeToSendAttributes(data: {
193
+ channel: NotificationDeliveryChannel;
194
+ customChannel?: NotificationCustomChannelIdentity | undefined;
195
+ triggerType?: NotificationTriggerType | undefined;
196
+ pageStart: OnCallPageStart;
197
+ }): NotificationMetricAttributes;
198
+ static getSendLagAttributes(data: {
199
+ channel: NotificationDeliveryChannel;
200
+ customChannel?: NotificationCustomChannelIdentity | undefined;
201
+ triggerType?: NotificationTriggerType | undefined;
202
+ schedule: NotificationSchedule;
203
+ }): NotificationMetricAttributes;
204
+ static getTriggerTypeOf(row: {
205
+ triggeredByIncidentId?: unknown;
206
+ triggeredByAlertId?: unknown;
207
+ triggeredByIncidentEpisodeId?: unknown;
208
+ triggeredByAlertEpisodeId?: unknown;
209
+ }): NotificationTriggerType | undefined;
210
+ static getChannelOfOnCallPage(channel: OnCallPageChannel): NotificationDeliveryChannel | null;
211
+ static getMailProvider(transport: MailTransportType): NotificationDeliveryProvider;
212
+ }
@@ -7,6 +7,7 @@ import WorkspaceChannelInvitationPayload from "../../../Types/Workspace/Workspac
7
7
  import WorkspaceMessagePayload, { WorkspaceCheckboxBlock, WorkspaceDatePickerBlock, WorkspaceDateTimePickerBlock, WorkspaceDropdownBlock, WorkspaceMessageBlock, WorkspaceMessagePayloadButton, WorkspaceModalBlock, WorkspaceNumberInputBlock, WorkspacePayloadButtons, WorkspacePayloadContext, WorkspacePayloadHeader, WorkspacePayloadImage, WorkspacePayloadMarkdown, WorkspaceTextAreaBlock, WorkspaceTextBoxBlock } from "../../../Types/Workspace/WorkspaceMessagePayload.mjs";
8
8
  import WorkspaceType from "../../../Types/Workspace/WorkspaceType.mjs";
9
9
  import URL from "../../../Types/API/URL.mjs";
10
+ import { NotificationProviderConfig } from "../Telemetry/NotificationDeliveryMetrics.mjs";
10
11
  export interface WorkspaceThread {
11
12
  channel: WorkspaceChannel;
12
13
  threadId: string;
@@ -195,6 +196,8 @@ export default class WorkspaceBase {
195
196
  static sendMessageToChannelViaIncomingWebhook(_data: {
196
197
  url: URL;
197
198
  text: string;
199
+ providerConfig?: NotificationProviderConfig | undefined;
200
+ isNotification?: boolean | undefined;
198
201
  }): Promise<HTTPResponse<JSONObject> | HTTPErrorResponse>;
199
202
  static isUserInChannel(_data: {
200
203
  authToken: string;
@@ -7,6 +7,7 @@ import WorkspaceChannelInvitationPayload from "../../../Types/Workspace/Workspac
7
7
  import WorkspaceMessagePayload, { WorkspaceCheckboxBlock, WorkspaceDatePickerBlock, WorkspaceDateTimePickerBlock, WorkspaceDropdownBlock, WorkspaceMessageBlock, WorkspaceMessagePayloadButton, WorkspaceModalBlock, WorkspaceNumberInputBlock, WorkspacePayloadButtons, WorkspacePayloadContext, WorkspacePayloadHeader, WorkspacePayloadImage, WorkspacePayloadMarkdown, WorkspaceTextAreaBlock, WorkspaceTextBoxBlock } from "../../../Types/Workspace/WorkspaceMessagePayload";
8
8
  import WorkspaceType from "../../../Types/Workspace/WorkspaceType";
9
9
  import URL from "../../../Types/API/URL";
10
+ import { NotificationProviderConfig } from "../Telemetry/NotificationDeliveryMetrics";
10
11
  export interface WorkspaceThread {
11
12
  channel: WorkspaceChannel;
12
13
  threadId: string;
@@ -195,6 +196,8 @@ export default class WorkspaceBase {
195
196
  static sendMessageToChannelViaIncomingWebhook(_data: {
196
197
  url: URL;
197
198
  text: string;
199
+ providerConfig?: NotificationProviderConfig | undefined;
200
+ isNotification?: boolean | undefined;
198
201
  }): Promise<HTTPResponse<JSONObject> | HTTPErrorResponse>;
199
202
  static isUserInChannel(_data: {
200
203
  authToken: string;
@@ -47,7 +47,8 @@ export declare enum AIChatCitationTargetType {
47
47
  DataSecurityIssues = "DataSecurityIssues",
48
48
  DataSecurityIssueView = "DataSecurityIssueView",
49
49
  DataSecurityAccess = "DataSecurityAccess",
50
- DataTableView = "DataTableView"
50
+ DataTableView = "DataTableView",
51
+ DataTableLineageView = "DataTableLineageView"
51
52
  }
52
53
  export interface AIChatCitationTarget {
53
54
  type: AIChatCitationTargetType;
@@ -47,7 +47,8 @@ export declare enum AIChatCitationTargetType {
47
47
  DataSecurityIssues = "DataSecurityIssues",
48
48
  DataSecurityIssueView = "DataSecurityIssueView",
49
49
  DataSecurityAccess = "DataSecurityAccess",
50
- DataTableView = "DataTableView"
50
+ DataTableView = "DataTableView",
51
+ DataTableLineageView = "DataTableLineageView"
51
52
  }
52
53
  export interface AIChatCitationTarget {
53
54
  type: AIChatCitationTargetType;
@@ -71,6 +71,8 @@ var AIChatCitationTargetType;
71
71
  AIChatCitationTargetType["DataSecurityAccess"] = "DataSecurityAccess";
72
72
  // Data Observability: one watched table ({ dataAssetId }).
73
73
  AIChatCitationTargetType["DataTableView"] = "DataTableView";
74
+ // Data Observability: one watched table's Lineage tab ({ dataAssetId }).
75
+ AIChatCitationTargetType["DataTableLineageView"] = "DataTableLineageView";
74
76
  })(AIChatCitationTargetType || (exports.AIChatCitationTargetType = AIChatCitationTargetType = {}));
75
77
  /*
76
78
  * ---------------------------------------------------------------------------
@@ -11,6 +11,13 @@ export default interface InvestigationNotStartedReason {
11
11
  source: "recorded" | "current_configuration" | "unknown";
12
12
  evaluatedAt: string;
13
13
  decidedAfterWaitMinutes?: number | undefined;
14
+ facts?: InvestigationNotStartedFacts | undefined;
15
+ }
16
+ export interface InvestigationNotStartedFacts {
17
+ severityName?: string | undefined;
18
+ minimumSeverityName?: string | undefined;
19
+ cooldownWindowMinutes?: number | undefined;
20
+ dailyTokenLimit?: number | undefined;
14
21
  }
15
22
  export interface InvestigationGateDetails {
16
23
  severityName?: string | undefined;
@@ -11,6 +11,13 @@ export default interface InvestigationNotStartedReason {
11
11
  source: "recorded" | "current_configuration" | "unknown";
12
12
  evaluatedAt: string;
13
13
  decidedAfterWaitMinutes?: number | undefined;
14
+ facts?: InvestigationNotStartedFacts | undefined;
15
+ }
16
+ export interface InvestigationNotStartedFacts {
17
+ severityName?: string | undefined;
18
+ minimumSeverityName?: string | undefined;
19
+ cooldownWindowMinutes?: number | undefined;
20
+ dailyTokenLimit?: number | undefined;
14
21
  }
15
22
  export interface InvestigationGateDetails {
16
23
  severityName?: string | undefined;
@@ -0,0 +1,8 @@
1
+ export declare const LEFT_TO_RIGHT_ISOLATE: string;
2
+ export interface CodeInSentence {
3
+ start: number;
4
+ end: number;
5
+ text: string;
6
+ }
7
+ export declare const getCodeInSentence: (sentence: string) => Array<CodeInSentence>;
8
+ export declare const setCodeApartInSentence: (sentence: string, language: string | null | undefined) => string;
@@ -0,0 +1,8 @@
1
+ export declare const LEFT_TO_RIGHT_ISOLATE: string;
2
+ export interface CodeInSentence {
3
+ start: number;
4
+ end: number;
5
+ text: string;
6
+ }
7
+ export declare const getCodeInSentence: (sentence: string) => Array<CodeInSentence>;
8
+ export declare const setCodeApartInSentence: (sentence: string, language: string | null | undefined) => string;