decidim-comments 0.8.4 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +7 -0
- data/app/assets/javascripts/decidim/comments/bundle.js +115 -111
- data/app/assets/javascripts/decidim/comments/bundle.js.map +1 -1
- data/app/commands/decidim/comments/create_comment.rb +24 -2
- data/app/events/decidim/comments/comment_created_event.rb +13 -30
- data/app/events/decidim/comments/user_mentioned_event.rb +39 -0
- data/app/frontend/application/apollo_client.ts +10 -6
- data/app/frontend/application/application.component.test.tsx +0 -13
- data/app/frontend/application/application.component.tsx +0 -2
- data/app/frontend/comments/add_comment_form.component.tsx +23 -21
- data/app/frontend/comments/comment.component.test.tsx +9 -4
- data/app/frontend/comments/comment.component.tsx +80 -22
- data/app/frontend/comments/comments.component.test.tsx +1 -0
- data/app/frontend/comments/comments.component.tsx +2 -2
- data/app/frontend/comments/down_vote_button.component.tsx +48 -50
- data/app/frontend/comments/up_vote_button.component.tsx +13 -11
- data/app/frontend/fragments/comment_data.fragment.graphql +5 -2
- data/app/frontend/queries/comments.query.graphql +2 -0
- data/app/frontend/support/generate_comments_data.ts +10 -4
- data/app/frontend/support/generate_user_data.ts +2 -1
- data/app/frontend/support/schema.ts +419 -216
- data/app/models/decidim/comments/comment.rb +11 -0
- data/app/queries/decidim/comments/sorted_comments.rb +2 -2
- data/app/types/decidim/comments/commentable_interface.rb +10 -1
- data/config/locales/ca.yml +20 -16
- data/config/locales/en.yml +18 -13
- data/config/locales/es.yml +22 -18
- data/config/locales/eu.yml +18 -13
- data/config/locales/fi.yml +19 -14
- data/config/locales/fr.yml +18 -13
- data/config/locales/gl.yml +75 -0
- data/config/locales/it.yml +18 -13
- data/config/locales/nl.yml +18 -13
- data/config/locales/pl.yml +18 -13
- data/config/locales/pt-BR.yml +75 -0
- data/config/locales/pt.yml +18 -13
- data/config/locales/ru.yml +1 -14
- data/config/locales/sv.yml +75 -0
- data/config/locales/uk.yml +0 -13
- data/lib/decidim/comments/api/comment_type.rb +5 -1
- data/lib/decidim/comments/commentable.rb +2 -1
- data/lib/decidim/comments/version.rb +1 -1
- metadata +15 -11
@@ -37,9 +37,9 @@ export class Comments extends React.Component<CommentsProps> {
|
|
37
37
|
};
|
38
38
|
|
39
39
|
public render() {
|
40
|
-
const { commentable: { comments }, reorderComments, orderBy, loading } = this.props;
|
40
|
+
const { commentable: { comments, totalCommentsCount }, reorderComments, orderBy, loading } = this.props;
|
41
41
|
let commentClasses = "comments";
|
42
|
-
let commentHeader = I18n.t("components.comments.title", { count:
|
42
|
+
let commentHeader = I18n.t("components.comments.title", { count: totalCommentsCount });
|
43
43
|
|
44
44
|
if (loading) {
|
45
45
|
commentClasses += " loading-comments";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
import { graphql } from "react-apollo";
|
2
|
+
import { graphql, MutationFunc } from "react-apollo";
|
3
3
|
|
4
4
|
import VoteButton from "./vote_button.component";
|
5
5
|
|
@@ -55,62 +55,60 @@ const downVoteMutation = require("../mutations/down_vote.mutation.graphql");
|
|
55
55
|
const getCommentsQuery = require("../queries/comments.query.graphql");
|
56
56
|
|
57
57
|
const DownVoteButtonWithMutation = graphql<DownVoteMutation, DownVoteButtonProps>(downVoteMutation, {
|
58
|
-
props: ({ ownProps, mutate }) => ({
|
59
|
-
downVote() {
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
props: ({ ownProps, mutate }: { ownProps: DownVoteButtonProps, mutate: MutationFunc<DownVoteMutation> }) => ({
|
59
|
+
downVote: () => mutate({
|
60
|
+
variables: {
|
61
|
+
id: ownProps.comment.id,
|
62
|
+
},
|
63
|
+
optimisticResponse: {
|
64
|
+
__typename: "Mutation",
|
65
|
+
comment: {
|
66
|
+
__typename: "CommentMutation",
|
67
|
+
downVote: {
|
68
|
+
__typename: "Comment",
|
69
|
+
...ownProps.comment,
|
70
|
+
downVotes: ownProps.comment.downVotes + 1,
|
71
|
+
downVoted: true,
|
64
72
|
},
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
downVoted: true,
|
74
|
-
},
|
75
|
-
},
|
76
|
-
},
|
77
|
-
update: (store, { data }: { data: DownVoteMutation }) => {
|
78
|
-
const variables = {
|
79
|
-
commentableId: ownProps.rootCommentable.id,
|
80
|
-
commentableType: ownProps.rootCommentable.type,
|
81
|
-
orderBy: ownProps.orderBy,
|
82
|
-
};
|
73
|
+
},
|
74
|
+
},
|
75
|
+
update: (store, { data }: { data: DownVoteMutation }) => {
|
76
|
+
const variables = {
|
77
|
+
commentableId: ownProps.rootCommentable.id,
|
78
|
+
commentableType: ownProps.rootCommentable.type,
|
79
|
+
orderBy: ownProps.orderBy,
|
80
|
+
};
|
83
81
|
|
84
|
-
|
85
|
-
|
82
|
+
const commentReducer = (comment: CommentFragment): CommentFragment => {
|
83
|
+
const replies = comment.comments || [];
|
86
84
|
|
87
|
-
|
88
|
-
|
89
|
-
|
85
|
+
if (comment.id === ownProps.comment.id && data.comment) {
|
86
|
+
return data.comment.downVote;
|
87
|
+
}
|
90
88
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
89
|
+
return {
|
90
|
+
...comment,
|
91
|
+
comments: replies.map(commentReducer),
|
92
|
+
};
|
93
|
+
};
|
96
94
|
|
97
|
-
|
95
|
+
const prev = store.readQuery<GetCommentsQuery>({ query: getCommentsQuery, variables });
|
98
96
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
97
|
+
if (prev) {
|
98
|
+
store.writeQuery({
|
99
|
+
query: getCommentsQuery,
|
100
|
+
data: {
|
101
|
+
...prev,
|
102
|
+
commentable: {
|
103
|
+
...prev.commentable,
|
104
|
+
comments: prev.commentable.comments.map(commentReducer),
|
107
105
|
},
|
108
|
-
|
109
|
-
|
110
|
-
}
|
111
|
-
}
|
112
|
-
}
|
113
|
-
},
|
106
|
+
},
|
107
|
+
variables,
|
108
|
+
});
|
109
|
+
}
|
110
|
+
},
|
111
|
+
}),
|
114
112
|
}),
|
115
113
|
})(DownVoteButton);
|
116
114
|
|
@@ -54,7 +54,7 @@ export const UpVoteButton: React.SFC<UpVoteButtonProps> = ({
|
|
54
54
|
const upVoteMutation = require("../mutations/up_vote.mutation.graphql");
|
55
55
|
const getCommentsQuery = require("../queries/comments.query.graphql");
|
56
56
|
|
57
|
-
const UpVoteButtonWithMutation = graphql(upVoteMutation, {
|
57
|
+
const UpVoteButtonWithMutation = graphql<UpVoteMutation, UpVoteButtonProps>(upVoteMutation, {
|
58
58
|
props: ({ ownProps, mutate }: { ownProps: UpVoteButtonProps, mutate: MutationFunc<UpVoteMutation> }) => ({
|
59
59
|
upVote: () => mutate({
|
60
60
|
variables: {
|
@@ -94,17 +94,19 @@ const UpVoteButtonWithMutation = graphql(upVoteMutation, {
|
|
94
94
|
|
95
95
|
const prev = store.readQuery<GetCommentsQuery>({ query: getCommentsQuery, variables });
|
96
96
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
97
|
+
if (prev) {
|
98
|
+
store.writeQuery({
|
99
|
+
query: getCommentsQuery,
|
100
|
+
data: {
|
101
|
+
...prev,
|
102
|
+
commentable: {
|
103
|
+
...prev.commentable,
|
104
|
+
comments: prev.commentable.comments.map(commentReducer),
|
105
|
+
},
|
104
106
|
},
|
105
|
-
|
106
|
-
|
107
|
-
}
|
107
|
+
variables,
|
108
|
+
});
|
109
|
+
}
|
108
110
|
},
|
109
111
|
}),
|
110
112
|
}),
|
@@ -6,13 +6,16 @@ fragment CommentData on Comment {
|
|
6
6
|
sgid
|
7
7
|
type
|
8
8
|
body
|
9
|
+
formattedBody
|
9
10
|
createdAt
|
11
|
+
formattedCreatedAt
|
10
12
|
author {
|
11
13
|
name
|
14
|
+
nickname
|
12
15
|
avatarUrl
|
13
|
-
|
14
|
-
isUser
|
16
|
+
profilePath
|
15
17
|
deleted
|
18
|
+
badge
|
16
19
|
}
|
17
20
|
hasComments
|
18
21
|
acceptsNewComments
|
@@ -5,6 +5,7 @@ query GetComments($commentableId: String!, $commentableType: String!, $orderBy:
|
|
5
5
|
session {
|
6
6
|
user {
|
7
7
|
name
|
8
|
+
nickname
|
8
9
|
avatarUrl
|
9
10
|
organizationName
|
10
11
|
}
|
@@ -14,6 +15,7 @@ query GetComments($commentableId: String!, $commentableType: String!, $orderBy:
|
|
14
15
|
acceptsNewComments
|
15
16
|
commentsHaveAlignment
|
16
17
|
commentsHaveVotes
|
18
|
+
totalCommentsCount
|
17
19
|
comments(orderBy: $orderBy) {
|
18
20
|
id
|
19
21
|
...CommentThread
|
@@ -11,17 +11,23 @@ const generateCommentsData = (num = 1) => {
|
|
11
11
|
const commentsData: CommentFragment[] = [];
|
12
12
|
|
13
13
|
for (let idx = 0; idx < num; idx += 1) {
|
14
|
+
const creationDate = date.recent();
|
15
|
+
const nickname = name.findName();
|
16
|
+
|
14
17
|
commentsData.push({
|
15
18
|
id: random.uuid(),
|
16
19
|
type: "Decidim::Comments::Comment",
|
17
20
|
body: lorem.words(),
|
18
|
-
|
21
|
+
formattedBody: lorem.words(),
|
22
|
+
createdAt: creationDate.toISOString(),
|
23
|
+
formattedCreatedAt: creationDate.toLocaleTimeString(),
|
19
24
|
author: {
|
20
|
-
name: name.
|
25
|
+
name: `${name.firstName()} ${name.lastName()}`,
|
26
|
+
nickname: `@${nickname}`,
|
21
27
|
avatarUrl: image.imageUrl(),
|
22
|
-
|
23
|
-
isUser: Math.random() >= 0.5,
|
28
|
+
profilePath: `/profiles/${nickname}`,
|
24
29
|
deleted: false,
|
30
|
+
badge: "verified-badge",
|
25
31
|
},
|
26
32
|
hasComments: false,
|
27
33
|
comments: [],
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/* tslint:disable */
|
2
2
|
// This file was automatically generated and should not be edited.
|
3
3
|
|
4
|
-
export
|
4
|
+
export interface addCommentMutationVariables {
|
5
5
|
commentableId: string,
|
6
6
|
commentableType: string,
|
7
7
|
body: string,
|
@@ -9,7 +9,7 @@ export type addCommentMutationVariables = {
|
|
9
9
|
userGroupId?: string | null,
|
10
10
|
};
|
11
11
|
|
12
|
-
export
|
12
|
+
export interface addCommentMutation {
|
13
13
|
// A commentable
|
14
14
|
commentable: {
|
15
15
|
// Add a new comment to a commentable
|
@@ -24,31 +24,39 @@ export type addCommentMutation = {
|
|
24
24
|
type: string,
|
25
25
|
// The comment message
|
26
26
|
body: string,
|
27
|
+
// The comment message ready to display (it is expected to include HTML)
|
28
|
+
formattedBody: string,
|
27
29
|
// The creation date of the comment
|
28
30
|
createdAt: string,
|
31
|
+
// The creation date of the comment in relative format
|
32
|
+
formattedCreatedAt: string,
|
29
33
|
// The comment's author
|
30
34
|
author: ( {
|
31
35
|
// The author's name
|
32
36
|
name: string,
|
37
|
+
// The author's nickname
|
38
|
+
nickname: string,
|
33
39
|
// The author's avatar url
|
34
40
|
avatarUrl: string,
|
35
|
-
//
|
36
|
-
|
37
|
-
// Whether the author is a user or another kind of author (User Group)
|
38
|
-
isUser: boolean,
|
41
|
+
// The author's profile path
|
42
|
+
profilePath: string,
|
39
43
|
// Whether the author's account has been deleted or not
|
40
44
|
deleted: boolean,
|
45
|
+
// The author's badge icon
|
46
|
+
badge: string,
|
41
47
|
} | {
|
42
48
|
// The author's name
|
43
49
|
name: string,
|
50
|
+
// The author's nickname
|
51
|
+
nickname: string,
|
44
52
|
// The author's avatar url
|
45
53
|
avatarUrl: string,
|
46
|
-
//
|
47
|
-
|
48
|
-
// Whether the author is a user or another kind of author (User Group)
|
49
|
-
isUser: boolean,
|
54
|
+
// The author's profile path
|
55
|
+
profilePath: string,
|
50
56
|
// Whether the author's account has been deleted or not
|
51
57
|
deleted: boolean,
|
58
|
+
// The author's badge icon
|
59
|
+
badge: string,
|
52
60
|
}
|
53
61
|
),
|
54
62
|
// Whether the object can have new comments or not
|
@@ -74,31 +82,39 @@ export type addCommentMutation = {
|
|
74
82
|
type: string,
|
75
83
|
// The comment message
|
76
84
|
body: string,
|
85
|
+
// The comment message ready to display (it is expected to include HTML)
|
86
|
+
formattedBody: string,
|
77
87
|
// The creation date of the comment
|
78
88
|
createdAt: string,
|
89
|
+
// The creation date of the comment in relative format
|
90
|
+
formattedCreatedAt: string,
|
79
91
|
// The comment's author
|
80
92
|
author: ( {
|
81
93
|
// The author's name
|
82
94
|
name: string,
|
95
|
+
// The author's nickname
|
96
|
+
nickname: string,
|
83
97
|
// The author's avatar url
|
84
98
|
avatarUrl: string,
|
85
|
-
//
|
86
|
-
|
87
|
-
// Whether the author is a user or another kind of author (User Group)
|
88
|
-
isUser: boolean,
|
99
|
+
// The author's profile path
|
100
|
+
profilePath: string,
|
89
101
|
// Whether the author's account has been deleted or not
|
90
102
|
deleted: boolean,
|
103
|
+
// The author's badge icon
|
104
|
+
badge: string,
|
91
105
|
} | {
|
92
106
|
// The author's name
|
93
107
|
name: string,
|
108
|
+
// The author's nickname
|
109
|
+
nickname: string,
|
94
110
|
// The author's avatar url
|
95
111
|
avatarUrl: string,
|
96
|
-
//
|
97
|
-
|
98
|
-
// Whether the author is a user or another kind of author (User Group)
|
99
|
-
isUser: boolean,
|
112
|
+
// The author's profile path
|
113
|
+
profilePath: string,
|
100
114
|
// Whether the author's account has been deleted or not
|
101
115
|
deleted: boolean,
|
116
|
+
// The author's badge icon
|
117
|
+
badge: string,
|
102
118
|
}
|
103
119
|
),
|
104
120
|
// Check if the commentable has comments
|
@@ -126,31 +142,39 @@ export type addCommentMutation = {
|
|
126
142
|
type: string,
|
127
143
|
// The comment message
|
128
144
|
body: string,
|
145
|
+
// The comment message ready to display (it is expected to include HTML)
|
146
|
+
formattedBody: string,
|
129
147
|
// The creation date of the comment
|
130
148
|
createdAt: string,
|
149
|
+
// The creation date of the comment in relative format
|
150
|
+
formattedCreatedAt: string,
|
131
151
|
// The comment's author
|
132
152
|
author: ( {
|
133
153
|
// The author's name
|
134
154
|
name: string,
|
155
|
+
// The author's nickname
|
156
|
+
nickname: string,
|
135
157
|
// The author's avatar url
|
136
158
|
avatarUrl: string,
|
137
|
-
//
|
138
|
-
|
139
|
-
// Whether the author is a user or another kind of author (User Group)
|
140
|
-
isUser: boolean,
|
159
|
+
// The author's profile path
|
160
|
+
profilePath: string,
|
141
161
|
// Whether the author's account has been deleted or not
|
142
162
|
deleted: boolean,
|
163
|
+
// The author's badge icon
|
164
|
+
badge: string,
|
143
165
|
} | {
|
144
166
|
// The author's name
|
145
167
|
name: string,
|
168
|
+
// The author's nickname
|
169
|
+
nickname: string,
|
146
170
|
// The author's avatar url
|
147
171
|
avatarUrl: string,
|
148
|
-
//
|
149
|
-
|
150
|
-
// Whether the author is a user or another kind of author (User Group)
|
151
|
-
isUser: boolean,
|
172
|
+
// The author's profile path
|
173
|
+
profilePath: string,
|
152
174
|
// Whether the author's account has been deleted or not
|
153
175
|
deleted: boolean,
|
176
|
+
// The author's badge icon
|
177
|
+
badge: string,
|
154
178
|
}
|
155
179
|
),
|
156
180
|
// Check if the commentable has comments
|
@@ -178,31 +202,39 @@ export type addCommentMutation = {
|
|
178
202
|
type: string,
|
179
203
|
// The comment message
|
180
204
|
body: string,
|
205
|
+
// The comment message ready to display (it is expected to include HTML)
|
206
|
+
formattedBody: string,
|
181
207
|
// The creation date of the comment
|
182
208
|
createdAt: string,
|
209
|
+
// The creation date of the comment in relative format
|
210
|
+
formattedCreatedAt: string,
|
183
211
|
// The comment's author
|
184
212
|
author: ( {
|
185
213
|
// The author's name
|
186
214
|
name: string,
|
215
|
+
// The author's nickname
|
216
|
+
nickname: string,
|
187
217
|
// The author's avatar url
|
188
218
|
avatarUrl: string,
|
189
|
-
//
|
190
|
-
|
191
|
-
// Whether the author is a user or another kind of author (User Group)
|
192
|
-
isUser: boolean,
|
219
|
+
// The author's profile path
|
220
|
+
profilePath: string,
|
193
221
|
// Whether the author's account has been deleted or not
|
194
222
|
deleted: boolean,
|
223
|
+
// The author's badge icon
|
224
|
+
badge: string,
|
195
225
|
} | {
|
196
226
|
// The author's name
|
197
227
|
name: string,
|
228
|
+
// The author's nickname
|
229
|
+
nickname: string,
|
198
230
|
// The author's avatar url
|
199
231
|
avatarUrl: string,
|
200
|
-
//
|
201
|
-
|
202
|
-
// Whether the author is a user or another kind of author (User Group)
|
203
|
-
isUser: boolean,
|
232
|
+
// The author's profile path
|
233
|
+
profilePath: string,
|
204
234
|
// Whether the author's account has been deleted or not
|
205
235
|
deleted: boolean,
|
236
|
+
// The author's badge icon
|
237
|
+
badge: string,
|
206
238
|
}
|
207
239
|
),
|
208
240
|
// Check if the commentable has comments
|
@@ -228,11 +260,11 @@ export type addCommentMutation = {
|
|
228
260
|
} | null,
|
229
261
|
};
|
230
262
|
|
231
|
-
export
|
263
|
+
export interface DownVoteMutationVariables {
|
232
264
|
id: string,
|
233
265
|
};
|
234
266
|
|
235
|
-
export
|
267
|
+
export interface DownVoteMutation {
|
236
268
|
// A comment
|
237
269
|
comment: {
|
238
270
|
downVote: {
|
@@ -244,31 +276,39 @@ export type DownVoteMutation = {
|
|
244
276
|
type: string,
|
245
277
|
// The comment message
|
246
278
|
body: string,
|
279
|
+
// The comment message ready to display (it is expected to include HTML)
|
280
|
+
formattedBody: string,
|
247
281
|
// The creation date of the comment
|
248
282
|
createdAt: string,
|
283
|
+
// The creation date of the comment in relative format
|
284
|
+
formattedCreatedAt: string,
|
249
285
|
// The comment's author
|
250
286
|
author: ( {
|
251
287
|
// The author's name
|
252
288
|
name: string,
|
289
|
+
// The author's nickname
|
290
|
+
nickname: string,
|
253
291
|
// The author's avatar url
|
254
292
|
avatarUrl: string,
|
255
|
-
//
|
256
|
-
|
257
|
-
// Whether the author is a user or another kind of author (User Group)
|
258
|
-
isUser: boolean,
|
293
|
+
// The author's profile path
|
294
|
+
profilePath: string,
|
259
295
|
// Whether the author's account has been deleted or not
|
260
296
|
deleted: boolean,
|
297
|
+
// The author's badge icon
|
298
|
+
badge: string,
|
261
299
|
} | {
|
262
300
|
// The author's name
|
263
301
|
name: string,
|
302
|
+
// The author's nickname
|
303
|
+
nickname: string,
|
264
304
|
// The author's avatar url
|
265
305
|
avatarUrl: string,
|
266
|
-
//
|
267
|
-
|
268
|
-
// Whether the author is a user or another kind of author (User Group)
|
269
|
-
isUser: boolean,
|
306
|
+
// The author's profile path
|
307
|
+
profilePath: string,
|
270
308
|
// Whether the author's account has been deleted or not
|
271
309
|
deleted: boolean,
|
310
|
+
// The author's badge icon
|
311
|
+
badge: string,
|
272
312
|
}
|
273
313
|
),
|
274
314
|
// Check if the commentable has comments
|
@@ -296,31 +336,39 @@ export type DownVoteMutation = {
|
|
296
336
|
type: string,
|
297
337
|
// The comment message
|
298
338
|
body: string,
|
339
|
+
// The comment message ready to display (it is expected to include HTML)
|
340
|
+
formattedBody: string,
|
299
341
|
// The creation date of the comment
|
300
342
|
createdAt: string,
|
343
|
+
// The creation date of the comment in relative format
|
344
|
+
formattedCreatedAt: string,
|
301
345
|
// The comment's author
|
302
346
|
author: ( {
|
303
347
|
// The author's name
|
304
348
|
name: string,
|
349
|
+
// The author's nickname
|
350
|
+
nickname: string,
|
305
351
|
// The author's avatar url
|
306
352
|
avatarUrl: string,
|
307
|
-
//
|
308
|
-
|
309
|
-
// Whether the author is a user or another kind of author (User Group)
|
310
|
-
isUser: boolean,
|
353
|
+
// The author's profile path
|
354
|
+
profilePath: string,
|
311
355
|
// Whether the author's account has been deleted or not
|
312
356
|
deleted: boolean,
|
357
|
+
// The author's badge icon
|
358
|
+
badge: string,
|
313
359
|
} | {
|
314
360
|
// The author's name
|
315
361
|
name: string,
|
362
|
+
// The author's nickname
|
363
|
+
nickname: string,
|
316
364
|
// The author's avatar url
|
317
365
|
avatarUrl: string,
|
318
|
-
//
|
319
|
-
|
320
|
-
// Whether the author is a user or another kind of author (User Group)
|
321
|
-
isUser: boolean,
|
366
|
+
// The author's profile path
|
367
|
+
profilePath: string,
|
322
368
|
// Whether the author's account has been deleted or not
|
323
369
|
deleted: boolean,
|
370
|
+
// The author's badge icon
|
371
|
+
badge: string,
|
324
372
|
}
|
325
373
|
),
|
326
374
|
// Check if the commentable has comments
|
@@ -348,31 +396,39 @@ export type DownVoteMutation = {
|
|
348
396
|
type: string,
|
349
397
|
// The comment message
|
350
398
|
body: string,
|
399
|
+
// The comment message ready to display (it is expected to include HTML)
|
400
|
+
formattedBody: string,
|
351
401
|
// The creation date of the comment
|
352
402
|
createdAt: string,
|
403
|
+
// The creation date of the comment in relative format
|
404
|
+
formattedCreatedAt: string,
|
353
405
|
// The comment's author
|
354
406
|
author: ( {
|
355
407
|
// The author's name
|
356
408
|
name: string,
|
409
|
+
// The author's nickname
|
410
|
+
nickname: string,
|
357
411
|
// The author's avatar url
|
358
412
|
avatarUrl: string,
|
359
|
-
//
|
360
|
-
|
361
|
-
// Whether the author is a user or another kind of author (User Group)
|
362
|
-
isUser: boolean,
|
413
|
+
// The author's profile path
|
414
|
+
profilePath: string,
|
363
415
|
// Whether the author's account has been deleted or not
|
364
416
|
deleted: boolean,
|
417
|
+
// The author's badge icon
|
418
|
+
badge: string,
|
365
419
|
} | {
|
366
420
|
// The author's name
|
367
421
|
name: string,
|
422
|
+
// The author's nickname
|
423
|
+
nickname: string,
|
368
424
|
// The author's avatar url
|
369
425
|
avatarUrl: string,
|
370
|
-
//
|
371
|
-
|
372
|
-
// Whether the author is a user or another kind of author (User Group)
|
373
|
-
isUser: boolean,
|
426
|
+
// The author's profile path
|
427
|
+
profilePath: string,
|
374
428
|
// Whether the author's account has been deleted or not
|
375
429
|
deleted: boolean,
|
430
|
+
// The author's badge icon
|
431
|
+
badge: string,
|
376
432
|
}
|
377
433
|
),
|
378
434
|
// Check if the commentable has comments
|
@@ -400,31 +456,39 @@ export type DownVoteMutation = {
|
|
400
456
|
type: string,
|
401
457
|
// The comment message
|
402
458
|
body: string,
|
459
|
+
// The comment message ready to display (it is expected to include HTML)
|
460
|
+
formattedBody: string,
|
403
461
|
// The creation date of the comment
|
404
462
|
createdAt: string,
|
463
|
+
// The creation date of the comment in relative format
|
464
|
+
formattedCreatedAt: string,
|
405
465
|
// The comment's author
|
406
466
|
author: ( {
|
407
467
|
// The author's name
|
408
468
|
name: string,
|
469
|
+
// The author's nickname
|
470
|
+
nickname: string,
|
409
471
|
// The author's avatar url
|
410
472
|
avatarUrl: string,
|
411
|
-
//
|
412
|
-
|
413
|
-
// Whether the author is a user or another kind of author (User Group)
|
414
|
-
isUser: boolean,
|
473
|
+
// The author's profile path
|
474
|
+
profilePath: string,
|
415
475
|
// Whether the author's account has been deleted or not
|
416
476
|
deleted: boolean,
|
477
|
+
// The author's badge icon
|
478
|
+
badge: string,
|
417
479
|
} | {
|
418
480
|
// The author's name
|
419
481
|
name: string,
|
482
|
+
// The author's nickname
|
483
|
+
nickname: string,
|
420
484
|
// The author's avatar url
|
421
485
|
avatarUrl: string,
|
422
|
-
//
|
423
|
-
|
424
|
-
// Whether the author is a user or another kind of author (User Group)
|
425
|
-
isUser: boolean,
|
486
|
+
// The author's profile path
|
487
|
+
profilePath: string,
|
426
488
|
// Whether the author's account has been deleted or not
|
427
489
|
deleted: boolean,
|
490
|
+
// The author's badge icon
|
491
|
+
badge: string,
|
428
492
|
}
|
429
493
|
),
|
430
494
|
// Check if the commentable has comments
|
@@ -450,11 +514,11 @@ export type DownVoteMutation = {
|
|
450
514
|
} | null,
|
451
515
|
};
|
452
516
|
|
453
|
-
export
|
517
|
+
export interface UpVoteMutationVariables {
|
454
518
|
id: string,
|
455
519
|
};
|
456
520
|
|
457
|
-
export
|
521
|
+
export interface UpVoteMutation {
|
458
522
|
// A comment
|
459
523
|
comment: {
|
460
524
|
upVote: {
|
@@ -466,31 +530,39 @@ export type UpVoteMutation = {
|
|
466
530
|
type: string,
|
467
531
|
// The comment message
|
468
532
|
body: string,
|
533
|
+
// The comment message ready to display (it is expected to include HTML)
|
534
|
+
formattedBody: string,
|
469
535
|
// The creation date of the comment
|
470
536
|
createdAt: string,
|
537
|
+
// The creation date of the comment in relative format
|
538
|
+
formattedCreatedAt: string,
|
471
539
|
// The comment's author
|
472
540
|
author: ( {
|
473
541
|
// The author's name
|
474
542
|
name: string,
|
543
|
+
// The author's nickname
|
544
|
+
nickname: string,
|
475
545
|
// The author's avatar url
|
476
546
|
avatarUrl: string,
|
477
|
-
//
|
478
|
-
|
479
|
-
// Whether the author is a user or another kind of author (User Group)
|
480
|
-
isUser: boolean,
|
547
|
+
// The author's profile path
|
548
|
+
profilePath: string,
|
481
549
|
// Whether the author's account has been deleted or not
|
482
550
|
deleted: boolean,
|
551
|
+
// The author's badge icon
|
552
|
+
badge: string,
|
483
553
|
} | {
|
484
554
|
// The author's name
|
485
555
|
name: string,
|
556
|
+
// The author's nickname
|
557
|
+
nickname: string,
|
486
558
|
// The author's avatar url
|
487
559
|
avatarUrl: string,
|
488
|
-
//
|
489
|
-
|
490
|
-
// Whether the author is a user or another kind of author (User Group)
|
491
|
-
isUser: boolean,
|
560
|
+
// The author's profile path
|
561
|
+
profilePath: string,
|
492
562
|
// Whether the author's account has been deleted or not
|
493
563
|
deleted: boolean,
|
564
|
+
// The author's badge icon
|
565
|
+
badge: string,
|
494
566
|
}
|
495
567
|
),
|
496
568
|
// Check if the commentable has comments
|
@@ -518,31 +590,39 @@ export type UpVoteMutation = {
|
|
518
590
|
type: string,
|
519
591
|
// The comment message
|
520
592
|
body: string,
|
593
|
+
// The comment message ready to display (it is expected to include HTML)
|
594
|
+
formattedBody: string,
|
521
595
|
// The creation date of the comment
|
522
596
|
createdAt: string,
|
597
|
+
// The creation date of the comment in relative format
|
598
|
+
formattedCreatedAt: string,
|
523
599
|
// The comment's author
|
524
600
|
author: ( {
|
525
601
|
// The author's name
|
526
602
|
name: string,
|
603
|
+
// The author's nickname
|
604
|
+
nickname: string,
|
527
605
|
// The author's avatar url
|
528
606
|
avatarUrl: string,
|
529
|
-
//
|
530
|
-
|
531
|
-
// Whether the author is a user or another kind of author (User Group)
|
532
|
-
isUser: boolean,
|
607
|
+
// The author's profile path
|
608
|
+
profilePath: string,
|
533
609
|
// Whether the author's account has been deleted or not
|
534
610
|
deleted: boolean,
|
611
|
+
// The author's badge icon
|
612
|
+
badge: string,
|
535
613
|
} | {
|
536
614
|
// The author's name
|
537
615
|
name: string,
|
616
|
+
// The author's nickname
|
617
|
+
nickname: string,
|
538
618
|
// The author's avatar url
|
539
619
|
avatarUrl: string,
|
540
|
-
//
|
541
|
-
|
542
|
-
// Whether the author is a user or another kind of author (User Group)
|
543
|
-
isUser: boolean,
|
620
|
+
// The author's profile path
|
621
|
+
profilePath: string,
|
544
622
|
// Whether the author's account has been deleted or not
|
545
623
|
deleted: boolean,
|
624
|
+
// The author's badge icon
|
625
|
+
badge: string,
|
546
626
|
}
|
547
627
|
),
|
548
628
|
// Check if the commentable has comments
|
@@ -570,31 +650,39 @@ export type UpVoteMutation = {
|
|
570
650
|
type: string,
|
571
651
|
// The comment message
|
572
652
|
body: string,
|
653
|
+
// The comment message ready to display (it is expected to include HTML)
|
654
|
+
formattedBody: string,
|
573
655
|
// The creation date of the comment
|
574
656
|
createdAt: string,
|
657
|
+
// The creation date of the comment in relative format
|
658
|
+
formattedCreatedAt: string,
|
575
659
|
// The comment's author
|
576
660
|
author: ( {
|
577
661
|
// The author's name
|
578
662
|
name: string,
|
663
|
+
// The author's nickname
|
664
|
+
nickname: string,
|
579
665
|
// The author's avatar url
|
580
666
|
avatarUrl: string,
|
581
|
-
//
|
582
|
-
|
583
|
-
// Whether the author is a user or another kind of author (User Group)
|
584
|
-
isUser: boolean,
|
667
|
+
// The author's profile path
|
668
|
+
profilePath: string,
|
585
669
|
// Whether the author's account has been deleted or not
|
586
670
|
deleted: boolean,
|
671
|
+
// The author's badge icon
|
672
|
+
badge: string,
|
587
673
|
} | {
|
588
674
|
// The author's name
|
589
675
|
name: string,
|
676
|
+
// The author's nickname
|
677
|
+
nickname: string,
|
590
678
|
// The author's avatar url
|
591
679
|
avatarUrl: string,
|
592
|
-
//
|
593
|
-
|
594
|
-
// Whether the author is a user or another kind of author (User Group)
|
595
|
-
isUser: boolean,
|
680
|
+
// The author's profile path
|
681
|
+
profilePath: string,
|
596
682
|
// Whether the author's account has been deleted or not
|
597
683
|
deleted: boolean,
|
684
|
+
// The author's badge icon
|
685
|
+
badge: string,
|
598
686
|
}
|
599
687
|
),
|
600
688
|
// Check if the commentable has comments
|
@@ -622,31 +710,39 @@ export type UpVoteMutation = {
|
|
622
710
|
type: string,
|
623
711
|
// The comment message
|
624
712
|
body: string,
|
713
|
+
// The comment message ready to display (it is expected to include HTML)
|
714
|
+
formattedBody: string,
|
625
715
|
// The creation date of the comment
|
626
716
|
createdAt: string,
|
717
|
+
// The creation date of the comment in relative format
|
718
|
+
formattedCreatedAt: string,
|
627
719
|
// The comment's author
|
628
720
|
author: ( {
|
629
721
|
// The author's name
|
630
722
|
name: string,
|
723
|
+
// The author's nickname
|
724
|
+
nickname: string,
|
631
725
|
// The author's avatar url
|
632
726
|
avatarUrl: string,
|
633
|
-
//
|
634
|
-
|
635
|
-
// Whether the author is a user or another kind of author (User Group)
|
636
|
-
isUser: boolean,
|
727
|
+
// The author's profile path
|
728
|
+
profilePath: string,
|
637
729
|
// Whether the author's account has been deleted or not
|
638
730
|
deleted: boolean,
|
731
|
+
// The author's badge icon
|
732
|
+
badge: string,
|
639
733
|
} | {
|
640
734
|
// The author's name
|
641
735
|
name: string,
|
736
|
+
// The author's nickname
|
737
|
+
nickname: string,
|
642
738
|
// The author's avatar url
|
643
739
|
avatarUrl: string,
|
644
|
-
//
|
645
|
-
|
646
|
-
// Whether the author is a user or another kind of author (User Group)
|
647
|
-
isUser: boolean,
|
740
|
+
// The author's profile path
|
741
|
+
profilePath: string,
|
648
742
|
// Whether the author's account has been deleted or not
|
649
743
|
deleted: boolean,
|
744
|
+
// The author's badge icon
|
745
|
+
badge: string,
|
650
746
|
}
|
651
747
|
),
|
652
748
|
// Check if the commentable has comments
|
@@ -672,19 +768,21 @@ export type UpVoteMutation = {
|
|
672
768
|
} | null,
|
673
769
|
};
|
674
770
|
|
675
|
-
export
|
771
|
+
export interface GetCommentsQueryVariables {
|
676
772
|
commentableId: string,
|
677
773
|
commentableType: string,
|
678
774
|
orderBy?: string | null,
|
679
775
|
};
|
680
776
|
|
681
|
-
export
|
777
|
+
export interface GetCommentsQuery {
|
682
778
|
// Return's information about the logged in user
|
683
779
|
session: {
|
684
780
|
// The current user
|
685
781
|
user: {
|
686
782
|
// The user's name
|
687
783
|
name: string,
|
784
|
+
// The user's nickname
|
785
|
+
nickname: string,
|
688
786
|
// The user's avatar url
|
689
787
|
avatarUrl: string,
|
690
788
|
// The user's organization name
|
@@ -705,6 +803,8 @@ export type GetCommentsQuery = {
|
|
705
803
|
commentsHaveAlignment: boolean,
|
706
804
|
// Whether the object comments have votes or not
|
707
805
|
commentsHaveVotes: boolean,
|
806
|
+
// The number of comments in all levels this resource holds
|
807
|
+
totalCommentsCount: number,
|
708
808
|
comments: Array< {
|
709
809
|
// The Comment's unique ID
|
710
810
|
id: string,
|
@@ -716,31 +816,39 @@ export type GetCommentsQuery = {
|
|
716
816
|
type: string,
|
717
817
|
// The comment message
|
718
818
|
body: string,
|
819
|
+
// The comment message ready to display (it is expected to include HTML)
|
820
|
+
formattedBody: string,
|
719
821
|
// The creation date of the comment
|
720
822
|
createdAt: string,
|
823
|
+
// The creation date of the comment in relative format
|
824
|
+
formattedCreatedAt: string,
|
721
825
|
// The comment's author
|
722
826
|
author: ( {
|
723
827
|
// The author's name
|
724
828
|
name: string,
|
829
|
+
// The author's nickname
|
830
|
+
nickname: string,
|
725
831
|
// The author's avatar url
|
726
832
|
avatarUrl: string,
|
727
|
-
//
|
728
|
-
|
729
|
-
// Whether the author is a user or another kind of author (User Group)
|
730
|
-
isUser: boolean,
|
833
|
+
// The author's profile path
|
834
|
+
profilePath: string,
|
731
835
|
// Whether the author's account has been deleted or not
|
732
836
|
deleted: boolean,
|
837
|
+
// The author's badge icon
|
838
|
+
badge: string,
|
733
839
|
} | {
|
734
840
|
// The author's name
|
735
841
|
name: string,
|
842
|
+
// The author's nickname
|
843
|
+
nickname: string,
|
736
844
|
// The author's avatar url
|
737
845
|
avatarUrl: string,
|
738
|
-
//
|
739
|
-
|
740
|
-
// Whether the author is a user or another kind of author (User Group)
|
741
|
-
isUser: boolean,
|
846
|
+
// The author's profile path
|
847
|
+
profilePath: string,
|
742
848
|
// Whether the author's account has been deleted or not
|
743
849
|
deleted: boolean,
|
850
|
+
// The author's badge icon
|
851
|
+
badge: string,
|
744
852
|
}
|
745
853
|
),
|
746
854
|
// Whether the object can have new comments or not
|
@@ -766,31 +874,39 @@ export type GetCommentsQuery = {
|
|
766
874
|
type: string,
|
767
875
|
// The comment message
|
768
876
|
body: string,
|
877
|
+
// The comment message ready to display (it is expected to include HTML)
|
878
|
+
formattedBody: string,
|
769
879
|
// The creation date of the comment
|
770
880
|
createdAt: string,
|
881
|
+
// The creation date of the comment in relative format
|
882
|
+
formattedCreatedAt: string,
|
771
883
|
// The comment's author
|
772
884
|
author: ( {
|
773
885
|
// The author's name
|
774
886
|
name: string,
|
887
|
+
// The author's nickname
|
888
|
+
nickname: string,
|
775
889
|
// The author's avatar url
|
776
890
|
avatarUrl: string,
|
777
|
-
//
|
778
|
-
|
779
|
-
// Whether the author is a user or another kind of author (User Group)
|
780
|
-
isUser: boolean,
|
891
|
+
// The author's profile path
|
892
|
+
profilePath: string,
|
781
893
|
// Whether the author's account has been deleted or not
|
782
894
|
deleted: boolean,
|
895
|
+
// The author's badge icon
|
896
|
+
badge: string,
|
783
897
|
} | {
|
784
898
|
// The author's name
|
785
899
|
name: string,
|
900
|
+
// The author's nickname
|
901
|
+
nickname: string,
|
786
902
|
// The author's avatar url
|
787
903
|
avatarUrl: string,
|
788
|
-
//
|
789
|
-
|
790
|
-
// Whether the author is a user or another kind of author (User Group)
|
791
|
-
isUser: boolean,
|
904
|
+
// The author's profile path
|
905
|
+
profilePath: string,
|
792
906
|
// Whether the author's account has been deleted or not
|
793
907
|
deleted: boolean,
|
908
|
+
// The author's badge icon
|
909
|
+
badge: string,
|
794
910
|
}
|
795
911
|
),
|
796
912
|
// Check if the commentable has comments
|
@@ -818,31 +934,39 @@ export type GetCommentsQuery = {
|
|
818
934
|
type: string,
|
819
935
|
// The comment message
|
820
936
|
body: string,
|
937
|
+
// The comment message ready to display (it is expected to include HTML)
|
938
|
+
formattedBody: string,
|
821
939
|
// The creation date of the comment
|
822
940
|
createdAt: string,
|
941
|
+
// The creation date of the comment in relative format
|
942
|
+
formattedCreatedAt: string,
|
823
943
|
// The comment's author
|
824
944
|
author: ( {
|
825
945
|
// The author's name
|
826
946
|
name: string,
|
947
|
+
// The author's nickname
|
948
|
+
nickname: string,
|
827
949
|
// The author's avatar url
|
828
950
|
avatarUrl: string,
|
829
|
-
//
|
830
|
-
|
831
|
-
// Whether the author is a user or another kind of author (User Group)
|
832
|
-
isUser: boolean,
|
951
|
+
// The author's profile path
|
952
|
+
profilePath: string,
|
833
953
|
// Whether the author's account has been deleted or not
|
834
954
|
deleted: boolean,
|
955
|
+
// The author's badge icon
|
956
|
+
badge: string,
|
835
957
|
} | {
|
836
958
|
// The author's name
|
837
959
|
name: string,
|
960
|
+
// The author's nickname
|
961
|
+
nickname: string,
|
838
962
|
// The author's avatar url
|
839
963
|
avatarUrl: string,
|
840
|
-
//
|
841
|
-
|
842
|
-
// Whether the author is a user or another kind of author (User Group)
|
843
|
-
isUser: boolean,
|
964
|
+
// The author's profile path
|
965
|
+
profilePath: string,
|
844
966
|
// Whether the author's account has been deleted or not
|
845
967
|
deleted: boolean,
|
968
|
+
// The author's badge icon
|
969
|
+
badge: string,
|
846
970
|
}
|
847
971
|
),
|
848
972
|
// Check if the commentable has comments
|
@@ -870,31 +994,39 @@ export type GetCommentsQuery = {
|
|
870
994
|
type: string,
|
871
995
|
// The comment message
|
872
996
|
body: string,
|
997
|
+
// The comment message ready to display (it is expected to include HTML)
|
998
|
+
formattedBody: string,
|
873
999
|
// The creation date of the comment
|
874
1000
|
createdAt: string,
|
1001
|
+
// The creation date of the comment in relative format
|
1002
|
+
formattedCreatedAt: string,
|
875
1003
|
// The comment's author
|
876
1004
|
author: ( {
|
877
1005
|
// The author's name
|
878
1006
|
name: string,
|
1007
|
+
// The author's nickname
|
1008
|
+
nickname: string,
|
879
1009
|
// The author's avatar url
|
880
1010
|
avatarUrl: string,
|
881
|
-
//
|
882
|
-
|
883
|
-
// Whether the author is a user or another kind of author (User Group)
|
884
|
-
isUser: boolean,
|
1011
|
+
// The author's profile path
|
1012
|
+
profilePath: string,
|
885
1013
|
// Whether the author's account has been deleted or not
|
886
1014
|
deleted: boolean,
|
1015
|
+
// The author's badge icon
|
1016
|
+
badge: string,
|
887
1017
|
} | {
|
888
1018
|
// The author's name
|
889
1019
|
name: string,
|
1020
|
+
// The author's nickname
|
1021
|
+
nickname: string,
|
890
1022
|
// The author's avatar url
|
891
1023
|
avatarUrl: string,
|
892
|
-
//
|
893
|
-
|
894
|
-
// Whether the author is a user or another kind of author (User Group)
|
895
|
-
isUser: boolean,
|
1024
|
+
// The author's profile path
|
1025
|
+
profilePath: string,
|
896
1026
|
// Whether the author's account has been deleted or not
|
897
1027
|
deleted: boolean,
|
1028
|
+
// The author's badge icon
|
1029
|
+
badge: string,
|
898
1030
|
}
|
899
1031
|
),
|
900
1032
|
// Check if the commentable has comments
|
@@ -924,14 +1056,14 @@ export type GetCommentsQuery = {
|
|
924
1056
|
},
|
925
1057
|
};
|
926
1058
|
|
927
|
-
export
|
1059
|
+
export interface AddCommentFormCommentableFragment {
|
928
1060
|
// The commentable's ID
|
929
1061
|
id: string,
|
930
1062
|
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
931
1063
|
type: string,
|
932
1064
|
};
|
933
1065
|
|
934
|
-
export
|
1066
|
+
export interface AddCommentFormSessionFragment {
|
935
1067
|
// The current user verified user groups
|
936
1068
|
verifiedUserGroups: Array< {
|
937
1069
|
// The user group's id
|
@@ -941,7 +1073,7 @@ export type AddCommentFormSessionFragment = {
|
|
941
1073
|
} >,
|
942
1074
|
};
|
943
1075
|
|
944
|
-
export
|
1076
|
+
export interface CommentFragment {
|
945
1077
|
// The Comment's unique ID
|
946
1078
|
id: string,
|
947
1079
|
// The Comment's signed global id
|
@@ -950,31 +1082,39 @@ export type CommentFragment = {
|
|
950
1082
|
type: string,
|
951
1083
|
// The comment message
|
952
1084
|
body: string,
|
1085
|
+
// The comment message ready to display (it is expected to include HTML)
|
1086
|
+
formattedBody: string,
|
953
1087
|
// The creation date of the comment
|
954
1088
|
createdAt: string,
|
1089
|
+
// The creation date of the comment in relative format
|
1090
|
+
formattedCreatedAt: string,
|
955
1091
|
// The comment's author
|
956
1092
|
author: ( {
|
957
1093
|
// The author's name
|
958
1094
|
name: string,
|
1095
|
+
// The author's nickname
|
1096
|
+
nickname: string,
|
959
1097
|
// The author's avatar url
|
960
1098
|
avatarUrl: string,
|
961
|
-
//
|
962
|
-
|
963
|
-
// Whether the author is a user or another kind of author (User Group)
|
964
|
-
isUser: boolean,
|
1099
|
+
// The author's profile path
|
1100
|
+
profilePath: string,
|
965
1101
|
// Whether the author's account has been deleted or not
|
966
1102
|
deleted: boolean,
|
1103
|
+
// The author's badge icon
|
1104
|
+
badge: string,
|
967
1105
|
} | {
|
968
1106
|
// The author's name
|
969
1107
|
name: string,
|
1108
|
+
// The author's nickname
|
1109
|
+
nickname: string,
|
970
1110
|
// The author's avatar url
|
971
1111
|
avatarUrl: string,
|
972
|
-
//
|
973
|
-
|
974
|
-
// Whether the author is a user or another kind of author (User Group)
|
975
|
-
isUser: boolean,
|
1112
|
+
// The author's profile path
|
1113
|
+
profilePath: string,
|
976
1114
|
// Whether the author's account has been deleted or not
|
977
1115
|
deleted: boolean,
|
1116
|
+
// The author's badge icon
|
1117
|
+
badge: string,
|
978
1118
|
}
|
979
1119
|
),
|
980
1120
|
// Check if the commentable has comments
|
@@ -1002,31 +1142,39 @@ export type CommentFragment = {
|
|
1002
1142
|
type: string,
|
1003
1143
|
// The comment message
|
1004
1144
|
body: string,
|
1145
|
+
// The comment message ready to display (it is expected to include HTML)
|
1146
|
+
formattedBody: string,
|
1005
1147
|
// The creation date of the comment
|
1006
1148
|
createdAt: string,
|
1149
|
+
// The creation date of the comment in relative format
|
1150
|
+
formattedCreatedAt: string,
|
1007
1151
|
// The comment's author
|
1008
1152
|
author: ( {
|
1009
1153
|
// The author's name
|
1010
1154
|
name: string,
|
1155
|
+
// The author's nickname
|
1156
|
+
nickname: string,
|
1011
1157
|
// The author's avatar url
|
1012
1158
|
avatarUrl: string,
|
1013
|
-
//
|
1014
|
-
|
1015
|
-
// Whether the author is a user or another kind of author (User Group)
|
1016
|
-
isUser: boolean,
|
1159
|
+
// The author's profile path
|
1160
|
+
profilePath: string,
|
1017
1161
|
// Whether the author's account has been deleted or not
|
1018
1162
|
deleted: boolean,
|
1163
|
+
// The author's badge icon
|
1164
|
+
badge: string,
|
1019
1165
|
} | {
|
1020
1166
|
// The author's name
|
1021
1167
|
name: string,
|
1168
|
+
// The author's nickname
|
1169
|
+
nickname: string,
|
1022
1170
|
// The author's avatar url
|
1023
1171
|
avatarUrl: string,
|
1024
|
-
//
|
1025
|
-
|
1026
|
-
// Whether the author is a user or another kind of author (User Group)
|
1027
|
-
isUser: boolean,
|
1172
|
+
// The author's profile path
|
1173
|
+
profilePath: string,
|
1028
1174
|
// Whether the author's account has been deleted or not
|
1029
1175
|
deleted: boolean,
|
1176
|
+
// The author's badge icon
|
1177
|
+
badge: string,
|
1030
1178
|
}
|
1031
1179
|
),
|
1032
1180
|
// Check if the commentable has comments
|
@@ -1054,31 +1202,39 @@ export type CommentFragment = {
|
|
1054
1202
|
type: string,
|
1055
1203
|
// The comment message
|
1056
1204
|
body: string,
|
1205
|
+
// The comment message ready to display (it is expected to include HTML)
|
1206
|
+
formattedBody: string,
|
1057
1207
|
// The creation date of the comment
|
1058
1208
|
createdAt: string,
|
1209
|
+
// The creation date of the comment in relative format
|
1210
|
+
formattedCreatedAt: string,
|
1059
1211
|
// The comment's author
|
1060
1212
|
author: ( {
|
1061
1213
|
// The author's name
|
1062
1214
|
name: string,
|
1215
|
+
// The author's nickname
|
1216
|
+
nickname: string,
|
1063
1217
|
// The author's avatar url
|
1064
1218
|
avatarUrl: string,
|
1065
|
-
//
|
1066
|
-
|
1067
|
-
// Whether the author is a user or another kind of author (User Group)
|
1068
|
-
isUser: boolean,
|
1219
|
+
// The author's profile path
|
1220
|
+
profilePath: string,
|
1069
1221
|
// Whether the author's account has been deleted or not
|
1070
1222
|
deleted: boolean,
|
1223
|
+
// The author's badge icon
|
1224
|
+
badge: string,
|
1071
1225
|
} | {
|
1072
1226
|
// The author's name
|
1073
1227
|
name: string,
|
1228
|
+
// The author's nickname
|
1229
|
+
nickname: string,
|
1074
1230
|
// The author's avatar url
|
1075
1231
|
avatarUrl: string,
|
1076
|
-
//
|
1077
|
-
|
1078
|
-
// Whether the author is a user or another kind of author (User Group)
|
1079
|
-
isUser: boolean,
|
1232
|
+
// The author's profile path
|
1233
|
+
profilePath: string,
|
1080
1234
|
// Whether the author's account has been deleted or not
|
1081
1235
|
deleted: boolean,
|
1236
|
+
// The author's badge icon
|
1237
|
+
badge: string,
|
1082
1238
|
}
|
1083
1239
|
),
|
1084
1240
|
// Check if the commentable has comments
|
@@ -1106,31 +1262,39 @@ export type CommentFragment = {
|
|
1106
1262
|
type: string,
|
1107
1263
|
// The comment message
|
1108
1264
|
body: string,
|
1265
|
+
// The comment message ready to display (it is expected to include HTML)
|
1266
|
+
formattedBody: string,
|
1109
1267
|
// The creation date of the comment
|
1110
1268
|
createdAt: string,
|
1269
|
+
// The creation date of the comment in relative format
|
1270
|
+
formattedCreatedAt: string,
|
1111
1271
|
// The comment's author
|
1112
1272
|
author: ( {
|
1113
1273
|
// The author's name
|
1114
1274
|
name: string,
|
1275
|
+
// The author's nickname
|
1276
|
+
nickname: string,
|
1115
1277
|
// The author's avatar url
|
1116
1278
|
avatarUrl: string,
|
1117
|
-
//
|
1118
|
-
|
1119
|
-
// Whether the author is a user or another kind of author (User Group)
|
1120
|
-
isUser: boolean,
|
1279
|
+
// The author's profile path
|
1280
|
+
profilePath: string,
|
1121
1281
|
// Whether the author's account has been deleted or not
|
1122
1282
|
deleted: boolean,
|
1283
|
+
// The author's badge icon
|
1284
|
+
badge: string,
|
1123
1285
|
} | {
|
1124
1286
|
// The author's name
|
1125
1287
|
name: string,
|
1288
|
+
// The author's nickname
|
1289
|
+
nickname: string,
|
1126
1290
|
// The author's avatar url
|
1127
1291
|
avatarUrl: string,
|
1128
|
-
//
|
1129
|
-
|
1130
|
-
// Whether the author is a user or another kind of author (User Group)
|
1131
|
-
isUser: boolean,
|
1292
|
+
// The author's profile path
|
1293
|
+
profilePath: string,
|
1132
1294
|
// Whether the author's account has been deleted or not
|
1133
1295
|
deleted: boolean,
|
1296
|
+
// The author's badge icon
|
1297
|
+
badge: string,
|
1134
1298
|
}
|
1135
1299
|
),
|
1136
1300
|
// Check if the commentable has comments
|
@@ -1154,7 +1318,7 @@ export type CommentFragment = {
|
|
1154
1318
|
} >,
|
1155
1319
|
};
|
1156
1320
|
|
1157
|
-
export
|
1321
|
+
export interface CommentDataFragment {
|
1158
1322
|
// The Comment's unique ID
|
1159
1323
|
id: string,
|
1160
1324
|
// The Comment's signed global id
|
@@ -1163,31 +1327,39 @@ export type CommentDataFragment = {
|
|
1163
1327
|
type: string,
|
1164
1328
|
// The comment message
|
1165
1329
|
body: string,
|
1330
|
+
// The comment message ready to display (it is expected to include HTML)
|
1331
|
+
formattedBody: string,
|
1166
1332
|
// The creation date of the comment
|
1167
1333
|
createdAt: string,
|
1334
|
+
// The creation date of the comment in relative format
|
1335
|
+
formattedCreatedAt: string,
|
1168
1336
|
// The comment's author
|
1169
1337
|
author: ( {
|
1170
1338
|
// The author's name
|
1171
1339
|
name: string,
|
1340
|
+
// The author's nickname
|
1341
|
+
nickname: string,
|
1172
1342
|
// The author's avatar url
|
1173
1343
|
avatarUrl: string,
|
1174
|
-
//
|
1175
|
-
|
1176
|
-
// Whether the author is a user or another kind of author (User Group)
|
1177
|
-
isUser: boolean,
|
1344
|
+
// The author's profile path
|
1345
|
+
profilePath: string,
|
1178
1346
|
// Whether the author's account has been deleted or not
|
1179
1347
|
deleted: boolean,
|
1348
|
+
// The author's badge icon
|
1349
|
+
badge: string,
|
1180
1350
|
} | {
|
1181
1351
|
// The author's name
|
1182
1352
|
name: string,
|
1353
|
+
// The author's nickname
|
1354
|
+
nickname: string,
|
1183
1355
|
// The author's avatar url
|
1184
1356
|
avatarUrl: string,
|
1185
|
-
//
|
1186
|
-
|
1187
|
-
// Whether the author is a user or another kind of author (User Group)
|
1188
|
-
isUser: boolean,
|
1357
|
+
// The author's profile path
|
1358
|
+
profilePath: string,
|
1189
1359
|
// Whether the author's account has been deleted or not
|
1190
1360
|
deleted: boolean,
|
1361
|
+
// The author's badge icon
|
1362
|
+
badge: string,
|
1191
1363
|
}
|
1192
1364
|
),
|
1193
1365
|
// Check if the commentable has comments
|
@@ -1208,7 +1380,7 @@ export type CommentDataFragment = {
|
|
1208
1380
|
downVotes: number,
|
1209
1381
|
};
|
1210
1382
|
|
1211
|
-
export
|
1383
|
+
export interface CommentThreadFragment {
|
1212
1384
|
// Check if the commentable has comments
|
1213
1385
|
hasComments: boolean,
|
1214
1386
|
// The Comment's unique ID
|
@@ -1219,31 +1391,39 @@ export type CommentThreadFragment = {
|
|
1219
1391
|
type: string,
|
1220
1392
|
// The comment message
|
1221
1393
|
body: string,
|
1394
|
+
// The comment message ready to display (it is expected to include HTML)
|
1395
|
+
formattedBody: string,
|
1222
1396
|
// The creation date of the comment
|
1223
1397
|
createdAt: string,
|
1398
|
+
// The creation date of the comment in relative format
|
1399
|
+
formattedCreatedAt: string,
|
1224
1400
|
// The comment's author
|
1225
1401
|
author: ( {
|
1226
1402
|
// The author's name
|
1227
1403
|
name: string,
|
1404
|
+
// The author's nickname
|
1405
|
+
nickname: string,
|
1228
1406
|
// The author's avatar url
|
1229
1407
|
avatarUrl: string,
|
1230
|
-
//
|
1231
|
-
|
1232
|
-
// Whether the author is a user or another kind of author (User Group)
|
1233
|
-
isUser: boolean,
|
1408
|
+
// The author's profile path
|
1409
|
+
profilePath: string,
|
1234
1410
|
// Whether the author's account has been deleted or not
|
1235
1411
|
deleted: boolean,
|
1412
|
+
// The author's badge icon
|
1413
|
+
badge: string,
|
1236
1414
|
} | {
|
1237
1415
|
// The author's name
|
1238
1416
|
name: string,
|
1417
|
+
// The author's nickname
|
1418
|
+
nickname: string,
|
1239
1419
|
// The author's avatar url
|
1240
1420
|
avatarUrl: string,
|
1241
|
-
//
|
1242
|
-
|
1243
|
-
// Whether the author is a user or another kind of author (User Group)
|
1244
|
-
isUser: boolean,
|
1421
|
+
// The author's profile path
|
1422
|
+
profilePath: string,
|
1245
1423
|
// Whether the author's account has been deleted or not
|
1246
1424
|
deleted: boolean,
|
1425
|
+
// The author's badge icon
|
1426
|
+
badge: string,
|
1247
1427
|
}
|
1248
1428
|
),
|
1249
1429
|
// Whether the object can have new comments or not
|
@@ -1269,31 +1449,39 @@ export type CommentThreadFragment = {
|
|
1269
1449
|
type: string,
|
1270
1450
|
// The comment message
|
1271
1451
|
body: string,
|
1452
|
+
// The comment message ready to display (it is expected to include HTML)
|
1453
|
+
formattedBody: string,
|
1272
1454
|
// The creation date of the comment
|
1273
1455
|
createdAt: string,
|
1456
|
+
// The creation date of the comment in relative format
|
1457
|
+
formattedCreatedAt: string,
|
1274
1458
|
// The comment's author
|
1275
1459
|
author: ( {
|
1276
1460
|
// The author's name
|
1277
1461
|
name: string,
|
1462
|
+
// The author's nickname
|
1463
|
+
nickname: string,
|
1278
1464
|
// The author's avatar url
|
1279
1465
|
avatarUrl: string,
|
1280
|
-
//
|
1281
|
-
|
1282
|
-
// Whether the author is a user or another kind of author (User Group)
|
1283
|
-
isUser: boolean,
|
1466
|
+
// The author's profile path
|
1467
|
+
profilePath: string,
|
1284
1468
|
// Whether the author's account has been deleted or not
|
1285
1469
|
deleted: boolean,
|
1470
|
+
// The author's badge icon
|
1471
|
+
badge: string,
|
1286
1472
|
} | {
|
1287
1473
|
// The author's name
|
1288
1474
|
name: string,
|
1475
|
+
// The author's nickname
|
1476
|
+
nickname: string,
|
1289
1477
|
// The author's avatar url
|
1290
1478
|
avatarUrl: string,
|
1291
|
-
//
|
1292
|
-
|
1293
|
-
// Whether the author is a user or another kind of author (User Group)
|
1294
|
-
isUser: boolean,
|
1479
|
+
// The author's profile path
|
1480
|
+
profilePath: string,
|
1295
1481
|
// Whether the author's account has been deleted or not
|
1296
1482
|
deleted: boolean,
|
1483
|
+
// The author's badge icon
|
1484
|
+
badge: string,
|
1297
1485
|
}
|
1298
1486
|
),
|
1299
1487
|
// Check if the commentable has comments
|
@@ -1321,31 +1509,39 @@ export type CommentThreadFragment = {
|
|
1321
1509
|
type: string,
|
1322
1510
|
// The comment message
|
1323
1511
|
body: string,
|
1512
|
+
// The comment message ready to display (it is expected to include HTML)
|
1513
|
+
formattedBody: string,
|
1324
1514
|
// The creation date of the comment
|
1325
1515
|
createdAt: string,
|
1516
|
+
// The creation date of the comment in relative format
|
1517
|
+
formattedCreatedAt: string,
|
1326
1518
|
// The comment's author
|
1327
1519
|
author: ( {
|
1328
1520
|
// The author's name
|
1329
1521
|
name: string,
|
1522
|
+
// The author's nickname
|
1523
|
+
nickname: string,
|
1330
1524
|
// The author's avatar url
|
1331
1525
|
avatarUrl: string,
|
1332
|
-
//
|
1333
|
-
|
1334
|
-
// Whether the author is a user or another kind of author (User Group)
|
1335
|
-
isUser: boolean,
|
1526
|
+
// The author's profile path
|
1527
|
+
profilePath: string,
|
1336
1528
|
// Whether the author's account has been deleted or not
|
1337
1529
|
deleted: boolean,
|
1530
|
+
// The author's badge icon
|
1531
|
+
badge: string,
|
1338
1532
|
} | {
|
1339
1533
|
// The author's name
|
1340
1534
|
name: string,
|
1535
|
+
// The author's nickname
|
1536
|
+
nickname: string,
|
1341
1537
|
// The author's avatar url
|
1342
1538
|
avatarUrl: string,
|
1343
|
-
//
|
1344
|
-
|
1345
|
-
// Whether the author is a user or another kind of author (User Group)
|
1346
|
-
isUser: boolean,
|
1539
|
+
// The author's profile path
|
1540
|
+
profilePath: string,
|
1347
1541
|
// Whether the author's account has been deleted or not
|
1348
1542
|
deleted: boolean,
|
1543
|
+
// The author's badge icon
|
1544
|
+
badge: string,
|
1349
1545
|
}
|
1350
1546
|
),
|
1351
1547
|
// Check if the commentable has comments
|
@@ -1373,31 +1569,39 @@ export type CommentThreadFragment = {
|
|
1373
1569
|
type: string,
|
1374
1570
|
// The comment message
|
1375
1571
|
body: string,
|
1572
|
+
// The comment message ready to display (it is expected to include HTML)
|
1573
|
+
formattedBody: string,
|
1376
1574
|
// The creation date of the comment
|
1377
1575
|
createdAt: string,
|
1576
|
+
// The creation date of the comment in relative format
|
1577
|
+
formattedCreatedAt: string,
|
1378
1578
|
// The comment's author
|
1379
1579
|
author: ( {
|
1380
1580
|
// The author's name
|
1381
1581
|
name: string,
|
1582
|
+
// The author's nickname
|
1583
|
+
nickname: string,
|
1382
1584
|
// The author's avatar url
|
1383
1585
|
avatarUrl: string,
|
1384
|
-
//
|
1385
|
-
|
1386
|
-
// Whether the author is a user or another kind of author (User Group)
|
1387
|
-
isUser: boolean,
|
1586
|
+
// The author's profile path
|
1587
|
+
profilePath: string,
|
1388
1588
|
// Whether the author's account has been deleted or not
|
1389
1589
|
deleted: boolean,
|
1590
|
+
// The author's badge icon
|
1591
|
+
badge: string,
|
1390
1592
|
} | {
|
1391
1593
|
// The author's name
|
1392
1594
|
name: string,
|
1595
|
+
// The author's nickname
|
1596
|
+
nickname: string,
|
1393
1597
|
// The author's avatar url
|
1394
1598
|
avatarUrl: string,
|
1395
|
-
//
|
1396
|
-
|
1397
|
-
// Whether the author is a user or another kind of author (User Group)
|
1398
|
-
isUser: boolean,
|
1599
|
+
// The author's profile path
|
1600
|
+
profilePath: string,
|
1399
1601
|
// Whether the author's account has been deleted or not
|
1400
1602
|
deleted: boolean,
|
1603
|
+
// The author's badge icon
|
1604
|
+
badge: string,
|
1401
1605
|
}
|
1402
1606
|
),
|
1403
1607
|
// Check if the commentable has comments
|
@@ -1421,7 +1625,7 @@ export type CommentThreadFragment = {
|
|
1421
1625
|
} >,
|
1422
1626
|
};
|
1423
1627
|
|
1424
|
-
export
|
1628
|
+
export interface DownVoteButtonFragment {
|
1425
1629
|
// The Comment's unique ID
|
1426
1630
|
id: string,
|
1427
1631
|
// The number of comment's downVotes
|
@@ -1432,7 +1636,7 @@ export type DownVoteButtonFragment = {
|
|
1432
1636
|
upVoted: boolean,
|
1433
1637
|
};
|
1434
1638
|
|
1435
|
-
export
|
1639
|
+
export interface UpVoteButtonFragment {
|
1436
1640
|
// The Comment's unique ID
|
1437
1641
|
id: string,
|
1438
1642
|
// The number of comment's upVotes
|
@@ -1442,4 +1646,3 @@ export type UpVoteButtonFragment = {
|
|
1442
1646
|
// Check if the current user has downvoted the comment
|
1443
1647
|
downVoted: boolean,
|
1444
1648
|
};
|
1445
|
-
/* tslint:enable */
|