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        )]
357        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
358    ) -> Result<
359        super::super::super::super::super::objects::scout::checks::api::GetAllLabelsAndPropertiesResponse,
360        conjure_http::private::Error,
361    >;
362    /// Batch edits metadata across multiple checklists. Supports rename/merge for labels and properties.
363    /// If more than 1000 checklists are targeted, this endpoint will throw a 400.
364    #[endpoint(
365        method = POST,
366        path = "/scout/v1/checklists/metadata/batch-edit",
367        name = "batchEditChecklistMetadata",
368        produces = conjure_http::server::StdResponseSerializer
369    )]
370    fn batch_edit_checklist_metadata(
371        &self,
372        #[auth]
373        auth_: conjure_object::BearerToken,
374        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
375        request: super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataRequest,
376    ) -> Result<
377        super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataResponse,
378        conjure_http::private::Error,
379    >;
380}
381/// The Checklist Service is responsible for managing checklists and checks.
382/// A checklist is a collection of checks that can be executed against a set of data sources.
383#[conjure_http::conjure_endpoints(
384    name = "ChecklistService",
385    use_legacy_error_serialization
386)]
387pub trait AsyncChecklistService {
388    /// Creates a new checklist with the provided checks.
389    #[endpoint(
390        method = POST,
391        path = "/scout/v1/checklists",
392        name = "create",
393        produces = conjure_http::server::StdResponseSerializer
394    )]
395    async fn create(
396        &self,
397        #[auth]
398        auth_: conjure_object::BearerToken,
399        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
400        request: super::super::super::super::super::objects::scout::checks::api::CreateChecklistRequest,
401    ) -> Result<
402        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
403        conjure_http::private::Error,
404    >;
405    /// Creates a permanent commit with a commit message.
406    /// Throws if the checklist or branch doesn't exist.
407    /// Throws if the latest commit doesn't match the provided id.
408    /// Throws if you commit to an archived checklist.
409    #[endpoint(
410        method = POST,
411        path = "/scout/v1/checklists/{checklistRid}/commit",
412        name = "commit",
413        produces = conjure_http::server::StdResponseSerializer
414    )]
415    async fn commit(
416        &self,
417        #[auth]
418        auth_: conjure_object::BearerToken,
419        #[path(
420            name = "checklistRid",
421            decoder = conjure_http::server::conjure::FromPlainDecoder,
422            log_as = "checklistRid",
423            safe
424        )]
425        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
426        #[query(
427            name = "branch",
428            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
429        )]
430        branch: Option<
431            super::super::super::super::super::objects::scout::versioning::api::BranchName,
432        >,
433        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
434        request: super::super::super::super::super::objects::scout::checks::api::CommitChecklistRequest,
435    ) -> Result<
436        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
437        conjure_http::private::Error,
438    >;
439    /// Creates a commit that may be compacted, e.g cleaned up and not exist anymore.
440    /// Throws if the checklist or branch doesn't exist.
441    /// Throws if the latest commit doesn't match the provided id.
442    /// Throws if you save to an archived checklist.
443    #[endpoint(
444        method = POST,
445        path = "/scout/v1/checklists/{checklistRid}/save-working-state",
446        name = "saveWorkingState",
447        produces = conjure_http::server::StdResponseSerializer
448    )]
449    async fn save_working_state(
450        &self,
451        #[auth]
452        auth_: conjure_object::BearerToken,
453        #[path(
454            name = "checklistRid",
455            decoder = conjure_http::server::conjure::FromPlainDecoder,
456            log_as = "checklistRid",
457            safe
458        )]
459        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
460        #[query(
461            name = "branch",
462            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
463        )]
464        branch: Option<
465            super::super::super::super::super::objects::scout::versioning::api::BranchName,
466        >,
467        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
468        request: super::super::super::super::super::objects::scout::checks::api::SaveChecklistRequest,
469    ) -> Result<
470        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
471        conjure_http::private::Error,
472    >;
473    /// Merges the given branch to the "main" branch.
474    /// Throws if the checklist or branch doesn't exist.
475    /// Throws if the latest commit doesn't match the provided id.
476    /// Throws if you merge with an archived checklist.
477    #[endpoint(
478        method = POST,
479        path = "/scout/v1/checklists/{checklistRid}/merge-to-main",
480        name = "mergeToMain",
481        produces = conjure_http::server::StdResponseSerializer
482    )]
483    async fn merge_to_main(
484        &self,
485        #[auth]
486        auth_: conjure_object::BearerToken,
487        #[path(
488            name = "checklistRid",
489            decoder = conjure_http::server::conjure::FromPlainDecoder,
490            log_as = "checklistRid",
491            safe
492        )]
493        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
494        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
495        request: super::super::super::super::super::objects::scout::checks::api::MergeToMainRequest,
496    ) -> Result<
497        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
498        conjure_http::private::Error,
499    >;
500    /// Updates the data source ref names for all checks within a checklist.
501    /// Throws if the checklist doesn't exist.
502    #[endpoint(
503        method = POST,
504        path = "/scout/v1/checklists/{checklistRid}/update-ref-names",
505        name = "updateDataSourceRefNames",
506        produces = conjure_http::server::StdResponseSerializer
507    )]
508    async fn update_data_source_ref_names(
509        &self,
510        #[auth]
511        auth_: conjure_object::BearerToken,
512        #[path(
513            name = "checklistRid",
514            decoder = conjure_http::server::conjure::FromPlainDecoder,
515            log_as = "checklistRid",
516            safe
517        )]
518        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
519        #[query(
520            name = "branch",
521            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
522        )]
523        branch: Option<
524            super::super::super::super::super::objects::scout::versioning::api::BranchName,
525        >,
526        #[body(
527            deserializer = conjure_http::server::StdRequestDeserializer,
528            log_as = "refNameUpdates"
529        )]
530        ref_name_updates: std::collections::BTreeMap<
531            super::super::super::super::super::objects::scout::api::DataSourceRefName,
532            super::super::super::super::super::objects::scout::api::DataSourceRefName,
533        >,
534    ) -> Result<
535        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
536        conjure_http::private::Error,
537    >;
538    /// Updates the metadata of a checklist.
539    #[endpoint(
540        method = PUT,
541        path = "/scout/v1/checklists/{rid}/update-metadata",
542        name = "updateMetadata",
543        produces = conjure_http::server::StdResponseSerializer
544    )]
545    async fn update_metadata(
546        &self,
547        #[auth]
548        auth_: conjure_object::BearerToken,
549        #[path(
550            name = "rid",
551            decoder = conjure_http::server::conjure::FromPlainDecoder,
552            safe
553        )]
554        rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
555        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
556        request: super::super::super::super::super::objects::scout::checks::api::UpdateChecklistMetadataRequest,
557    ) -> Result<
558        super::super::super::super::super::objects::scout::checks::api::ChecklistMetadata,
559        conjure_http::private::Error,
560    >;
561    /// Specify at most one of (branch, commit).
562    /// If neither is specified, branch = "main" is the default.
563    #[endpoint(
564        method = GET,
565        path = "/scout/v1/checklists/{rid}",
566        name = "get",
567        produces = conjure_http::server::StdResponseSerializer
568    )]
569    async fn get(
570        &self,
571        #[auth]
572        auth_: conjure_object::BearerToken,
573        #[path(
574            name = "rid",
575            decoder = conjure_http::server::conjure::FromPlainDecoder,
576            safe
577        )]
578        rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
579        #[query(
580            name = "branch",
581            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
582        )]
583        branch: Option<
584            super::super::super::super::super::objects::scout::versioning::api::BranchName,
585        >,
586        #[query(
587            name = "commit",
588            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
589            safe
590        )]
591        commit: Option<
592            super::super::super::super::super::objects::scout::versioning::api::CommitId,
593        >,
594    ) -> Result<
595        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
596        conjure_http::private::Error,
597    >;
598    /// Returns the pinned commit for each provided checklist reference.
599    #[endpoint(
600        method = POST,
601        path = "/scout/v1/checklists/batch-get",
602        name = "batchGet",
603        produces = conjure_http::server::conjure::CollectionResponseSerializer
604    )]
605    async fn batch_get(
606        &self,
607        #[auth]
608        auth_: conjure_object::BearerToken,
609        #[body(
610            deserializer = conjure_http::server::StdRequestDeserializer,
611            log_as = "checklistRefs",
612            safe
613        )]
614        checklist_refs: std::collections::BTreeSet<
615            super::super::super::super::super::objects::scout::checks::api::PinnedChecklistRef,
616        >,
617    ) -> Result<
618        std::collections::BTreeSet<
619            super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
620        >,
621        conjure_http::private::Error,
622    >;
623    /// Returns the metadata for each provided checklist.
624    #[endpoint(
625        method = POST,
626        path = "/scout/v1/checklists/batch-get-metadata",
627        name = "batchGetMetadata",
628        produces = conjure_http::server::StdResponseSerializer
629    )]
630    async fn batch_get_metadata(
631        &self,
632        #[auth]
633        auth_: conjure_object::BearerToken,
634        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
635        request: super::super::super::super::super::objects::scout::checks::api::BatchGetChecklistMetadataRequest,
636    ) -> Result<
637        super::super::super::super::super::objects::scout::checks::api::BatchGetChecklistMetadataResponse,
638        conjure_http::private::Error,
639    >;
640    /// Results will be the latest commit on main for each checklist.
641    #[endpoint(
642        method = POST,
643        path = "/scout/v1/checklists/search",
644        name = "search",
645        produces = conjure_http::server::StdResponseSerializer
646    )]
647    async fn search(
648        &self,
649        #[auth]
650        auth_: conjure_object::BearerToken,
651        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
652        request: super::super::super::super::super::objects::scout::checks::api::SearchChecklistsRequest,
653    ) -> Result<
654        super::super::super::super::super::objects::scout::checks::api::VersionedChecklistPage,
655        conjure_http::private::Error,
656    >;
657    /// Archives the provided checklists.
658    #[endpoint(method = POST, path = "/scout/v1/checklists/archive", name = "archive")]
659    async fn archive(
660        &self,
661        #[auth]
662        auth_: conjure_object::BearerToken,
663        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
664        request: super::super::super::super::super::objects::scout::checks::api::ArchiveChecklistsRequest,
665    ) -> Result<(), conjure_http::private::Error>;
666    /// Unarchives the provided checklists.
667    #[endpoint(
668        method = POST,
669        path = "/scout/v1/checklists/unarchive",
670        name = "unarchive"
671    )]
672    async fn unarchive(
673        &self,
674        #[auth]
675        auth_: conjure_object::BearerToken,
676        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
677        request: super::super::super::super::super::objects::scout::checks::api::UnarchiveChecklistsRequest,
678    ) -> Result<(), conjure_http::private::Error>;
679    /// Returns the check with the given rid.
680    #[endpoint(
681        method = GET,
682        path = "/scout/v1/checklists/check/{rid}",
683        name = "getCheck",
684        produces = conjure_http::server::StdResponseSerializer
685    )]
686    async fn get_check(
687        &self,
688        #[auth]
689        auth_: conjure_object::BearerToken,
690        #[path(
691            name = "rid",
692            decoder = conjure_http::server::conjure::FromPlainDecoder,
693            safe
694        )]
695        rid: super::super::super::super::super::objects::scout::rids::api::CheckRid,
696    ) -> Result<
697        super::super::super::super::super::objects::scout::checks::api::Check,
698        conjure_http::private::Error,
699    >;
700    /// Returns the checks with the given rids.
701    #[endpoint(
702        method = POST,
703        path = "/scout/v1/checklists/check/batch-get",
704        name = "batchGetChecks",
705        produces = conjure_http::server::conjure::CollectionResponseSerializer
706    )]
707    async fn batch_get_checks(
708        &self,
709        #[auth]
710        auth_: conjure_object::BearerToken,
711        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
712        rids: std::collections::BTreeSet<
713            super::super::super::super::super::objects::scout::rids::api::CheckRid,
714        >,
715    ) -> Result<
716        std::collections::BTreeSet<
717            super::super::super::super::super::objects::scout::checks::api::Check,
718        >,
719        conjure_http::private::Error,
720    >;
721    /// Returns all labels and properties.
722    #[endpoint(
723        method = GET,
724        path = "/scout/v1/checklists/get-all-labels-properties",
725        name = "getAllLabelsAndProperties",
726        produces = conjure_http::server::StdResponseSerializer
727    )]
728    async fn get_all_labels_and_properties(
729        &self,
730        #[auth]
731        auth_: conjure_object::BearerToken,
732        #[query(
733            name = "workspaces",
734            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
735        )]
736        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
737    ) -> Result<
738        super::super::super::super::super::objects::scout::checks::api::GetAllLabelsAndPropertiesResponse,
739        conjure_http::private::Error,
740    >;
741    /// Batch edits metadata across multiple checklists. Supports rename/merge for labels and properties.
742    /// If more than 1000 checklists are targeted, this endpoint will throw a 400.
743    #[endpoint(
744        method = POST,
745        path = "/scout/v1/checklists/metadata/batch-edit",
746        name = "batchEditChecklistMetadata",
747        produces = conjure_http::server::StdResponseSerializer
748    )]
749    async fn batch_edit_checklist_metadata(
750        &self,
751        #[auth]
752        auth_: conjure_object::BearerToken,
753        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
754        request: super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataRequest,
755    ) -> Result<
756        super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataResponse,
757        conjure_http::private::Error,
758    >;
759}
760/// The Checklist Service is responsible for managing checklists and checks.
761/// A checklist is a collection of checks that can be executed against a set of data sources.
762#[conjure_http::conjure_endpoints(
763    name = "ChecklistService",
764    use_legacy_error_serialization,
765    local
766)]
767pub trait LocalAsyncChecklistService {
768    /// Creates a new checklist with the provided checks.
769    #[endpoint(
770        method = POST,
771        path = "/scout/v1/checklists",
772        name = "create",
773        produces = conjure_http::server::StdResponseSerializer
774    )]
775    async fn create(
776        &self,
777        #[auth]
778        auth_: conjure_object::BearerToken,
779        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
780        request: super::super::super::super::super::objects::scout::checks::api::CreateChecklistRequest,
781    ) -> Result<
782        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
783        conjure_http::private::Error,
784    >;
785    /// Creates a permanent commit with a commit message.
786    /// Throws if the checklist or branch doesn't exist.
787    /// Throws if the latest commit doesn't match the provided id.
788    /// Throws if you commit to an archived checklist.
789    #[endpoint(
790        method = POST,
791        path = "/scout/v1/checklists/{checklistRid}/commit",
792        name = "commit",
793        produces = conjure_http::server::StdResponseSerializer
794    )]
795    async fn commit(
796        &self,
797        #[auth]
798        auth_: conjure_object::BearerToken,
799        #[path(
800            name = "checklistRid",
801            decoder = conjure_http::server::conjure::FromPlainDecoder,
802            log_as = "checklistRid",
803            safe
804        )]
805        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
806        #[query(
807            name = "branch",
808            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
809        )]
810        branch: Option<
811            super::super::super::super::super::objects::scout::versioning::api::BranchName,
812        >,
813        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
814        request: super::super::super::super::super::objects::scout::checks::api::CommitChecklistRequest,
815    ) -> Result<
816        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
817        conjure_http::private::Error,
818    >;
819    /// Creates a commit that may be compacted, e.g cleaned up and not exist anymore.
820    /// Throws if the checklist or branch doesn't exist.
821    /// Throws if the latest commit doesn't match the provided id.
822    /// Throws if you save to an archived checklist.
823    #[endpoint(
824        method = POST,
825        path = "/scout/v1/checklists/{checklistRid}/save-working-state",
826        name = "saveWorkingState",
827        produces = conjure_http::server::StdResponseSerializer
828    )]
829    async fn save_working_state(
830        &self,
831        #[auth]
832        auth_: conjure_object::BearerToken,
833        #[path(
834            name = "checklistRid",
835            decoder = conjure_http::server::conjure::FromPlainDecoder,
836            log_as = "checklistRid",
837            safe
838        )]
839        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
840        #[query(
841            name = "branch",
842            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
843        )]
844        branch: Option<
845            super::super::super::super::super::objects::scout::versioning::api::BranchName,
846        >,
847        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
848        request: super::super::super::super::super::objects::scout::checks::api::SaveChecklistRequest,
849    ) -> Result<
850        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
851        conjure_http::private::Error,
852    >;
853    /// Merges the given branch to the "main" branch.
854    /// Throws if the checklist or branch doesn't exist.
855    /// Throws if the latest commit doesn't match the provided id.
856    /// Throws if you merge with an archived checklist.
857    #[endpoint(
858        method = POST,
859        path = "/scout/v1/checklists/{checklistRid}/merge-to-main",
860        name = "mergeToMain",
861        produces = conjure_http::server::StdResponseSerializer
862    )]
863    async fn merge_to_main(
864        &self,
865        #[auth]
866        auth_: conjure_object::BearerToken,
867        #[path(
868            name = "checklistRid",
869            decoder = conjure_http::server::conjure::FromPlainDecoder,
870            log_as = "checklistRid",
871            safe
872        )]
873        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
874        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
875        request: super::super::super::super::super::objects::scout::checks::api::MergeToMainRequest,
876    ) -> Result<
877        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
878        conjure_http::private::Error,
879    >;
880    /// Updates the data source ref names for all checks within a checklist.
881    /// Throws if the checklist doesn't exist.
882    #[endpoint(
883        method = POST,
884        path = "/scout/v1/checklists/{checklistRid}/update-ref-names",
885        name = "updateDataSourceRefNames",
886        produces = conjure_http::server::StdResponseSerializer
887    )]
888    async fn update_data_source_ref_names(
889        &self,
890        #[auth]
891        auth_: conjure_object::BearerToken,
892        #[path(
893            name = "checklistRid",
894            decoder = conjure_http::server::conjure::FromPlainDecoder,
895            log_as = "checklistRid",
896            safe
897        )]
898        checklist_rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
899        #[query(
900            name = "branch",
901            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
902        )]
903        branch: Option<
904            super::super::super::super::super::objects::scout::versioning::api::BranchName,
905        >,
906        #[body(
907            deserializer = conjure_http::server::StdRequestDeserializer,
908            log_as = "refNameUpdates"
909        )]
910        ref_name_updates: std::collections::BTreeMap<
911            super::super::super::super::super::objects::scout::api::DataSourceRefName,
912            super::super::super::super::super::objects::scout::api::DataSourceRefName,
913        >,
914    ) -> Result<
915        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
916        conjure_http::private::Error,
917    >;
918    /// Updates the metadata of a checklist.
919    #[endpoint(
920        method = PUT,
921        path = "/scout/v1/checklists/{rid}/update-metadata",
922        name = "updateMetadata",
923        produces = conjure_http::server::StdResponseSerializer
924    )]
925    async fn update_metadata(
926        &self,
927        #[auth]
928        auth_: conjure_object::BearerToken,
929        #[path(
930            name = "rid",
931            decoder = conjure_http::server::conjure::FromPlainDecoder,
932            safe
933        )]
934        rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
935        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
936        request: super::super::super::super::super::objects::scout::checks::api::UpdateChecklistMetadataRequest,
937    ) -> Result<
938        super::super::super::super::super::objects::scout::checks::api::ChecklistMetadata,
939        conjure_http::private::Error,
940    >;
941    /// Specify at most one of (branch, commit).
942    /// If neither is specified, branch = "main" is the default.
943    #[endpoint(
944        method = GET,
945        path = "/scout/v1/checklists/{rid}",
946        name = "get",
947        produces = conjure_http::server::StdResponseSerializer
948    )]
949    async fn get(
950        &self,
951        #[auth]
952        auth_: conjure_object::BearerToken,
953        #[path(
954            name = "rid",
955            decoder = conjure_http::server::conjure::FromPlainDecoder,
956            safe
957        )]
958        rid: super::super::super::super::super::objects::scout::rids::api::ChecklistRid,
959        #[query(
960            name = "branch",
961            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
962        )]
963        branch: Option<
964            super::super::super::super::super::objects::scout::versioning::api::BranchName,
965        >,
966        #[query(
967            name = "commit",
968            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
969            safe
970        )]
971        commit: Option<
972            super::super::super::super::super::objects::scout::versioning::api::CommitId,
973        >,
974    ) -> Result<
975        super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
976        conjure_http::private::Error,
977    >;
978    /// Returns the pinned commit for each provided checklist reference.
979    #[endpoint(
980        method = POST,
981        path = "/scout/v1/checklists/batch-get",
982        name = "batchGet",
983        produces = conjure_http::server::conjure::CollectionResponseSerializer
984    )]
985    async fn batch_get(
986        &self,
987        #[auth]
988        auth_: conjure_object::BearerToken,
989        #[body(
990            deserializer = conjure_http::server::StdRequestDeserializer,
991            log_as = "checklistRefs",
992            safe
993        )]
994        checklist_refs: std::collections::BTreeSet<
995            super::super::super::super::super::objects::scout::checks::api::PinnedChecklistRef,
996        >,
997    ) -> Result<
998        std::collections::BTreeSet<
999            super::super::super::super::super::objects::scout::checks::api::VersionedChecklist,
1000        >,
1001        conjure_http::private::Error,
1002    >;
1003    /// Returns the metadata for each provided checklist.
1004    #[endpoint(
1005        method = POST,
1006        path = "/scout/v1/checklists/batch-get-metadata",
1007        name = "batchGetMetadata",
1008        produces = conjure_http::server::StdResponseSerializer
1009    )]
1010    async fn batch_get_metadata(
1011        &self,
1012        #[auth]
1013        auth_: conjure_object::BearerToken,
1014        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
1015        request: super::super::super::super::super::objects::scout::checks::api::BatchGetChecklistMetadataRequest,
1016    ) -> Result<
1017        super::super::super::super::super::objects::scout::checks::api::BatchGetChecklistMetadataResponse,
1018        conjure_http::private::Error,
1019    >;
1020    /// Results will be the latest commit on main for each checklist.
1021    #[endpoint(
1022        method = POST,
1023        path = "/scout/v1/checklists/search",
1024        name = "search",
1025        produces = conjure_http::server::StdResponseSerializer
1026    )]
1027    async fn search(
1028        &self,
1029        #[auth]
1030        auth_: conjure_object::BearerToken,
1031        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
1032        request: super::super::super::super::super::objects::scout::checks::api::SearchChecklistsRequest,
1033    ) -> Result<
1034        super::super::super::super::super::objects::scout::checks::api::VersionedChecklistPage,
1035        conjure_http::private::Error,
1036    >;
1037    /// Archives the provided checklists.
1038    #[endpoint(method = POST, path = "/scout/v1/checklists/archive", name = "archive")]
1039    async fn archive(
1040        &self,
1041        #[auth]
1042        auth_: conjure_object::BearerToken,
1043        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
1044        request: super::super::super::super::super::objects::scout::checks::api::ArchiveChecklistsRequest,
1045    ) -> Result<(), conjure_http::private::Error>;
1046    /// Unarchives the provided checklists.
1047    #[endpoint(
1048        method = POST,
1049        path = "/scout/v1/checklists/unarchive",
1050        name = "unarchive"
1051    )]
1052    async fn unarchive(
1053        &self,
1054        #[auth]
1055        auth_: conjure_object::BearerToken,
1056        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
1057        request: super::super::super::super::super::objects::scout::checks::api::UnarchiveChecklistsRequest,
1058    ) -> Result<(), conjure_http::private::Error>;
1059    /// Returns the check with the given rid.
1060    #[endpoint(
1061        method = GET,
1062        path = "/scout/v1/checklists/check/{rid}",
1063        name = "getCheck",
1064        produces = conjure_http::server::StdResponseSerializer
1065    )]
1066    async fn get_check(
1067        &self,
1068        #[auth]
1069        auth_: conjure_object::BearerToken,
1070        #[path(
1071            name = "rid",
1072            decoder = conjure_http::server::conjure::FromPlainDecoder,
1073            safe
1074        )]
1075        rid: super::super::super::super::super::objects::scout::rids::api::CheckRid,
1076    ) -> Result<
1077        super::super::super::super::super::objects::scout::checks::api::Check,
1078        conjure_http::private::Error,
1079    >;
1080    /// Returns the checks with the given rids.
1081    #[endpoint(
1082        method = POST,
1083        path = "/scout/v1/checklists/check/batch-get",
1084        name = "batchGetChecks",
1085        produces = conjure_http::server::conjure::CollectionResponseSerializer
1086    )]
1087    async fn batch_get_checks(
1088        &self,
1089        #[auth]
1090        auth_: conjure_object::BearerToken,
1091        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
1092        rids: std::collections::BTreeSet<
1093            super::super::super::super::super::objects::scout::rids::api::CheckRid,
1094        >,
1095    ) -> Result<
1096        std::collections::BTreeSet<
1097            super::super::super::super::super::objects::scout::checks::api::Check,
1098        >,
1099        conjure_http::private::Error,
1100    >;
1101    /// Returns all labels and properties.
1102    #[endpoint(
1103        method = GET,
1104        path = "/scout/v1/checklists/get-all-labels-properties",
1105        name = "getAllLabelsAndProperties",
1106        produces = conjure_http::server::StdResponseSerializer
1107    )]
1108    async fn get_all_labels_and_properties(
1109        &self,
1110        #[auth]
1111        auth_: conjure_object::BearerToken,
1112        #[query(
1113            name = "workspaces",
1114            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
1115        )]
1116        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
1117    ) -> Result<
1118        super::super::super::super::super::objects::scout::checks::api::GetAllLabelsAndPropertiesResponse,
1119        conjure_http::private::Error,
1120    >;
1121    /// Batch edits metadata across multiple checklists. Supports rename/merge for labels and properties.
1122    /// If more than 1000 checklists are targeted, this endpoint will throw a 400.
1123    #[endpoint(
1124        method = POST,
1125        path = "/scout/v1/checklists/metadata/batch-edit",
1126        name = "batchEditChecklistMetadata",
1127        produces = conjure_http::server::StdResponseSerializer
1128    )]
1129    async fn batch_edit_checklist_metadata(
1130        &self,
1131        #[auth]
1132        auth_: conjure_object::BearerToken,
1133        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
1134        request: super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataRequest,
1135    ) -> Result<
1136        super::super::super::super::super::objects::scout::checks::api::BatchEditChecklistMetadataResponse,
1137        conjure_http::private::Error,
1138    >;
1139}