-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathseveral-events-notify.ts
More file actions
63 lines (62 loc) · 1.55 KB
/
several-events-notify.ts
File metadata and controls
63 lines (62 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { SeveralEventsNotification } from 'hawk-worker-sender/types/template-variables';
import { GroupedEventDBScheme } from '@hawk.so/types';
import { ObjectId } from 'mongodb';
/**
* Example of several-events notify template variables
*/
export default {
type: 'several-events',
payload: {
events: [
{
event: {
totalCount: 10,
timestamp: Date.now(),
payload: {
title: 'New event',
backtrace: [ {
file: 'file',
line: 1,
sourceCode: [ {
line: 1,
content: 'code',
} ],
} ],
},
} as GroupedEventDBScheme,
daysRepeated: 1,
newCount: 1,
},
{
event: {
totalCount: 5,
payload: {
title: 'New event 2',
timestamp: Date.now(),
backtrace: [ {
file: 'file',
line: 1,
sourceCode: [ {
line: 1,
content: 'code',
} ],
} ],
},
},
daysRepeated: 100,
newCount: 1,
},
],
period: 60,
host: process.env.GARAGE_URL,
hostOfStatic: process.env.API_STATIC_URL,
project: {
_id: new ObjectId('5d206f7f9aaf7c0071d64596'),
token: 'project-token',
name: 'Project',
workspaceId: new ObjectId('5d206f7f9aaf7c0071d64596'),
uidAdded: new ObjectId('5d206f7f9aaf7c0071d64596'),
notifications: [],
},
},
} as SeveralEventsNotification;