Skip to main content

nominal_api/conjure/endpoints/scout/
template_service.rs

1use conjure_http::endpoint;
2/// TemplateService manages templates, which are workbooks that
3/// can be re-used across runs. Templates are versioned.
4#[conjure_http::conjure_endpoints(
5    name = "TemplateService",
6    use_legacy_error_serialization
7)]
8pub trait TemplateService {
9    /// Creates a new template.
10    #[endpoint(
11        method = POST,
12        path = "/scout/v1/template",
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::objects::scout::template::api::CreateTemplateRequest,
22    ) -> Result<
23        super::super::super::objects::scout::template::api::Template,
24        conjure_http::private::Error,
25    >;
26    /// Must only pass one of (branch, commit). If neither are passed,
27    /// the latest commit on the "main" branch is returned.
28    /// Throws if the template, branch, or commit doesn't exist.
29    #[endpoint(
30        method = GET,
31        path = "/scout/v1/template/{templateRid}",
32        name = "get",
33        produces = conjure_http::server::StdResponseSerializer
34    )]
35    fn get(
36        &self,
37        #[auth]
38        auth_: conjure_object::BearerToken,
39        #[path(
40            name = "templateRid",
41            decoder = conjure_http::server::conjure::FromPlainDecoder,
42            log_as = "templateRid",
43            safe
44        )]
45        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
46        #[query(
47            name = "branch",
48            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
49        )]
50        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
51        #[query(
52            name = "commit",
53            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
54            safe
55        )]
56        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
57    ) -> Result<
58        super::super::super::objects::scout::template::api::Template,
59        conjure_http::private::Error,
60    >;
61    #[endpoint(
62        method = POST,
63        path = "/scout/v1/template/batch-get-metadata",
64        name = "batchGetMetadata",
65        produces = conjure_http::server::conjure::CollectionResponseSerializer
66    )]
67    fn batch_get_metadata(
68        &self,
69        #[auth]
70        auth_: conjure_object::BearerToken,
71        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
72        rids: std::collections::BTreeSet<
73            super::super::super::objects::scout::rids::api::TemplateRid,
74        >,
75    ) -> Result<
76        std::collections::BTreeSet<
77            super::super::super::objects::scout::template::api::TemplateSummary,
78        >,
79        conjure_http::private::Error,
80    >;
81    /// Creates a commit that may be compacted, e.g cleaned up and not exist anymore.
82    /// Throws if the template or branch doesn't exist.
83    /// Throws if the latest commit doesn't match the provided id.
84    /// Throws if you save to an archived template.
85    #[endpoint(
86        method = POST,
87        path = "/scout/v1/template/{templateRid}/save-working-state",
88        name = "saveWorkingState",
89        produces = conjure_http::server::StdResponseSerializer
90    )]
91    fn save_working_state(
92        &self,
93        #[auth]
94        auth_: conjure_object::BearerToken,
95        #[path(
96            name = "templateRid",
97            decoder = conjure_http::server::conjure::FromPlainDecoder,
98            log_as = "templateRid",
99            safe
100        )]
101        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
102        #[query(
103            name = "branch",
104            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
105        )]
106        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
107        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
108        request: super::super::super::objects::scout::template::api::SaveTemplateRequest,
109    ) -> Result<
110        super::super::super::objects::scout::template::api::Template,
111        conjure_http::private::Error,
112    >;
113    /// Returns the set of all ref names used by the template.
114    #[endpoint(
115        method = GET,
116        path = "/scout/v1/template/{templateRid}/ref-names",
117        name = "getUsedRefNames",
118        produces = conjure_http::server::conjure::CollectionResponseSerializer
119    )]
120    fn get_used_ref_names(
121        &self,
122        #[auth]
123        auth_: conjure_object::BearerToken,
124        #[path(
125            name = "templateRid",
126            decoder = conjure_http::server::conjure::FromPlainDecoder,
127            log_as = "templateRid",
128            safe
129        )]
130        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
131        #[query(
132            name = "branch",
133            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
134        )]
135        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
136        #[query(
137            name = "commit",
138            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
139            safe
140        )]
141        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
142    ) -> Result<
143        std::collections::BTreeSet<
144            super::super::super::objects::scout::api::DataSourceRefName,
145        >,
146        conjure_http::private::Error,
147    >;
148    /// Updates the data source ref names for all variables used in the template.
149    #[endpoint(
150        method = POST,
151        path = "/scout/v1/template/{templateRid}/update-ref-names",
152        name = "updateRefNames",
153        produces = conjure_http::server::StdResponseSerializer
154    )]
155    fn update_ref_names(
156        &self,
157        #[auth]
158        auth_: conjure_object::BearerToken,
159        #[path(
160            name = "templateRid",
161            decoder = conjure_http::server::conjure::FromPlainDecoder,
162            log_as = "templateRid",
163            safe
164        )]
165        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
166        #[query(
167            name = "branch",
168            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
169        )]
170        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
171        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
172        request: super::super::super::objects::scout::template::api::UpdateRefNameRequest,
173    ) -> Result<
174        super::super::super::objects::scout::template::api::Template,
175        conjure_http::private::Error,
176    >;
177    /// Creates a commit with a commit message.
178    /// Throws if the template or branch doesn't exist.
179    /// Throws if the latest commit doesn't match the provided id.
180    /// Throws if you commit to an archived template.
181    #[endpoint(
182        method = POST,
183        path = "/scout/v1/template/{templateRid}/commit",
184        name = "commit",
185        produces = conjure_http::server::StdResponseSerializer
186    )]
187    fn commit(
188        &self,
189        #[auth]
190        auth_: conjure_object::BearerToken,
191        #[path(
192            name = "templateRid",
193            decoder = conjure_http::server::conjure::FromPlainDecoder,
194            log_as = "templateRid",
195            safe
196        )]
197        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
198        #[query(
199            name = "branch",
200            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
201        )]
202        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
203        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
204        request: super::super::super::objects::scout::template::api::CommitTemplateRequest,
205    ) -> Result<
206        super::super::super::objects::scout::template::api::Template,
207        conjure_http::private::Error,
208    >;
209    /// Throws if the template doesn't exist.
210    #[endpoint(
211        method = POST,
212        path = "/scout/v1/template/{templateRid}/metadata",
213        name = "updateMetadata",
214        produces = conjure_http::server::StdResponseSerializer
215    )]
216    fn update_metadata(
217        &self,
218        #[auth]
219        auth_: conjure_object::BearerToken,
220        #[path(
221            name = "templateRid",
222            decoder = conjure_http::server::conjure::FromPlainDecoder,
223            log_as = "templateRid",
224            safe
225        )]
226        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
227        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
228        request: super::super::super::objects::scout::template::api::UpdateMetadataRequest,
229    ) -> Result<
230        super::super::super::objects::scout::template::api::TemplateMetadata,
231        conjure_http::private::Error,
232    >;
233    #[endpoint(
234        method = POST,
235        path = "/scout/v1/template/search",
236        name = "searchTemplates",
237        produces = conjure_http::server::StdResponseSerializer
238    )]
239    fn search_templates(
240        &self,
241        #[auth]
242        auth_: conjure_object::BearerToken,
243        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
244        request: super::super::super::objects::scout::template::api::SearchTemplatesRequest,
245    ) -> Result<
246        super::super::super::objects::scout::template::api::SearchTemplatesResponse,
247        conjure_http::private::Error,
248    >;
249    #[endpoint(
250        method = GET,
251        path = "/scout/v1/template/get-all-labels-properties",
252        name = "getAllLabelsAndProperties",
253        produces = conjure_http::server::StdResponseSerializer
254    )]
255    fn get_all_labels_and_properties(
256        &self,
257        #[auth]
258        auth_: conjure_object::BearerToken,
259        #[query(
260            name = "workspaces",
261            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
262            safe
263        )]
264        workspaces: std::collections::BTreeSet<
265            super::super::super::objects::api::rids::WorkspaceRid,
266        >,
267    ) -> Result<
268        super::super::super::objects::scout::template::api::GetAllLabelsAndPropertiesResponse,
269        conjure_http::private::Error,
270    >;
271    /// Duplicates an existing template, copying its content (layout, charts, variables)
272    /// and optionally overriding metadata fields such as title, description, labels,
273    /// and properties. Returns the newly created template.
274    #[endpoint(
275        method = POST,
276        path = "/scout/v1/template/{templateRid}/duplicate",
277        name = "duplicate",
278        produces = conjure_http::server::StdResponseSerializer
279    )]
280    fn duplicate(
281        &self,
282        #[auth]
283        auth_: conjure_object::BearerToken,
284        #[path(
285            name = "templateRid",
286            decoder = conjure_http::server::conjure::FromPlainDecoder,
287            log_as = "templateRid",
288            safe
289        )]
290        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
291        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
292        request: super::super::super::objects::scout::template::api::DuplicateTemplateRequest,
293    ) -> Result<
294        super::super::super::objects::scout::template::api::Template,
295        conjure_http::private::Error,
296    >;
297    /// Merges the given branch to the "main" branch.
298    /// Throws if the template or branch doesn't exist.
299    /// Throws if the latest commit doesn't match the provided id.
300    /// Throws if you merge on an archived template.
301    #[endpoint(
302        method = POST,
303        path = "/scout/v1/template/{templateRid}/merge-to-main",
304        name = "mergeToMain",
305        produces = conjure_http::server::StdResponseSerializer
306    )]
307    fn merge_to_main(
308        &self,
309        #[auth]
310        auth_: conjure_object::BearerToken,
311        #[path(
312            name = "templateRid",
313            decoder = conjure_http::server::conjure::FromPlainDecoder,
314            log_as = "templateRid",
315            safe
316        )]
317        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
318        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
319        request: super::super::super::objects::scout::template::api::MergeToMainRequest,
320    ) -> Result<
321        super::super::super::objects::scout::template::api::Template,
322        conjure_http::private::Error,
323    >;
324}
325/// TemplateService manages templates, which are workbooks that
326/// can be re-used across runs. Templates are versioned.
327#[conjure_http::conjure_endpoints(
328    name = "TemplateService",
329    use_legacy_error_serialization
330)]
331pub trait AsyncTemplateService {
332    /// Creates a new template.
333    #[endpoint(
334        method = POST,
335        path = "/scout/v1/template",
336        name = "create",
337        produces = conjure_http::server::StdResponseSerializer
338    )]
339    async fn create(
340        &self,
341        #[auth]
342        auth_: conjure_object::BearerToken,
343        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
344        request: super::super::super::objects::scout::template::api::CreateTemplateRequest,
345    ) -> Result<
346        super::super::super::objects::scout::template::api::Template,
347        conjure_http::private::Error,
348    >;
349    /// Must only pass one of (branch, commit). If neither are passed,
350    /// the latest commit on the "main" branch is returned.
351    /// Throws if the template, branch, or commit doesn't exist.
352    #[endpoint(
353        method = GET,
354        path = "/scout/v1/template/{templateRid}",
355        name = "get",
356        produces = conjure_http::server::StdResponseSerializer
357    )]
358    async fn get(
359        &self,
360        #[auth]
361        auth_: conjure_object::BearerToken,
362        #[path(
363            name = "templateRid",
364            decoder = conjure_http::server::conjure::FromPlainDecoder,
365            log_as = "templateRid",
366            safe
367        )]
368        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
369        #[query(
370            name = "branch",
371            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
372        )]
373        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
374        #[query(
375            name = "commit",
376            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
377            safe
378        )]
379        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
380    ) -> Result<
381        super::super::super::objects::scout::template::api::Template,
382        conjure_http::private::Error,
383    >;
384    #[endpoint(
385        method = POST,
386        path = "/scout/v1/template/batch-get-metadata",
387        name = "batchGetMetadata",
388        produces = conjure_http::server::conjure::CollectionResponseSerializer
389    )]
390    async fn batch_get_metadata(
391        &self,
392        #[auth]
393        auth_: conjure_object::BearerToken,
394        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
395        rids: std::collections::BTreeSet<
396            super::super::super::objects::scout::rids::api::TemplateRid,
397        >,
398    ) -> Result<
399        std::collections::BTreeSet<
400            super::super::super::objects::scout::template::api::TemplateSummary,
401        >,
402        conjure_http::private::Error,
403    >;
404    /// Creates a commit that may be compacted, e.g cleaned up and not exist anymore.
405    /// Throws if the template or branch doesn't exist.
406    /// Throws if the latest commit doesn't match the provided id.
407    /// Throws if you save to an archived template.
408    #[endpoint(
409        method = POST,
410        path = "/scout/v1/template/{templateRid}/save-working-state",
411        name = "saveWorkingState",
412        produces = conjure_http::server::StdResponseSerializer
413    )]
414    async fn save_working_state(
415        &self,
416        #[auth]
417        auth_: conjure_object::BearerToken,
418        #[path(
419            name = "templateRid",
420            decoder = conjure_http::server::conjure::FromPlainDecoder,
421            log_as = "templateRid",
422            safe
423        )]
424        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
425        #[query(
426            name = "branch",
427            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
428        )]
429        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
430        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
431        request: super::super::super::objects::scout::template::api::SaveTemplateRequest,
432    ) -> Result<
433        super::super::super::objects::scout::template::api::Template,
434        conjure_http::private::Error,
435    >;
436    /// Returns the set of all ref names used by the template.
437    #[endpoint(
438        method = GET,
439        path = "/scout/v1/template/{templateRid}/ref-names",
440        name = "getUsedRefNames",
441        produces = conjure_http::server::conjure::CollectionResponseSerializer
442    )]
443    async fn get_used_ref_names(
444        &self,
445        #[auth]
446        auth_: conjure_object::BearerToken,
447        #[path(
448            name = "templateRid",
449            decoder = conjure_http::server::conjure::FromPlainDecoder,
450            log_as = "templateRid",
451            safe
452        )]
453        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
454        #[query(
455            name = "branch",
456            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
457        )]
458        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
459        #[query(
460            name = "commit",
461            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
462            safe
463        )]
464        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
465    ) -> Result<
466        std::collections::BTreeSet<
467            super::super::super::objects::scout::api::DataSourceRefName,
468        >,
469        conjure_http::private::Error,
470    >;
471    /// Updates the data source ref names for all variables used in the template.
472    #[endpoint(
473        method = POST,
474        path = "/scout/v1/template/{templateRid}/update-ref-names",
475        name = "updateRefNames",
476        produces = conjure_http::server::StdResponseSerializer
477    )]
478    async fn update_ref_names(
479        &self,
480        #[auth]
481        auth_: conjure_object::BearerToken,
482        #[path(
483            name = "templateRid",
484            decoder = conjure_http::server::conjure::FromPlainDecoder,
485            log_as = "templateRid",
486            safe
487        )]
488        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
489        #[query(
490            name = "branch",
491            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
492        )]
493        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
494        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
495        request: super::super::super::objects::scout::template::api::UpdateRefNameRequest,
496    ) -> Result<
497        super::super::super::objects::scout::template::api::Template,
498        conjure_http::private::Error,
499    >;
500    /// Creates a commit with a commit message.
501    /// Throws if the template or branch doesn't exist.
502    /// Throws if the latest commit doesn't match the provided id.
503    /// Throws if you commit to an archived template.
504    #[endpoint(
505        method = POST,
506        path = "/scout/v1/template/{templateRid}/commit",
507        name = "commit",
508        produces = conjure_http::server::StdResponseSerializer
509    )]
510    async fn commit(
511        &self,
512        #[auth]
513        auth_: conjure_object::BearerToken,
514        #[path(
515            name = "templateRid",
516            decoder = conjure_http::server::conjure::FromPlainDecoder,
517            log_as = "templateRid",
518            safe
519        )]
520        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
521        #[query(
522            name = "branch",
523            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
524        )]
525        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
526        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
527        request: super::super::super::objects::scout::template::api::CommitTemplateRequest,
528    ) -> Result<
529        super::super::super::objects::scout::template::api::Template,
530        conjure_http::private::Error,
531    >;
532    /// Throws if the template doesn't exist.
533    #[endpoint(
534        method = POST,
535        path = "/scout/v1/template/{templateRid}/metadata",
536        name = "updateMetadata",
537        produces = conjure_http::server::StdResponseSerializer
538    )]
539    async fn update_metadata(
540        &self,
541        #[auth]
542        auth_: conjure_object::BearerToken,
543        #[path(
544            name = "templateRid",
545            decoder = conjure_http::server::conjure::FromPlainDecoder,
546            log_as = "templateRid",
547            safe
548        )]
549        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
550        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
551        request: super::super::super::objects::scout::template::api::UpdateMetadataRequest,
552    ) -> Result<
553        super::super::super::objects::scout::template::api::TemplateMetadata,
554        conjure_http::private::Error,
555    >;
556    #[endpoint(
557        method = POST,
558        path = "/scout/v1/template/search",
559        name = "searchTemplates",
560        produces = conjure_http::server::StdResponseSerializer
561    )]
562    async fn search_templates(
563        &self,
564        #[auth]
565        auth_: conjure_object::BearerToken,
566        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
567        request: super::super::super::objects::scout::template::api::SearchTemplatesRequest,
568    ) -> Result<
569        super::super::super::objects::scout::template::api::SearchTemplatesResponse,
570        conjure_http::private::Error,
571    >;
572    #[endpoint(
573        method = GET,
574        path = "/scout/v1/template/get-all-labels-properties",
575        name = "getAllLabelsAndProperties",
576        produces = conjure_http::server::StdResponseSerializer
577    )]
578    async fn get_all_labels_and_properties(
579        &self,
580        #[auth]
581        auth_: conjure_object::BearerToken,
582        #[query(
583            name = "workspaces",
584            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
585            safe
586        )]
587        workspaces: std::collections::BTreeSet<
588            super::super::super::objects::api::rids::WorkspaceRid,
589        >,
590    ) -> Result<
591        super::super::super::objects::scout::template::api::GetAllLabelsAndPropertiesResponse,
592        conjure_http::private::Error,
593    >;
594    /// Duplicates an existing template, copying its content (layout, charts, variables)
595    /// and optionally overriding metadata fields such as title, description, labels,
596    /// and properties. Returns the newly created template.
597    #[endpoint(
598        method = POST,
599        path = "/scout/v1/template/{templateRid}/duplicate",
600        name = "duplicate",
601        produces = conjure_http::server::StdResponseSerializer
602    )]
603    async fn duplicate(
604        &self,
605        #[auth]
606        auth_: conjure_object::BearerToken,
607        #[path(
608            name = "templateRid",
609            decoder = conjure_http::server::conjure::FromPlainDecoder,
610            log_as = "templateRid",
611            safe
612        )]
613        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
614        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
615        request: super::super::super::objects::scout::template::api::DuplicateTemplateRequest,
616    ) -> Result<
617        super::super::super::objects::scout::template::api::Template,
618        conjure_http::private::Error,
619    >;
620    /// Merges the given branch to the "main" branch.
621    /// Throws if the template or branch doesn't exist.
622    /// Throws if the latest commit doesn't match the provided id.
623    /// Throws if you merge on an archived template.
624    #[endpoint(
625        method = POST,
626        path = "/scout/v1/template/{templateRid}/merge-to-main",
627        name = "mergeToMain",
628        produces = conjure_http::server::StdResponseSerializer
629    )]
630    async fn merge_to_main(
631        &self,
632        #[auth]
633        auth_: conjure_object::BearerToken,
634        #[path(
635            name = "templateRid",
636            decoder = conjure_http::server::conjure::FromPlainDecoder,
637            log_as = "templateRid",
638            safe
639        )]
640        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
641        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
642        request: super::super::super::objects::scout::template::api::MergeToMainRequest,
643    ) -> Result<
644        super::super::super::objects::scout::template::api::Template,
645        conjure_http::private::Error,
646    >;
647}
648/// TemplateService manages templates, which are workbooks that
649/// can be re-used across runs. Templates are versioned.
650#[conjure_http::conjure_endpoints(
651    name = "TemplateService",
652    use_legacy_error_serialization,
653    local
654)]
655pub trait LocalAsyncTemplateService {
656    /// Creates a new template.
657    #[endpoint(
658        method = POST,
659        path = "/scout/v1/template",
660        name = "create",
661        produces = conjure_http::server::StdResponseSerializer
662    )]
663    async fn create(
664        &self,
665        #[auth]
666        auth_: conjure_object::BearerToken,
667        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
668        request: super::super::super::objects::scout::template::api::CreateTemplateRequest,
669    ) -> Result<
670        super::super::super::objects::scout::template::api::Template,
671        conjure_http::private::Error,
672    >;
673    /// Must only pass one of (branch, commit). If neither are passed,
674    /// the latest commit on the "main" branch is returned.
675    /// Throws if the template, branch, or commit doesn't exist.
676    #[endpoint(
677        method = GET,
678        path = "/scout/v1/template/{templateRid}",
679        name = "get",
680        produces = conjure_http::server::StdResponseSerializer
681    )]
682    async fn get(
683        &self,
684        #[auth]
685        auth_: conjure_object::BearerToken,
686        #[path(
687            name = "templateRid",
688            decoder = conjure_http::server::conjure::FromPlainDecoder,
689            log_as = "templateRid",
690            safe
691        )]
692        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
693        #[query(
694            name = "branch",
695            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
696        )]
697        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
698        #[query(
699            name = "commit",
700            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
701            safe
702        )]
703        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
704    ) -> Result<
705        super::super::super::objects::scout::template::api::Template,
706        conjure_http::private::Error,
707    >;
708    #[endpoint(
709        method = POST,
710        path = "/scout/v1/template/batch-get-metadata",
711        name = "batchGetMetadata",
712        produces = conjure_http::server::conjure::CollectionResponseSerializer
713    )]
714    async fn batch_get_metadata(
715        &self,
716        #[auth]
717        auth_: conjure_object::BearerToken,
718        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
719        rids: std::collections::BTreeSet<
720            super::super::super::objects::scout::rids::api::TemplateRid,
721        >,
722    ) -> Result<
723        std::collections::BTreeSet<
724            super::super::super::objects::scout::template::api::TemplateSummary,
725        >,
726        conjure_http::private::Error,
727    >;
728    /// Creates a commit that may be compacted, e.g cleaned up and not exist anymore.
729    /// Throws if the template or branch doesn't exist.
730    /// Throws if the latest commit doesn't match the provided id.
731    /// Throws if you save to an archived template.
732    #[endpoint(
733        method = POST,
734        path = "/scout/v1/template/{templateRid}/save-working-state",
735        name = "saveWorkingState",
736        produces = conjure_http::server::StdResponseSerializer
737    )]
738    async fn save_working_state(
739        &self,
740        #[auth]
741        auth_: conjure_object::BearerToken,
742        #[path(
743            name = "templateRid",
744            decoder = conjure_http::server::conjure::FromPlainDecoder,
745            log_as = "templateRid",
746            safe
747        )]
748        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
749        #[query(
750            name = "branch",
751            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
752        )]
753        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
754        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
755        request: super::super::super::objects::scout::template::api::SaveTemplateRequest,
756    ) -> Result<
757        super::super::super::objects::scout::template::api::Template,
758        conjure_http::private::Error,
759    >;
760    /// Returns the set of all ref names used by the template.
761    #[endpoint(
762        method = GET,
763        path = "/scout/v1/template/{templateRid}/ref-names",
764        name = "getUsedRefNames",
765        produces = conjure_http::server::conjure::CollectionResponseSerializer
766    )]
767    async fn get_used_ref_names(
768        &self,
769        #[auth]
770        auth_: conjure_object::BearerToken,
771        #[path(
772            name = "templateRid",
773            decoder = conjure_http::server::conjure::FromPlainDecoder,
774            log_as = "templateRid",
775            safe
776        )]
777        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
778        #[query(
779            name = "branch",
780            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
781        )]
782        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
783        #[query(
784            name = "commit",
785            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
786            safe
787        )]
788        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
789    ) -> Result<
790        std::collections::BTreeSet<
791            super::super::super::objects::scout::api::DataSourceRefName,
792        >,
793        conjure_http::private::Error,
794    >;
795    /// Updates the data source ref names for all variables used in the template.
796    #[endpoint(
797        method = POST,
798        path = "/scout/v1/template/{templateRid}/update-ref-names",
799        name = "updateRefNames",
800        produces = conjure_http::server::StdResponseSerializer
801    )]
802    async fn update_ref_names(
803        &self,
804        #[auth]
805        auth_: conjure_object::BearerToken,
806        #[path(
807            name = "templateRid",
808            decoder = conjure_http::server::conjure::FromPlainDecoder,
809            log_as = "templateRid",
810            safe
811        )]
812        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
813        #[query(
814            name = "branch",
815            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
816        )]
817        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
818        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
819        request: super::super::super::objects::scout::template::api::UpdateRefNameRequest,
820    ) -> Result<
821        super::super::super::objects::scout::template::api::Template,
822        conjure_http::private::Error,
823    >;
824    /// Creates a commit with a commit message.
825    /// Throws if the template or branch doesn't exist.
826    /// Throws if the latest commit doesn't match the provided id.
827    /// Throws if you commit to an archived template.
828    #[endpoint(
829        method = POST,
830        path = "/scout/v1/template/{templateRid}/commit",
831        name = "commit",
832        produces = conjure_http::server::StdResponseSerializer
833    )]
834    async fn commit(
835        &self,
836        #[auth]
837        auth_: conjure_object::BearerToken,
838        #[path(
839            name = "templateRid",
840            decoder = conjure_http::server::conjure::FromPlainDecoder,
841            log_as = "templateRid",
842            safe
843        )]
844        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
845        #[query(
846            name = "branch",
847            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
848        )]
849        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
850        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
851        request: super::super::super::objects::scout::template::api::CommitTemplateRequest,
852    ) -> Result<
853        super::super::super::objects::scout::template::api::Template,
854        conjure_http::private::Error,
855    >;
856    /// Throws if the template doesn't exist.
857    #[endpoint(
858        method = POST,
859        path = "/scout/v1/template/{templateRid}/metadata",
860        name = "updateMetadata",
861        produces = conjure_http::server::StdResponseSerializer
862    )]
863    async fn update_metadata(
864        &self,
865        #[auth]
866        auth_: conjure_object::BearerToken,
867        #[path(
868            name = "templateRid",
869            decoder = conjure_http::server::conjure::FromPlainDecoder,
870            log_as = "templateRid",
871            safe
872        )]
873        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
874        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
875        request: super::super::super::objects::scout::template::api::UpdateMetadataRequest,
876    ) -> Result<
877        super::super::super::objects::scout::template::api::TemplateMetadata,
878        conjure_http::private::Error,
879    >;
880    #[endpoint(
881        method = POST,
882        path = "/scout/v1/template/search",
883        name = "searchTemplates",
884        produces = conjure_http::server::StdResponseSerializer
885    )]
886    async fn search_templates(
887        &self,
888        #[auth]
889        auth_: conjure_object::BearerToken,
890        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
891        request: super::super::super::objects::scout::template::api::SearchTemplatesRequest,
892    ) -> Result<
893        super::super::super::objects::scout::template::api::SearchTemplatesResponse,
894        conjure_http::private::Error,
895    >;
896    #[endpoint(
897        method = GET,
898        path = "/scout/v1/template/get-all-labels-properties",
899        name = "getAllLabelsAndProperties",
900        produces = conjure_http::server::StdResponseSerializer
901    )]
902    async fn get_all_labels_and_properties(
903        &self,
904        #[auth]
905        auth_: conjure_object::BearerToken,
906        #[query(
907            name = "workspaces",
908            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
909            safe
910        )]
911        workspaces: std::collections::BTreeSet<
912            super::super::super::objects::api::rids::WorkspaceRid,
913        >,
914    ) -> Result<
915        super::super::super::objects::scout::template::api::GetAllLabelsAndPropertiesResponse,
916        conjure_http::private::Error,
917    >;
918    /// Duplicates an existing template, copying its content (layout, charts, variables)
919    /// and optionally overriding metadata fields such as title, description, labels,
920    /// and properties. Returns the newly created template.
921    #[endpoint(
922        method = POST,
923        path = "/scout/v1/template/{templateRid}/duplicate",
924        name = "duplicate",
925        produces = conjure_http::server::StdResponseSerializer
926    )]
927    async fn duplicate(
928        &self,
929        #[auth]
930        auth_: conjure_object::BearerToken,
931        #[path(
932            name = "templateRid",
933            decoder = conjure_http::server::conjure::FromPlainDecoder,
934            log_as = "templateRid",
935            safe
936        )]
937        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
938        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
939        request: super::super::super::objects::scout::template::api::DuplicateTemplateRequest,
940    ) -> Result<
941        super::super::super::objects::scout::template::api::Template,
942        conjure_http::private::Error,
943    >;
944    /// Merges the given branch to the "main" branch.
945    /// Throws if the template or branch doesn't exist.
946    /// Throws if the latest commit doesn't match the provided id.
947    /// Throws if you merge on an archived template.
948    #[endpoint(
949        method = POST,
950        path = "/scout/v1/template/{templateRid}/merge-to-main",
951        name = "mergeToMain",
952        produces = conjure_http::server::StdResponseSerializer
953    )]
954    async fn merge_to_main(
955        &self,
956        #[auth]
957        auth_: conjure_object::BearerToken,
958        #[path(
959            name = "templateRid",
960            decoder = conjure_http::server::conjure::FromPlainDecoder,
961            log_as = "templateRid",
962            safe
963        )]
964        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
965        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
966        request: super::super::super::objects::scout::template::api::MergeToMainRequest,
967    ) -> Result<
968        super::super::super::objects::scout::template::api::Template,
969        conjure_http::private::Error,
970    >;
971}