28
28
from more_itertools import chunked
29
29
from sentry_sdk .tracing import trace
30
30
from sqlalchemy import CompoundSelect , Select , select
31
- from sqlalchemy .orm import contains_eager , defer , joinedload
31
+ from sqlalchemy .orm import defer , joinedload
32
32
from sqlalchemy .sql .functions import count
33
33
from starlette .responses import Response
34
34
35
35
from oauth2_lib .fastapi import OIDCUserModel
36
36
from orchestrator .api .error_handling import raise_status
37
37
from orchestrator .api .helpers import add_response_range
38
- from orchestrator .config .assignee import Assignee
39
38
from orchestrator .db import ProcessSubscriptionTable , ProcessTable , SubscriptionTable , db
40
39
from orchestrator .db .filters import Filter
41
40
from orchestrator .db .filters .process import filter_processes
46
45
ProcessResumeAllSchema ,
47
46
ProcessSchema ,
48
47
ProcessStatusCounts ,
49
- ProcessSubscriptionBaseSchema ,
50
- ProcessSubscriptionSchema ,
51
48
Reporter ,
52
49
)
53
50
from orchestrator .security import oidc_user
65
62
from orchestrator .services .settings import get_engine_settings
66
63
from orchestrator .settings import app_settings
67
64
from orchestrator .types import JSON , State
68
- from orchestrator .utils .deprecation_logger import deprecated_endpoint
69
65
from orchestrator .utils .enrich_process import enrich_process
70
66
from orchestrator .websocket import WS_CHANNELS , send_process_data_to_websocket , websocket_manager
71
67
from orchestrator .workflow import ProcessStatus
@@ -230,46 +226,6 @@ def abort_process_endpoint(process_id: UUID, request: Request, user: str = Depen
230
226
raise_status (HTTPStatus .INTERNAL_SERVER_ERROR , str (e ))
231
227
232
228
233
- @router .get (
234
- "/process-subscriptions-by-subscription-id/{subscription_id}" ,
235
- response_model = list [ProcessSubscriptionSchema ],
236
- deprecated = True ,
237
- description = "This endpoint is deprecated and will be removed in a future release. Please use the GraphQL query" ,
238
- dependencies = [Depends (deprecated_endpoint )],
239
- )
240
- def process_subscriptions_by_subscription_id (subscription_id : UUID ) -> list [ProcessSubscriptionSchema ]:
241
- stmt = (
242
- select (ProcessSubscriptionTable )
243
- .options (contains_eager (ProcessSubscriptionTable .process ))
244
- .join (ProcessTable )
245
- .filter (ProcessSubscriptionTable .subscription_id == subscription_id )
246
- .order_by (ProcessTable .started_at .asc ())
247
- )
248
- return list (db .session .scalars (stmt ))
249
-
250
-
251
- @router .get (
252
- "/process-subscriptions-by-process_id/{process_id}" ,
253
- response_model = list [ProcessSubscriptionBaseSchema ],
254
- deprecated = True ,
255
- description = "This endpoint is deprecated and will be removed in a future release. Please use the GraphQL query" ,
256
- dependencies = [Depends (deprecated_endpoint )],
257
- )
258
- def process_subscriptions_by_process_process_id (process_id : UUID ) -> list [ProcessSubscriptionTable ]:
259
- return list (db .session .scalars (select (ProcessSubscriptionTable ).filter_by (process_id = process_id )))
260
-
261
-
262
- @router .get (
263
- "/statuses" ,
264
- response_model = list [ProcessStatus ],
265
- deprecated = True ,
266
- description = "This endpoint is deprecated and will be removed in a future release. Please use the GraphQL query" ,
267
- dependencies = [Depends (deprecated_endpoint )],
268
- )
269
- def statuses () -> list [str ]:
270
- return [status .value for status in ProcessStatus ]
271
-
272
-
273
229
@router .get ("/status-counts" , response_model = ProcessStatusCounts )
274
230
def status_counts () -> ProcessStatusCounts :
275
231
"""Retrieve status counts for processes and tasks."""
@@ -286,17 +242,6 @@ def status_counts() -> ProcessStatusCounts:
286
242
)
287
243
288
244
289
- @router .get (
290
- "/assignees" ,
291
- response_model = list [Assignee ],
292
- deprecated = True ,
293
- description = "This endpoint is deprecated and will be removed in a future release. Please use the GraphQL query" ,
294
- dependencies = [Depends (deprecated_endpoint )],
295
- )
296
- def assignees () -> list [str ]:
297
- return [assignee .value for assignee in Assignee ]
298
-
299
-
300
245
@router .get ("/{process_id}" , response_model = ProcessSchema )
301
246
def show (process_id : UUID ) -> dict [str , Any ]:
302
247
process = _get_process (process_id )
0 commit comments