Skip to main content

nominal_api/conjure/endpoints/ingest/api/
internal_ingest_job_service.rs

1use conjure_http::endpoint;
2/// Internal API for managing ingest jobs. This service is filtered out from public documentation.
3#[conjure_http::conjure_endpoints(
4    name = "InternalIngestJobService",
5    use_legacy_error_serialization
6)]
7pub trait InternalIngestJobService {
8    /// Creates an ingest job, returning a RID for the job.
9    #[endpoint(
10        method = POST,
11        path = "/internal/ingest/v1/ingest-job",
12        name = "createIngestJob",
13        produces = conjure_http::server::StdResponseSerializer
14    )]
15    fn create_ingest_job(
16        &self,
17        #[auth]
18        auth_: conjure_object::BearerToken,
19        #[body(
20            deserializer = conjure_http::server::StdRequestDeserializer,
21            log_as = "createIngestJobRequest"
22        )]
23        create_ingest_job_request: super::super::super::super::objects::ingest::api::CreateIngestJobRequest,
24    ) -> Result<
25        super::super::super::super::objects::ingest::api::IngestJobRid,
26        conjure_http::private::Error,
27    >;
28    /// Returns a single ingest job by RID with full details including the ingest request.
29    #[endpoint(
30        method = GET,
31        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}",
32        name = "getIngestJobInternal",
33        produces = conjure_http::server::StdResponseSerializer
34    )]
35    fn get_ingest_job_internal(
36        &self,
37        #[auth]
38        auth_: conjure_object::BearerToken,
39        #[path(
40            name = "ingestJobRid",
41            decoder = conjure_http::server::conjure::FromPlainDecoder,
42            log_as = "ingestJobRid",
43            safe
44        )]
45        ingest_job_rid: super::super::super::super::objects::ingest::api::IngestJobRid,
46    ) -> Result<
47        super::super::super::super::objects::ingest::api::InternalIngestJob,
48        conjure_http::private::Error,
49    >;
50    /// Updates the status of an ingest job.
51    #[endpoint(
52        method = PUT,
53        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}/status",
54        name = "updateIngestJobStatus",
55        produces = conjure_http::server::StdResponseSerializer
56    )]
57    fn update_ingest_job_status(
58        &self,
59        #[auth]
60        auth_: conjure_object::BearerToken,
61        #[path(
62            name = "ingestJobRid",
63            decoder = conjure_http::server::conjure::FromPlainDecoder,
64            log_as = "ingestJobRid",
65            safe
66        )]
67        ingest_job_rid: super::super::super::super::objects::ingest::api::IngestJobRid,
68        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
69        status: super::super::super::super::objects::ingest::api::IngestJobStatus,
70    ) -> Result<
71        super::super::super::super::objects::ingest::api::IngestJobStatus,
72        conjure_http::private::Error,
73    >;
74}
75/// Internal API for managing ingest jobs. This service is filtered out from public documentation.
76#[conjure_http::conjure_endpoints(
77    name = "InternalIngestJobService",
78    use_legacy_error_serialization
79)]
80pub trait AsyncInternalIngestJobService {
81    /// Creates an ingest job, returning a RID for the job.
82    #[endpoint(
83        method = POST,
84        path = "/internal/ingest/v1/ingest-job",
85        name = "createIngestJob",
86        produces = conjure_http::server::StdResponseSerializer
87    )]
88    async fn create_ingest_job(
89        &self,
90        #[auth]
91        auth_: conjure_object::BearerToken,
92        #[body(
93            deserializer = conjure_http::server::StdRequestDeserializer,
94            log_as = "createIngestJobRequest"
95        )]
96        create_ingest_job_request: super::super::super::super::objects::ingest::api::CreateIngestJobRequest,
97    ) -> Result<
98        super::super::super::super::objects::ingest::api::IngestJobRid,
99        conjure_http::private::Error,
100    >;
101    /// Returns a single ingest job by RID with full details including the ingest request.
102    #[endpoint(
103        method = GET,
104        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}",
105        name = "getIngestJobInternal",
106        produces = conjure_http::server::StdResponseSerializer
107    )]
108    async fn get_ingest_job_internal(
109        &self,
110        #[auth]
111        auth_: conjure_object::BearerToken,
112        #[path(
113            name = "ingestJobRid",
114            decoder = conjure_http::server::conjure::FromPlainDecoder,
115            log_as = "ingestJobRid",
116            safe
117        )]
118        ingest_job_rid: super::super::super::super::objects::ingest::api::IngestJobRid,
119    ) -> Result<
120        super::super::super::super::objects::ingest::api::InternalIngestJob,
121        conjure_http::private::Error,
122    >;
123    /// Updates the status of an ingest job.
124    #[endpoint(
125        method = PUT,
126        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}/status",
127        name = "updateIngestJobStatus",
128        produces = conjure_http::server::StdResponseSerializer
129    )]
130    async fn update_ingest_job_status(
131        &self,
132        #[auth]
133        auth_: conjure_object::BearerToken,
134        #[path(
135            name = "ingestJobRid",
136            decoder = conjure_http::server::conjure::FromPlainDecoder,
137            log_as = "ingestJobRid",
138            safe
139        )]
140        ingest_job_rid: super::super::super::super::objects::ingest::api::IngestJobRid,
141        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
142        status: super::super::super::super::objects::ingest::api::IngestJobStatus,
143    ) -> Result<
144        super::super::super::super::objects::ingest::api::IngestJobStatus,
145        conjure_http::private::Error,
146    >;
147}
148/// Internal API for managing ingest jobs. This service is filtered out from public documentation.
149#[conjure_http::conjure_endpoints(
150    name = "InternalIngestJobService",
151    use_legacy_error_serialization,
152    local
153)]
154pub trait LocalAsyncInternalIngestJobService {
155    /// Creates an ingest job, returning a RID for the job.
156    #[endpoint(
157        method = POST,
158        path = "/internal/ingest/v1/ingest-job",
159        name = "createIngestJob",
160        produces = conjure_http::server::StdResponseSerializer
161    )]
162    async fn create_ingest_job(
163        &self,
164        #[auth]
165        auth_: conjure_object::BearerToken,
166        #[body(
167            deserializer = conjure_http::server::StdRequestDeserializer,
168            log_as = "createIngestJobRequest"
169        )]
170        create_ingest_job_request: super::super::super::super::objects::ingest::api::CreateIngestJobRequest,
171    ) -> Result<
172        super::super::super::super::objects::ingest::api::IngestJobRid,
173        conjure_http::private::Error,
174    >;
175    /// Returns a single ingest job by RID with full details including the ingest request.
176    #[endpoint(
177        method = GET,
178        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}",
179        name = "getIngestJobInternal",
180        produces = conjure_http::server::StdResponseSerializer
181    )]
182    async fn get_ingest_job_internal(
183        &self,
184        #[auth]
185        auth_: conjure_object::BearerToken,
186        #[path(
187            name = "ingestJobRid",
188            decoder = conjure_http::server::conjure::FromPlainDecoder,
189            log_as = "ingestJobRid",
190            safe
191        )]
192        ingest_job_rid: super::super::super::super::objects::ingest::api::IngestJobRid,
193    ) -> Result<
194        super::super::super::super::objects::ingest::api::InternalIngestJob,
195        conjure_http::private::Error,
196    >;
197    /// Updates the status of an ingest job.
198    #[endpoint(
199        method = PUT,
200        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}/status",
201        name = "updateIngestJobStatus",
202        produces = conjure_http::server::StdResponseSerializer
203    )]
204    async fn update_ingest_job_status(
205        &self,
206        #[auth]
207        auth_: conjure_object::BearerToken,
208        #[path(
209            name = "ingestJobRid",
210            decoder = conjure_http::server::conjure::FromPlainDecoder,
211            log_as = "ingestJobRid",
212            safe
213        )]
214        ingest_job_rid: super::super::super::super::objects::ingest::api::IngestJobRid,
215        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
216        status: super::super::super::super::objects::ingest::api::IngestJobStatus,
217    ) -> Result<
218        super::super::super::super::objects::ingest::api::IngestJobStatus,
219        conjure_http::private::Error,
220    >;
221}