@cellaware/utils 8.7.10 → 8.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chatwms/alert.d.ts +16 -8
- package/dist/chatwms/alert.js +4 -2
- package/dist/chatwms/cosmos.js +5 -1
- package/dist/chatwms/report.js +0 -1
- package/package.json +1 -1
package/dist/chatwms/alert.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataContext } from "./client.js";
|
|
2
2
|
import { DatagridCondition, DatagridStateBase } from "./datagrid.js";
|
|
3
|
+
import { SubscriptionIntegration } from "./integration.js";
|
|
3
4
|
export declare const ALERT_VISIBILITY_PRIVATE = "private";
|
|
4
5
|
export declare const ALERT_VISIBILITY_PUBLIC = "public";
|
|
5
6
|
/**
|
|
@@ -34,14 +35,14 @@ export interface Alert {
|
|
|
34
35
|
userId: string;
|
|
35
36
|
}
|
|
36
37
|
export declare function initAlert(): Alert;
|
|
37
|
-
export interface
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
export interface AlertWithSubscriptions extends Alert {
|
|
41
|
-
subscriptions: AlertSubscriptionType[];
|
|
38
|
+
export interface AlertWithSubscription extends Alert {
|
|
39
|
+
subscription: AlertSubscription;
|
|
42
40
|
lastMet: string;
|
|
43
41
|
lastSent: string;
|
|
44
42
|
}
|
|
43
|
+
export interface InstanceAlert extends Alert {
|
|
44
|
+
subscriptions: InstanceAlertSubscription[];
|
|
45
|
+
}
|
|
45
46
|
export interface AlertContentInfo extends DatagridStateBase {
|
|
46
47
|
contextName: DataContext;
|
|
47
48
|
specification: string;
|
|
@@ -74,13 +75,20 @@ export interface AlertExecution {
|
|
|
74
75
|
userId: string;
|
|
75
76
|
datetime: Date;
|
|
76
77
|
}
|
|
77
|
-
export type AlertSubscriptionType = 'popup' | 'email' | 'teams';
|
|
78
|
-
export declare const ALERT_SUBSCRIPTION_TYPES: string[];
|
|
79
78
|
export interface AlertSubscription {
|
|
80
79
|
alertId: string;
|
|
81
|
-
|
|
80
|
+
popup?: boolean;
|
|
81
|
+
email?: boolean;
|
|
82
|
+
additionalEmails?: string[];
|
|
83
|
+
integrations?: string[];
|
|
82
84
|
clientId: string;
|
|
83
85
|
userId: string;
|
|
84
86
|
userDetails: string;
|
|
85
87
|
}
|
|
86
88
|
export declare function initAlertSubscription(): AlertSubscription;
|
|
89
|
+
export interface InstanceAlertSubscription {
|
|
90
|
+
alertId: string;
|
|
91
|
+
popups: Set<string>;
|
|
92
|
+
emails: Set<string>;
|
|
93
|
+
integrations: Set<SubscriptionIntegration>;
|
|
94
|
+
}
|
package/dist/chatwms/alert.js
CHANGED
|
@@ -50,11 +50,13 @@ export function initAlertTestResult() {
|
|
|
50
50
|
hashedRows: []
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
export const ALERT_SUBSCRIPTION_TYPES = ['popup', 'email', 'teams'];
|
|
54
53
|
export function initAlertSubscription() {
|
|
55
54
|
return {
|
|
56
55
|
alertId: '',
|
|
57
|
-
|
|
56
|
+
popup: false,
|
|
57
|
+
email: false,
|
|
58
|
+
additionalEmails: [],
|
|
59
|
+
integrations: [],
|
|
58
60
|
clientId: '',
|
|
59
61
|
userId: '',
|
|
60
62
|
userDetails: ''
|
package/dist/chatwms/cosmos.js
CHANGED
|
@@ -6,7 +6,7 @@ const COSMOS_SQL_ACTION_WORDS_REGEX = /\b(insert|update|delete|create|alter|drop
|
|
|
6
6
|
const COSMOS_SQL_SELECT_REGEX = /\b(select)\b/gmi;
|
|
7
7
|
const COSMOS_SQL_FROM_REGEX = /\b(from)\b/gmi;
|
|
8
8
|
const COSMOS_SQL_WHERE_REGEX = /\b(where)\b/gmi;
|
|
9
|
-
const COSMOS_SQL_APPROVED_TABLES_REGEX = /\b(active_users|alert_executions|alert_subscriptions|alerts|client_configs|conversation_details|conversation_feedback|conversation_headers|conversation_metadata|conversation_removed_details|conversation_sampled_details|conversation_sampled_metadata|dashboard_usage|dashboard_widgets|dashboards|errors_temp|notifications|notifications_poll|report_lines|report_schedules|report_usage|reports|subscription_integrations|user_roles)\b/gmi;
|
|
9
|
+
const COSMOS_SQL_APPROVED_TABLES_REGEX = /\b(active_users|alert_executions|alert_subscriptions|alerts|client_configs|conversation_details|conversation_feedback|conversation_headers|conversation_metadata|conversation_removed_details|conversation_sampled_details|conversation_sampled_metadata|dashboard_usage|dashboard_widgets|dashboards|errors_temp|notifications|notifications_poll|outages|report_lines|report_schedules|report_usage|reports|subscription_integrations|user_roles)\b/gmi;
|
|
10
10
|
const _SUBQUERY_QUERY_PLACEHOLDER_UNWRAPPED = '{{query}}';
|
|
11
11
|
const SUBQUERY_QUERY_PLACEHOLDER = `(${_SUBQUERY_QUERY_PLACEHOLDER_UNWRAPPED})`;
|
|
12
12
|
const VARIABLE_COSMOS_USER_ID = '__USER_ID__';
|
|
@@ -132,6 +132,10 @@ const COSMOS_TABLES = [
|
|
|
132
132
|
table_name: 'notifications_poll',
|
|
133
133
|
table_description: 'Notifications Poll'
|
|
134
134
|
},
|
|
135
|
+
{
|
|
136
|
+
table_name: 'outages',
|
|
137
|
+
table_description: 'Outages'
|
|
138
|
+
},
|
|
135
139
|
{
|
|
136
140
|
table_name: 'report_lines',
|
|
137
141
|
table_description: 'Report Lines'
|
package/dist/chatwms/report.js
CHANGED