Skip to main content

nominal_api/conjure/endpoints/scout/
notebook_service.rs

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