Skip to main content

nominal_api/conjure/endpoints/scout/spatial/
spatial_service.rs

1use conjure_http::endpoint;
2/// The spatial asset service manages spatial assets (point clouds, etc.) and their metadata.
3/// Spatial asset data is stored in Dagger; Scout tracks metadata and references.
4#[conjure_http::conjure_endpoints(
5    name = "SpatialService",
6    use_legacy_error_serialization
7)]
8pub trait SpatialService {
9    /// Returns spatial asset metadata associated with a spatial asset rid.
10    #[endpoint(
11        method = GET,
12        path = "/spatial/v1/spatials/{spatialRid}",
13        name = "get",
14        produces = conjure_http::server::StdResponseSerializer
15    )]
16    fn get(
17        &self,
18        #[auth]
19        auth_: conjure_object::BearerToken,
20        #[path(
21            name = "spatialRid",
22            decoder = conjure_http::server::conjure::FromPlainDecoder,
23            log_as = "spatialRid"
24        )]
25        spatial_rid: conjure_object::ResourceIdentifier,
26    ) -> Result<
27        super::super::super::super::objects::scout::spatial::api::Spatial,
28        conjure_http::private::Error,
29    >;
30    /// Returns spatial asset metadata for each given spatial asset rid.
31    #[endpoint(
32        method = POST,
33        path = "/spatial/v1/spatials/batchGet",
34        name = "batchGet",
35        produces = conjure_http::server::StdResponseSerializer
36    )]
37    fn batch_get(
38        &self,
39        #[auth]
40        auth_: conjure_object::BearerToken,
41        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
42        request: super::super::super::super::objects::scout::spatial::api::GetSpatialsRequest,
43    ) -> Result<
44        super::super::super::super::objects::scout::spatial::api::GetSpatialsResponse,
45        conjure_http::private::Error,
46    >;
47    /// Returns metadata about spatial assets that match a given query.
48    #[endpoint(
49        method = POST,
50        path = "/spatial/v1/spatials/search",
51        name = "search",
52        produces = conjure_http::server::StdResponseSerializer
53    )]
54    fn search(
55        &self,
56        #[auth]
57        auth_: conjure_object::BearerToken,
58        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
59        request: super::super::super::super::objects::scout::spatial::api::SearchSpatialsRequest,
60    ) -> Result<
61        super::super::super::super::objects::scout::spatial::api::SearchSpatialsResponse,
62        conjure_http::private::Error,
63    >;
64    /// Creates and persists a spatial asset entity with the given metadata.
65    #[endpoint(
66        method = POST,
67        path = "/spatial/v1/spatials",
68        name = "create",
69        produces = conjure_http::server::StdResponseSerializer
70    )]
71    fn create(
72        &self,
73        #[auth]
74        auth_: conjure_object::BearerToken,
75        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
76        request: super::super::super::super::objects::scout::spatial::api::CreateSpatialRequest,
77    ) -> Result<
78        super::super::super::super::objects::scout::spatial::api::Spatial,
79        conjure_http::private::Error,
80    >;
81    /// Updates the metadata for a spatial asset associated with the given rid.
82    #[endpoint(
83        method = PUT,
84        path = "/spatial/v1/spatials/{spatialRid}",
85        name = "updateMetadata",
86        produces = conjure_http::server::StdResponseSerializer
87    )]
88    fn update_metadata(
89        &self,
90        #[auth]
91        auth_: conjure_object::BearerToken,
92        #[path(
93            name = "spatialRid",
94            decoder = conjure_http::server::conjure::FromPlainDecoder,
95            log_as = "spatialRid"
96        )]
97        spatial_rid: conjure_object::ResourceIdentifier,
98        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
99        request: super::super::super::super::objects::scout::spatial::api::UpdateSpatialMetadataRequest,
100    ) -> Result<
101        super::super::super::super::objects::scout::spatial::api::Spatial,
102        conjure_http::private::Error,
103    >;
104    /// Archives a spatial asset, excluding it from search. Can be unarchived.
105    #[endpoint(
106        method = PUT,
107        path = "/spatial/v1/spatials/{spatialRid}/archive",
108        name = "archive"
109    )]
110    fn archive(
111        &self,
112        #[auth]
113        auth_: conjure_object::BearerToken,
114        #[path(
115            name = "spatialRid",
116            decoder = conjure_http::server::conjure::FromPlainDecoder,
117            log_as = "spatialRid"
118        )]
119        spatial_rid: conjure_object::ResourceIdentifier,
120    ) -> Result<(), conjure_http::private::Error>;
121    /// Unarchives a previously archived spatial asset.
122    #[endpoint(
123        method = PUT,
124        path = "/spatial/v1/spatials/{spatialRid}/unarchive",
125        name = "unarchive"
126    )]
127    fn unarchive(
128        &self,
129        #[auth]
130        auth_: conjure_object::BearerToken,
131        #[path(
132            name = "spatialRid",
133            decoder = conjure_http::server::conjure::FromPlainDecoder,
134            log_as = "spatialRid"
135        )]
136        spatial_rid: conjure_object::ResourceIdentifier,
137    ) -> Result<(), conjure_http::private::Error>;
138}
139/// The spatial asset service manages spatial assets (point clouds, etc.) and their metadata.
140/// Spatial asset data is stored in Dagger; Scout tracks metadata and references.
141#[conjure_http::conjure_endpoints(
142    name = "SpatialService",
143    use_legacy_error_serialization
144)]
145pub trait AsyncSpatialService {
146    /// Returns spatial asset metadata associated with a spatial asset rid.
147    #[endpoint(
148        method = GET,
149        path = "/spatial/v1/spatials/{spatialRid}",
150        name = "get",
151        produces = conjure_http::server::StdResponseSerializer
152    )]
153    async fn get(
154        &self,
155        #[auth]
156        auth_: conjure_object::BearerToken,
157        #[path(
158            name = "spatialRid",
159            decoder = conjure_http::server::conjure::FromPlainDecoder,
160            log_as = "spatialRid"
161        )]
162        spatial_rid: conjure_object::ResourceIdentifier,
163    ) -> Result<
164        super::super::super::super::objects::scout::spatial::api::Spatial,
165        conjure_http::private::Error,
166    >;
167    /// Returns spatial asset metadata for each given spatial asset rid.
168    #[endpoint(
169        method = POST,
170        path = "/spatial/v1/spatials/batchGet",
171        name = "batchGet",
172        produces = conjure_http::server::StdResponseSerializer
173    )]
174    async fn batch_get(
175        &self,
176        #[auth]
177        auth_: conjure_object::BearerToken,
178        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
179        request: super::super::super::super::objects::scout::spatial::api::GetSpatialsRequest,
180    ) -> Result<
181        super::super::super::super::objects::scout::spatial::api::GetSpatialsResponse,
182        conjure_http::private::Error,
183    >;
184    /// Returns metadata about spatial assets that match a given query.
185    #[endpoint(
186        method = POST,
187        path = "/spatial/v1/spatials/search",
188        name = "search",
189        produces = conjure_http::server::StdResponseSerializer
190    )]
191    async fn search(
192        &self,
193        #[auth]
194        auth_: conjure_object::BearerToken,
195        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
196        request: super::super::super::super::objects::scout::spatial::api::SearchSpatialsRequest,
197    ) -> Result<
198        super::super::super::super::objects::scout::spatial::api::SearchSpatialsResponse,
199        conjure_http::private::Error,
200    >;
201    /// Creates and persists a spatial asset entity with the given metadata.
202    #[endpoint(
203        method = POST,
204        path = "/spatial/v1/spatials",
205        name = "create",
206        produces = conjure_http::server::StdResponseSerializer
207    )]
208    async fn create(
209        &self,
210        #[auth]
211        auth_: conjure_object::BearerToken,
212        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
213        request: super::super::super::super::objects::scout::spatial::api::CreateSpatialRequest,
214    ) -> Result<
215        super::super::super::super::objects::scout::spatial::api::Spatial,
216        conjure_http::private::Error,
217    >;
218    /// Updates the metadata for a spatial asset associated with the given rid.
219    #[endpoint(
220        method = PUT,
221        path = "/spatial/v1/spatials/{spatialRid}",
222        name = "updateMetadata",
223        produces = conjure_http::server::StdResponseSerializer
224    )]
225    async fn update_metadata(
226        &self,
227        #[auth]
228        auth_: conjure_object::BearerToken,
229        #[path(
230            name = "spatialRid",
231            decoder = conjure_http::server::conjure::FromPlainDecoder,
232            log_as = "spatialRid"
233        )]
234        spatial_rid: conjure_object::ResourceIdentifier,
235        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
236        request: super::super::super::super::objects::scout::spatial::api::UpdateSpatialMetadataRequest,
237    ) -> Result<
238        super::super::super::super::objects::scout::spatial::api::Spatial,
239        conjure_http::private::Error,
240    >;
241    /// Archives a spatial asset, excluding it from search. Can be unarchived.
242    #[endpoint(
243        method = PUT,
244        path = "/spatial/v1/spatials/{spatialRid}/archive",
245        name = "archive"
246    )]
247    async fn archive(
248        &self,
249        #[auth]
250        auth_: conjure_object::BearerToken,
251        #[path(
252            name = "spatialRid",
253            decoder = conjure_http::server::conjure::FromPlainDecoder,
254            log_as = "spatialRid"
255        )]
256        spatial_rid: conjure_object::ResourceIdentifier,
257    ) -> Result<(), conjure_http::private::Error>;
258    /// Unarchives a previously archived spatial asset.
259    #[endpoint(
260        method = PUT,
261        path = "/spatial/v1/spatials/{spatialRid}/unarchive",
262        name = "unarchive"
263    )]
264    async fn unarchive(
265        &self,
266        #[auth]
267        auth_: conjure_object::BearerToken,
268        #[path(
269            name = "spatialRid",
270            decoder = conjure_http::server::conjure::FromPlainDecoder,
271            log_as = "spatialRid"
272        )]
273        spatial_rid: conjure_object::ResourceIdentifier,
274    ) -> Result<(), conjure_http::private::Error>;
275}
276/// The spatial asset service manages spatial assets (point clouds, etc.) and their metadata.
277/// Spatial asset data is stored in Dagger; Scout tracks metadata and references.
278#[conjure_http::conjure_endpoints(
279    name = "SpatialService",
280    use_legacy_error_serialization,
281    local
282)]
283pub trait LocalAsyncSpatialService {
284    /// Returns spatial asset metadata associated with a spatial asset rid.
285    #[endpoint(
286        method = GET,
287        path = "/spatial/v1/spatials/{spatialRid}",
288        name = "get",
289        produces = conjure_http::server::StdResponseSerializer
290    )]
291    async fn get(
292        &self,
293        #[auth]
294        auth_: conjure_object::BearerToken,
295        #[path(
296            name = "spatialRid",
297            decoder = conjure_http::server::conjure::FromPlainDecoder,
298            log_as = "spatialRid"
299        )]
300        spatial_rid: conjure_object::ResourceIdentifier,
301    ) -> Result<
302        super::super::super::super::objects::scout::spatial::api::Spatial,
303        conjure_http::private::Error,
304    >;
305    /// Returns spatial asset metadata for each given spatial asset rid.
306    #[endpoint(
307        method = POST,
308        path = "/spatial/v1/spatials/batchGet",
309        name = "batchGet",
310        produces = conjure_http::server::StdResponseSerializer
311    )]
312    async fn batch_get(
313        &self,
314        #[auth]
315        auth_: conjure_object::BearerToken,
316        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
317        request: super::super::super::super::objects::scout::spatial::api::GetSpatialsRequest,
318    ) -> Result<
319        super::super::super::super::objects::scout::spatial::api::GetSpatialsResponse,
320        conjure_http::private::Error,
321    >;
322    /// Returns metadata about spatial assets that match a given query.
323    #[endpoint(
324        method = POST,
325        path = "/spatial/v1/spatials/search",
326        name = "search",
327        produces = conjure_http::server::StdResponseSerializer
328    )]
329    async fn search(
330        &self,
331        #[auth]
332        auth_: conjure_object::BearerToken,
333        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
334        request: super::super::super::super::objects::scout::spatial::api::SearchSpatialsRequest,
335    ) -> Result<
336        super::super::super::super::objects::scout::spatial::api::SearchSpatialsResponse,
337        conjure_http::private::Error,
338    >;
339    /// Creates and persists a spatial asset entity with the given metadata.
340    #[endpoint(
341        method = POST,
342        path = "/spatial/v1/spatials",
343        name = "create",
344        produces = conjure_http::server::StdResponseSerializer
345    )]
346    async fn create(
347        &self,
348        #[auth]
349        auth_: conjure_object::BearerToken,
350        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
351        request: super::super::super::super::objects::scout::spatial::api::CreateSpatialRequest,
352    ) -> Result<
353        super::super::super::super::objects::scout::spatial::api::Spatial,
354        conjure_http::private::Error,
355    >;
356    /// Updates the metadata for a spatial asset associated with the given rid.
357    #[endpoint(
358        method = PUT,
359        path = "/spatial/v1/spatials/{spatialRid}",
360        name = "updateMetadata",
361        produces = conjure_http::server::StdResponseSerializer
362    )]
363    async fn update_metadata(
364        &self,
365        #[auth]
366        auth_: conjure_object::BearerToken,
367        #[path(
368            name = "spatialRid",
369            decoder = conjure_http::server::conjure::FromPlainDecoder,
370            log_as = "spatialRid"
371        )]
372        spatial_rid: conjure_object::ResourceIdentifier,
373        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
374        request: super::super::super::super::objects::scout::spatial::api::UpdateSpatialMetadataRequest,
375    ) -> Result<
376        super::super::super::super::objects::scout::spatial::api::Spatial,
377        conjure_http::private::Error,
378    >;
379    /// Archives a spatial asset, excluding it from search. Can be unarchived.
380    #[endpoint(
381        method = PUT,
382        path = "/spatial/v1/spatials/{spatialRid}/archive",
383        name = "archive"
384    )]
385    async fn archive(
386        &self,
387        #[auth]
388        auth_: conjure_object::BearerToken,
389        #[path(
390            name = "spatialRid",
391            decoder = conjure_http::server::conjure::FromPlainDecoder,
392            log_as = "spatialRid"
393        )]
394        spatial_rid: conjure_object::ResourceIdentifier,
395    ) -> Result<(), conjure_http::private::Error>;
396    /// Unarchives a previously archived spatial asset.
397    #[endpoint(
398        method = PUT,
399        path = "/spatial/v1/spatials/{spatialRid}/unarchive",
400        name = "unarchive"
401    )]
402    async fn unarchive(
403        &self,
404        #[auth]
405        auth_: conjure_object::BearerToken,
406        #[path(
407            name = "spatialRid",
408            decoder = conjure_http::server::conjure::FromPlainDecoder,
409            log_as = "spatialRid"
410        )]
411        spatial_rid: conjure_object::ResourceIdentifier,
412    ) -> Result<(), conjure_http::private::Error>;
413}