Skip to main content

nominal_api/conjure/endpoints/scout/checks/api/
checklist_service.rs

1use conjure_http::endpoint;
2/// The Checklist Service is responsible for managing checklists and checks.
3/// A checklist is a collection of checks that can be executed against a set of data sources.
4#[conjure_http::conjure_endpoints(
5    name = "ChecklistService",
6    use_legacy_error_serialization
7)]
8pub trait ChecklistService {
9    /// Creates a new checklist with the provided checks.
10    #[endpoint(
11        method = POST,
12        path = "/scout/v1/checklists",
13        name = "create",
14        produces = conjure_http::server::StdResponseSerializer
15    )]
16    fn create(
17        &self,
18        #[auth]
19        auth_: conjure_object::BearerToken,
20        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
21        request: super::super::super::super::super::objects::scout::checks::api::CreateChecklistRequest,
22    ) -> Result<
23        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
24        conjure_http::private::Error,
25    >;
26    /// Creates a permanent commit with a commit message.
27    /// Throws if the checklist or branch doesn't exist.
28    /// Throws if the latest commit doesn't match the provided id.
29    /// Throws if you commit to an archived checklist.
30    #[endpoint(
31        method = POST,
32        path = "/scout/v1/checklists/{checklistRid}/commit",
33        name = "commit",
34        produces = conjure_http::server::StdResponseSerializer
35    )]
36    fn commit(
37        &self,
38        #[auth]
39        auth_: conjure_object::BearerToken,
40        #[path(
41            name = "checklistRid",
42            decoder = conjure_http::server::conjure::FromPlainDecoder,
43            log_as = "checklistRid",
44            safe
45        )]
46        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
47        #[query(
48            name = "branch",
49            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
50        )]
51        branch: Option<
52            super::super::super::super::super::objects::scout::versioning::api::BranchName,
53        >,
54        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
55        request: super::super::super::super::super::objects::scout::checks::api::CommitChecklistRequest,
56    ) -> Result<
57        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
58        conjure_http::private::Error,
59    >;
60    /// Creates a commit that may be compacted, e.g cleaned up and not exist anymore.
61    /// Throws if the checklist or branch doesn't exist.
62    /// Throws if the latest commit doesn't match the provided id.
63    /// Throws if you save to an archived checklist.
64    #[endpoint(
65        method = POST,
66        path = "/scout/v1/checklists/{checklistRid}/save-working-state",
67        name = "saveWorkingState",
68        produces = conjure_http::server::StdResponseSerializer
69    )]
70    fn save_working_state(
71        &self,
72        #[auth]
73        auth_: conjure_object::BearerToken,
74        #[path(
75            name = "checklistRid",
76            decoder = conjure_http::server::conjure::FromPlainDecoder,
77            log_as = "checklistRid",
78            safe
79        )]
80        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
81        #[query(
82            name = "branch",
83            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
84        )]
85        branch: Option<
86            super::super::super::super::super::objects::scout::versioning::api::BranchName,
87        >,
88        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
89        request: super::super::super::super::super::objects::scout::checks::api::SaveChecklistRequest,
90    ) -> Result<
91        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
92        conjure_http::private::Error,
93    >;
94    /// Merges the given branch to the "main" branch.
95    /// Throws if the checklist or branch doesn't exist.
96    /// Throws if the latest commit doesn't match the provided id.
97    /// Throws if you merge with an archived checklist.
98    #[endpoint(
99        method = POST,
100        path = "/scout/v1/checklists/{checklistRid}/merge-to-main",
101        name = "mergeToMain",
102        produces = conjure_http::server::StdResponseSerializer
103    )]
104    fn merge_to_main(
105        &self,
106        #[auth]
107        auth_: conjure_object::BearerToken,
108        #[path(
109            name = "checklistRid",
110            decoder = conjure_http::server::conjure::FromPlainDecoder,
111            log_as = "checklistRid",
112            safe
113        )]
114        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
115        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
116        request: super::super::super::super::super::objects::scout::checks::api::MergeToMainRequest,
117    ) -> Result<
118        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
119        conjure_http::private::Error,
120    >;
121    /// Updates the data source ref names for all checks within a checklist.
122    /// Throws if the checklist doesn't exist.
123    #[endpoint(
124        method = POST,
125        path = "/scout/v1/checklists/{checklistRid}/update-ref-names",
126        name = "updateDataSourceRefNames",
127        produces = conjure_http::server::StdResponseSerializer
128    )]
129    fn update_data_source_ref_names(
130        &self,
131        #[auth]
132        auth_: conjure_object::BearerToken,
133        #[path(
134            name = "checklistRid",
135            decoder = conjure_http::server::conjure::FromPlainDecoder,
136            log_as = "checklistRid",
137            safe
138        )]
139        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
140        #[query(
141            name = "branch",
142            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
143        )]
144        branch: Option<
145            super::super::super::super::super::objects::scout::versioning::api::BranchName,
146        >,
147        #[body(
148            deserializer = conjure_http::server::StdRequestDeserializer,
149            log_as = "refNameUpdates"
150        )]
151        ref_name_updates: std::collections::BTreeMap<
152            super::super::super::super::super::objects::scout::api::DataSourceRefName,
153            super::super::super::super::super::objects::scout::api::DataSourceRefName,
154        >,
155    ) -> Result<
156        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
157        conjure_http::private::Error,
158    >;
159    /// Updates the metadata of a checklist.
160    #[endpoint(
161        method = PUT,
162        path = "/scout/v1/checklists/{rid}/update-metadata",
163        name = "updateMetadata",
164        produces = conjure_http::server::StdResponseSerializer
165    )]
166    fn update_metadata(
167        &self,
168        #[auth]
169        auth_: conjure_object::BearerToken,
170        #[path(
171            name = "rid",
172            decoder = conjure_http::server::conjure::FromPlainDecoder,
173            safe
174        )]
175        rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
176        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
177        request: super::super::super::super::super::objects::scout::checks::api::UpdateChecklistMetadataRequest,
178    ) -> Result<
179        super::super::super::super::super::objects::scout::checks::api::ChecklistMetadata,
180        conjure_http::private::Error,
181    >;
182    /// Specify at most one of (branch, commit).
183    /// If neither is specified, branch = "main" is the default.
184    #[endpoint(
185        method = GET,
186        path = "/scout/v1/checklists/{rid}",
187        name = "get",
188        produces = conjure_http::server::StdResponseSerializer
189    )]
190    fn get(
191        &self,
192        #[auth]
193        auth_: conjure_object::BearerToken,
194        #[path(
195            name = "rid",
196            decoder = conjure_http::server::conjure::FromPlainDecoder,
197            safe
198        )]
199        rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
200        #[query(
201            name = "branch",
202            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
203        )]
204        branch: Option<
205            super::super::super::super::super::objects::scout::versioning::api::BranchName,
206        >,
207        #[query(
208            name = "commit",
209            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
210            safe
211        )]
212        commit: Option<
213            super::super::super::super::super::objects::scout::versioning::api::CommitId,
214        >,
215    ) -> Result<
216        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
217        conjure_http::private::Error,
218    >;
219    /// Returns the pinned commit for each provided checklist reference.
220    #[endpoint(
221        method = POST,
222        path = "/scout/v1/checklists/batch-get",
223        name = "batchGet",
224        produces = conjure_http::server::conjure::CollectionResponseSerializer
225    )]
226    fn batch_get(
227        &self,
228        #[auth]
229        auth_: conjure_object::BearerToken,
230        #[body(
231            deserializer = conjure_http::server::StdRequestDeserializer,
232            log_as = "checklistRefs",
233            safe
234        )]
235        checklist_refs: std::collections::BTreeSet<
236            super::super::super::super::super::objects::scout::checks::api::PinnedChecklistRef,
237        >,
238    ) -> Result<
239        std::collections::BTreeSet<
240            super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
241        >,
242        conjure_http::private::Error,
243    >;
244    /// Returns the metadata for each provided checklist.
245    #[endpoint(
246        method = POST,
247        path = "/scout/v1/checklists/batch-get-metadata",
248        name = "batchGetMetadata",
249        produces = conjure_http::server::StdResponseSerializer
250    )]
251    fn batch_get_metadata(
252        &self,
253        #[auth]
254        auth_: conjure_object::BearerToken,
255        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
256        request: super::super::super::super::super::objects::scout::checks::api::BatchGetChecklistMetadataRequest,
257    ) -> Result<
258        super::super::super::super::super::objects::scout::checks::api::BatchGetChecklistMetadataResponse,
259        conjure_http::private::Error,
260    >;
261    /// Results will be the latest commit on main for each checklist.
262    #[endpoint(
263        method = POST,
264        path = "/scout/v1/checklists/search",
265        name = "search",
266        produces = conjure_http::server::StdResponseSerializer
267    )]
268    fn search(
269        &self,
270        #[auth]
271        auth_: conjure_object::BearerToken,
272        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
273        request: super::super::super::super::super::objects::scout::checks::api::SearchChecklistsRequest,
274    ) -> Result<
275        super::super::super::super::super::objects::scout::checks::api::VersionedChecklistPage,
276        conjure_http::private::Error,
277    >;
278    /// Archives the provided checklists.
279    #[endpoint(method = POST, path = "/scout/v1/checklists/archive", name = "archive")]
280    fn archive(
281        &self,
282        #[auth]
283        auth_: conjure_object::BearerToken,
284        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
285        request: super::super::super::super::super::objects::scout::checks::api::ArchiveChecklistsRequest,
286    ) -> Result<(), conjure_http::private::Error>;
287    /// Unarchives the provided checklists.
288    #[endpoint(
289        method = POST,
290        path = "/scout/v1/checklists/unarchive",
291        name = "unarchive"
292    )]
293    fn unarchive(
294        &self,
295        #[auth]
296        auth_: conjure_object::BearerToken,
297        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
298        request: super::super::super::super::super::objects::scout::checks::api::UnarchiveChecklistsRequest,
299    ) -> Result<(), conjure_http::private::Error>;
300    /// Returns the check with the given rid.
301    #[endpoint(
302        method = GET,
303        path = "/scout/v1/checklists/check/{rid}",
304        name = "getCheck",
305        produces = conjure_http::server::StdResponseSerializer
306    )]
307    fn get_check(
308        &self,
309        #[auth]
310        auth_: conjure_object::BearerToken,
311        #[path(
312            name = "rid",
313            decoder = conjure_http::server::conjure::FromPlainDecoder,
314            safe
315        )]
316        rid: super::super::super::super::super::objects::scout::rids::api::CheckRid,
317    ) -> Result<
318        super::super::super::super::super::objects::scout::checks::api::Check,
319        conjure_http::private::Error,
320    >;
321    /// Returns the checks with the given rids.
322    #[endpoint(
323        method = POST,
324        path = "/scout/v1/checklists/check/batch-get",
325        name = "batchGetChecks",
326        produces = conjure_http::server::conjure::CollectionResponseSerializer
327    )]
328    fn batch_get_checks(
329        &self,
330        #[auth]
331        auth_: conjure_object::BearerToken,
332        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
333        rids: std::collections::BTreeSet<
334            super::super::super::super::super::objects::scout::rids::api::CheckRid,
335        >,
336    ) -> Result<
337        std::collections::BTreeSet<
338            super::super::super::super::super::objects::scout::checks::api::Check,
339        >,
340        conjure_http::private::Error,
341    >;
342    /// Returns all labels and properties.
343    #[endpoint(
344        method = GET,
345        path = "/scout/v1/checklists/get-all-labels-properties",
346        name = "getAllLabelsAndProperties",
347        produces = conjure_http::server::StdResponseSerializer
348    )]
349    fn get_all_labels_and_properties(
350        &self,
351        #[auth]
352        auth_: conjure_object::BearerToken,
353        #[query(
354            name = "workspaces",
355            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
356            safe
357        )]
358        workspaces: std::collections::BTreeSet<
359            super::super::super::super::super::objects::api::rids::WorkspaceRid,
360        >,
361    ) -> Result<
362        super::super::super::super::super::objects::scout::checks::api::GetAllLabelsAndPropertiesResponse,
363        conjure_http::private::Error,
364    >;
365    /// Batch edits metadata across multiple checklists. Supports rename/merge for labels and properties.
366    /// If more than 1000 checklists are targeted, this endpoint will throw a 400.
367    #[endpoint(
368        method = POST,
369        path = "/scout/v1/checklists/metadata/batch-edit",
370        name = "batchEditChecklistMetadata",
371        produces = conjure_http::server::StdResponseSerializer
372    )]
373    fn batch_edit_checklist_metadata(
374        &self,
375        #[auth]
376        auth_: conjure_object::BearerToken,
377        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
378        request: super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataRequest,
379    ) -> Result<
380        super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataResponse,
381        conjure_http::private::Error,
382    >;
383}
384/// The Checklist Service is responsible for managing checklists and checks.
385/// A checklist is a collection of checks that can be executed against a set of data sources.
386#[conjure_http::conjure_endpoints(
387    name = "ChecklistService",
388    use_legacy_error_serialization
389)]
390pub trait AsyncChecklistService {
391    /// Creates a new checklist with the provided checks.
392    #[endpoint(
393        method = POST,
394        path = "/scout/v1/checklists",
395        name = "create",
396        produces = conjure_http::server::StdResponseSerializer
397    )]
398    async fn create(
399        &self,
400        #[auth]
401        auth_: conjure_object::BearerToken,
402        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
403        request: super::super::super::super::super::objects::scout::checks::api::CreateChecklistRequest,
404    ) -> Result<
405        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
406        conjure_http::private::Error,
407    >;
408    /// Creates a permanent commit with a commit message.
409    /// Throws if the checklist or branch doesn't exist.
410    /// Throws if the latest commit doesn't match the provided id.
411    /// Throws if you commit to an archived checklist.
412    #[endpoint(
413        method = POST,
414        path = "/scout/v1/checklists/{checklistRid}/commit",
415        name = "commit",
416        produces = conjure_http::server::StdResponseSerializer
417    )]
418    async fn commit(
419        &self,
420        #[auth]
421        auth_: conjure_object::BearerToken,
422        #[path(
423            name = "checklistRid",
424            decoder = conjure_http::server::conjure::FromPlainDecoder,
425            log_as = "checklistRid",
426            safe
427        )]
428        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
429        #[query(
430            name = "branch",
431            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
432        )]
433        branch: Option<
434            super::super::super::super::super::objects::scout::versioning::api::BranchName,
435        >,
436        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
437        request: super::super::super::super::super::objects::scout::checks::api::CommitChecklistRequest,
438    ) -> Result<
439        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
440        conjure_http::private::Error,
441    >;
442    /// Creates a commit that may be compacted, e.g cleaned up and not exist anymore.
443    /// Throws if the checklist or branch doesn't exist.
444    /// Throws if the latest commit doesn't match the provided id.
445    /// Throws if you save to an archived checklist.
446    #[endpoint(
447        method = POST,
448        path = "/scout/v1/checklists/{checklistRid}/save-working-state",
449        name = "saveWorkingState",
450        produces = conjure_http::server::StdResponseSerializer
451    )]
452    async fn save_working_state(
453        &self,
454        #[auth]
455        auth_: conjure_object::BearerToken,
456        #[path(
457            name = "checklistRid",
458            decoder = conjure_http::server::conjure::FromPlainDecoder,
459            log_as = "checklistRid",
460            safe
461        )]
462        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
463        #[query(
464            name = "branch",
465            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
466        )]
467        branch: Option<
468            super::super::super::super::super::objects::scout::versioning::api::BranchName,
469        >,
470        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
471        request: super::super::super::super::super::objects::scout::checks::api::SaveChecklistRequest,
472    ) -> Result<
473        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
474        conjure_http::private::Error,
475    >;
476    /// Merges the given branch to the "main" branch.
477    /// Throws if the checklist or branch doesn't exist.
478    /// Throws if the latest commit doesn't match the provided id.
479    /// Throws if you merge with an archived checklist.
480    #[endpoint(
481        method = POST,
482        path = "/scout/v1/checklists/{checklistRid}/merge-to-main",
483        name = "mergeToMain",
484        produces = conjure_http::server::StdResponseSerializer
485    )]
486    async fn merge_to_main(
487        &self,
488        #[auth]
489        auth_: conjure_object::BearerToken,
490        #[path(
491            name = "checklistRid",
492            decoder = conjure_http::server::conjure::FromPlainDecoder,
493            log_as = "checklistRid",
494            safe
495        )]
496        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
497        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
498        request: super::super::super::super::super::objects::scout::checks::api::MergeToMainRequest,
499    ) -> Result<
500        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
501        conjure_http::private::Error,
502    >;
503    /// Updates the data source ref names for all checks within a checklist.
504    /// Throws if the checklist doesn't exist.
505    #[endpoint(
506        method = POST,
507        path = "/scout/v1/checklists/{checklistRid}/update-ref-names",
508        name = "updateDataSourceRefNames",
509        produces = conjure_http::server::StdResponseSerializer
510    )]
511    async fn update_data_source_ref_names(
512        &self,
513        #[auth]
514        auth_: conjure_object::BearerToken,
515        #[path(
516            name = "checklistRid",
517            decoder = conjure_http::server::conjure::FromPlainDecoder,
518            log_as = "checklistRid",
519            safe
520        )]
521        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
522        #[query(
523            name = "branch",
524            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
525        )]
526        branch: Option<
527            super::super::super::super::super::objects::scout::versioning::api::BranchName,
528        >,
529        #[body(
530            deserializer = conjure_http::server::StdRequestDeserializer,
531            log_as = "refNameUpdates"
532        )]
533        ref_name_updates: std::collections::BTreeMap<
534            super::super::super::super::super::objects::scout::api::DataSourceRefName,
535            super::super::super::super::super::objects::scout::api::DataSourceRefName,
536        >,
537    ) -> Result<
538        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
539        conjure_http::private::Error,
540    >;
541    /// Updates the metadata of a checklist.
542    #[endpoint(
543        method = PUT,
544        path = "/scout/v1/checklists/{rid}/update-metadata",
545        name = "updateMetadata",
546        produces = conjure_http::server::StdResponseSerializer
547    )]
548    async fn update_metadata(
549        &self,
550        #[auth]
551        auth_: conjure_object::BearerToken,
552        #[path(
553            name = "rid",
554            decoder = conjure_http::server::conjure::FromPlainDecoder,
555            safe
556        )]
557        rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
558        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
559        request: super::super::super::super::super::objects::scout::checks::api::UpdateChecklistMetadataRequest,
560    ) -> Result<
561        super::super::super::super::super::objects::scout::checks::api::ChecklistMetadata,
562        conjure_http::private::Error,
563    >;
564    /// Specify at most one of (branch, commit).
565    /// If neither is specified, branch = "main" is the default.
566    #[endpoint(
567        method = GET,
568        path = "/scout/v1/checklists/{rid}",
569        name = "get",
570        produces = conjure_http::server::StdResponseSerializer
571    )]
572    async fn get(
573        &self,
574        #[auth]
575        auth_: conjure_object::BearerToken,
576        #[path(
577            name = "rid",
578            decoder = conjure_http::server::conjure::FromPlainDecoder,
579            safe
580        )]
581        rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
582        #[query(
583            name = "branch",
584            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
585        )]
586        branch: Option<
587            super::super::super::super::super::objects::scout::versioning::api::BranchName,
588        >,
589        #[query(
590            name = "commit",
591            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
592            safe
593        )]
594        commit: Option<
595            super::super::super::super::super::objects::scout::versioning::api::CommitId,
596        >,
597    ) -> Result<
598        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
599        conjure_http::private::Error,
600    >;
601    /// Returns the pinned commit for each provided checklist reference.
602    #[endpoint(
603        method = POST,
604        path = "/scout/v1/checklists/batch-get",
605        name = "batchGet",
606        produces = conjure_http::server::conjure::CollectionResponseSerializer
607    )]
608    async fn batch_get(
609        &self,
610        #[auth]
611        auth_: conjure_object::BearerToken,
612        #[body(
613            deserializer = conjure_http::server::StdRequestDeserializer,
614            log_as = "checklistRefs",
615            safe
616        )]
617        checklist_refs: std::collections::BTreeSet<
618            super::super::super::super::super::objects::scout::checks::api::PinnedChecklistRef,
619        >,
620    ) -> Result<
621        std::collections::BTreeSet<
622            super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
623        >,
624        conjure_http::private::Error,
625    >;
626    /// Returns the metadata for each provided checklist.
627    #[endpoint(
628        method = POST,
629        path = "/scout/v1/checklists/batch-get-metadata",
630        name = "batchGetMetadata",
631        produces = conjure_http::server::StdResponseSerializer
632    )]
633    async fn batch_get_metadata(
634        &self,
635        #[auth]
636        auth_: conjure_object::BearerToken,
637        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
638        request: super::super::super::super::super::objects::scout::checks::api::BatchGetChecklistMetadataRequest,
639    ) -> Result<
640        super::super::super::super::super::objects::scout::checks::api::BatchGetChecklistMetadataResponse,
641        conjure_http::private::Error,
642    >;
643    /// Results will be the latest commit on main for each checklist.
644    #[endpoint(
645        method = POST,
646        path = "/scout/v1/checklists/search",
647        name = "search",
648        produces = conjure_http::server::StdResponseSerializer
649    )]
650    async fn search(
651        &self,
652        #[auth]
653        auth_: conjure_object::BearerToken,
654        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
655        request: super::super::super::super::super::objects::scout::checks::api::SearchChecklistsRequest,
656    ) -> Result<
657        super::super::super::super::super::objects::scout::checks::api::VersionedChecklistPage,
658        conjure_http::private::Error,
659    >;
660    /// Archives the provided checklists.
661    #[endpoint(method = POST, path = "/scout/v1/checklists/archive", name = "archive")]
662    async fn archive(
663        &self,
664        #[auth]
665        auth_: conjure_object::BearerToken,
666        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
667        request: super::super::super::super::super::objects::scout::checks::api::ArchiveChecklistsRequest,
668    ) -> Result<(), conjure_http::private::Error>;
669    /// Unarchives the provided checklists.
670    #[endpoint(
671        method = POST,
672        path = "/scout/v1/checklists/unarchive",
673        name = "unarchive"
674    )]
675    async fn unarchive(
676        &self,
677        #[auth]
678        auth_: conjure_object::BearerToken,
679        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
680        request: super::super::super::super::super::objects::scout::checks::api::UnarchiveChecklistsRequest,
681    ) -> Result<(), conjure_http::private::Error>;
682    /// Returns the check with the given rid.
683    #[endpoint(
684        method = GET,
685        path = "/scout/v1/checklists/check/{rid}",
686        name = "getCheck",
687        produces = conjure_http::server::StdResponseSerializer
688    )]
689    async fn get_check(
690        &self,
691        #[auth]
692        auth_: conjure_object::BearerToken,
693        #[path(
694            name = "rid",
695            decoder = conjure_http::server::conjure::FromPlainDecoder,
696            safe
697        )]
698        rid: super::super::super::super::super::objects::scout::rids::api::CheckRid,
699    ) -> Result<
700        super::super::super::super::super::objects::scout::checks::api::Check,
701        conjure_http::private::Error,
702    >;
703    /// Returns the checks with the given rids.
704    #[endpoint(
705        method = POST,
706        path = "/scout/v1/checklists/check/batch-get",
707        name = "batchGetChecks",
708        produces = conjure_http::server::conjure::CollectionResponseSerializer
709    )]
710    async fn batch_get_checks(
711        &self,
712        #[auth]
713        auth_: conjure_object::BearerToken,
714        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
715        rids: std::collections::BTreeSet<
716            super::super::super::super::super::objects::scout::rids::api::CheckRid,
717        >,
718    ) -> Result<
719        std::collections::BTreeSet<
720            super::super::super::super::super::objects::scout::checks::api::Check,
721        >,
722        conjure_http::private::Error,
723    >;
724    /// Returns all labels and properties.
725    #[endpoint(
726        method = GET,
727        path = "/scout/v1/checklists/get-all-labels-properties",
728        name = "getAllLabelsAndProperties",
729        produces = conjure_http::server::StdResponseSerializer
730    )]
731    async fn get_all_labels_and_properties(
732        &self,
733        #[auth]
734        auth_: conjure_object::BearerToken,
735        #[query(
736            name = "workspaces",
737            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
738            safe
739        )]
740        workspaces: std::collections::BTreeSet<
741            super::super::super::super::super::objects::api::rids::WorkspaceRid,
742        >,
743    ) -> Result<
744        super::super::super::super::super::objects::scout::checks::api::GetAllLabelsAndPropertiesResponse,
745        conjure_http::private::Error,
746    >;
747    /// Batch edits metadata across multiple checklists. Supports rename/merge for labels and properties.
748    /// If more than 1000 checklists are targeted, this endpoint will throw a 400.
749    #[endpoint(
750        method = POST,
751        path = "/scout/v1/checklists/metadata/batch-edit",
752        name = "batchEditChecklistMetadata",
753        produces = conjure_http::server::StdResponseSerializer
754    )]
755    async fn batch_edit_checklist_metadata(
756        &self,
757        #[auth]
758        auth_: conjure_object::BearerToken,
759        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
760        request: super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataRequest,
761    ) -> Result<
762        super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataResponse,
763        conjure_http::private::Error,
764    >;
765}
766/// The Checklist Service is responsible for managing checklists and checks.
767/// A checklist is a collection of checks that can be executed against a set of data sources.
768#[conjure_http::conjure_endpoints(
769    name = "ChecklistService",
770    use_legacy_error_serialization,
771    local
772)]
773pub trait LocalAsyncChecklistService {
774    /// Creates a new checklist with the provided checks.
775    #[endpoint(
776        method = POST,
777        path = "/scout/v1/checklists",
778        name = "create",
779        produces = conjure_http::server::StdResponseSerializer
780    )]
781    async fn create(
782        &self,
783        #[auth]
784        auth_: conjure_object::BearerToken,
785        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
786        request: super::super::super::super::super::objects::scout::checks::api::CreateChecklistRequest,
787    ) -> Result<
788        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
789        conjure_http::private::Error,
790    >;
791    /// Creates a permanent commit with a commit message.
792    /// Throws if the checklist or branch doesn't exist.
793    /// Throws if the latest commit doesn't match the provided id.
794    /// Throws if you commit to an archived checklist.
795    #[endpoint(
796        method = POST,
797        path = "/scout/v1/checklists/{checklistRid}/commit",
798        name = "commit",
799        produces = conjure_http::server::StdResponseSerializer
800    )]
801    async fn commit(
802        &self,
803        #[auth]
804        auth_: conjure_object::BearerToken,
805        #[path(
806            name = "checklistRid",
807            decoder = conjure_http::server::conjure::FromPlainDecoder,
808            log_as = "checklistRid",
809            safe
810        )]
811        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
812        #[query(
813            name = "branch",
814            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
815        )]
816        branch: Option<
817            super::super::super::super::super::objects::scout::versioning::api::BranchName,
818        >,
819        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
820        request: super::super::super::super::super::objects::scout::checks::api::CommitChecklistRequest,
821    ) -> Result<
822        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
823        conjure_http::private::Error,
824    >;
825    /// Creates a commit that may be compacted, e.g cleaned up and not exist anymore.
826    /// Throws if the checklist or branch doesn't exist.
827    /// Throws if the latest commit doesn't match the provided id.
828    /// Throws if you save to an archived checklist.
829    #[endpoint(
830        method = POST,
831        path = "/scout/v1/checklists/{checklistRid}/save-working-state",
832        name = "saveWorkingState",
833        produces = conjure_http::server::StdResponseSerializer
834    )]
835    async fn save_working_state(
836        &self,
837        #[auth]
838        auth_: conjure_object::BearerToken,
839        #[path(
840            name = "checklistRid",
841            decoder = conjure_http::server::conjure::FromPlainDecoder,
842            log_as = "checklistRid",
843            safe
844        )]
845        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
846        #[query(
847            name = "branch",
848            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
849        )]
850        branch: Option<
851            super::super::super::super::super::objects::scout::versioning::api::BranchName,
852        >,
853        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
854        request: super::super::super::super::super::objects::scout::checks::api::SaveChecklistRequest,
855    ) -> Result<
856        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
857        conjure_http::private::Error,
858    >;
859    /// Merges the given branch to the "main" branch.
860    /// Throws if the checklist or branch doesn't exist.
861    /// Throws if the latest commit doesn't match the provided id.
862    /// Throws if you merge with an archived checklist.
863    #[endpoint(
864        method = POST,
865        path = "/scout/v1/checklists/{checklistRid}/merge-to-main",
866        name = "mergeToMain",
867        produces = conjure_http::server::StdResponseSerializer
868    )]
869    async fn merge_to_main(
870        &self,
871        #[auth]
872        auth_: conjure_object::BearerToken,
873        #[path(
874            name = "checklistRid",
875            decoder = conjure_http::server::conjure::FromPlainDecoder,
876            log_as = "checklistRid",
877            safe
878        )]
879        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
880        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
881        request: super::super::super::super::super::objects::scout::checks::api::MergeToMainRequest,
882    ) -> Result<
883        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
884        conjure_http::private::Error,
885    >;
886    /// Updates the data source ref names for all checks within a checklist.
887    /// Throws if the checklist doesn't exist.
888    #[endpoint(
889        method = POST,
890        path = "/scout/v1/checklists/{checklistRid}/update-ref-names",
891        name = "updateDataSourceRefNames",
892        produces = conjure_http::server::StdResponseSerializer
893    )]
894    async fn update_data_source_ref_names(
895        &self,
896        #[auth]
897        auth_: conjure_object::BearerToken,
898        #[path(
899            name = "checklistRid",
900            decoder = conjure_http::server::conjure::FromPlainDecoder,
901            log_as = "checklistRid",
902            safe
903        )]
904        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
905        #[query(
906            name = "branch",
907            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
908        )]
909        branch: Option<
910            super::super::super::super::super::objects::scout::versioning::api::BranchName,
911        >,
912        #[body(
913            deserializer = conjure_http::server::StdRequestDeserializer,
914            log_as = "refNameUpdates"
915        )]
916        ref_name_updates: std::collections::BTreeMap<
917            super::super::super::super::super::objects::scout::api::DataSourceRefName,
918            super::super::super::super::super::objects::scout::api::DataSourceRefName,
919        >,
920    ) -> Result<
921        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
922        conjure_http::private::Error,
923    >;
924    /// Updates the metadata of a checklist.
925    #[endpoint(
926        method = PUT,
927        path = "/scout/v1/checklists/{rid}/update-metadata",
928        name = "updateMetadata",
929        produces = conjure_http::server::StdResponseSerializer
930    )]
931    async fn update_metadata(
932        &self,
933        #[auth]
934        auth_: conjure_object::BearerToken,
935        #[path(
936            name = "rid",
937            decoder = conjure_http::server::conjure::FromPlainDecoder,
938            safe
939        )]
940        rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
941        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
942        request: super::super::super::super::super::objects::scout::checks::api::UpdateChecklistMetadataRequest,
943    ) -> Result<
944        super::super::super::super::super::objects::scout::checks::api::ChecklistMetadata,
945        conjure_http::private::Error,
946    >;
947    /// Specify at most one of (branch, commit).
948    /// If neither is specified, branch = "main" is the default.
949    #[endpoint(
950        method = GET,
951        path = "/scout/v1/checklists/{rid}",
952        name = "get",
953        produces = conjure_http::server::StdResponseSerializer
954    )]
955    async fn get(
956        &self,
957        #[auth]
958        auth_: conjure_object::BearerToken,
959        #[path(
960            name = "rid",
961            decoder = conjure_http::server::conjure::FromPlainDecoder,
962            safe
963        )]
964        rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
965        #[query(
966            name = "branch",
967            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
968        )]
969        branch: Option<
970            super::super::super::super::super::objects::scout::versioning::api::BranchName,
971        >,
972        #[query(
973            name = "commit",
974            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
975            safe
976        )]
977        commit: Option<
978            super::super::super::super::super::objects::scout::versioning::api::CommitId,
979        >,
980    ) -> Result<
981        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
982        conjure_http::private::Error,
983    >;
984    /// Returns the pinned commit for each provided checklist reference.
985    #[endpoint(
986        method = POST,
987        path = "/scout/v1/checklists/batch-get",
988        name = "batchGet",
989        produces = conjure_http::server::conjure::CollectionResponseSerializer
990    )]
991    async fn batch_get(
992        &self,
993        #[auth]
994        auth_: conjure_object::BearerToken,
995        #[body(
996            deserializer = conjure_http::server::StdRequestDeserializer,
997            log_as = "checklistRefs",
998            safe
999        )]
1000        checklist_refs: std::collections::BTreeSet<
1001            super::super::super::super::super::objects::scout::checks::api::PinnedChecklistRef,
1002        >,
1003    ) -> Result<
1004        std::collections::BTreeSet<
1005            super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
1006        >,
1007        conjure_http::private::Error,
1008    >;
1009    /// Returns the metadata for each provided checklist.
1010    #[endpoint(
1011        method = POST,
1012        path = "/scout/v1/checklists/batch-get-metadata",
1013        name = "batchGetMetadata",
1014        produces = conjure_http::server::StdResponseSerializer
1015    )]
1016    async fn batch_get_metadata(
1017        &self,
1018        #[auth]
1019        auth_: conjure_object::BearerToken,
1020        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
1021        request: super::super::super::super::super::objects::scout::checks::api::BatchGetChecklistMetadataRequest,
1022    ) -> Result<
1023        super::super::super::super::super::objects::scout::checks::api::BatchGetChecklistMetadataResponse,
1024        conjure_http::private::Error,
1025    >;
1026    /// Results will be the latest commit on main for each checklist.
1027    #[endpoint(
1028        method = POST,
1029        path = "/scout/v1/checklists/search",
1030        name = "search",
1031        produces = conjure_http::server::StdResponseSerializer
1032    )]
1033    async fn search(
1034        &self,
1035        #[auth]
1036        auth_: conjure_object::BearerToken,
1037        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
1038        request: super::super::super::super::super::objects::scout::checks::api::SearchChecklistsRequest,
1039    ) -> Result<
1040        super::super::super::super::super::objects::scout::checks::api::VersionedChecklistPage,
1041        conjure_http::private::Error,
1042    >;
1043    /// Archives the provided checklists.
1044    #[endpoint(method = POST, path = "/scout/v1/checklists/archive", name = "archive")]
1045    async fn archive(
1046        &self,
1047        #[auth]
1048        auth_: conjure_object::BearerToken,
1049        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
1050        request: super::super::super::super::super::objects::scout::checks::api::ArchiveChecklistsRequest,
1051    ) -> Result<(), conjure_http::private::Error>;
1052    /// Unarchives the provided checklists.
1053    #[endpoint(
1054        method = POST,
1055        path = "/scout/v1/checklists/unarchive",
1056        name = "unarchive"
1057    )]
1058    async fn unarchive(
1059        &self,
1060        #[auth]
1061        auth_: conjure_object::BearerToken,
1062        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
1063        request: super::super::super::super::super::objects::scout::checks::api::UnarchiveChecklistsRequest,
1064    ) -> Result<(), conjure_http::private::Error>;
1065    /// Returns the check with the given rid.
1066    #[endpoint(
1067        method = GET,
1068        path = "/scout/v1/checklists/check/{rid}",
1069        name = "getCheck",
1070        produces = conjure_http::server::StdResponseSerializer
1071    )]
1072    async fn get_check(
1073        &self,
1074        #[auth]
1075        auth_: conjure_object::BearerToken,
1076        #[path(
1077            name = "rid",
1078            decoder = conjure_http::server::conjure::FromPlainDecoder,
1079            safe
1080        )]
1081        rid: super::super::super::super::super::objects::scout::rids::api::CheckRid,
1082    ) -> Result<
1083        super::super::super::super::super::objects::scout::checks::api::Check,
1084        conjure_http::private::Error,
1085    >;
1086    /// Returns the checks with the given rids.
1087    #[endpoint(
1088        method = POST,
1089        path = "/scout/v1/checklists/check/batch-get",
1090        name = "batchGetChecks",
1091        produces = conjure_http::server::conjure::CollectionResponseSerializer
1092    )]
1093    async fn batch_get_checks(
1094        &self,
1095        #[auth]
1096        auth_: conjure_object::BearerToken,
1097        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
1098        rids: std::collections::BTreeSet<
1099            super::super::super::super::super::objects::scout::rids::api::CheckRid,
1100        >,
1101    ) -> Result<
1102        std::collections::BTreeSet<
1103            super::super::super::super::super::objects::scout::checks::api::Check,
1104        >,
1105        conjure_http::private::Error,
1106    >;
1107    /// Returns all labels and properties.
1108    #[endpoint(
1109        method = GET,
1110        path = "/scout/v1/checklists/get-all-labels-properties",
1111        name = "getAllLabelsAndProperties",
1112        produces = conjure_http::server::StdResponseSerializer
1113    )]
1114    async fn get_all_labels_and_properties(
1115        &self,
1116        #[auth]
1117        auth_: conjure_object::BearerToken,
1118        #[query(
1119            name = "workspaces",
1120            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
1121            safe
1122        )]
1123        workspaces: std::collections::BTreeSet<
1124            super::super::super::super::super::objects::api::rids::WorkspaceRid,
1125        >,
1126    ) -> Result<
1127        super::super::super::super::super::objects::scout::checks::api::GetAllLabelsAndPropertiesResponse,
1128        conjure_http::private::Error,
1129    >;
1130    /// Batch edits metadata across multiple checklists. Supports rename/merge for labels and properties.
1131    /// If more than 1000 checklists are targeted, this endpoint will throw a 400.
1132    #[endpoint(
1133        method = POST,
1134        path = "/scout/v1/checklists/metadata/batch-edit",
1135        name = "batchEditChecklistMetadata",
1136        produces = conjure_http::server::StdResponseSerializer
1137    )]
1138    async fn batch_edit_checklist_metadata(
1139        &self,
1140        #[auth]
1141        auth_: conjure_object::BearerToken,
1142        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
1143        request: super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataRequest,
1144    ) -> Result<
1145        super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataResponse,
1146        conjure_http::private::Error,
1147    >;
1148}