· 6 years ago · Oct 01, 2019, 11:52 AM
1package kibela
2
3type ID interface{}
4
5// The top-level query type to Kibela resources
6type Query struct {
7 AccessToken AccessToken `json:"accessToken" validate:"required"`
8 AccessTokens AccessTokenConnection `json:"accessTokens" validate:"required"`
9 ArchivedGroups GroupConnection `json:"archivedGroups" validate:"required"`
10 AttachmentByPath Attachment `json:"attachmentByPath" validate:"required"`
11 AttachmentFromPath Attachment `json:"attachmentFromPath" validate:"required"`
12 Budget Budget `json:"budget" validate:"required"`
13 Comment Comment `json:"comment"`
14 CurrentUser User `json:"currentUser"`
15 DefaultGroup Group `json:"defaultGroup"`
16 FeedSections FeedSectionSimpleConnection `json:"feedSections" validate:"required"`
17 Folder Folder `json:"folder"`
18 Folders FolderConnection `json:"folders" validate:"required"`
19 Group Group `json:"group" validate:"required"`
20 Groups GroupConnection `json:"groups" validate:"required"`
21 ImportableUsers ImportableUserConnection `json:"importableUsers" validate:"required"`
22 Node Node `json:"node"`
23 Nodes []Node `json:"nodes" validate:"required"`
24 Note Note `json:"note"`
25 NoteBrowsingHistries NoteBrowsingHistoryConnection `json:"noteBrowsingHistries" validate:"required"`
26 NoteFromPath Note `json:"noteFromPath" validate:"required"`
27 NoteTemplate NoteTemplate `json:"noteTemplate"`
28 NoteTemplates NoteTemplateConnection `json:"noteTemplates" validate:"required"`
29 Notes NoteConnection `json:"notes" validate:"required"`
30 Notifications NotificationConnection `json:"notifications"`
31 RenderMarkdownToHtml string `json:"renderMarkdownToHtml" validate:"required"`
32 Search SearchResultConnection `json:"search" validate:"required"`
33 TeamAccessTokenLogs AccessTokenLogConnection `json:"teamAccessTokenLogs" validate:"required"`
34 User User `json:"user"`
35 UserByAccount User `json:"userByAccount"`
36 UserFromAccount User `json:"userFromAccount"`
37 Users UserConnection `json:"users" validate:"required"`
38 ValidateToMove bool `json:"validateToMove" validate:"required"`
39}
40
41// Personal access tokens
42type AccessToken struct {
43 CreatedAt DateTime `json:"createdAt" validate:"required"`
44 Description string `json:"description" validate:"required"`
45 DescriptionHtml string `json:"descriptionHtml" validate:"required"`
46 Id ID `json:"id" validate:"required"`
47 IsActive bool `json:"isActive" validate:"required"`
48 IsRevoked bool `json:"isRevoked" validate:"required"`
49 LastUsedAt DateTime `json:"lastUsedAt"`
50 Logs AccessTokenLogConnection `json:"logs" validate:"required"`
51 Path string `json:"path" validate:"required"`
52 Scopes []AccessTokenScope `json:"scopes" validate:"required"`
53 Title string `json:"title" validate:"required"`
54 Token string `json:"token"`
55 UpdatedAt DateTime `json:"updatedAt" validate:"required"`
56 User User `json:"user" validate:"required"`
57}
58
59// An object with an ID.
60type Node interface{}
61
62// A datetime type, encoded in ISO 8601 string in JSON, or timestamp type in MessagePack
63type DateTime interface{}
64
65// The connection type for AccessTokenLog.
66type AccessTokenLogConnection struct {
67 Edges []AccessTokenLogEdge `json:"edges"`
68 Nodes []AccessTokenLog `json:"nodes"`
69 PageInfo PageInfo `json:"pageInfo" validate:"required"`
70 TotalCount int64 `json:"totalCount" validate:"required"`
71}
72
73// An edge in a connection.
74type AccessTokenLogEdge struct {
75 Cursor string `json:"cursor" validate:"required"`
76 Node AccessTokenLog `json:"node"`
77}
78
79// Usage logs for personal access tokens
80type AccessTokenLog struct {
81 AccessToken AccessToken `json:"accessToken" validate:"required"`
82 CreatedAt DateTime `json:"createdAt" validate:"required"`
83 Id ID `json:"id" validate:"required"`
84 IpAddress string `json:"ipAddress" validate:"required"`
85 OperationType string `json:"operationType" validate:"required"`
86 Query string `json:"query" validate:"required"`
87 User User `json:"user" validate:"required"`
88 UserAgent string `json:"userAgent" validate:"required"`
89}
90
91// A user, which is an individual account of a team
92type User struct {
93 Account string `json:"account"`
94 Avatar UserAvatarImage `json:"avatar" validate:"required"`
95 AvatarImage UserAvatarImage `json:"avatarImage" validate:"required"`
96 Biography string `json:"biography"`
97 Cover UserCoverImage `json:"cover"`
98 CoverImage UserCoverImage `json:"coverImage"`
99 Email string `json:"email" validate:"required"`
100 Groups GroupConnection `json:"groups"`
101 Id ID `json:"id" validate:"required"`
102 LatestNotes NoteConnection `json:"latestNotes" validate:"required"`
103 Locale string `json:"locale" validate:"required"`
104 Path string `json:"path"`
105 PopularNotes NoteConnection `json:"popularNotes" validate:"required"`
106 PrivateNotes NoteConnection `json:"privateNotes" validate:"required"`
107 RealName string `json:"realName"`
108 Role Role `json:"role" validate:"required"`
109 ShortBio string `json:"shortBio"`
110 Url string `json:"url"`
111}
112
113// The size class of user avatar images
114type UserAvatarImageSize string
115
116const (
117 USER_AVATAR_IMAGE_SIZE_LARGE = UserAvatarImageSize("LARGE")
118 USER_AVATAR_IMAGE_SIZE_MEDIUM = UserAvatarImageSize("MEDIUM")
119 USER_AVATAR_IMAGE_SIZE_SMALL = UserAvatarImageSize("SMALL")
120)
121
122// An avatar image of users
123type UserAvatarImage struct {
124 Density int64 `json:"density" validate:"required"`
125 Height int64 `json:"height" validate:"required"`
126 Url string `json:"url" validate:"required"`
127 Width int64 `json:"width" validate:"required"`
128}
129
130// The size class of user cover images
131type UserCoverImageSize string
132
133const (
134 USER_COVER_IMAGE_SIZE_MEDIUM = UserCoverImageSize("MEDIUM")
135 USER_COVER_IMAGE_SIZE_ORIGINAL = UserCoverImageSize("ORIGINAL")
136 USER_COVER_IMAGE_SIZE_SMALL = UserCoverImageSize("SMALL")
137)
138
139// A cover image of users
140type UserCoverImage struct {
141 Density int64 `json:"density" validate:"required"`
142 Height int64 `json:"height" validate:"required"`
143 Key string `json:"key" validate:"required"`
144 Size UserCoverImageSize `json:"size" validate:"required"`
145 Url string `json:"url" validate:"required"`
146 Width int64 `json:"width" validate:"required"`
147}
148
149// The connection type for Group.
150type GroupConnection struct {
151 Edges []GroupEdge `json:"edges"`
152 Nodes []Group `json:"nodes"`
153 PageInfo PageInfo `json:"pageInfo" validate:"required"`
154 TotalCount int64 `json:"totalCount" validate:"required"`
155}
156
157// An edge in a connection.
158type GroupEdge struct {
159 Cursor string `json:"cursor" validate:"required"`
160 Node Group `json:"node"`
161}
162
163// undefined
164type Group struct {
165 ArchivedAt DateTime `json:"archivedAt"`
166 CanBeDestroyed bool `json:"canBeDestroyed" validate:"required"`
167 CanBeManaged bool `json:"canBeManaged" validate:"required"`
168 CoverImage GroupCoverImage `json:"coverImage" validate:"required"`
169 CoverImageKey string `json:"coverImageKey"`
170 CreatedAt DateTime `json:"createdAt" validate:"required"`
171 DatabaseId int64 `json:"databaseId" validate:"required"`
172 Description string `json:"description" validate:"required"`
173 FeedSections FeedSectionSimpleConnection `json:"feedSections" validate:"required"`
174 FeedUpdatedAt DateTime `json:"feedUpdatedAt"`
175 Id ID `json:"id" validate:"required"`
176 IsArchived bool `json:"isArchived" validate:"required"`
177 IsDefault bool `json:"isDefault" validate:"required"`
178 IsJoined bool `json:"isJoined" validate:"required"`
179 IsPrivate bool `json:"isPrivate" validate:"required"`
180 Name string `json:"name" validate:"required"`
181 Notes NoteConnection `json:"notes" validate:"required"`
182 Path string `json:"path" validate:"required"`
183 PinnedNotes []Note `json:"pinnedNotes" validate:"required"`
184 TodayContributors UserConnection `json:"todayContributors" validate:"required"`
185 TrendNotes NoteConnection `json:"trendNotes" validate:"required"`
186 UpdatedAt DateTime `json:"updatedAt" validate:"required"`
187 Users UserConnection `json:"users" validate:"required"`
188}
189
190// The size class of group cover images
191type GroupCoverImageSize string
192
193const (
194 GROUP_COVER_IMAGE_SIZE_LARGE = GroupCoverImageSize("LARGE")
195 GROUP_COVER_IMAGE_SIZE_MEDIUM = GroupCoverImageSize("MEDIUM")
196)
197
198// Cover image of a group
199type GroupCoverImage struct {
200 Density int64 `json:"density" validate:"required"`
201 Height int64 `json:"height" validate:"required"`
202 Url string `json:"url" validate:"required"`
203 Width int64 `json:"width" validate:"required"`
204}
205
206// undefined
207type FeedSectionSimpleConnection struct {
208 Edges []FeedSectionSimpleEdge `json:"edges" validate:"required"`
209 PageInfo FeedSectionSimplePageInfo `json:"pageInfo" validate:"required"`
210}
211
212// undefined
213type FeedSectionSimpleEdge struct {
214 Node FeedSection `json:"node" validate:"required"`
215}
216
217// A section of feed, which includes one or more notes
218type FeedSection interface{}
219
220// A section of a feed, which includes notes in a folder
221type FeedFolderParcel struct {
222 Date DateTime `json:"date" validate:"required"`
223 Folder Folder `json:"folder" validate:"required"`
224 Notes NoteConnection `json:"notes" validate:"required"`
225}
226
227// undefined
228type Folder struct {
229 ArchivedAt DateTime `json:"archivedAt"`
230 Components []Folder `json:"components" validate:"required"`
231 CreatedAt DateTime `json:"createdAt" validate:"required"`
232 Folders FolderConnection `json:"folders" validate:"required"`
233 FullName string `json:"fullName" validate:"required"`
234 Id ID `json:"id" validate:"required"`
235 LastModifiedAt DateTime `json:"lastModifiedAt"`
236 Name string `json:"name" validate:"required"`
237 NewNotePath string `json:"newNotePath" validate:"required"`
238 Notes NoteConnection `json:"notes" validate:"required"`
239 Path string `json:"path" validate:"required"`
240 PinnedNotes NoteConnection `json:"pinnedNotes" validate:"required"`
241 UpdatedAt DateTime `json:"updatedAt" validate:"required"`
242}
243
244// The connection type for Folder.
245type FolderConnection struct {
246 Edges []FolderEdge `json:"edges"`
247 Nodes []Folder `json:"nodes"`
248 PageInfo PageInfo `json:"pageInfo" validate:"required"`
249 TotalCount int64 `json:"totalCount" validate:"required"`
250}
251
252// An edge in a connection.
253type FolderEdge struct {
254 Cursor string `json:"cursor" validate:"required"`
255 Node Folder `json:"node"`
256}
257
258// Information about pagination in a connection.
259type PageInfo struct {
260 EndCursor string `json:"endCursor"`
261 HasNextPage bool `json:"hasNextPage" validate:"required"`
262 HasPreviousPage bool `json:"hasPreviousPage" validate:"required"`
263 StartCursor string `json:"startCursor"`
264}
265
266// undefined
267type NoteOrder struct {
268 Direction OrderDirection `json:"direction"`
269 Field NoteOrderField `json:"field"`
270}
271
272// undefined
273type OrderDirection string
274
275const (
276 ORDER_DIRECTION_ASC = OrderDirection("ASC")
277 ORDER_DIRECTION_DESC = OrderDirection("DESC")
278)
279
280// Properties by which notes can be ordered.
281type NoteOrderField string
282
283const (
284 NOTE_ORDER_FIELD_CONTENT_UPDATED_AT = NoteOrderField("CONTENT_UPDATED_AT")
285 NOTE_ORDER_FIELD_PUBLISHED_AT = NoteOrderField("PUBLISHED_AT")
286 NOTE_ORDER_FIELD_TITLE = NoteOrderField("TITLE")
287)
288
289// The connection type for Note.
290type NoteConnection struct {
291 Edges []NoteEdge `json:"edges"`
292 Nodes []Note `json:"nodes"`
293 PageInfo PageInfo `json:"pageInfo" validate:"required"`
294 TotalCount int64 `json:"totalCount" validate:"required"`
295}
296
297// An edge in a connection.
298type NoteEdge struct {
299 Cursor string `json:"cursor" validate:"required"`
300 Node Note `json:"node"`
301}
302
303// The Note type
304type Note struct {
305 Author User `json:"author"`
306 CanBeDestroyed bool `json:"canBeDestroyed" validate:"required"`
307 CanBeUpdated bool `json:"canBeUpdated" validate:"required"`
308 Coediting bool `json:"coediting" validate:"required"`
309 Comments CommentConnection `json:"comments" validate:"required"`
310 Content string `json:"content" validate:"required"`
311 ContentHtml string `json:"contentHtml" validate:"required"`
312 ContentSummaryHtml string `json:"contentSummaryHtml" validate:"required"`
313 ContentTocHtml string `json:"contentTocHtml" validate:"required"`
314 ContentUpdatedAt DateTime `json:"contentUpdatedAt" validate:"required"`
315 Contributors UserConnection `json:"contributors" validate:"required"`
316 CreatedAt DateTime `json:"createdAt" validate:"required"`
317 DatabaseId int64 `json:"databaseId" validate:"required"`
318 EditPath string `json:"editPath" validate:"required"`
319 Folder Folder `json:"folder"`
320 FolderName string `json:"folderName"`
321 Groups []Group `json:"groups" validate:"required"`
322 Id ID `json:"id" validate:"required"`
323 IsLikedByCurrentUser bool `json:"isLikedByCurrentUser" validate:"required"`
324 Likers UserConnection `json:"likers" validate:"required"`
325 Path string `json:"path" validate:"required"`
326 PublishedAt DateTime `json:"publishedAt"`
327 RelatedNotes SearchResultConnection `json:"relatedNotes" validate:"required"`
328 Title string `json:"title" validate:"required"`
329 TitleHtml string `json:"titleHtml" validate:"required"`
330 TrackbackNotes NoteConnection `json:"trackbackNotes" validate:"required"`
331 UpdatedAt DateTime `json:"updatedAt" validate:"required"`
332 Url string `json:"url" validate:"required"`
333}
334
335// The connection type for Comment.
336type CommentConnection struct {
337 Edges []CommentEdge `json:"edges"`
338 Nodes []Comment `json:"nodes"`
339 PageInfo PageInfo `json:"pageInfo" validate:"required"`
340 TotalCount int64 `json:"totalCount" validate:"required"`
341}
342
343// An edge in a connection.
344type CommentEdge struct {
345 Cursor string `json:"cursor" validate:"required"`
346 Node Comment `json:"node"`
347}
348
349// A comment that belongs to a Note
350type Comment struct {
351 Anchor string `json:"anchor" validate:"required"`
352 Author User `json:"author" validate:"required"`
353 Content string `json:"content" validate:"required"`
354 ContentHtml string `json:"contentHtml" validate:"required"`
355 ContentSummaryHtml string `json:"contentSummaryHtml" validate:"required"`
356 ContentUpdatedAt DateTime `json:"contentUpdatedAt" validate:"required"`
357 Contributors UserConnection `json:"contributors" validate:"required"`
358 CreatedAt DateTime `json:"createdAt" validate:"required"`
359 EditedAt DateTime `json:"editedAt"`
360 Id ID `json:"id" validate:"required"`
361 IsEdited bool `json:"isEdited" validate:"required"`
362 IsLikedByCurrentUser bool `json:"isLikedByCurrentUser" validate:"required"`
363 Likers UserConnection `json:"likers" validate:"required"`
364 Path string `json:"path" validate:"required"`
365 PublishedAt DateTime `json:"publishedAt"`
366 UpdatedAt DateTime `json:"updatedAt" validate:"required"`
367}
368
369// undefined
370type ContributorOrder struct {
371 Direction OrderDirection `json:"direction"`
372 Field ContributorOrderField `json:"field"`
373}
374
375// Properties by which contributors can be ordered.
376type ContributorOrderField string
377
378const (
379 CONTRIBUTOR_ORDER_FIELD_CONTRIBUTED_AT = ContributorOrderField("CONTRIBUTED_AT")
380)
381
382// The connection type for User.
383type UserConnection struct {
384 Edges []UserEdge `json:"edges"`
385 Nodes []User `json:"nodes"`
386 PageInfo PageInfo `json:"pageInfo" validate:"required"`
387 TotalCount int64 `json:"totalCount" validate:"required"`
388}
389
390// An edge in a connection.
391type UserEdge struct {
392 Cursor string `json:"cursor" validate:"required"`
393 Node User `json:"node"`
394}
395
396// The connection type for SearchResult.
397type SearchResultConnection struct {
398 Edges []SearchResultEdge `json:"edges"`
399 Nodes []SearchResult `json:"nodes"`
400 PageInfo PageInfo `json:"pageInfo" validate:"required"`
401 TotalCount int64 `json:"totalCount" validate:"required"`
402}
403
404// An edge in a connection.
405type SearchResultEdge struct {
406 Cursor string `json:"cursor" validate:"required"`
407 Node SearchResult `json:"node"`
408}
409
410// A search result that refers to a document
411type SearchResult struct {
412 Author User `json:"author" validate:"required"`
413 ContentSummaryHtml string `json:"contentSummaryHtml" validate:"required"`
414 ContentUpdatedAt DateTime `json:"contentUpdatedAt" validate:"required"`
415 Document SearchableDocument `json:"document" validate:"required"`
416 Folder Folder `json:"folder"`
417 Path string `json:"path" validate:"required"`
418 Title string `json:"title" validate:"required"`
419 TitleHtml string `json:"titleHtml" validate:"required"`
420 Url string `json:"url" validate:"required"`
421}
422
423//
424type SearchableDocument interface{}
425
426// A section of feed, which includes a note
427type FeedNote struct {
428 Date DateTime `json:"date" validate:"required"`
429 Note Note `json:"note" validate:"required"`
430}
431
432// A section of feed, which includes notes written by a user
433type FeedUserParcel struct {
434 Date DateTime `json:"date" validate:"required"`
435 Notes NoteConnection `json:"notes" validate:"required"`
436 User User `json:"user" validate:"required"`
437}
438
439// undefined
440type FeedSectionSimplePageInfo struct {
441 EndCursor string `json:"endCursor" validate:"required"`
442}
443
444// A role of a user
445type Role string
446
447const (
448 ROLE_ADMIN = Role("ADMIN")
449 ROLE_FULL_MEMBER = Role("FULL_MEMBER")
450 ROLE_GUEST = Role("GUEST")
451 ROLE_OWNER = Role("OWNER")
452)
453
454// undefined
455type AccessTokenScope string
456
457const (
458 ACCESS_TOKEN_SCOPE_ADMINISTER = AccessTokenScope("ADMINISTER")
459 ACCESS_TOKEN_SCOPE_READ = AccessTokenScope("READ")
460 ACCESS_TOKEN_SCOPE_WRITE = AccessTokenScope("WRITE")
461)
462
463// The connection type for AccessToken.
464type AccessTokenConnection struct {
465 Edges []AccessTokenEdge `json:"edges"`
466 Nodes []AccessToken `json:"nodes"`
467 PageInfo PageInfo `json:"pageInfo" validate:"required"`
468 TotalCount int64 `json:"totalCount" validate:"required"`
469}
470
471// An edge in a connection.
472type AccessTokenEdge struct {
473 Cursor string `json:"cursor" validate:"required"`
474 Node AccessToken `json:"node"`
475}
476
477// undefined
478type Attachment struct {
479 Author User `json:"author" validate:"required"`
480 CreatedAt DateTime `json:"createdAt" validate:"required"`
481 Data Blob `json:"data" validate:"required"`
482 DataUrl string `json:"dataUrl" validate:"required"`
483 Id ID `json:"id" validate:"required"`
484 Key string `json:"key" validate:"required"`
485 Kind AttachmentKind `json:"kind" validate:"required"`
486 MimeType string `json:"mimeType" validate:"required"`
487 Name string `json:"name" validate:"required"`
488 Path string `json:"path" validate:"required"`
489 Size int64 `json:"size" validate:"required"`
490 Url string `json:"url" validate:"required"`
491}
492
493//
494type Blob interface{}
495
496// How and where the attachment is used.
497type AttachmentKind string
498
499const (
500 ATTACHMENT_KIND_GENERAL = AttachmentKind("GENERAL")
501 ATTACHMENT_KIND_GROUP_COVER_IMAGE = AttachmentKind("GROUP_COVER_IMAGE")
502 ATTACHMENT_KIND_USER_AVATAR_IMAGE = AttachmentKind("USER_AVATAR_IMAGE")
503 ATTACHMENT_KIND_USER_COVER_IMAGE = AttachmentKind("USER_COVER_IMAGE")
504)
505
506// Kibela Web API budget like RateLimit of RESTful API
507type Budget struct {
508 Consumed BigInt `json:"consumed" validate:"required"`
509 Cost BigInt `json:"cost" validate:"required"`
510 Remaining BigInt `json:"remaining" validate:"required"`
511}
512
513// Represents non-fractional signed whole numeric values. Since the value may exceed the size of a 32-bit integer, it's encoded as a string.
514type BigInt interface{}
515
516// The kind to indicate what the feed is
517type FeedKind string
518
519const (
520 FEED_KIND_ALL = FeedKind("ALL")
521 FEED_KIND_GROUP = FeedKind("GROUP")
522 FEED_KIND_MY_FEED = FeedKind("MY_FEED")
523)
524
525// The connection type for ImportableUser.
526type ImportableUserConnection struct {
527 Edges []ImportableUserEdge `json:"edges"`
528 Nodes []ImportableUser `json:"nodes"`
529 PageInfo PageInfo `json:"pageInfo" validate:"required"`
530 TotalCount int64 `json:"totalCount" validate:"required"`
531}
532
533// An edge in a connection.
534type ImportableUserEdge struct {
535 Cursor string `json:"cursor" validate:"required"`
536 Node ImportableUser `json:"node"`
537}
538
539// A user representation from importable services
540type ImportableUser struct {
541 Account string `json:"account" validate:"required"`
542 AvatarUrl string `json:"avatarUrl" validate:"required"`
543 RealName string `json:"realName" validate:"required"`
544}
545
546// The connection type for NoteBrowsingHistory.
547type NoteBrowsingHistoryConnection struct {
548 Edges []NoteBrowsingHistoryEdge `json:"edges"`
549 Nodes []NoteBrowsingHistory `json:"nodes"`
550 PageInfo PageInfo `json:"pageInfo" validate:"required"`
551 TotalCount int64 `json:"totalCount" validate:"required"`
552}
553
554// An edge in a connection.
555type NoteBrowsingHistoryEdge struct {
556 Cursor string `json:"cursor" validate:"required"`
557 Node NoteBrowsingHistory `json:"node"`
558}
559
560// Browsing history of notes
561type NoteBrowsingHistory struct {
562 Id ID `json:"id" validate:"required"`
563 Note Note `json:"note"`
564}
565
566// Template of note
567type NoteTemplate struct {
568 Content string `json:"content" validate:"required"`
569 CreatedAt DateTime `json:"createdAt" validate:"required"`
570 EvaluatedTitle string `json:"evaluatedTitle" validate:"required"`
571 FolderEvaluatedFullName string `json:"folderEvaluatedFullName"`
572 FolderFullName string `json:"folderFullName"`
573 Groups []Group `json:"groups" validate:"required"`
574 Id ID `json:"id" validate:"required"`
575 Name string `json:"name" validate:"required"`
576 Title string `json:"title" validate:"required"`
577 UpdatedAt DateTime `json:"updatedAt" validate:"required"`
578}
579
580// The connection type for NoteTemplate.
581type NoteTemplateConnection struct {
582 Edges []NoteTemplateEdge `json:"edges"`
583 Nodes []NoteTemplate `json:"nodes"`
584 PageInfo PageInfo `json:"pageInfo" validate:"required"`
585 TotalCount int64 `json:"totalCount" validate:"required"`
586}
587
588// An edge in a connection.
589type NoteTemplateEdge struct {
590 Cursor string `json:"cursor" validate:"required"`
591 Node NoteTemplate `json:"node"`
592}
593
594// The state of notifications
595type NotificationState string
596
597const (
598 NOTIFICATION_STATE_READ = NotificationState("READ")
599 NOTIFICATION_STATE_UNREAD = NotificationState("UNREAD")
600)
601
602// The connection type for Notification.
603type NotificationConnection struct {
604 Edges []NotificationEdge `json:"edges"`
605 Nodes []Notification `json:"nodes"`
606 PageInfo PageInfo `json:"pageInfo" validate:"required"`
607 TotalCount int64 `json:"totalCount" validate:"required"`
608}
609
610// An edge in a connection.
611type NotificationEdge struct {
612 Cursor string `json:"cursor" validate:"required"`
613 Node Notification `json:"node"`
614}
615
616// Notifications you get in a Kibela team
617type Notification struct {
618 CreatedAt DateTime `json:"createdAt" validate:"required"`
619 Id ID `json:"id" validate:"required"`
620 MessageHtml string `json:"messageHtml" validate:"required"`
621 Sender User `json:"sender" validate:"required"`
622 SourcePath string `json:"sourcePath" validate:"required"`
623 State NotificationState `json:"state" validate:"required"`
624 UpdatedAt DateTime `json:"updatedAt" validate:"required"`
625}
626
627// The top-level mutation type to mutate resources
628type Mutation struct {
629 ArchiveFolder ArchiveFolderPayload `json:"archiveFolder"`
630 ArchiveGroup ArchiveGroupPayload `json:"archiveGroup"`
631 CloseAnnouncement CloseAnnouncementPayload `json:"closeAnnouncement"`
632 CreateAccessToken CreateAccessTokenPayload `json:"createAccessToken"`
633 CreateComment CreateCommentPayload `json:"createComment"`
634 CreateDisabledUser CreateDisabledUserPayload `json:"createDisabledUser"`
635 CreateFolderPin CreateFolderPinPayload `json:"createFolderPin"`
636 CreateGroup CreateGroupPayload `json:"createGroup"`
637 CreateGroupPin CreateGroupPinPayload `json:"createGroupPin"`
638 CreateNote CreateNotePayload `json:"createNote"`
639 CreateNoteTemplate CreateNoteTemplatePayload `json:"createNoteTemplate"`
640 DeleteAttachment DeleteAttachmentPayload `json:"deleteAttachment"`
641 DeleteComment DeleteCommentPayload `json:"deleteComment"`
642 DeleteGroup DeleteGroupPayload `json:"deleteGroup"`
643 DeleteNote DeleteNotePayload `json:"deleteNote"`
644 DisableSharedEntry DisableSharedEntryPayload `json:"disableSharedEntry"`
645 DisableUser DisableUserPayload `json:"disableUser"`
646 EnableSharedEntry EnableSharedEntryPayload `json:"enableSharedEntry"`
647 IgnoreMultiFactorAuthn IgnoreMultiFactorAuthnPayload `json:"ignoreMultiFactorAuthn"`
648 Invite InvitePayload `json:"invite"`
649 JoinGroup JoinGroupPayload `json:"joinGroup"`
650 LeaveGroup LeaveGroupPayload `json:"leaveGroup"`
651 Like LikePayload `json:"like"`
652 MarkNotificationsAsRead MarkNotificationsAsReadPayload `json:"markNotificationsAsRead"`
653 RemoveFolderPin RemoveFolderPinPayload `json:"removeFolderPin"`
654 RemoveGroupPin RemoveGroupPinPayload `json:"removeGroupPin"`
655 RestoreFolder RestoreFolderPayload `json:"restoreFolder"`
656 RestoreGroup RestoreGroupPayload `json:"restoreGroup"`
657 RevokeAccessToken RevokeAccessTokenPayload `json:"revokeAccessToken"`
658 TransferGroupNotes TransferGroupNotesPayload `json:"transferGroupNotes"`
659 Unlike UnlikePayload `json:"unlike"`
660 UnwatchNote UnwatchNotePayload `json:"unwatchNote"`
661 UpdateAccessToken UpdateAccessTokenPayload `json:"updateAccessToken"`
662 UpdateComment UpdateCommentPayload `json:"updateComment"`
663 UpdateDashboard UpdateDashboardPayload `json:"updateDashboard"`
664 UpdateDashboardContent UpdateDashboardContentPayload `json:"updateDashboardContent"`
665 UpdateFolderName UpdateFolderNamePayload `json:"updateFolderName"`
666 UpdateFolderParent UpdateFolderParentPayload `json:"updateFolderParent"`
667 UpdateGroup UpdateGroupPayload `json:"updateGroup"`
668 UpdateNote UpdateNotePayload `json:"updateNote"`
669 UpdateNoteContent UpdateNoteContentPayload `json:"updateNoteContent"`
670 UpdateNoteFolder UpdateNoteFolderPayload `json:"updateNoteFolder"`
671 UpdateNoteTemplate UpdateNoteTemplatePayload `json:"updateNoteTemplate"`
672 UpdateNoteTitle UpdateNoteTitlePayload `json:"updateNoteTitle"`
673 UpdateTeamSetting UpdateTeamSettingPayload `json:"updateTeamSetting"`
674 UploadAttachment UploadAttachmentPayload `json:"uploadAttachment"`
675 UploadAttachmentWithDataUrl UploadAttachmentWithDataUrlPayload `json:"uploadAttachmentWithDataUrl"`
676 WatchNote WatchNotePayload `json:"watchNote"`
677}
678
679// Autogenerated input type of ArchiveFolder
680type ArchiveFolderInput struct {
681 ClientMutationId string `json:"clientMutationId"`
682 Id ID `json:"id" validate:"required"`
683}
684
685// Autogenerated return type of ArchiveFolder
686type ArchiveFolderPayload struct {
687 ClientMutationId string `json:"clientMutationId"`
688 Folder Folder `json:"folder" validate:"required"`
689}
690
691// Autogenerated input type of ArchiveGroup
692type ArchiveGroupInput struct {
693 ClientMutationId string `json:"clientMutationId"`
694 GroupId ID `json:"groupId" validate:"required"`
695}
696
697// Autogenerated return type of ArchiveGroup
698type ArchiveGroupPayload struct {
699 ClientMutationId string `json:"clientMutationId"`
700 Group Group `json:"group" validate:"required"`
701}
702
703// Autogenerated input type of CloseAnnouncement
704type CloseAnnouncementInput struct {
705 AnnouncementKey string `json:"announcementKey" validate:"required"`
706 ClientMutationId string `json:"clientMutationId"`
707}
708
709// Autogenerated return type of CloseAnnouncement
710type CloseAnnouncementPayload struct {
711 ClientMutationId string `json:"clientMutationId"`
712}
713
714// Autogenerated input type of CreateAccessToken
715type CreateAccessTokenInput struct {
716 ClientMutationId string `json:"clientMutationId"`
717 Description string `json:"description" validate:"required"`
718 Scopes []AccessTokenScope `json:"scopes" validate:"required"`
719 Title string `json:"title" validate:"required"`
720}
721
722// Autogenerated return type of CreateAccessToken
723type CreateAccessTokenPayload struct {
724 AccessToken AccessToken `json:"accessToken" validate:"required"`
725 ClientMutationId string `json:"clientMutationId"`
726}
727
728// Autogenerated input type of CreateComment
729type CreateCommentInput struct {
730 AuthorId ID `json:"authorId"`
731 ClientMutationId string `json:"clientMutationId"`
732 CommentableId ID `json:"commentableId" validate:"required"`
733 Content string `json:"content" validate:"required"`
734 PublishedAt DateTime `json:"publishedAt"`
735}
736
737// Autogenerated return type of CreateComment
738type CreateCommentPayload struct {
739 ClientMutationId string `json:"clientMutationId"`
740 Comment Comment `json:"comment" validate:"required"`
741}
742
743// Autogenerated input type of CreateDisabledUser
744type CreateDisabledUserInput struct {
745 Account string `json:"account" validate:"required"`
746 ClientMutationId string `json:"clientMutationId"`
747 Email string `json:"email" validate:"required"`
748 RealName string `json:"realName" validate:"required"`
749 Role Role `json:"role"`
750}
751
752// Autogenerated return type of CreateDisabledUser
753type CreateDisabledUserPayload struct {
754 ClientMutationId string `json:"clientMutationId"`
755 User User `json:"user" validate:"required"`
756}
757
758// Autogenerated input type of CreateFolderPin
759type CreateFolderPinInput struct {
760 ClientMutationId string `json:"clientMutationId"`
761 NoteId ID `json:"noteId" validate:"required"`
762}
763
764// Autogenerated return type of CreateFolderPin
765type CreateFolderPinPayload struct {
766 ClientMutationId string `json:"clientMutationId"`
767 Folder Folder `json:"folder" validate:"required"`
768}
769
770// Autogenerated input type of CreateGroup
771type CreateGroupInput struct {
772 ClientMutationId string `json:"clientMutationId"`
773 CoverImageKey string `json:"coverImageKey"`
774 Description string `json:"description" validate:"required"`
775 IsPrivate bool `json:"isPrivate" validate:"required"`
776 Name string `json:"name" validate:"required"`
777}
778
779// Autogenerated return type of CreateGroup
780type CreateGroupPayload struct {
781 ClientMutationId string `json:"clientMutationId"`
782 Group Group `json:"group" validate:"required"`
783}
784
785// Autogenerated input type of CreateGroupPin
786type CreateGroupPinInput struct {
787 ClientMutationId string `json:"clientMutationId"`
788 GroupId ID `json:"groupId" validate:"required"`
789 NoteId ID `json:"noteId" validate:"required"`
790}
791
792// Autogenerated return type of CreateGroupPin
793type CreateGroupPinPayload struct {
794 ClientMutationId string `json:"clientMutationId"`
795 Group Group `json:"group" validate:"required"`
796}
797
798// Autogenerated input type of CreateNote
799type CreateNoteInput struct {
800 AuthorId ID `json:"authorId"`
801 ClientMutationId string `json:"clientMutationId"`
802 Coediting bool `json:"coediting" validate:"required"`
803 Content string `json:"content" validate:"required"`
804 Draft bool `json:"draft"`
805 FolderName string `json:"folderName"`
806 GroupIds []ID `json:"groupIds" validate:"required"`
807 PublishedAt DateTime `json:"publishedAt"`
808 Title string `json:"title" validate:"required"`
809}
810
811// Autogenerated return type of CreateNote
812type CreateNotePayload struct {
813 ClientMutationId string `json:"clientMutationId"`
814 Note Note `json:"note" validate:"required"`
815}
816
817// Autogenerated input type of CreateNoteTemplate
818type CreateNoteTemplateInput struct {
819 ClientMutationId string `json:"clientMutationId"`
820 Coediting bool `json:"coediting" validate:"required"`
821 Content string `json:"content" validate:"required"`
822 FolderFullName string `json:"folderFullName"`
823 GroupIds []ID `json:"groupIds" validate:"required"`
824 Name string `json:"name" validate:"required"`
825 Title string `json:"title" validate:"required"`
826}
827
828// Autogenerated return type of CreateNoteTemplate
829type CreateNoteTemplatePayload struct {
830 ClientMutationId string `json:"clientMutationId"`
831 NoteTemplate NoteTemplate `json:"noteTemplate" validate:"required"`
832}
833
834// Autogenerated input type of DeleteAttachment
835type DeleteAttachmentInput struct {
836 ClientMutationId string `json:"clientMutationId"`
837 Id ID `json:"id" validate:"required"`
838}
839
840// Autogenerated return type of DeleteAttachment
841type DeleteAttachmentPayload struct {
842 ClientMutationId string `json:"clientMutationId"`
843}
844
845// Autogenerated input type of DeleteComment
846type DeleteCommentInput struct {
847 ClientMutationId string `json:"clientMutationId"`
848 Id ID `json:"id" validate:"required"`
849}
850
851// Autogenerated return type of DeleteComment
852type DeleteCommentPayload struct {
853 ClientMutationId string `json:"clientMutationId"`
854}
855
856// Autogenerated input type of DeleteGroup
857type DeleteGroupInput struct {
858 ClientMutationId string `json:"clientMutationId"`
859 Id ID `json:"id" validate:"required"`
860 MergeToId ID `json:"mergeToId"`
861}
862
863// Autogenerated return type of DeleteGroup
864type DeleteGroupPayload struct {
865 ClientMutationId string `json:"clientMutationId"`
866}
867
868// Autogenerated input type of DeleteNote
869type DeleteNoteInput struct {
870 ClientMutationId string `json:"clientMutationId"`
871 Id ID `json:"id" validate:"required"`
872}
873
874// Autogenerated return type of DeleteNote
875type DeleteNotePayload struct {
876 ClientMutationId string `json:"clientMutationId"`
877}
878
879// Autogenerated input type of DisableSharedEntry
880type DisableSharedEntryInput struct {
881 ClientMutationId string `json:"clientMutationId"`
882}
883
884// Autogenerated return type of DisableSharedEntry
885type DisableSharedEntryPayload struct {
886 ClientMutationId string `json:"clientMutationId"`
887}
888
889// Autogenerated input type of DisableUser
890type DisableUserInput struct {
891 ClientMutationId string `json:"clientMutationId"`
892 Id ID `json:"id" validate:"required"`
893}
894
895// Autogenerated return type of DisableUser
896type DisableUserPayload struct {
897 ClientMutationId string `json:"clientMutationId"`
898}
899
900// Autogenerated input type of EnableSharedEntry
901type EnableSharedEntryInput struct {
902 ClientMutationId string `json:"clientMutationId"`
903}
904
905// Autogenerated return type of EnableSharedEntry
906type EnableSharedEntryPayload struct {
907 ClientMutationId string `json:"clientMutationId"`
908}
909
910// Autogenerated input type of IgnoreMultiFactorAuthn
911type IgnoreMultiFactorAuthnInput struct {
912 ClientMutationId string `json:"clientMutationId"`
913 UserId ID `json:"userId" validate:"required"`
914}
915
916// Autogenerated return type of IgnoreMultiFactorAuthn
917type IgnoreMultiFactorAuthnPayload struct {
918 ClientMutationId string `json:"clientMutationId"`
919}
920
921// Autogenerated input type of Invite
922type InviteInput struct {
923 ClientMutationId string `json:"clientMutationId"`
924 Email string `json:"email" validate:"required"`
925 Role Role `json:"role"`
926}
927
928// Autogenerated return type of Invite
929type InvitePayload struct {
930 ClientMutationId string `json:"clientMutationId"`
931 Email string `json:"email" validate:"required"`
932 Hint InvitationHint `json:"hint" validate:"required"`
933 Role Role `json:"role" validate:"required"`
934}
935
936// Message hints that suggest what happens in sending invitations
937type InvitationHint string
938
939const (
940 INVITATION_HINT_ALREADY_JOINED = InvitationHint("ALREADY_JOINED")
941 INVITATION_HINT_INVITED = InvitationHint("INVITED")
942 INVITATION_HINT_RE_ENABLED = InvitationHint("RE_ENABLED")
943)
944
945// Autogenerated input type of JoinGroup
946type JoinGroupInput struct {
947 ClientMutationId string `json:"clientMutationId"`
948 GroupId ID `json:"groupId" validate:"required"`
949 UserId ID `json:"userId" validate:"required"`
950}
951
952// Autogenerated return type of JoinGroup
953type JoinGroupPayload struct {
954 ClientMutationId string `json:"clientMutationId"`
955}
956
957// Autogenerated input type of LeaveGroup
958type LeaveGroupInput struct {
959 ClientMutationId string `json:"clientMutationId"`
960 GroupId ID `json:"groupId" validate:"required"`
961 UserId ID `json:"userId" validate:"required"`
962}
963
964// Autogenerated return type of LeaveGroup
965type LeaveGroupPayload struct {
966 ClientMutationId string `json:"clientMutationId"`
967}
968
969// Autogenerated input type of Like
970type LikeInput struct {
971 ClientMutationId string `json:"clientMutationId"`
972 LikableId ID `json:"likableId" validate:"required"`
973}
974
975// Autogenerated return type of Like
976type LikePayload struct {
977 ClientMutationId string `json:"clientMutationId"`
978 Likers UserConnection `json:"likers" validate:"required"`
979}
980
981// Autogenerated input type of MarkNotificationsAsRead
982type MarkNotificationsAsReadInput struct {
983 ClientMutationId string `json:"clientMutationId"`
984}
985
986// Autogenerated return type of MarkNotificationsAsRead
987type MarkNotificationsAsReadPayload struct {
988 ClientMutationId string `json:"clientMutationId"`
989}
990
991// Autogenerated input type of RemoveFolderPin
992type RemoveFolderPinInput struct {
993 ClientMutationId string `json:"clientMutationId"`
994 NoteId ID `json:"noteId" validate:"required"`
995}
996
997// Autogenerated return type of RemoveFolderPin
998type RemoveFolderPinPayload struct {
999 ClientMutationId string `json:"clientMutationId"`
1000 Folder Folder `json:"folder" validate:"required"`
1001}
1002
1003// Autogenerated input type of RemoveGroupPin
1004type RemoveGroupPinInput struct {
1005 ClientMutationId string `json:"clientMutationId"`
1006 GroupId ID `json:"groupId" validate:"required"`
1007 NoteId ID `json:"noteId" validate:"required"`
1008}
1009
1010// Autogenerated return type of RemoveGroupPin
1011type RemoveGroupPinPayload struct {
1012 ClientMutationId string `json:"clientMutationId"`
1013 Group Group `json:"group" validate:"required"`
1014}
1015
1016// Autogenerated input type of RestoreFolder
1017type RestoreFolderInput struct {
1018 ClientMutationId string `json:"clientMutationId"`
1019 Id ID `json:"id" validate:"required"`
1020}
1021
1022// Autogenerated return type of RestoreFolder
1023type RestoreFolderPayload struct {
1024 ClientMutationId string `json:"clientMutationId"`
1025 Folder Folder `json:"folder" validate:"required"`
1026}
1027
1028// Autogenerated input type of RestoreGroup
1029type RestoreGroupInput struct {
1030 ClientMutationId string `json:"clientMutationId"`
1031 GroupId ID `json:"groupId" validate:"required"`
1032}
1033
1034// Autogenerated return type of RestoreGroup
1035type RestoreGroupPayload struct {
1036 ClientMutationId string `json:"clientMutationId"`
1037 Group Group `json:"group" validate:"required"`
1038}
1039
1040// Autogenerated input type of RevokeAccessToken
1041type RevokeAccessTokenInput struct {
1042 ClientMutationId string `json:"clientMutationId"`
1043 Id ID `json:"id" validate:"required"`
1044}
1045
1046// Autogenerated return type of RevokeAccessToken
1047type RevokeAccessTokenPayload struct {
1048 AccessToken AccessToken `json:"accessToken" validate:"required"`
1049 ClientMutationId string `json:"clientMutationId"`
1050}
1051
1052// Autogenerated input type of TransferGroupNotes
1053type TransferGroupNotesInput struct {
1054 ClientMutationId string `json:"clientMutationId"`
1055 FromGroupId ID `json:"fromGroupId" validate:"required"`
1056 ToGroupId ID `json:"toGroupId" validate:"required"`
1057}
1058
1059// Autogenerated return type of TransferGroupNotes
1060type TransferGroupNotesPayload struct {
1061 ClientMutationId string `json:"clientMutationId"`
1062 From Group `json:"from" validate:"required"`
1063 To Group `json:"to" validate:"required"`
1064}
1065
1066// Autogenerated input type of Unlike
1067type UnlikeInput struct {
1068 ClientMutationId string `json:"clientMutationId"`
1069 LikableId ID `json:"likableId" validate:"required"`
1070}
1071
1072// Autogenerated return type of Unlike
1073type UnlikePayload struct {
1074 ClientMutationId string `json:"clientMutationId"`
1075 Likers UserConnection `json:"likers" validate:"required"`
1076}
1077
1078// Autogenerated input type of UnwatchNote
1079type UnwatchNoteInput struct {
1080 ClientMutationId string `json:"clientMutationId"`
1081 NoteId ID `json:"noteId" validate:"required"`
1082}
1083
1084// Autogenerated return type of UnwatchNote
1085type UnwatchNotePayload struct {
1086 ClientMutationId string `json:"clientMutationId"`
1087}
1088
1089// Autogenerated input type of UpdateAccessToken
1090type UpdateAccessTokenInput struct {
1091 ClientMutationId string `json:"clientMutationId"`
1092 Description string `json:"description" validate:"required"`
1093 Id ID `json:"id" validate:"required"`
1094 Scopes []AccessTokenScope `json:"scopes" validate:"required"`
1095 Title string `json:"title" validate:"required"`
1096}
1097
1098// Autogenerated return type of UpdateAccessToken
1099type UpdateAccessTokenPayload struct {
1100 AccessToken AccessToken `json:"accessToken" validate:"required"`
1101 ClientMutationId string `json:"clientMutationId"`
1102}
1103
1104// Autogenerated input type of UpdateComment
1105type UpdateCommentInput struct {
1106 ClientMutationId string `json:"clientMutationId"`
1107 Content string `json:"content" validate:"required"`
1108 Id ID `json:"id" validate:"required"`
1109 Touch bool `json:"touch"`
1110}
1111
1112// Autogenerated return type of UpdateComment
1113type UpdateCommentPayload struct {
1114 ClientMutationId string `json:"clientMutationId"`
1115 Comment Comment `json:"comment" validate:"required"`
1116}
1117
1118// Autogenerated input type of UpdateDashboard
1119type UpdateDashboardInput struct {
1120 ClientMutationId string `json:"clientMutationId"`
1121 Content string `json:"content" validate:"required"`
1122 GroupId ID `json:"groupId" validate:"required"`
1123}
1124
1125// Autogenerated return type of UpdateDashboard
1126type UpdateDashboardPayload struct {
1127 ClientMutationId string `json:"clientMutationId"`
1128 Dashboard Dashboard `json:"dashboard" validate:"required"`
1129}
1130
1131// A dashboard of a group
1132type Dashboard struct {
1133 Content string `json:"content" validate:"required"`
1134 ContentHtml string `json:"contentHtml" validate:"required"`
1135 CreatedAt DateTime `json:"createdAt" validate:"required"`
1136 Group Group `json:"group" validate:"required"`
1137 Id ID `json:"id" validate:"required"`
1138 UpdatedAt DateTime `json:"updatedAt" validate:"required"`
1139}
1140
1141// Autogenerated input type of UpdateDashboardContent
1142type UpdateDashboardContentInput struct {
1143 BaseContent string `json:"baseContent" validate:"required"`
1144 ClientMutationId string `json:"clientMutationId"`
1145 GroupId ID `json:"groupId" validate:"required"`
1146 NewContent string `json:"newContent" validate:"required"`
1147}
1148
1149// Autogenerated return type of UpdateDashboardContent
1150type UpdateDashboardContentPayload struct {
1151 ClientMutationId string `json:"clientMutationId"`
1152 Dashboard Dashboard `json:"dashboard" validate:"required"`
1153}
1154
1155// Autogenerated input type of UpdateFolderName
1156type UpdateFolderNameInput struct {
1157 ClientMutationId string `json:"clientMutationId"`
1158 Id ID `json:"id" validate:"required"`
1159 Name string `json:"name" validate:"required"`
1160}
1161
1162// Autogenerated return type of UpdateFolderName
1163type UpdateFolderNamePayload struct {
1164 ClientMutationId string `json:"clientMutationId"`
1165 Folder Folder `json:"folder" validate:"required"`
1166}
1167
1168// Autogenerated input type of UpdateFolderParent
1169type UpdateFolderParentInput struct {
1170 ClientMutationId string `json:"clientMutationId"`
1171 FolderFullName string `json:"folderFullName"`
1172 FolderId ID `json:"folderId" validate:"required"`
1173}
1174
1175// Autogenerated return type of UpdateFolderParent
1176type UpdateFolderParentPayload struct {
1177 ClientMutationId string `json:"clientMutationId"`
1178 Folder Folder `json:"folder" validate:"required"`
1179}
1180
1181// Autogenerated input type of UpdateGroup
1182type UpdateGroupInput struct {
1183 ClientMutationId string `json:"clientMutationId"`
1184 CoverImageKey string `json:"coverImageKey"`
1185 Description string `json:"description"`
1186 Id ID `json:"id" validate:"required"`
1187 IsPrivate bool `json:"isPrivate"`
1188 Name string `json:"name"`
1189}
1190
1191// Autogenerated return type of UpdateGroup
1192type UpdateGroupPayload struct {
1193 ClientMutationId string `json:"clientMutationId"`
1194 Group Group `json:"group" validate:"required"`
1195}
1196
1197// Autogenerated input type of UpdateNote
1198type UpdateNoteInput struct {
1199 BaseNote NoteInput `json:"baseNote" validate:"required"`
1200 ClientMutationId string `json:"clientMutationId"`
1201 Draft bool `json:"draft" validate:"required"`
1202 Id ID `json:"id" validate:"required"`
1203 NewNote NoteInput `json:"newNote" validate:"required"`
1204}
1205
1206// Note input struct, used to updateNote mutation
1207type NoteInput struct {
1208 Coediting bool `json:"coediting" validate:"required"`
1209 Content string `json:"content" validate:"required"`
1210 FolderName string `json:"folderName"`
1211 GroupIds []ID `json:"groupIds" validate:"required"`
1212 Title string `json:"title" validate:"required"`
1213}
1214
1215// Autogenerated return type of UpdateNote
1216type UpdateNotePayload struct {
1217 ClientMutationId string `json:"clientMutationId"`
1218 Note Note `json:"note" validate:"required"`
1219}
1220
1221// Autogenerated input type of UpdateNoteContent
1222type UpdateNoteContentInput struct {
1223 BaseContent string `json:"baseContent" validate:"required"`
1224 ClientMutationId string `json:"clientMutationId"`
1225 Id ID `json:"id" validate:"required"`
1226 NewContent string `json:"newContent" validate:"required"`
1227 Touch bool `json:"touch"`
1228}
1229
1230// Autogenerated return type of UpdateNoteContent
1231type UpdateNoteContentPayload struct {
1232 ClientMutationId string `json:"clientMutationId"`
1233 Note Note `json:"note" validate:"required"`
1234}
1235
1236// Autogenerated input type of UpdateNoteFolder
1237type UpdateNoteFolderInput struct {
1238 ClientMutationId string `json:"clientMutationId"`
1239 FolderFullName string `json:"folderFullName"`
1240 NoteId ID `json:"noteId" validate:"required"`
1241}
1242
1243// Autogenerated return type of UpdateNoteFolder
1244type UpdateNoteFolderPayload struct {
1245 ClientMutationId string `json:"clientMutationId"`
1246 Note Note `json:"note" validate:"required"`
1247}
1248
1249// Autogenerated input type of UpdateNoteTemplate
1250type UpdateNoteTemplateInput struct {
1251 ClientMutationId string `json:"clientMutationId"`
1252 Coediting bool `json:"coediting" validate:"required"`
1253 Content string `json:"content" validate:"required"`
1254 FolderFullName string `json:"folderFullName"`
1255 GroupIds []ID `json:"groupIds" validate:"required"`
1256 Id ID `json:"id" validate:"required"`
1257 Name string `json:"name" validate:"required"`
1258 Title string `json:"title" validate:"required"`
1259}
1260
1261// Autogenerated return type of UpdateNoteTemplate
1262type UpdateNoteTemplatePayload struct {
1263 ClientMutationId string `json:"clientMutationId"`
1264 NoteTemplate NoteTemplate `json:"noteTemplate" validate:"required"`
1265}
1266
1267// Autogenerated input type of UpdateNoteTitle
1268type UpdateNoteTitleInput struct {
1269 BaseTitle string `json:"baseTitle" validate:"required"`
1270 ClientMutationId string `json:"clientMutationId"`
1271 Id ID `json:"id" validate:"required"`
1272 NewTitle string `json:"newTitle" validate:"required"`
1273}
1274
1275// Autogenerated return type of UpdateNoteTitle
1276type UpdateNoteTitlePayload struct {
1277 ClientMutationId string `json:"clientMutationId"`
1278 Note Note `json:"note" validate:"required"`
1279}
1280
1281// Autogenerated input type of UpdateTeamSetting
1282type UpdateTeamSettingInput struct {
1283 City string `json:"city"`
1284 ClientMutationId string `json:"clientMutationId"`
1285 Country string `json:"country"`
1286 DepartmentName string `json:"departmentName"`
1287 InChargeUserId ID `json:"inChargeUserId"`
1288 OrganizationKind OrganizationKind `json:"organizationKind"`
1289 OrganizationName string `json:"organizationName"`
1290 PhoneNumber string `json:"phoneNumber"`
1291 PostalCode string `json:"postalCode"`
1292 State string `json:"state"`
1293 StreetAddress string `json:"streetAddress"`
1294}
1295
1296// Kind of the organization
1297type OrganizationKind string
1298
1299const (
1300 ORGANIZATION_KIND_COMPANY = OrganizationKind("COMPANY")
1301 ORGANIZATION_KIND_OTHER = OrganizationKind("OTHER")
1302 ORGANIZATION_KIND_PERSONAL = OrganizationKind("PERSONAL")
1303 ORGANIZATION_KIND_UNKNOWN = OrganizationKind("UNKNOWN")
1304)
1305
1306// Autogenerated return type of UpdateTeamSetting
1307type UpdateTeamSettingPayload struct {
1308 ClientMutationId string `json:"clientMutationId"`
1309}
1310
1311// Autogenerated input type of UploadAttachment
1312type UploadAttachmentInput struct {
1313 ClientMutationId string `json:"clientMutationId"`
1314 Data Blob `json:"data" validate:"required"`
1315 Kind AttachmentKind `json:"kind" validate:"required"`
1316 Name string `json:"name" validate:"required"`
1317}
1318
1319// Autogenerated return type of UploadAttachment
1320type UploadAttachmentPayload struct {
1321 Attachment Attachment `json:"attachment" validate:"required"`
1322 ClientMutationId string `json:"clientMutationId"`
1323}
1324
1325// Autogenerated input type of UploadAttachmentWithDataUrl
1326type UploadAttachmentWithDataUrlInput struct {
1327 ClientMutationId string `json:"clientMutationId"`
1328 DataUrl string `json:"dataUrl" validate:"required"`
1329 Kind AttachmentKind `json:"kind" validate:"required"`
1330 Name string `json:"name" validate:"required"`
1331}
1332
1333// Autogenerated return type of UploadAttachmentWithDataUrl
1334type UploadAttachmentWithDataUrlPayload struct {
1335 Attachment Attachment `json:"attachment" validate:"required"`
1336 ClientMutationId string `json:"clientMutationId"`
1337}
1338
1339// Autogenerated input type of WatchNote
1340type WatchNoteInput struct {
1341 ClientMutationId string `json:"clientMutationId"`
1342 NoteId ID `json:"noteId" validate:"required"`
1343 WatchedAction WatchState `json:"watchedAction" validate:"required"`
1344}
1345
1346// State of watching note
1347type WatchState string
1348
1349const (
1350 WATCH_STATE_WATCH_COMMENT = WatchState("WATCH_COMMENT")
1351 WATCH_STATE_WATCH_NOTE_UPDATE = WatchState("WATCH_NOTE_UPDATE")
1352)
1353
1354// Autogenerated return type of WatchNote
1355type WatchNotePayload struct {
1356 ClientMutationId string `json:"clientMutationId"`
1357}