Skip to content

Commit a2e9d26

Browse files
committed
feat(typeDefs): add type definitions for event grouping patterns
1 parent 4794e6d commit a2e9d26

File tree

4 files changed

+120
-0
lines changed

4 files changed

+120
-0
lines changed

src/typeDefs/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import notifications from './notifications';
66
import notificationsInput from './notificationsInput';
77
import projectNotifications from './projectNotifications';
88
import projectNotificationsMutations from './projectNotificationsMutations';
9+
import projectEventGroupingPattern from './projectEventGroupingPattern';
10+
import projectEventGroupingPatternMutations from './projectEventGroupingPatternMutations';
911
import project from './project';
1012
import user from './user';
1113
import userNotifications from './userNotifications';
@@ -98,6 +100,8 @@ const typeDefinitions = [
98100
workspaceMutations,
99101
chart,
100102
plans,
103+
projectEventGroupingPattern,
104+
projectEventGroupingPatternMutations,
101105
];
102106

103107
if (isE2E) {

src/typeDefs/project.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ type Project {
148148
Project notification settings
149149
"""
150150
notifications: [ProjectNotificationsRule]
151+
152+
"""
153+
Event grouping patterns
154+
"""
155+
eventGroupingPatterns: [ProjectEventGroupingPattern]
151156
}
152157
153158
extend type Query {
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { gql } from 'apollo-server-express';
2+
3+
export default gql`
4+
"""
5+
Project event grouping settings
6+
"""
7+
type ProjectEventGroupingPattern {
8+
"""
9+
id of the event grouping pattern
10+
"""
11+
id: ID! @renameFrom(name: "_id")
12+
13+
"""
14+
event grouping pattern string
15+
"""
16+
pattern: String!
17+
}
18+
19+
type ProjectEventGroupingPatternContent {
20+
"""
21+
event grouping pattern string
22+
"""
23+
pattern: String!
24+
}
25+
26+
type ProjectEventGroupingPatternPointer {
27+
"""
28+
id of the event grouping pattern
29+
"""
30+
id: ID! @renameFrom(name: "_id")
31+
}
32+
`;
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import { gql } from 'apollo-server-express';
2+
3+
export default gql`
4+
"""
5+
Input type for creating new event grouping pattern
6+
"""
7+
input CreateProjectEventGroupingPatternInput {
8+
"""
9+
Pattern string
10+
"""
11+
pattern: String!
12+
13+
"""
14+
Id of the project
15+
"""
16+
projectId: ID!
17+
}
18+
19+
"""
20+
Input type for updating of the event grouping pattern
21+
"""
22+
input UpdateProjectEventGroupingPatternInput {
23+
"""
24+
Id of the pattern to be updated
25+
"""
26+
id: ID!
27+
28+
"""
29+
New pattern string
30+
"""
31+
pattern: String!
32+
33+
"""
34+
Id of the project
35+
"""
36+
projectId: ID!
37+
}
38+
39+
"""
40+
Input type for deleting of the event grouping pattern
41+
"""
42+
input RemoveProjectEventGroupingPatternInput {
43+
"""
44+
Id of the pattern to be removed
45+
"""
46+
id: ID!
47+
48+
"""
49+
Id of the project
50+
"""
51+
projectId: ID!
52+
}
53+
54+
extend type Mutation {
55+
"""
56+
Creates new event grouping pattern
57+
"""
58+
createProjectEventGroupingPattern(
59+
"Data for creating"
60+
input: CreateProjectEventGroupingPatternInput!
61+
): ProjectEventGroupingPattern @requireAdmin
62+
63+
"""
64+
Updates existing event grouping pattern
65+
"""
66+
updateProjectEventGroupingPattern(
67+
"Data for updating"
68+
input: UpdateProjectEventGroupingPatternInput!
69+
): ProjectEventGroupingPattern @requireAdmin
70+
71+
"""
72+
Removes notifications rule from project
73+
"""
74+
removeProjectEventGroupingPattern(
75+
"Data for deleting"
76+
input: RemoveProjectEventGroupingPatternInput!
77+
): ProjectEventGroupingPattern @requireAdmin
78+
}
79+
`;

0 commit comments

Comments
 (0)