1use chrono::DateTime;
2use chrono::Utc;
3use uuid::Uuid;
4
5#[derive(Clone, Deserialize, Serialize, Debug)]
6pub struct Branch {
7 pub created_at: Option<DateTime<Utc>>,
8 pub deleted: bool,
9 pub entity_type: String,
10 pub id: Option<u64>,
11 pub merged_branch_ids: Vec<u64>,
12 pub name: String,
13 pub persistent: bool,
14 pub pull_requests: Vec<PullRequest>,
15 pub repository_id: Option<u64>,
16 pub updated_at: Option<DateTime<Utc>>,
17 pub url: String,
18}
19
20#[derive(Clone, Deserialize, Serialize, Debug)]
21pub struct Category {
22 pub archived: bool,
23 pub color: Option<String>,
24 pub created_at: DateTime<Utc>,
25 pub entity_type: String,
26 pub external_id: Option<String>,
27 pub id: u64,
28 pub name: String,
29 #[serde(rename = "type")]
30 pub category_type: String,
31 pub updated_at: DateTime<Utc>,
32}
33
34#[derive(Clone, Deserialize, Serialize, Debug)]
35pub struct Comment {
36 pub author_id: Option<Uuid>,
37 pub created_at: DateTime<Utc>,
38 pub entity_type: String,
39 pub external_id: Option<String>,
40 pub id: u64,
41 pub mention_ids: Vec<Uuid>,
42 pub position: u64,
43 pub story_id: u64,
44 pub text: String,
45 pub updated_at: Option<DateTime<Utc>>,
46}
47
48#[derive(Clone, Deserialize, Serialize, Debug)]
49pub struct Commit {
50 pub author_email: String,
51 pub author_id: Option<Uuid>,
52 pub author_identity: Identity,
53 pub created_at: DateTime<Utc>,
54 pub entity_type: String,
55 pub hash: String,
56 pub id: Option<u64>,
57 pub merged_branch_ids: Vec<u64>,
58 pub message: String,
59 pub repository_id: Option<u64>,
60 pub timestamp: DateTime<Utc>,
61 pub updated_at: Option<DateTime<Utc>>,
62 pub url: String,
63}
64
65#[derive(Clone, Deserialize, Serialize, Debug)]
66pub struct CreateCategoryParams {
67 pub color: String,
68 pub external_id: String,
69 pub name: String,
70}
71
72#[derive(Clone, Deserialize, Serialize, Debug)]
73pub struct CreateCommentParams {
74 pub author_id: Uuid,
75 pub created_at: DateTime<Utc>,
76 pub external_id: String,
77 pub text: String,
78 pub updated_at: DateTime<Utc>,
79}
80
81#[derive(Clone, Deserialize, Serialize, Debug)]
82pub struct CreateLabelParams {
83 pub color: String,
84 pub external_id: String,
85 pub name: String,
86}
87
88#[derive(Clone, Deserialize, Serialize, Debug)]
89pub struct CreateStoryLinkParams {
90 pub object_id: u64,
91 pub subject_id: u64,
92 pub verb: StoryLinkType,
93}
94
95#[derive(Clone, Deserialize, Serialize, Debug)]
96pub struct CreateStoryParams {
97 pub comments: Vec<CreateCommentParams>,
98 pub completed_at_override: DateTime<Utc>,
99 pub created_at: DateTime<Utc>,
100 pub deadline: Option<DateTime<Utc>>,
101 pub description: String,
102 pub epic_id: Option<u64>,
103 pub estimate: Option<u64>,
104 pub external_id: String,
105 pub file_ids: Vec<u64>,
106 pub follower_ids: Vec<Uuid>,
107 pub labels: Vec<CreateLabelParams>,
108 pub linked_file_ids: Vec<u64>,
109 pub name: String,
110 pub owner_ids: Vec<Uuid>,
111 pub project_id: u64,
112 pub requested_by_id: Uuid,
113 pub started_at_override: DateTime<Utc>,
114 pub story_links: Vec<CreateStoryLinkParams>,
115 pub story_type: StoryType,
116 pub tasks: Vec<CreateTaskParams>,
117 pub updated_at: DateTime<Utc>,
118 pub workflow_state_id: u64,
119}
120
121#[derive(Clone, Deserialize, Serialize, Debug)]
122pub struct CreateTaskParams {
123 pub complete: bool,
124 pub created_at: DateTime<Utc>,
125 pub description: String,
126 pub external_id: String,
127 pub owner_ids: Vec<Uuid>,
128 pub updated_at: DateTime<Utc>,
129}
130
131#[derive(Clone, Deserialize, Serialize, Debug)]
132pub struct Epic {
133 pub archived: bool,
134 pub comments: Vec<ThreadedComment>,
135 pub completed: bool,
136 pub completed_at: Option<DateTime<Utc>>,
137 pub completed_at_override: Option<DateTime<Utc>>,
138 pub created_at: Option<DateTime<Utc>>,
139 pub deadline: Option<DateTime<Utc>>,
140 pub description: String,
141 pub entity_type: String,
142 pub epic_state_id: u64,
143 pub external_id: Option<String>,
144 pub follower_ids: Vec<Uuid>,
145 pub id: u64,
146 pub labels: Vec<Label>,
147 pub mention_ids: Vec<Uuid>,
148 pub milestone_id: Option<u64>,
149 pub name: String,
150 pub owner_ids: Vec<Uuid>,
151 pub position: u64,
152 pub project_ids: Vec<u64>,
153 pub requested_by_id: Uuid,
154 pub started: bool,
155 pub started_at: Option<DateTime<Utc>>,
156 pub started_at_override: Option<DateTime<Utc>>,
157 pub stats: EpicStats,
158 pub updated_at: Option<DateTime<Utc>>,
159}
160
161#[derive(Clone, Deserialize, Serialize, Debug)]
162pub struct EpicState {
163 pub color: String,
164 pub created_at: DateTime<Utc>,
165 pub description: String,
166 pub entity_type: String,
167 pub id: u64,
168 pub name: String,
169 pub position: u64,
170 #[serde(rename = "type")]
171 pub epic_state_type: String,
172 pub updated_at: DateTime<Utc>,
173}
174
175#[derive(Clone, Deserialize, Serialize, Debug)]
176pub struct EpicStats {
177 pub last_story_update: Option<DateTime<Utc>>,
178 pub num_points: u64,
179 pub num_points_done: u64,
180 pub num_points_started: u64,
181 pub num_points_unstarted: u64,
182 pub num_stories_done: u64,
183 pub num_stories_started: u64,
184 pub num_stories_unestimated: u64,
185 pub num_stories_unstarted: u64,
186}
187
188#[derive(Clone, Deserialize, Serialize, Debug)]
189pub struct EpicWorkflow {
190 pub created_at: DateTime<Utc>,
191 pub default_epic_state_id: u64,
192 pub entity_type: String,
193 pub epic_states: Vec<EpicState>,
194 pub id: u64,
195 pub updated_at: DateTime<Utc>,
196}
197
198#[derive(Clone, Deserialize, Serialize, Debug)]
199pub struct File {
200 pub content_type: String,
201 pub created_at: DateTime<Utc>,
202 pub description: Option<String>,
203 pub entity_type: String,
204 pub external_id: Option<String>,
205 pub filename: String,
206 pub id: u64,
207 pub mention_ids: Vec<Uuid>,
208 pub name: String,
209 pub size: u64,
210 pub story_ids: Vec<u64>,
211 pub thumbnail_url: Option<String>,
212 pub updated_at: Option<DateTime<Utc>>,
213 pub uploader_id: Uuid,
214 pub url: Option<String>,
215}
216
217#[derive(Clone, Deserialize, Serialize, Debug)]
218pub struct Icon {
219 pub created_at: DateTime<Utc>,
220 pub entity_type: String,
221 pub id: Uuid,
222 pub updated_at: DateTime<Utc>,
223 pub url: String,
224}
225
226#[derive(Clone, Deserialize, Serialize, Debug)]
227pub struct Identity {
228 pub entity_type: String,
229 pub name: Option<String>,
230 #[serde(rename = "type")]
231 pub identity_type: Option<String>,
232}
233
234#[derive(Clone, Deserialize, Serialize, Debug)]
235pub struct Label {
236 pub archived: bool,
237 pub color: Option<String>,
238 pub created_at: Option<DateTime<Utc>>,
239 pub entity_type: String,
240 pub external_id: Option<String>,
241 pub id: u64,
242 pub name: String,
243 pub stats: Option<LabelStats>,
244 pub updated_at: Option<DateTime<Utc>>,
245}
246
247#[derive(Clone, Deserialize, Serialize, Debug)]
248pub struct LabelStats {
249 pub num_epics: u64,
250 pub num_points_completed: u64,
251 pub num_points_in_progress: u64,
252 pub num_points_total: u64,
253 pub num_stories_completed: u64,
254 pub num_stories_in_progress: u64,
255 pub num_stories_total: u64,
256 pub num_stories_unestimated: u64,
257}
258
259#[derive(Clone, Deserialize, Serialize, Debug)]
260pub struct LinkedFile {
261 pub content_type: Option<String>,
262 pub created_at: DateTime<Utc>,
263 pub description: Option<String>,
264 pub entity_type: String,
265 pub id: u64,
266 pub mention_ids: Vec<Uuid>,
267 pub name: String,
268 pub size: Option<u64>,
269 pub story_ids: Vec<u64>,
270 pub thumbnail_url: Option<String>,
271 #[serde(rename = "type")]
272 pub linked_file_type: String,
273 pub updated_at: DateTime<Utc>,
274 pub uploader_id: Uuid,
275 pub url: String,
276}
277
278#[derive(Clone, Deserialize, Serialize, Debug)]
279pub struct Member {
280 pub created_at: Option<DateTime<Utc>>,
281 pub disabled: bool,
282 pub entity_type: String,
283 pub id: Uuid,
284 pub profile: Profile,
285 pub role: String,
286 pub updated_at: Option<DateTime<Utc>>,
287}
288
289#[derive(Clone, Deserialize, Serialize, Debug)]
290pub struct Milestone {
291 pub categories: Vec<Category>,
292 pub completed: bool,
293 pub completed_at: Option<DateTime<Utc>>,
294 pub completed_at_override: Option<DateTime<Utc>>,
295 pub created_at: DateTime<Utc>,
296 pub description: String,
297 pub entity_type: String,
298 pub id: u64,
299 pub name: String,
300 pub position: u64,
301 pub started: bool,
302 pub started_at: Option<DateTime<Utc>>,
303 pub started_at_override: Option<DateTime<Utc>>,
304 pub state: String,
305 pub updated_at: DateTime<Utc>,
306}
307
308#[derive(Clone, Deserialize, Serialize, Debug)]
309pub struct Profile {
310 pub deactivated: bool,
311 pub display_icon: Option<Icon>,
312 pub email_address: Option<String>,
313 pub entity_type: String,
314 pub gravatar_hash: Option<String>,
315 pub id: Uuid,
316 pub mention_name: String,
317 pub name: String,
318 pub two_factor_auth_activated: bool,
319}
320
321#[derive(Clone, Deserialize, Serialize, Debug)]
322pub struct Project {
323 pub abbreviation: Option<String>,
324 pub archived: bool,
325 pub color: Option<String>,
326 pub created_at: Option<DateTime<Utc>>,
327 pub days_to_thermometer: u64,
328 pub description: Option<String>,
329 pub entity_type: String,
330 pub external_id: Option<String>,
331 pub follower_ids: Vec<Uuid>,
332 pub id: u64,
333 pub iteration_length: u64,
334 pub name: String,
335 pub show_thermometer: bool,
336 pub start_time: DateTime<Utc>,
337 pub stats: ProjectStats,
338 pub team_id: u64,
339 pub updated_at: Option<DateTime<Utc>>,
340}
341
342#[derive(Clone, Deserialize, Serialize, Debug)]
343pub struct ProjectStats {
344 pub num_points: u64,
345 pub num_stories: u64,
346}
347
348#[derive(Clone, Deserialize, Serialize, Debug)]
349pub struct PullRequest {
350 pub branch_id: u64,
351 pub closed: bool,
352 pub created_at: DateTime<Utc>,
353 pub entity_type: String,
354 pub id: u64,
355 pub num_added: u64,
356 pub num_commits: u64,
357 pub num_modified: u64,
358 pub num_removed: u64,
359 pub number: u64,
360 pub target_branch_id: u64,
361 pub title: String,
362 pub updated_at: DateTime<Utc>,
363 pub url: String,
364}
365
366#[derive(Clone, Deserialize, Serialize, Debug)]
367pub struct Repository {
368 pub created_at: Option<DateTime<Utc>>,
369 pub entity_type: String,
370 pub external_id: Option<String>,
371 pub full_name: Option<String>,
372 pub id: Option<u64>,
373 pub name: Option<String>,
374 #[serde(rename = "type")]
375 pub repository_type: String,
376 pub updated_at: Option<DateTime<Utc>>,
377 pub url: Option<String>,
378}
379
380#[derive(Clone, Deserialize, Serialize, Debug)]
381pub struct SearchResults {
382 pub data: Vec<StorySearch>,
383 pub next: Option<String>,
384 pub total: u64,
385}
386
387#[derive(Clone, Deserialize, Serialize, Debug)]
388pub struct Story {
389 pub app_url: String,
390 pub archived: bool,
391 pub blocked: bool,
392 pub blocker: bool,
393 pub branches: Vec<Branch>,
394 pub comments: Vec<Comment>,
395 pub commits: Vec<Commit>,
396 pub completed: bool,
397 pub completed_at: Option<DateTime<Utc>>,
398 pub completed_at_override: Option<DateTime<Utc>>,
399 pub created_at: DateTime<Utc>,
400 pub deadline: Option<DateTime<Utc>>,
401 pub description: String,
402 pub entity_type: String,
403 pub epic_id: Option<u64>,
404 pub estimate: Option<u64>,
405 pub external_id: Option<String>,
406 pub files: Vec<File>,
407 pub follower_ids: Vec<Uuid>,
408 pub id: u64,
409 pub labels: Vec<Label>,
410 pub linked_files: Vec<LinkedFile>,
411 pub mention_ids: Vec<Uuid>,
412 pub moved_at: Option<DateTime<Utc>>,
413 pub name: String,
414 pub owner_ids: Vec<Uuid>,
415 pub position: u64,
416 pub project_id: u64,
417 pub requested_by_id: Uuid,
418 pub started: bool,
419 pub started_at: Option<DateTime<Utc>>,
420 pub started_at_override: Option<DateTime<Utc>>,
421 pub story_links: Vec<TypedStoryLink>,
422 pub story_type: StoryType,
423 pub tasks: Vec<Task>,
424 pub updated_at: Option<DateTime<Utc>>,
425 pub workflow_state_id: u64,
426}
427
428#[derive(Clone, Deserialize, Serialize, Debug)]
429pub struct StoryLink {
430 pub created_at: DateTime<Utc>,
431 pub entity_type: String,
432 pub id: u64,
433 pub object_id: u64,
434 pub subject_id: u64,
435 pub updated_at: DateTime<Utc>,
436 pub verb: String,
437}
438
439#[derive(Clone, Deserialize, Serialize, Debug)]
440pub struct StorySearch {
441 pub app_url: String,
442 pub archived: bool,
443 pub blocked: bool,
444 pub blocker: bool,
445 pub completed: bool,
446 pub completed_at: Option<DateTime<Utc>>,
447 pub completed_at_override: Option<DateTime<Utc>>,
448 pub created_at: DateTime<Utc>,
449 pub deadline: Option<DateTime<Utc>>,
450 pub description: String,
451 pub entity_type: String,
452 pub epic_id: Option<u64>,
453 pub estimate: Option<u64>,
454 pub external_id: Option<String>,
455 pub follower_ids: Vec<Uuid>,
456 pub id: u64,
457 pub labels: Vec<Label>,
458 pub mention_ids: Vec<Uuid>,
459 pub moved_at: Option<DateTime<Utc>>,
460 pub name: String,
461 pub owner_ids: Vec<Uuid>,
462 pub position: u64,
463 pub project_id: u64,
464 pub requested_by_id: Uuid,
465 pub started: bool,
466 pub started_at: Option<DateTime<Utc>>,
467 pub started_at_override: Option<DateTime<Utc>>,
468 pub story_links: Vec<TypedStoryLink>,
469 pub story_type: String,
470 pub updated_at: Option<DateTime<Utc>>,
471 pub workflow_state_id: u64,
472}
473
474#[derive(Clone, Deserialize, Serialize, Debug)]
475pub struct StorySlim {
476 pub app_url: String,
477 pub archived: bool,
478 pub blocked: bool,
479 pub blocker: bool,
480 pub comment_ids: Vec<u64>,
481 pub completed: bool,
482 pub completed_at: Option<DateTime<Utc>>,
483 pub completed_at_override: Option<DateTime<Utc>>,
484 pub created_at: DateTime<Utc>,
485 pub deadline: Option<DateTime<Utc>>,
486 pub entity_type: String,
487 pub epic_id: Option<u64>,
488 pub estimate: Option<u64>,
489 pub external_id: Option<String>,
490 pub file_ids: Vec<u64>,
491 pub follower_ids: Vec<Uuid>,
492 pub id: u64,
493 pub labels: Vec<Label>,
494 pub linked_file_ids: Vec<u64>,
495 pub mention_ids: Vec<Uuid>,
496 pub moved_at: Option<DateTime<Utc>>,
497 pub name: String,
498 pub owner_ids: Vec<Uuid>,
499 pub position: u64,
500 pub project_id: u64,
501 pub requested_by_id: Uuid,
502 pub started: bool,
503 pub started_at: Option<DateTime<Utc>>,
504 pub started_at_override: Option<DateTime<Utc>>,
505 pub story_links: Vec<TypedStoryLink>,
506 pub story_type: String,
507 pub task_ids: Vec<u64>,
508 pub updated_at: Option<DateTime<Utc>>,
509 pub workflow_state_id: u64,
510}
511
512#[derive(Clone, Deserialize, Serialize, Debug)]
513pub struct Task {
514 pub complete: bool,
515 pub completed_at: Option<DateTime<Utc>>,
516 pub created_at: DateTime<Utc>,
517 pub description: String,
518 pub entity_type: String,
519 pub external_id: Option<String>,
520 pub id: u64,
521 pub mention_ids: Vec<Uuid>,
522 pub owner_ids: Vec<Uuid>,
523 pub position: u64,
524 pub story_id: u64,
525 pub updated_at: Option<DateTime<Utc>>,
526}
527
528#[derive(Clone, Deserialize, Serialize, Debug)]
529pub struct Team {
530 pub created_at: DateTime<Utc>,
531 pub description: String,
532 pub entity_type: String,
533 pub id: u64,
534 pub name: String,
535 pub position: u64,
536 pub project_ids: Vec<u64>,
537 pub updated_at: DateTime<Utc>,
538 pub workflow: Workflow,
539}
540
541#[derive(Clone, Deserialize, Serialize, Debug)]
542pub struct ThreadedComment {
543 pub author_id: Uuid,
544 pub comments: Vec<ThreadedComment>,
545 pub created_at: DateTime<Utc>,
546 pub deleted: bool,
547 pub entity_type: String,
548 pub external_id: Option<String>,
549 pub id: u64,
550 pub mention_ids: Vec<Uuid>,
551 pub text: String,
552 pub updated_at: DateTime<Utc>,
553}
554
555#[derive(Clone, Deserialize, Serialize, Debug)]
556pub struct TypedStoryLink {
557 pub created_at: DateTime<Utc>,
558 pub entity_type: String,
559 pub id: u64,
560 pub object_id: u64,
561 pub subject_id: u64,
562 #[serde(rename = "type")]
563 pub typed_story_link_type: String,
564 pub updated_at: DateTime<Utc>,
565 pub verb: String,
566}
567
568#[derive(Clone, Deserialize, Serialize, Debug)]
569pub struct Workflow {
570 pub created_at: DateTime<Utc>,
571 pub default_state_id: u64,
572 pub description: String,
573 pub entity_type: String,
574 pub id: u64,
575 pub name: String,
576 pub states: Vec<WorkflowState>,
577 pub team_id: u64,
578 pub updated_at: DateTime<Utc>,
579}
580
581#[derive(Clone, Deserialize, Serialize, Debug)]
582pub struct WorkflowState {
583 pub color: String,
584 pub created_at: DateTime<Utc>,
585 pub description: String,
586 pub entity_type: String,
587 pub id: u64,
588 pub name: String,
589 pub num_stories: u64,
590 pub position: u64,
591 #[serde(rename = "type")]
592 pub workflow_state_type: String,
593 pub updated_at: DateTime<Utc>,
594 pub verb: Option<String>,
595}
596
597#[derive(Clone, Deserialize, Serialize, Debug, PartialEq, Eq)]
598pub enum StoryType {
599 #[serde(rename = "bug")]
600 Bug,
601 #[serde(rename = "chore")]
602 Chore,
603 #[serde(rename = "feature")]
604 Feature,
605}
606
607#[derive(Clone, Deserialize, Serialize, Debug, PartialEq, Eq)]
608pub enum StoryLinkType {
609 #[serde(rename = "blocks")]
610 Blocks,
611 #[serde(rename = "duplicates")]
612 Duplicates,
613 #[serde(rename = "relates to")]
614 RelatesTo,
615}
616
617#[derive(Clone, Deserialize, Serialize, Debug, PartialEq, Eq)]
618pub enum CategoryType {
619 #[serde(rename = "milestone")]
620 Milestone,
621}
622
623#[derive(Clone, Deserialize, Serialize, Debug, PartialEq, Eq)]
624pub enum FileIntegrationType {
625 #[serde(rename = "box")]
626 Box,
627 #[serde(rename = "dropbox")]
628 Dropbox,
629 #[serde(rename = "google")]
630 Google,
631 #[serde(rename = "onedrive")]
632 OneDrive,
633 #[serde(rename = "url")]
634 Url,
635}
636
637#[derive(Clone, Deserialize, Serialize, Debug, PartialEq, Eq)]
638pub enum StateType {
639 #[serde(rename = "done")]
640 Done,
641 #[serde(rename = "in progress")]
642 InProgress,
643 #[serde(rename = "to do")]
644 ToDo,
645}
646
647#[derive(Clone, Deserialize, Serialize, Debug)]
648pub struct CreateCategory {
649 pub color: Option<String>,
650 pub external_id: Option<String>,
651 pub name: String,
652 pub category_type: CategoryType,
653}
654
655#[derive(Clone, Deserialize, Serialize, Debug)]
656pub struct UpdateCategory {
657 pub archived: Option<bool>,
658 pub color: Option<String>,
659 pub name: Option<String>,
660}
661
662#[derive(Clone, Deserialize, Serialize, Debug)]
663pub struct CreateEpic {
664 pub completed_at_override: Option<DateTime<Utc>>,
665 pub created_at: Option<DateTime<Utc>>,
666 pub deadline: Option<DateTime<Utc>>,
667 pub description: Option<String>,
668 pub epic_state_id: Option<u64>,
669 pub external_id: Option<String>,
670 pub follower_ids: Option<Vec<Uuid>>,
671 pub labels: Option<Vec<CreateLabelParams>>,
672 pub milestone_id: Option<u64>,
673 pub name: String,
674 pub owner_ids: Option<Vec<Uuid>>,
675 pub requested_by_id: Option<Uuid>,
676 pub started_at_override: Option<DateTime<Utc>>,
677 pub updated_at: Option<DateTime<Utc>>,
678}
679
680#[derive(Clone, Deserialize, Serialize, Debug)]
681pub struct UpdateEpic {
682 pub after_id: Option<u64>,
683 pub archived: Option<bool>,
684 pub before_id: Option<u64>,
685 pub completed_at_override: Option<DateTime<Utc>>,
686 pub deadline: Option<DateTime<Utc>>,
687 pub description: Option<String>,
688 pub epic_state_id: Option<u64>,
689 pub follower_ids: Option<Vec<Uuid>>,
690 pub labels: Option<Vec<CreateLabelParams>>,
691 pub milestone_id: Option<u64>,
692 pub name: Option<String>,
693 pub owner_ids: Option<Vec<Uuid>>,
694 pub requested_by_id: Option<Uuid>,
695 pub started_at_override: Option<DateTime<Utc>>,
696}
697
698#[derive(Clone, Deserialize, Serialize, Debug)]
699pub struct CreateEpicComment {
700 pub author_id: Option<Uuid>,
701 pub created_at: Option<DateTime<Utc>>,
702 pub external_id: Option<String>,
703 pub text: String,
704 pub updated_at: Option<DateTime<Utc>>,
705}
706
707#[derive(Clone, Deserialize, Serialize, Debug)]
708pub struct CreateEpicCommentComment {
709 pub external_id: Option<String>,
710 pub text: String,
711}
712
713#[derive(Clone, Deserialize, Serialize, Debug)]
714pub struct UpdateEpicComment {
715 pub text: String,
716}
717
718#[derive(Clone, Deserialize, Serialize, Debug)]
719pub struct UpdateFile {
720 pub created_at: Option<DateTime<Utc>>,
721 pub description: Option<String>,
722 pub external_id: Option<String>,
723 pub name: Option<String>,
724 pub updated_at: Option<DateTime<Utc>>,
725 pub uploader_id: Option<Uuid>,
726}
727
728#[derive(Clone, Deserialize, Serialize, Debug)]
729pub struct CreateLabel {
730 pub color: Option<String>,
731 pub external_id: Option<String>,
732 pub name: String,
733}
734
735#[derive(Clone, Deserialize, Serialize, Debug)]
736pub struct UpdateLabel {
737 pub archived: Option<bool>,
738 pub color: Option<String>,
739 pub name: Option<String>,
740}
741
742#[derive(Clone, Deserialize, Serialize, Debug)]
743pub struct CreateLinkedFile {
744 pub content_type: Option<String>,
745 pub description: Option<String>,
746 pub name: String,
747 pub size: Option<u64>,
748 pub story_id: Option<u64>,
749 pub thumbnail_url: Option<String>,
750 pub file_integration_type: FileIntegrationType,
751 pub uploader_id: Option<Uuid>,
752 pub url: String,
753}
754
755#[derive(Clone, Deserialize, Serialize, Debug)]
756pub struct UpdateLinkedFile {
757 pub description: Option<String>,
758 pub name: Option<String>,
759 pub size: Option<String>,
760 pub thumbnail_url: Option<String>,
761 pub file_integration_type: Option<FileIntegrationType>,
762 pub uploader_id: Option<Uuid>,
763 pub url: Option<String>,
764}
765
766#[derive(Clone, Deserialize, Serialize, Debug)]
767pub struct CreateMilestone {
768 pub categories: Option<Vec<CreateCategoryParams>>,
769 pub completed_at_override: Option<DateTime<Utc>>,
770 pub description: Option<String>,
771 pub name: String,
772 pub started_at_override: Option<DateTime<Utc>>,
773 pub state: Option<StateType>,
774}
775
776#[derive(Clone, Deserialize, Serialize, Debug)]
777pub struct UpdateMilestone {
778 pub after_id: Option<u64>,
779 pub before_id: Option<u64>,
780 pub categories: Option<Vec<CreateCategoryParams>>,
781 pub completed_at_override: Option<DateTime<Utc>>,
782 pub description: Option<String>,
783 pub name: Option<String>,
784 pub started_at_override: Option<DateTime<Utc>>,
785 pub state: Option<StateType>,
786}
787
788#[derive(Clone, Deserialize, Serialize, Debug)]
789pub struct CreateProject {
790 pub abbreviation: Option<String>,
791 pub color: Option<String>,
792 pub created_at: Option<DateTime<Utc>>,
793 pub description: Option<String>,
794 pub external_id: Option<String>,
795 pub follower_ids: Option<Vec<Uuid>>,
796 pub iteration_length: Option<u64>,
797 pub name: String,
798 pub team_id: Option<u64>,
799 pub updated_at: Option<DateTime<Utc>>,
800}
801
802#[derive(Clone, Deserialize, Serialize, Debug)]
803pub struct UpdateProject {
804 pub abbreviation: Option<String>,
805 pub archived: Option<bool>,
806 pub color: Option<String>,
807 pub days_to_thermometer: Option<u64>,
808 pub description: Option<String>,
809 pub follower_ids: Option<Vec<Uuid>>,
810 pub name: Option<String>,
811 pub show_thermometer: Option<bool>,
812 pub team_id: Option<u64>,
813}
814
815#[derive(Clone, Deserialize, Serialize, Debug)]
816pub struct SearchStories {
817 pub page_size: Option<u64>,
818 pub query: String,
819}
820
821#[derive(Clone, Deserialize, Serialize, Debug)]
822pub struct CreateStory {
823 pub comments: Option<Vec<CreateCommentParams>>,
824 pub completed_at_override: Option<DateTime<Utc>>,
825 pub created_at: Option<DateTime<Utc>>,
826 pub deadline: Option<DateTime<Utc>>,
827 pub description: Option<String>,
828 pub epic_id: Option<u64>,
829 pub estimate: Option<u64>,
830 pub external_id: Option<String>,
831 pub file_ids: Option<Vec<u64>>,
832 pub follower_ids: Option<Vec<Uuid>>,
833 pub labels: Option<Vec<CreateLabelParams>>,
834 pub linked_file_ids: Option<Vec<u64>>,
835 pub name: String,
836 pub owner_ids: Option<Vec<Uuid>>,
837 pub project_id: u64,
838 pub requested_by_id: Option<Uuid>,
839 pub started_at_override: Option<DateTime<Utc>>,
840 pub story_links: Option<Vec<CreateStoryLinkParams>>,
841 pub story_type: Option<StoryType>,
842 pub tasks: Option<Vec<CreateTaskParams>>,
843 pub updated_at: Option<DateTime<Utc>>,
844 pub workflow_state_id: Option<u64>,
845}
846
847#[derive(Clone, Deserialize, Serialize, Debug)]
848pub struct CreateMultipleStories {
849 pub stories: Vec<CreateStoryParams>,
850}
851
852#[derive(Clone, Deserialize, Serialize, Debug)]
853pub struct UpdateMultipleStories {
854 pub after_id: Option<u64>,
855 pub archived: Option<bool>,
856 pub deadline: Option<DateTime<Utc>>,
857 pub epic_id: Option<u64>,
858 pub estimate: Option<u64>,
859 pub follower_ids_add: Option<Vec<Uuid>>,
860 pub follower_ids_remove: Option<Vec<Uuid>>,
861 pub labels_add: Option<Vec<CreateLabelParams>>,
862 pub labels_remove: Option<Vec<CreateLabelParams>>,
863 pub owner_ids_add: Option<Vec<Uuid>>,
864 pub owner_ids_remove: Option<Vec<Uuid>>,
865 pub project_id: Option<u64>,
866 pub requested_by_id: Option<Uuid>,
867 pub story_ids: Vec<u64>,
868 pub story_type: Option<StoryType>,
869 pub workflow_state_id: Option<u64>,
870}
871
872#[derive(Clone, Deserialize, Serialize, Debug)]
873pub struct DeleteMultipleStories {
874 pub story_ids: Vec<u64>,
875}
876
877#[derive(Clone, Deserialize, Serialize, Debug)]
878pub struct UpdateStory {
879 pub after_id: Option<u64>,
880 pub archived: Option<bool>,
881 pub before_id: Option<u64>,
882 pub branch_ids: Option<Vec<u64>>,
883 pub commit_ids: Option<Vec<u64>>,
884 pub completed_at_override: Option<DateTime<Utc>>,
885 pub deadline: Option<DateTime<Utc>>,
886 pub description: Option<String>,
887 pub epic_id: Option<u64>,
888 pub estimate: Option<u64>,
889 pub file_ids: Option<Vec<u64>>,
890 pub follower_ids: Option<Vec<Uuid>>,
891 pub labels: Option<Vec<CreateLabelParams>>,
892 pub linked_file_ids: Option<Vec<u64>>,
893 pub name: Option<String>,
894 pub owner_ids: Option<Vec<Uuid>>,
895 pub project_id: Option<u64>,
896 pub requested_by_id: Option<Uuid>,
897 pub started_at_override: Option<DateTime<Utc>>,
898 pub story_type: Option<StoryType>,
899 pub workflow_state_id: Option<u64>,
900}
901
902#[derive(Clone, Deserialize, Serialize, Debug)]
903pub struct CreateComment {
904 pub author_id: Option<Uuid>,
905 pub created_at: Option<DateTime<Utc>>,
906 pub external_id: Option<String>,
907 pub text: String,
908 pub updated_at: Option<DateTime<Utc>>,
909}
910
911#[derive(Clone, Deserialize, Serialize, Debug)]
912pub struct UpdateComment {
913 pub text: String,
914}
915
916#[derive(Clone, Deserialize, Serialize, Debug)]
917pub struct CreateTask {
918 pub complete: Option<bool>,
919 pub created_at: Option<DateTime<Utc>>,
920 pub description: String,
921 pub external_id: Option<String>,
922 pub owner_ids: Option<Vec<Uuid>>,
923 pub updated_at: Option<DateTime<Utc>>,
924}
925
926#[derive(Clone, Deserialize, Serialize, Debug)]
927pub struct UpdateTask {
928 pub after_id: Option<u64>,
929 pub before_id: Option<u64>,
930 pub complete: Option<bool>,
931 pub description: Option<String>,
932 pub owner_ids: Option<Vec<Uuid>>,
933}
934
935#[derive(Clone, Deserialize, Serialize, Debug)]
936pub struct CreateStoryLink {
937 pub object_id: u64,
938 pub subject_id: u64,
939 pub verb: StoryLinkType,
940}