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