2020-04-10 04:40:22 +02:00
|
|
|
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
|
|
|
|
|
|
|
|
package graph
|
|
|
|
|
2020-04-11 04:47:43 +02:00
|
|
|
import (
|
2020-07-05 01:02:57 +02:00
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
"strconv"
|
2020-06-16 00:36:59 +02:00
|
|
|
"time"
|
|
|
|
|
2020-04-11 04:47:43 +02:00
|
|
|
"github.com/google/uuid"
|
2020-08-07 03:50:35 +02:00
|
|
|
"github.com/jordanknott/taskcafe/internal/db"
|
2020-04-11 04:47:43 +02:00
|
|
|
)
|
|
|
|
|
2020-04-20 05:02:55 +02:00
|
|
|
type AddTaskLabelInput struct {
|
2020-05-31 06:11:19 +02:00
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
ProjectLabelID uuid.UUID `json:"projectLabelID"`
|
2020-04-20 05:02:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type AssignTaskInput struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
UserID uuid.UUID `json:"userID"`
|
|
|
|
}
|
|
|
|
|
2020-12-19 03:34:35 +01:00
|
|
|
type CausedBy struct {
|
|
|
|
ID uuid.UUID `json:"id"`
|
|
|
|
FullName string `json:"fullName"`
|
|
|
|
ProfileIcon *ProfileIcon `json:"profileIcon"`
|
|
|
|
}
|
|
|
|
|
2020-06-19 01:12:15 +02:00
|
|
|
type ChecklistBadge struct {
|
|
|
|
Complete int `json:"complete"`
|
|
|
|
Total int `json:"total"`
|
|
|
|
}
|
|
|
|
|
2021-10-25 22:14:24 +02:00
|
|
|
type CommentsBadge struct {
|
|
|
|
Total int `json:"total"`
|
|
|
|
Unread bool `json:"unread"`
|
|
|
|
}
|
|
|
|
|
2020-06-19 01:12:15 +02:00
|
|
|
type CreateTaskChecklist struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Position float64 `json:"position"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type CreateTaskChecklistItem struct {
|
|
|
|
TaskChecklistID uuid.UUID `json:"taskChecklistID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Position float64 `json:"position"`
|
|
|
|
}
|
|
|
|
|
2020-12-19 03:34:35 +01:00
|
|
|
type CreateTaskComment struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
Message string `json:"message"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type CreateTaskCommentPayload struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
Comment *db.TaskComment `json:"comment"`
|
|
|
|
}
|
|
|
|
|
2020-06-21 00:49:11 +02:00
|
|
|
type CreateTeamMember struct {
|
|
|
|
UserID uuid.UUID `json:"userID"`
|
|
|
|
TeamID uuid.UUID `json:"teamID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type CreateTeamMemberPayload struct {
|
2020-07-05 01:02:57 +02:00
|
|
|
Team *db.Team `json:"team"`
|
|
|
|
TeamMember *Member `json:"teamMember"`
|
2020-06-21 00:49:11 +02:00
|
|
|
}
|
|
|
|
|
2020-12-19 03:34:35 +01:00
|
|
|
type CreatedBy struct {
|
|
|
|
ID uuid.UUID `json:"id"`
|
|
|
|
FullName string `json:"fullName"`
|
|
|
|
ProfileIcon *ProfileIcon `json:"profileIcon"`
|
|
|
|
}
|
|
|
|
|
2020-10-21 01:52:09 +02:00
|
|
|
type DeleteInvitedProjectMember struct {
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteInvitedProjectMemberPayload struct {
|
|
|
|
InvitedMember *InvitedMember `json:"invitedMember"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteInvitedUserAccount struct {
|
|
|
|
InvitedUserID uuid.UUID `json:"invitedUserID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteInvitedUserAccountPayload struct {
|
|
|
|
InvitedUser *InvitedUserAccount `json:"invitedUser"`
|
|
|
|
}
|
|
|
|
|
2020-06-21 00:49:11 +02:00
|
|
|
type DeleteProject struct {
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
}
|
|
|
|
|
2020-05-28 03:12:50 +02:00
|
|
|
type DeleteProjectLabel struct {
|
|
|
|
ProjectLabelID uuid.UUID `json:"projectLabelID"`
|
|
|
|
}
|
|
|
|
|
2020-07-05 01:02:57 +02:00
|
|
|
type DeleteProjectMember struct {
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
UserID uuid.UUID `json:"userID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteProjectMemberPayload struct {
|
|
|
|
Ok bool `json:"ok"`
|
|
|
|
Member *Member `json:"member"`
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
}
|
|
|
|
|
2020-06-21 00:49:11 +02:00
|
|
|
type DeleteProjectPayload struct {
|
|
|
|
Ok bool `json:"ok"`
|
2020-07-05 01:02:57 +02:00
|
|
|
Project *db.Project `json:"project"`
|
2020-06-21 00:49:11 +02:00
|
|
|
}
|
|
|
|
|
2020-06-23 22:20:53 +02:00
|
|
|
type DeleteTaskChecklist struct {
|
|
|
|
TaskChecklistID uuid.UUID `json:"taskChecklistID"`
|
|
|
|
}
|
|
|
|
|
2020-06-19 01:12:15 +02:00
|
|
|
type DeleteTaskChecklistItem struct {
|
|
|
|
TaskChecklistItemID uuid.UUID `json:"taskChecklistItemID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteTaskChecklistItemPayload struct {
|
|
|
|
Ok bool `json:"ok"`
|
2020-07-05 01:02:57 +02:00
|
|
|
TaskChecklistItem *db.TaskChecklistItem `json:"taskChecklistItem"`
|
2020-06-19 01:12:15 +02:00
|
|
|
}
|
|
|
|
|
2020-06-23 22:20:53 +02:00
|
|
|
type DeleteTaskChecklistPayload struct {
|
|
|
|
Ok bool `json:"ok"`
|
2020-07-05 01:02:57 +02:00
|
|
|
TaskChecklist *db.TaskChecklist `json:"taskChecklist"`
|
2020-06-23 22:20:53 +02:00
|
|
|
}
|
|
|
|
|
2020-12-19 03:34:35 +01:00
|
|
|
type DeleteTaskComment struct {
|
|
|
|
CommentID uuid.UUID `json:"commentID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteTaskCommentPayload struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
CommentID uuid.UUID `json:"commentID"`
|
|
|
|
}
|
|
|
|
|
2020-04-11 21:24:45 +02:00
|
|
|
type DeleteTaskGroupInput struct {
|
|
|
|
TaskGroupID uuid.UUID `json:"taskGroupID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteTaskGroupPayload struct {
|
|
|
|
Ok bool `json:"ok"`
|
|
|
|
AffectedRows int `json:"affectedRows"`
|
2020-07-05 01:02:57 +02:00
|
|
|
TaskGroup *db.TaskGroup `json:"taskGroup"`
|
2020-04-11 21:24:45 +02:00
|
|
|
}
|
|
|
|
|
2020-09-11 01:15:06 +02:00
|
|
|
type DeleteTaskGroupTasks struct {
|
|
|
|
TaskGroupID uuid.UUID `json:"taskGroupID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteTaskGroupTasksPayload struct {
|
|
|
|
TaskGroupID uuid.UUID `json:"taskGroupID"`
|
|
|
|
Tasks []uuid.UUID `json:"tasks"`
|
|
|
|
}
|
|
|
|
|
2020-04-10 04:40:22 +02:00
|
|
|
type DeleteTaskInput struct {
|
2020-09-20 00:26:02 +02:00
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteTaskPayload struct {
|
2020-09-20 00:26:02 +02:00
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
|
|
|
|
2020-06-23 22:20:53 +02:00
|
|
|
type DeleteTeam struct {
|
|
|
|
TeamID uuid.UUID `json:"teamID"`
|
|
|
|
}
|
|
|
|
|
2020-07-05 01:02:57 +02:00
|
|
|
type DeleteTeamMember struct {
|
2020-07-12 09:06:11 +02:00
|
|
|
TeamID uuid.UUID `json:"teamID"`
|
|
|
|
UserID uuid.UUID `json:"userID"`
|
|
|
|
NewOwnerID *uuid.UUID `json:"newOwnerID"`
|
2020-07-05 01:02:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteTeamMemberPayload struct {
|
2020-07-12 09:06:11 +02:00
|
|
|
TeamID uuid.UUID `json:"teamID"`
|
|
|
|
UserID uuid.UUID `json:"userID"`
|
|
|
|
AffectedProjects []db.Project `json:"affectedProjects"`
|
2020-07-05 01:02:57 +02:00
|
|
|
}
|
|
|
|
|
2020-06-23 22:20:53 +02:00
|
|
|
type DeleteTeamPayload struct {
|
|
|
|
Ok bool `json:"ok"`
|
2020-07-05 01:02:57 +02:00
|
|
|
Team *db.Team `json:"team"`
|
|
|
|
Projects []db.Project `json:"projects"`
|
2020-06-23 22:20:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteUserAccount struct {
|
2020-07-18 04:55:38 +02:00
|
|
|
UserID uuid.UUID `json:"userID"`
|
|
|
|
NewOwnerID *uuid.UUID `json:"newOwnerID"`
|
2020-06-23 22:20:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteUserAccountPayload struct {
|
|
|
|
Ok bool `json:"ok"`
|
2020-07-05 01:02:57 +02:00
|
|
|
UserAccount *db.UserAccount `json:"userAccount"`
|
2020-06-23 22:20:53 +02:00
|
|
|
}
|
|
|
|
|
2020-09-11 01:15:06 +02:00
|
|
|
type DuplicateTaskGroup struct {
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
TaskGroupID uuid.UUID `json:"taskGroupID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Position float64 `json:"position"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DuplicateTaskGroupPayload struct {
|
|
|
|
TaskGroup *db.TaskGroup `json:"taskGroup"`
|
|
|
|
}
|
|
|
|
|
2020-04-10 04:40:22 +02:00
|
|
|
type FindProject struct {
|
2020-08-01 03:01:14 +02:00
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
|
|
|
|
2020-04-20 05:02:55 +02:00
|
|
|
type FindTask struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
}
|
|
|
|
|
2020-06-23 22:20:53 +02:00
|
|
|
type FindTeam struct {
|
|
|
|
TeamID uuid.UUID `json:"teamID"`
|
|
|
|
}
|
|
|
|
|
2020-04-10 04:40:22 +02:00
|
|
|
type FindUser struct {
|
2020-09-20 00:26:02 +02:00
|
|
|
UserID uuid.UUID `json:"userID"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
|
|
|
|
2020-10-21 01:52:09 +02:00
|
|
|
type InviteProjectMembers struct {
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
Members []MemberInvite `json:"members"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type InviteProjectMembersPayload struct {
|
|
|
|
Ok bool `json:"ok"`
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
Members []Member `json:"members"`
|
|
|
|
InvitedMembers []InvitedMember `json:"invitedMembers"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type InvitedMember struct {
|
|
|
|
Email string `json:"email"`
|
|
|
|
InvitedOn time.Time `json:"invitedOn"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type InvitedUserAccount struct {
|
|
|
|
ID uuid.UUID `json:"id"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
InvitedOn time.Time `json:"invitedOn"`
|
|
|
|
Member *MemberList `json:"member"`
|
|
|
|
}
|
|
|
|
|
2020-04-10 04:40:22 +02:00
|
|
|
type LogoutUser struct {
|
2020-09-20 00:26:02 +02:00
|
|
|
UserID uuid.UUID `json:"userID"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
|
|
|
|
2020-08-01 03:01:14 +02:00
|
|
|
type MePayload struct {
|
|
|
|
User *db.UserAccount `json:"user"`
|
2021-04-29 04:32:19 +02:00
|
|
|
Organization *RoleCode `json:"organization"`
|
2020-08-01 03:01:14 +02:00
|
|
|
TeamRoles []TeamRole `json:"teamRoles"`
|
|
|
|
ProjectRoles []ProjectRole `json:"projectRoles"`
|
|
|
|
}
|
|
|
|
|
2020-07-05 01:02:57 +02:00
|
|
|
type Member struct {
|
|
|
|
ID uuid.UUID `json:"id"`
|
|
|
|
Role *db.Role `json:"role"`
|
|
|
|
FullName string `json:"fullName"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
ProfileIcon *ProfileIcon `json:"profileIcon"`
|
2020-07-18 02:40:05 +02:00
|
|
|
Owned *OwnedList `json:"owned"`
|
|
|
|
Member *MemberList `json:"member"`
|
|
|
|
}
|
|
|
|
|
2020-10-21 01:52:09 +02:00
|
|
|
type MemberInvite struct {
|
|
|
|
UserID *uuid.UUID `json:"userID"`
|
|
|
|
Email *string `json:"email"`
|
|
|
|
}
|
|
|
|
|
2020-07-18 02:40:05 +02:00
|
|
|
type MemberList struct {
|
|
|
|
Teams []db.Team `json:"teams"`
|
|
|
|
Projects []db.Project `json:"projects"`
|
2020-07-05 01:02:57 +02:00
|
|
|
}
|
|
|
|
|
2020-10-21 01:52:09 +02:00
|
|
|
type MemberSearchFilter struct {
|
|
|
|
SearchFilter string `json:"searchFilter"`
|
|
|
|
ProjectID *uuid.UUID `json:"projectID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type MemberSearchResult struct {
|
|
|
|
Similarity int `json:"similarity"`
|
|
|
|
ID string `json:"id"`
|
|
|
|
User *db.UserAccount `json:"user"`
|
|
|
|
Status ShareStatus `json:"status"`
|
|
|
|
}
|
|
|
|
|
2020-12-31 03:56:59 +01:00
|
|
|
type MyTasks struct {
|
|
|
|
Status MyTasksStatus `json:"status"`
|
|
|
|
Sort MyTasksSort `json:"sort"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type MyTasksPayload struct {
|
|
|
|
Tasks []db.Task `json:"tasks"`
|
|
|
|
Projects []ProjectTaskMapping `json:"projects"`
|
|
|
|
}
|
|
|
|
|
2020-04-10 04:40:22 +02:00
|
|
|
type NewProject struct {
|
2020-09-20 03:20:36 +02:00
|
|
|
TeamID *uuid.UUID `json:"teamID"`
|
|
|
|
Name string `json:"name"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
|
|
|
|
2020-04-21 01:04:27 +02:00
|
|
|
type NewProjectLabel struct {
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
LabelColorID uuid.UUID `json:"labelColorID"`
|
|
|
|
Name *string `json:"name"`
|
|
|
|
}
|
|
|
|
|
2020-04-10 04:40:22 +02:00
|
|
|
type NewTask struct {
|
2020-12-31 03:56:59 +01:00
|
|
|
TaskGroupID uuid.UUID `json:"taskGroupID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Position float64 `json:"position"`
|
|
|
|
Assigned []uuid.UUID `json:"assigned"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type NewTaskGroup struct {
|
2020-09-20 00:26:02 +02:00
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Position float64 `json:"position"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
|
|
|
|
2020-04-11 04:47:43 +02:00
|
|
|
type NewTaskGroupLocation struct {
|
|
|
|
TaskGroupID uuid.UUID `json:"taskGroupID"`
|
|
|
|
Position float64 `json:"position"`
|
|
|
|
}
|
|
|
|
|
2020-04-10 04:40:22 +02:00
|
|
|
type NewTaskLocation struct {
|
2020-06-01 04:20:03 +02:00
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
TaskGroupID uuid.UUID `json:"taskGroupID"`
|
|
|
|
Position float64 `json:"position"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type NewTeam struct {
|
2020-06-21 00:49:11 +02:00
|
|
|
Name string `json:"name"`
|
|
|
|
OrganizationID uuid.UUID `json:"organizationID"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type NewUserAccount struct {
|
2020-06-13 00:21:58 +02:00
|
|
|
Username string `json:"username"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
FullName string `json:"fullName"`
|
|
|
|
Initials string `json:"initials"`
|
|
|
|
Password string `json:"password"`
|
2020-07-05 01:02:57 +02:00
|
|
|
RoleCode string `json:"roleCode"`
|
2020-04-20 05:02:55 +02:00
|
|
|
}
|
|
|
|
|
2021-10-26 21:42:04 +02:00
|
|
|
type NotificationCausedBy struct {
|
|
|
|
Fullname string `json:"fullname"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
ID uuid.UUID `json:"id"`
|
2020-08-13 03:54:14 +02:00
|
|
|
}
|
|
|
|
|
2021-10-26 21:42:04 +02:00
|
|
|
type NotificationData struct {
|
|
|
|
Key string `json:"key"`
|
|
|
|
Value string `json:"value"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Notified struct {
|
|
|
|
ID uuid.UUID `json:"id"`
|
|
|
|
Notification *db.Notification `json:"notification"`
|
|
|
|
Read bool `json:"read"`
|
2021-10-31 00:20:41 +02:00
|
|
|
ReadAt *time.Time `json:"readAt"`
|
2020-08-13 03:54:14 +02:00
|
|
|
}
|
|
|
|
|
2020-07-18 02:40:05 +02:00
|
|
|
type OwnedList struct {
|
|
|
|
Teams []db.Team `json:"teams"`
|
|
|
|
Projects []db.Project `json:"projects"`
|
|
|
|
}
|
|
|
|
|
2020-07-12 09:06:11 +02:00
|
|
|
type OwnersList struct {
|
|
|
|
Projects []uuid.UUID `json:"projects"`
|
|
|
|
Teams []uuid.UUID `json:"teams"`
|
|
|
|
}
|
|
|
|
|
2020-04-20 05:02:55 +02:00
|
|
|
type ProfileIcon struct {
|
|
|
|
URL *string `json:"url"`
|
|
|
|
Initials *string `json:"initials"`
|
2020-04-21 01:04:27 +02:00
|
|
|
BgColor *string `json:"bgColor"`
|
2020-04-20 05:02:55 +02:00
|
|
|
}
|
|
|
|
|
2021-04-29 04:32:19 +02:00
|
|
|
type ProjectPermission struct {
|
|
|
|
Team RoleCode `json:"team"`
|
|
|
|
Project RoleCode `json:"project"`
|
|
|
|
Org RoleCode `json:"org"`
|
|
|
|
}
|
|
|
|
|
2020-08-01 03:01:14 +02:00
|
|
|
type ProjectRole struct {
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
RoleCode RoleCode `json:"roleCode"`
|
|
|
|
}
|
|
|
|
|
2020-12-31 03:56:59 +01:00
|
|
|
type ProjectTaskMapping struct {
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
}
|
|
|
|
|
2020-04-10 04:40:22 +02:00
|
|
|
type ProjectsFilter struct {
|
2020-06-23 22:20:53 +02:00
|
|
|
TeamID *uuid.UUID `json:"teamID"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
|
|
|
|
2020-04-20 05:02:55 +02:00
|
|
|
type RemoveTaskLabelInput struct {
|
2020-09-20 00:26:02 +02:00
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
2020-04-20 05:02:55 +02:00
|
|
|
TaskLabelID uuid.UUID `json:"taskLabelID"`
|
|
|
|
}
|
|
|
|
|
2020-06-19 01:12:15 +02:00
|
|
|
type SetTaskChecklistItemComplete struct {
|
|
|
|
TaskChecklistItemID uuid.UUID `json:"taskChecklistItemID"`
|
|
|
|
Complete bool `json:"complete"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type SetTaskComplete struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
Complete bool `json:"complete"`
|
|
|
|
}
|
|
|
|
|
2020-09-11 01:15:06 +02:00
|
|
|
type SortTaskGroup struct {
|
|
|
|
TaskGroupID uuid.UUID `json:"taskGroupID"`
|
|
|
|
Tasks []TaskPositionUpdate `json:"tasks"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type SortTaskGroupPayload struct {
|
|
|
|
TaskGroupID uuid.UUID `json:"taskGroupID"`
|
|
|
|
Tasks []db.Task `json:"tasks"`
|
|
|
|
}
|
|
|
|
|
2020-12-19 03:34:35 +01:00
|
|
|
type TaskActivityData struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Value string `json:"value"`
|
|
|
|
}
|
|
|
|
|
2020-06-19 01:12:15 +02:00
|
|
|
type TaskBadges struct {
|
|
|
|
Checklist *ChecklistBadge `json:"checklist"`
|
2021-10-25 22:14:24 +02:00
|
|
|
Comments *CommentsBadge `json:"comments"`
|
2020-06-19 01:12:15 +02:00
|
|
|
}
|
|
|
|
|
2020-09-11 01:15:06 +02:00
|
|
|
type TaskPositionUpdate struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
Position float64 `json:"position"`
|
|
|
|
}
|
|
|
|
|
2021-04-29 04:32:19 +02:00
|
|
|
type TeamPermission struct {
|
|
|
|
Team RoleCode `json:"team"`
|
|
|
|
Org RoleCode `json:"org"`
|
|
|
|
}
|
|
|
|
|
2020-08-01 03:01:14 +02:00
|
|
|
type TeamRole struct {
|
|
|
|
TeamID uuid.UUID `json:"teamID"`
|
|
|
|
RoleCode RoleCode `json:"roleCode"`
|
|
|
|
}
|
|
|
|
|
2021-05-01 05:55:37 +02:00
|
|
|
type ToggleProjectVisibility struct {
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
IsPublic bool `json:"isPublic"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ToggleProjectVisibilityPayload struct {
|
|
|
|
Project *db.Project `json:"project"`
|
|
|
|
}
|
|
|
|
|
2020-05-31 06:11:19 +02:00
|
|
|
type ToggleTaskLabelInput struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
ProjectLabelID uuid.UUID `json:"projectLabelID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ToggleTaskLabelPayload struct {
|
|
|
|
Active bool `json:"active"`
|
2020-07-05 01:02:57 +02:00
|
|
|
Task *db.Task `json:"task"`
|
2020-05-31 06:11:19 +02:00
|
|
|
}
|
|
|
|
|
2020-04-21 01:04:27 +02:00
|
|
|
type UnassignTaskInput struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
UserID uuid.UUID `json:"userID"`
|
|
|
|
}
|
|
|
|
|
2020-05-28 03:12:50 +02:00
|
|
|
type UpdateProjectLabel struct {
|
|
|
|
ProjectLabelID uuid.UUID `json:"projectLabelID"`
|
|
|
|
LabelColorID uuid.UUID `json:"labelColorID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateProjectLabelColor struct {
|
|
|
|
ProjectLabelID uuid.UUID `json:"projectLabelID"`
|
|
|
|
LabelColorID uuid.UUID `json:"labelColorID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateProjectLabelName struct {
|
|
|
|
ProjectLabelID uuid.UUID `json:"projectLabelID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
2020-07-05 01:02:57 +02:00
|
|
|
type UpdateProjectMemberRole struct {
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
UserID uuid.UUID `json:"userID"`
|
|
|
|
RoleCode RoleCode `json:"roleCode"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateProjectMemberRolePayload struct {
|
|
|
|
Ok bool `json:"ok"`
|
|
|
|
Member *Member `json:"member"`
|
|
|
|
}
|
|
|
|
|
2020-05-31 06:11:19 +02:00
|
|
|
type UpdateProjectName struct {
|
|
|
|
ProjectID uuid.UUID `json:"projectID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
2020-07-12 09:06:11 +02:00
|
|
|
type UpdateTaskChecklistItemLocation struct {
|
2020-09-20 00:26:02 +02:00
|
|
|
TaskChecklistID uuid.UUID `json:"taskChecklistID"`
|
|
|
|
TaskChecklistItemID uuid.UUID `json:"taskChecklistItemID"`
|
|
|
|
Position float64 `json:"position"`
|
2020-07-12 09:06:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateTaskChecklistItemLocationPayload struct {
|
2020-09-20 00:26:02 +02:00
|
|
|
TaskChecklistID uuid.UUID `json:"taskChecklistID"`
|
2020-07-12 09:06:11 +02:00
|
|
|
PrevChecklistID uuid.UUID `json:"prevChecklistID"`
|
|
|
|
ChecklistItem *db.TaskChecklistItem `json:"checklistItem"`
|
|
|
|
}
|
|
|
|
|
2020-06-19 01:12:15 +02:00
|
|
|
type UpdateTaskChecklistItemName struct {
|
|
|
|
TaskChecklistItemID uuid.UUID `json:"taskChecklistItemID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
2020-07-12 09:06:11 +02:00
|
|
|
type UpdateTaskChecklistLocation struct {
|
2020-09-20 00:26:02 +02:00
|
|
|
TaskChecklistID uuid.UUID `json:"taskChecklistID"`
|
|
|
|
Position float64 `json:"position"`
|
2020-07-12 09:06:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateTaskChecklistLocationPayload struct {
|
|
|
|
Checklist *db.TaskChecklist `json:"checklist"`
|
|
|
|
}
|
|
|
|
|
2020-06-23 22:20:53 +02:00
|
|
|
type UpdateTaskChecklistName struct {
|
|
|
|
TaskChecklistID uuid.UUID `json:"taskChecklistID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
2020-12-19 03:34:35 +01:00
|
|
|
type UpdateTaskComment struct {
|
|
|
|
CommentID uuid.UUID `json:"commentID"`
|
|
|
|
Message string `json:"message"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateTaskCommentPayload struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
Comment *db.TaskComment `json:"comment"`
|
|
|
|
}
|
|
|
|
|
2020-04-20 05:02:55 +02:00
|
|
|
type UpdateTaskDescriptionInput struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
}
|
|
|
|
|
2020-06-16 00:36:59 +02:00
|
|
|
type UpdateTaskDueDate struct {
|
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
2021-01-01 21:51:40 +01:00
|
|
|
HasTime bool `json:"hasTime"`
|
2020-06-16 00:36:59 +02:00
|
|
|
DueDate *time.Time `json:"dueDate"`
|
|
|
|
}
|
|
|
|
|
2020-06-13 00:21:58 +02:00
|
|
|
type UpdateTaskGroupName struct {
|
|
|
|
TaskGroupID uuid.UUID `json:"taskGroupID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
2020-06-01 04:20:03 +02:00
|
|
|
type UpdateTaskLocationPayload struct {
|
|
|
|
PreviousTaskGroupID uuid.UUID `json:"previousTaskGroupID"`
|
2020-07-05 01:02:57 +02:00
|
|
|
Task *db.Task `json:"task"`
|
2020-06-01 04:20:03 +02:00
|
|
|
}
|
|
|
|
|
2020-04-10 04:40:22 +02:00
|
|
|
type UpdateTaskName struct {
|
2020-09-20 00:26:02 +02:00
|
|
|
TaskID uuid.UUID `json:"taskID"`
|
|
|
|
Name string `json:"name"`
|
2020-04-10 04:40:22 +02:00
|
|
|
}
|
2020-07-05 01:02:57 +02:00
|
|
|
|
|
|
|
type UpdateTeamMemberRole struct {
|
|
|
|
TeamID uuid.UUID `json:"teamID"`
|
|
|
|
UserID uuid.UUID `json:"userID"`
|
|
|
|
RoleCode RoleCode `json:"roleCode"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateTeamMemberRolePayload struct {
|
2020-08-01 03:01:14 +02:00
|
|
|
Ok bool `json:"ok"`
|
|
|
|
TeamID uuid.UUID `json:"teamID"`
|
|
|
|
Member *Member `json:"member"`
|
2020-07-05 01:02:57 +02:00
|
|
|
}
|
|
|
|
|
2020-09-11 20:54:43 +02:00
|
|
|
type UpdateUserInfo struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Initials string `json:"initials"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
Bio string `json:"bio"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateUserInfoPayload struct {
|
|
|
|
User *db.UserAccount `json:"user"`
|
|
|
|
}
|
|
|
|
|
2020-07-16 01:20:08 +02:00
|
|
|
type UpdateUserPassword struct {
|
|
|
|
UserID uuid.UUID `json:"userID"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateUserPasswordPayload struct {
|
|
|
|
Ok bool `json:"ok"`
|
|
|
|
User *db.UserAccount `json:"user"`
|
|
|
|
}
|
|
|
|
|
2020-07-12 09:06:11 +02:00
|
|
|
type UpdateUserRole struct {
|
|
|
|
UserID uuid.UUID `json:"userID"`
|
|
|
|
RoleCode RoleCode `json:"roleCode"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateUserRolePayload struct {
|
|
|
|
User *db.UserAccount `json:"user"`
|
|
|
|
}
|
|
|
|
|
2020-08-01 03:01:14 +02:00
|
|
|
type ActionLevel string
|
|
|
|
|
|
|
|
const (
|
|
|
|
ActionLevelOrg ActionLevel = "ORG"
|
|
|
|
ActionLevelTeam ActionLevel = "TEAM"
|
|
|
|
ActionLevelProject ActionLevel = "PROJECT"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllActionLevel = []ActionLevel{
|
|
|
|
ActionLevelOrg,
|
|
|
|
ActionLevelTeam,
|
|
|
|
ActionLevelProject,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ActionLevel) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case ActionLevelOrg, ActionLevelTeam, ActionLevelProject:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ActionLevel) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *ActionLevel) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = ActionLevel(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid ActionLevel", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ActionLevel) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
|
|
|
|
2020-08-13 03:54:14 +02:00
|
|
|
type ActionType string
|
|
|
|
|
|
|
|
const (
|
|
|
|
ActionTypeTaskMemberAdded ActionType = "TASK_MEMBER_ADDED"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllActionType = []ActionType{
|
|
|
|
ActionTypeTaskMemberAdded,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ActionType) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case ActionTypeTaskMemberAdded:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ActionType) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *ActionType) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = ActionType(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid ActionType", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ActionType) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
|
|
|
|
2020-12-19 03:34:35 +01:00
|
|
|
type ActivityType string
|
|
|
|
|
|
|
|
const (
|
|
|
|
ActivityTypeTaskAdded ActivityType = "TASK_ADDED"
|
|
|
|
ActivityTypeTaskMoved ActivityType = "TASK_MOVED"
|
|
|
|
ActivityTypeTaskMarkedComplete ActivityType = "TASK_MARKED_COMPLETE"
|
|
|
|
ActivityTypeTaskMarkedIncomplete ActivityType = "TASK_MARKED_INCOMPLETE"
|
|
|
|
ActivityTypeTaskDueDateChanged ActivityType = "TASK_DUE_DATE_CHANGED"
|
|
|
|
ActivityTypeTaskDueDateAdded ActivityType = "TASK_DUE_DATE_ADDED"
|
|
|
|
ActivityTypeTaskDueDateRemoved ActivityType = "TASK_DUE_DATE_REMOVED"
|
|
|
|
ActivityTypeTaskChecklistChanged ActivityType = "TASK_CHECKLIST_CHANGED"
|
|
|
|
ActivityTypeTaskChecklistAdded ActivityType = "TASK_CHECKLIST_ADDED"
|
|
|
|
ActivityTypeTaskChecklistRemoved ActivityType = "TASK_CHECKLIST_REMOVED"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllActivityType = []ActivityType{
|
|
|
|
ActivityTypeTaskAdded,
|
|
|
|
ActivityTypeTaskMoved,
|
|
|
|
ActivityTypeTaskMarkedComplete,
|
|
|
|
ActivityTypeTaskMarkedIncomplete,
|
|
|
|
ActivityTypeTaskDueDateChanged,
|
|
|
|
ActivityTypeTaskDueDateAdded,
|
|
|
|
ActivityTypeTaskDueDateRemoved,
|
|
|
|
ActivityTypeTaskChecklistChanged,
|
|
|
|
ActivityTypeTaskChecklistAdded,
|
|
|
|
ActivityTypeTaskChecklistRemoved,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ActivityType) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case ActivityTypeTaskAdded, ActivityTypeTaskMoved, ActivityTypeTaskMarkedComplete, ActivityTypeTaskMarkedIncomplete, ActivityTypeTaskDueDateChanged, ActivityTypeTaskDueDateAdded, ActivityTypeTaskDueDateRemoved, ActivityTypeTaskChecklistChanged, ActivityTypeTaskChecklistAdded, ActivityTypeTaskChecklistRemoved:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ActivityType) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *ActivityType) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = ActivityType(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid ActivityType", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ActivityType) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
|
|
|
|
2020-12-31 03:56:59 +01:00
|
|
|
type MyTasksSort string
|
|
|
|
|
|
|
|
const (
|
|
|
|
MyTasksSortNone MyTasksSort = "NONE"
|
|
|
|
MyTasksSortProject MyTasksSort = "PROJECT"
|
|
|
|
MyTasksSortDueDate MyTasksSort = "DUE_DATE"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllMyTasksSort = []MyTasksSort{
|
|
|
|
MyTasksSortNone,
|
|
|
|
MyTasksSortProject,
|
|
|
|
MyTasksSortDueDate,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e MyTasksSort) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case MyTasksSortNone, MyTasksSortProject, MyTasksSortDueDate:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e MyTasksSort) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *MyTasksSort) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = MyTasksSort(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid MyTasksSort", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e MyTasksSort) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
|
|
|
|
|
|
|
type MyTasksStatus string
|
|
|
|
|
|
|
|
const (
|
|
|
|
MyTasksStatusAll MyTasksStatus = "ALL"
|
|
|
|
MyTasksStatusIncomplete MyTasksStatus = "INCOMPLETE"
|
|
|
|
MyTasksStatusCompleteAll MyTasksStatus = "COMPLETE_ALL"
|
|
|
|
MyTasksStatusCompleteToday MyTasksStatus = "COMPLETE_TODAY"
|
|
|
|
MyTasksStatusCompleteYesterday MyTasksStatus = "COMPLETE_YESTERDAY"
|
|
|
|
MyTasksStatusCompleteOneWeek MyTasksStatus = "COMPLETE_ONE_WEEK"
|
|
|
|
MyTasksStatusCompleteTwoWeek MyTasksStatus = "COMPLETE_TWO_WEEK"
|
|
|
|
MyTasksStatusCompleteThreeWeek MyTasksStatus = "COMPLETE_THREE_WEEK"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllMyTasksStatus = []MyTasksStatus{
|
|
|
|
MyTasksStatusAll,
|
|
|
|
MyTasksStatusIncomplete,
|
|
|
|
MyTasksStatusCompleteAll,
|
|
|
|
MyTasksStatusCompleteToday,
|
|
|
|
MyTasksStatusCompleteYesterday,
|
|
|
|
MyTasksStatusCompleteOneWeek,
|
|
|
|
MyTasksStatusCompleteTwoWeek,
|
|
|
|
MyTasksStatusCompleteThreeWeek,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e MyTasksStatus) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case MyTasksStatusAll, MyTasksStatusIncomplete, MyTasksStatusCompleteAll, MyTasksStatusCompleteToday, MyTasksStatusCompleteYesterday, MyTasksStatusCompleteOneWeek, MyTasksStatusCompleteTwoWeek, MyTasksStatusCompleteThreeWeek:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e MyTasksStatus) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *MyTasksStatus) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = MyTasksStatus(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid MyTasksStatus", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e MyTasksStatus) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
|
|
|
|
2020-08-01 03:01:14 +02:00
|
|
|
type ObjectType string
|
|
|
|
|
|
|
|
const (
|
2020-09-20 00:26:02 +02:00
|
|
|
ObjectTypeOrg ObjectType = "ORG"
|
|
|
|
ObjectTypeTeam ObjectType = "TEAM"
|
|
|
|
ObjectTypeProject ObjectType = "PROJECT"
|
|
|
|
ObjectTypeTask ObjectType = "TASK"
|
|
|
|
ObjectTypeTaskGroup ObjectType = "TASK_GROUP"
|
|
|
|
ObjectTypeTaskChecklist ObjectType = "TASK_CHECKLIST"
|
|
|
|
ObjectTypeTaskChecklistItem ObjectType = "TASK_CHECKLIST_ITEM"
|
2020-08-01 03:01:14 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
var AllObjectType = []ObjectType{
|
|
|
|
ObjectTypeOrg,
|
|
|
|
ObjectTypeTeam,
|
|
|
|
ObjectTypeProject,
|
|
|
|
ObjectTypeTask,
|
2020-09-20 00:26:02 +02:00
|
|
|
ObjectTypeTaskGroup,
|
|
|
|
ObjectTypeTaskChecklist,
|
|
|
|
ObjectTypeTaskChecklistItem,
|
2020-08-01 03:01:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (e ObjectType) IsValid() bool {
|
|
|
|
switch e {
|
2020-09-20 00:26:02 +02:00
|
|
|
case ObjectTypeOrg, ObjectTypeTeam, ObjectTypeProject, ObjectTypeTask, ObjectTypeTaskGroup, ObjectTypeTaskChecklist, ObjectTypeTaskChecklistItem:
|
2020-08-01 03:01:14 +02:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ObjectType) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *ObjectType) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = ObjectType(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid ObjectType", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ObjectType) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
|
|
|
|
2020-07-05 01:02:57 +02:00
|
|
|
type RoleCode string
|
|
|
|
|
|
|
|
const (
|
|
|
|
RoleCodeOwner RoleCode = "owner"
|
|
|
|
RoleCodeAdmin RoleCode = "admin"
|
|
|
|
RoleCodeMember RoleCode = "member"
|
|
|
|
RoleCodeObserver RoleCode = "observer"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllRoleCode = []RoleCode{
|
|
|
|
RoleCodeOwner,
|
|
|
|
RoleCodeAdmin,
|
|
|
|
RoleCodeMember,
|
|
|
|
RoleCodeObserver,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e RoleCode) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case RoleCodeOwner, RoleCodeAdmin, RoleCodeMember, RoleCodeObserver:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e RoleCode) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *RoleCode) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = RoleCode(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid RoleCode", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e RoleCode) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
2020-08-01 03:01:14 +02:00
|
|
|
|
|
|
|
type RoleLevel string
|
|
|
|
|
|
|
|
const (
|
|
|
|
RoleLevelAdmin RoleLevel = "ADMIN"
|
|
|
|
RoleLevelMember RoleLevel = "MEMBER"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllRoleLevel = []RoleLevel{
|
|
|
|
RoleLevelAdmin,
|
|
|
|
RoleLevelMember,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e RoleLevel) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case RoleLevelAdmin, RoleLevelMember:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e RoleLevel) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *RoleLevel) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = RoleLevel(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid RoleLevel", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e RoleLevel) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
2020-10-21 01:52:09 +02:00
|
|
|
|
|
|
|
type ShareStatus string
|
|
|
|
|
|
|
|
const (
|
|
|
|
ShareStatusInvited ShareStatus = "INVITED"
|
|
|
|
ShareStatusJoined ShareStatus = "JOINED"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllShareStatus = []ShareStatus{
|
|
|
|
ShareStatusInvited,
|
|
|
|
ShareStatusJoined,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ShareStatus) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case ShareStatusInvited, ShareStatusJoined:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ShareStatus) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *ShareStatus) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = ShareStatus(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid ShareStatus", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ShareStatus) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|