use serde::Deserialize; use uuid::Uuid; #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceNameArgs { pub space: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoRefArgs { pub space: String, pub repo: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct UserRefArgs { #[serde(default)] pub user_id: Option, #[serde(default)] pub username: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct UserIdsArgs { pub ids: Vec, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct SpaceListArgs { #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct SpaceExploreArgs { #[serde(default)] pub q: Option, #[serde(default)] pub sort: Option, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceCreateArgs { pub name: String, #[serde(default)] pub description: Option, #[serde(default)] pub is_private: bool, #[serde(default)] pub allow_join: Option, #[serde(default)] pub allow_invite: Option, #[serde(default)] pub welcome_message: Option, #[serde(default)] pub allow_join_level: Option, #[serde(default)] pub member_must_enable_2fa: bool, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceUpdateArgs { pub space: String, #[serde(default)] pub name: Option, #[serde(default)] pub description: Option, #[serde(default)] pub is_private: Option, #[serde(default)] pub allow_join: Option, #[serde(default)] pub allow_invite: Option, #[serde(default)] pub welcome_message: Option, #[serde(default)] pub allow_join_level: Option, #[serde(default)] pub member_must_enable_2fa: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceMemberListArgs { pub space: String, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceMemberAddArgs { pub space: String, pub user_id: i64, #[serde(default)] pub alias_name: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceMemberUpdateArgs { pub space: String, pub user_id: i64, #[serde(default)] pub alias_name: Option, #[serde(default)] pub muted: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceMemberRefArgs { pub space: String, pub user_id: i64, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceGroupListArgs { pub space: String, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceGroupCreateArgs { pub space: String, pub name: String, #[serde(default)] pub color: Option, #[serde(default)] pub position: Option, #[serde(default)] pub permissions: Vec, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceGroupUpdateArgs { pub space: String, pub group_id: Uuid, #[serde(default)] pub name: Option, #[serde(default)] pub color: Option, #[serde(default)] pub position: Option, #[serde(default)] pub permissions: Option>, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceGroupRefArgs { pub space: String, pub group_id: Uuid, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceGroupAssignArgs { pub space: String, pub user_id: i64, pub group_id: Uuid, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceDirTreeArgs { pub space: String, #[serde(default)] pub parent_id: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceDirCreateArgs { pub space: String, pub name: String, #[serde(default)] pub parent_id: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceDirUpdateArgs { pub space: String, pub dir_id: Uuid, pub name: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceDirMoveArgs { pub space: String, pub dir_id: Uuid, #[serde(default)] pub parent_id: Option, #[serde(default)] pub position: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceInviteListArgs { pub space: String, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceInviteCreateArgs { pub space: String, #[serde(default)] pub user_id: Option, #[serde(default)] pub email: Option, #[serde(default)] pub group_ids: Vec, #[serde(default)] pub expires_at: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceInviteRefArgs { pub space: String, pub invite_id: Uuid, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceJoinRequestListArgs { pub space: String, #[serde(default)] pub status: Option, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceJoinRequestCreateArgs { pub space: String, #[serde(default)] pub note: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct SpaceJoinRequestRefArgs { pub space: String, pub request_id: Uuid, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct RepoListArgs { pub space: String, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, #[serde(default)] pub sort: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoCreateArgs { pub space: String, pub name: String, #[serde(default)] pub description: Option, #[serde(default)] pub is_private: bool, #[serde(default)] pub default_branch: Option, #[serde(default)] pub parent_dir_id: Option, #[serde(default)] pub enable_lfs: bool, #[serde(default)] pub license_name: Option, #[serde(default)] pub init_message: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoUpdateArgs { pub space: String, pub repo: String, #[serde(default)] pub description: Option, #[serde(default)] pub website: Option, #[serde(default)] pub is_private: Option, #[serde(default)] pub enable_lfs: Option, #[serde(default)] pub default_branch: Option, #[serde(default)] pub ai_review_on_push: Option, #[serde(default)] pub ai_summary_on_push: Option, #[serde(default)] pub ai_review_on_pull: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoArchiveArgs { pub space: String, pub repo: String, pub archived: bool, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoBranchGetArgs { pub space: String, pub repo: String, pub branch: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoBranchCreateArgs { pub space: String, pub repo: String, pub name: String, #[serde(default)] pub start_point: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoBranchRenameArgs { pub space: String, pub repo: String, pub from: String, pub to: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoBranchDeleteArgs { pub space: String, pub repo: String, pub name: String, #[serde(default)] pub force: bool, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoBranchDefaultArgs { pub space: String, pub repo: String, pub name: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoTagGetArgs { pub space: String, pub repo: String, pub tag: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoTagCreateArgs { pub space: String, pub repo: String, pub name: String, pub target: String, #[serde(default)] pub message: Option, #[serde(default)] pub annotated: bool, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoTagDeleteArgs { pub space: String, pub repo: String, pub name: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoCommitListArgs { pub space: String, pub repo: String, #[serde(default)] pub revision: Option, #[serde(default)] pub path: Option, #[serde(default)] pub max_count: Option, #[serde(default)] pub skip: Option, #[serde(default)] pub first_parent: bool, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoCommitGetArgs { pub space: String, pub repo: String, pub revision: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoTreeArgs { pub space: String, pub repo: String, #[serde(default)] pub revision: Option, #[serde(default)] pub path: Option, #[serde(default)] pub recurse: bool, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoFileArgs { pub space: String, pub repo: String, pub path: String, #[serde(default)] pub revision: Option, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct RepoReleaseListArgs { pub space: String, pub repo: String, #[serde(default)] pub draft: Option, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoReleaseGetArgs { pub space: String, pub repo: String, pub tag: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoReleaseCreateArgs { pub space: String, pub repo: String, pub tag_name: String, #[serde(default)] pub target: Option, #[serde(default)] pub title: Option, #[serde(default)] pub content: Option, #[serde(default)] pub is_draft: Option, #[serde(default)] pub is_prerelease: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoReleaseUpdateArgs { pub space: String, pub repo: String, pub tag: String, #[serde(default)] pub title: Option, #[serde(default)] pub content: Option, #[serde(default)] pub is_draft: Option, #[serde(default)] pub is_prerelease: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoReleaseDeleteArgs { pub space: String, pub repo: String, pub tag: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoTopicArgs { pub space: String, pub repo: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoTopicChangeArgs { pub space: String, pub repo: String, pub topic: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoWatchArgs { pub space: String, pub repo: String, pub mode: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoStargazerListArgs { pub space: String, pub repo: String, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct RepoWatcherListArgs { pub space: String, pub repo: String, #[serde(default)] pub mode: Option, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct IssueBoardListArgs { pub space: String, #[serde(default)] pub dir_id: Option, #[serde(default)] pub q: Option, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueBoardCreateArgs { pub space: String, pub name: String, #[serde(default)] pub parent_dir_id: Option, /// Number prefix for the board's issues (`CAD` renders as `CAD-12`). #[serde(default)] pub prefix: Option, #[serde(default)] pub icon: Option, #[serde(default)] pub description: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueBoardUpdateArgs { pub space: String, pub board_id: Uuid, #[serde(default)] pub name: Option, /// Number prefix; `""` clears it. #[serde(default)] pub prefix: Option, #[serde(default)] pub icon: Option, #[serde(default)] pub description: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueBoardRefArgs { pub space: String, pub board_id: Uuid, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct IssueListArgs { pub space: String, pub board_id: Uuid, #[serde(default)] pub state: Option, #[serde(default)] pub author_id: Option, #[serde(default)] pub milestone_id: Option, #[serde(default)] pub label_id: Option, #[serde(default)] pub assignee_id: Option, #[serde(default)] pub priority: Option, #[serde(default)] pub sort: Option, #[serde(default)] pub q: Option, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueRefArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueCreateArgs { pub space: String, pub board_id: Uuid, pub title: String, #[serde(default)] pub description: Option, #[serde(default)] pub content: Option, #[serde(default)] pub milestone_id: Option, #[serde(default)] pub priority: Option, #[serde(default)] pub due_at: Option, #[serde(default)] pub assignee_ids: Vec, #[serde(default)] pub label_ids: Vec, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueUpdateArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, #[serde(default)] pub title: Option, #[serde(default)] pub description: Option, #[serde(default)] pub content: Option, #[serde(default)] pub milestone_id: Option, #[serde(default)] pub priority: Option, #[serde(default)] pub due_at: Option, #[serde(default)] pub assignee_ids: Option>, #[serde(default)] pub label_ids: Option>, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct IssueCommentListArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, #[serde(default)] pub parent_id: Option, #[serde(default)] pub sort: Option, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueCommentCreateArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, pub content: String, #[serde(default)] pub parent_id: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueCommentUpdateArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, pub comment_id: Uuid, pub content: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueCommentRefArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, pub comment_id: Uuid, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct IssueLabelListArgs { pub space: String, pub board_id: Uuid, #[serde(default)] pub q: Option, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueLabelCreateArgs { pub space: String, pub board_id: Uuid, pub name: String, pub color: String, #[serde(default)] pub exclusive: Option, #[serde(default)] pub description: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueLabelUpdateArgs { pub space: String, pub board_id: Uuid, pub label_id: Uuid, #[serde(default)] pub name: Option, #[serde(default)] pub color: Option, #[serde(default)] pub exclusive: Option, #[serde(default)] pub description: Option, #[serde(default)] pub is_archived: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueLabelRefArgs { pub space: String, pub board_id: Uuid, pub label_id: Uuid, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueLabelBindArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, pub label_id: Uuid, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct IssueMilestoneListArgs { pub space: String, pub board_id: Uuid, #[serde(default)] pub is_closed: Option, #[serde(default)] pub q: Option, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueMilestoneCreateArgs { pub space: String, pub board_id: Uuid, pub name: String, #[serde(default)] pub description: Option, #[serde(default)] pub due_at: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueMilestoneUpdateArgs { pub space: String, pub board_id: Uuid, pub milestone_id: Uuid, #[serde(default)] pub name: Option, #[serde(default)] pub description: Option, #[serde(default)] pub due_at: Option, #[serde(default)] pub is_closed: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueMilestoneRefArgs { pub space: String, pub board_id: Uuid, pub milestone_id: Uuid, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct IssueMemberListArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueMemberCreateArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, pub user_id: i64, pub kind: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueMemberRefArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, pub member_id: Uuid, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssuePinListArgs { pub space: String, pub board_id: Uuid, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssuePinCreateArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, #[serde(default)] pub pin_order: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssuePinUpdateArgs { pub space: String, pub board_id: Uuid, pub pin_id: Uuid, pub pin_order: i32, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssuePinRefArgs { pub space: String, pub board_id: Uuid, pub pin_id: Uuid, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueDependencyListArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueDependencyCreateArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, pub dependency_id: Uuid, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct IssueDependencyRefArgs { pub space: String, pub board_id: Uuid, pub issue_id: String, pub dep_id: Uuid, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullListArgs { pub space: String, pub repo: String, #[serde(default)] pub state: Option, #[serde(default)] pub author: Option, #[serde(default)] pub base: Option, #[serde(default)] pub head: Option, #[serde(default)] pub draft: Option, #[serde(default)] pub search: Option, #[serde(default)] pub sort: Option, #[serde(default)] pub order: Option, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullCreateArgs { pub space: String, pub repo: String, pub title: String, pub head_branch: String, #[serde(default)] pub body: Option, #[serde(default)] pub base_branch: Option, #[serde(default)] pub draft: Option, #[serde(default)] pub issue_id: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullRefArgs { pub space: String, pub repo: String, pub pull: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullUpdateArgs { pub space: String, pub repo: String, pub pull: String, #[serde(default)] pub title: Option, #[serde(default)] pub body: Option, #[serde(default)] pub base_branch: Option, #[serde(default)] pub draft: Option, #[serde(default)] pub auto_merge: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullMergeArgs { pub space: String, pub repo: String, pub pull: String, #[serde(default)] pub method: Option, #[serde(default)] pub title: Option, #[serde(default)] pub message: Option, #[serde(default)] pub fast_forward_only: Option, #[serde(default)] pub expect_head_sha: Option, #[serde(default)] pub delete_branch_after_merge: Option, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct PullCommentListArgs { pub space: String, pub repo: String, pub pull: String, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullCommentCreateArgs { pub space: String, pub repo: String, pub pull: String, pub body: String, #[serde(default)] pub path: Option, #[serde(default)] pub line: Option, #[serde(default)] pub side: Option, #[serde(default)] pub commit_sha: Option, #[serde(default)] pub parent_comment_id: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullCommentUpdateArgs { pub space: String, pub repo: String, pub pull: String, pub comment_id: Uuid, pub body: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullCommentRefArgs { pub space: String, pub repo: String, pub pull: String, pub comment_id: Uuid, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullCommentResolveArgs { pub space: String, pub repo: String, pub pull: String, pub comment_id: Uuid, pub resolved: bool, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullReviewsArgs { pub space: String, pub repo: String, pub pull: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullReviewSubmitArgs { pub space: String, pub repo: String, pub pull: String, pub state: String, #[serde(default)] pub body: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullReviewDismissArgs { pub space: String, pub repo: String, pub pull: String, pub review_id: Uuid, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullReviewerRequestArgs { pub space: String, pub repo: String, pub pull: String, pub reviewers: Vec, #[serde(default)] pub required: Option, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullReviewerCancelArgs { pub space: String, pub repo: String, pub pull: String, pub reviewer_id: i64, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullAssigneeArgs { pub space: String, pub repo: String, pub pull: String, pub user: String, } #[derive(Debug, Deserialize, schemars::JsonSchema)] pub struct PullLabelArgs { pub space: String, pub repo: String, pub pull: String, pub label: String, } #[derive(Debug, Default, Deserialize, schemars::JsonSchema)] pub struct PullInboxArgs { /// created | review-requested | reviewed pub scope: String, #[serde(default)] pub state: Option, #[serde(default)] pub limit: Option, #[serde(default)] pub offset: Option, }