1#![allow(clippy::too_many_arguments)]
9use super::inputs::*;
10use super::queries::*;
11use super::types::*;
12use crate::client::Client;
13use crate::error::LinearError;
14impl Client {
15 pub fn workflow_states(&self) -> WorkflowStatesQueryBuilder<'_> {
17 crate::generated::queries::workflow_states(self)
18 }
19 pub fn users(&self) -> UsersQueryBuilder<'_> {
21 crate::generated::queries::users(self)
22 }
23 pub async fn whoami(&self) -> Result<User, LinearError> {
25 crate::generated::queries::whoami(self).await
26 }
27 pub fn projects(&self) -> ProjectsQueryBuilder<'_> {
29 crate::generated::queries::projects(self)
30 }
31 pub async fn project(&self, id: String) -> Result<Project, LinearError> {
33 crate::generated::queries::project(self, id).await
34 }
35 pub fn teams(&self) -> TeamsQueryBuilder<'_> {
37 crate::generated::queries::teams(self)
38 }
39 pub async fn team(&self, id: String) -> Result<Team, LinearError> {
41 crate::generated::queries::team(self, id).await
42 }
43 pub fn search_issues(&self, term: impl Into<String>) -> SearchIssuesQueryBuilder<'_> {
45 crate::generated::queries::search_issues(self, term)
46 }
47 pub fn issues(&self) -> IssuesQueryBuilder<'_> {
49 crate::generated::queries::issues(self)
50 }
51 pub async fn issue(&self, id: String) -> Result<Issue, LinearError> {
53 crate::generated::queries::issue(self, id).await
54 }
55 pub fn issue_relations(&self) -> IssueRelationsQueryBuilder<'_> {
57 crate::generated::queries::issue_relations(self)
58 }
59 pub async fn issue_relation(&self, id: String) -> Result<IssueRelation, LinearError> {
61 crate::generated::queries::issue_relation(self, id).await
62 }
63 pub fn issue_labels(&self) -> IssueLabelsQueryBuilder<'_> {
65 crate::generated::queries::issue_labels(self)
66 }
67 pub fn documents(&self) -> DocumentsQueryBuilder<'_> {
69 crate::generated::queries::documents(self)
70 }
71 pub async fn document(&self, id: String) -> Result<Document, LinearError> {
73 crate::generated::queries::document(self, id).await
74 }
75 pub fn cycles(&self) -> CyclesQueryBuilder<'_> {
77 crate::generated::queries::cycles(self)
78 }
79 pub async fn cycle(&self, id: String) -> Result<Cycle, LinearError> {
81 crate::generated::queries::cycle(self, id).await
82 }
83 pub async fn file_upload(
85 &self,
86 meta_data: Option<serde_json::Value>,
87 make_public: Option<bool>,
88 size: i64,
89 content_type: String,
90 filename: String,
91 ) -> Result<serde_json::Value, LinearError> {
92 crate::generated::mutations::file_upload(
93 self,
94 meta_data,
95 make_public,
96 size,
97 content_type,
98 filename,
99 )
100 .await
101 }
102 pub async fn image_upload_from_url(
104 &self,
105 url: String,
106 ) -> Result<serde_json::Value, LinearError> {
107 crate::generated::mutations::image_upload_from_url(self, url).await
108 }
109 pub async fn issue_create(
111 &self,
112 input: IssueCreateInput,
113 ) -> Result<serde_json::Value, LinearError> {
114 crate::generated::mutations::issue_create(self, input).await
115 }
116 pub async fn issue_update(
118 &self,
119 input: IssueUpdateInput,
120 id: String,
121 ) -> Result<serde_json::Value, LinearError> {
122 crate::generated::mutations::issue_update(self, input, id).await
123 }
124 pub async fn issue_archive(
126 &self,
127 trash: Option<bool>,
128 id: String,
129 ) -> Result<serde_json::Value, LinearError> {
130 crate::generated::mutations::issue_archive(self, trash, id).await
131 }
132 pub async fn issue_unarchive(&self, id: String) -> Result<serde_json::Value, LinearError> {
134 crate::generated::mutations::issue_unarchive(self, id).await
135 }
136 pub async fn issue_delete(
138 &self,
139 permanently_delete: Option<bool>,
140 id: String,
141 ) -> Result<serde_json::Value, LinearError> {
142 crate::generated::mutations::issue_delete(self, permanently_delete, id).await
143 }
144 pub async fn issue_relation_create(
146 &self,
147 override_created_at: Option<serde_json::Value>,
148 input: IssueRelationCreateInput,
149 ) -> Result<serde_json::Value, LinearError> {
150 crate::generated::mutations::issue_relation_create(self, override_created_at, input).await
151 }
152 pub async fn document_create(
154 &self,
155 input: DocumentCreateInput,
156 ) -> Result<serde_json::Value, LinearError> {
157 crate::generated::mutations::document_create(self, input).await
158 }
159 pub async fn document_update(
161 &self,
162 input: DocumentUpdateInput,
163 id: String,
164 ) -> Result<serde_json::Value, LinearError> {
165 crate::generated::mutations::document_update(self, input, id).await
166 }
167 pub async fn document_delete(&self, id: String) -> Result<serde_json::Value, LinearError> {
169 crate::generated::mutations::document_delete(self, id).await
170 }
171 pub async fn comment_create(
173 &self,
174 input: CommentCreateInput,
175 ) -> Result<serde_json::Value, LinearError> {
176 crate::generated::mutations::comment_create(self, input).await
177 }
178}