interloper-api 0.21.0__tar.gz → 0.22.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {interloper_api-0.21.0 → interloper_api-0.22.0}/PKG-INFO +1 -1
- {interloper_api-0.21.0 → interloper_api-0.22.0}/pyproject.toml +1 -1
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/runs.py +14 -9
- {interloper_api-0.21.0 → interloper_api-0.22.0}/README.md +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/__init__.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/app.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/dependencies.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/email.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/__init__.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/admin.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/agent.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/assets.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/auth.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/backfills.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/catalog.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/destinations.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/__init__.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/amazon_ads.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/criteo.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/facebook_ads.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/google_ads.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/google_cloud.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/impact.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/pinterest_ads.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/snapchat_ads.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/tiktok_ads.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/jobs.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/oauth.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/organisations.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/resources.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/sources.py +0 -0
- {interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/ws.py +0 -0
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import datetime as dt
|
|
6
|
-
from typing import Literal
|
|
6
|
+
from typing import Annotated, Literal
|
|
7
7
|
from uuid import UUID
|
|
8
8
|
|
|
9
|
-
from fastapi import APIRouter, Depends, HTTPException, Response
|
|
9
|
+
from fastapi import APIRouter, Depends, HTTPException, Query, Response
|
|
10
10
|
from interloper.errors import NotFoundError
|
|
11
11
|
from interloper_db import Profile, Store
|
|
12
12
|
from interloper_db.models import Event, Run
|
|
@@ -244,23 +244,28 @@ def list_run_events(
|
|
|
244
244
|
response: Response,
|
|
245
245
|
limit: int = 100,
|
|
246
246
|
offset: int = 0,
|
|
247
|
-
asset_id: UUID | None = None,
|
|
247
|
+
asset_id: Annotated[list[UUID] | None, Query()] = None,
|
|
248
|
+
event_type: Annotated[list[str] | None, Query()] = None,
|
|
248
249
|
user: Profile = Depends(get_current_user),
|
|
249
250
|
store: Store = Depends(get_store),
|
|
250
251
|
) -> list[EventResponse]:
|
|
251
252
|
"""List events for a run, oldest first.
|
|
252
253
|
|
|
253
254
|
Events are ordered ``timestamp ASC`` and paged with ``limit``/``offset``.
|
|
254
|
-
``asset_id``
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
255
|
+
``asset_id`` and ``event_type`` may each be repeated to narrow the listing
|
|
256
|
+
to one or more assets (e.g. every asset sharing a status) and/or event
|
|
257
|
+
types (e.g. a "Lifecycle"/"Errors"/"Logs" tab); the two compose. The total
|
|
258
|
+
number of matching events (ignoring ``limit``/``offset``, honouring the
|
|
259
|
+
filters) is returned in the ``X-Total-Count`` response header so clients can
|
|
260
|
+
page through every event — including the terminal/outcome events
|
|
258
261
|
(``asset_completed``, ``asset_failed``, ``run_failed``, …) that sort last.
|
|
259
262
|
"""
|
|
260
263
|
_load_authorized_run(run_id, user, store)
|
|
261
264
|
limit = max(1, min(limit, MAX_EVENTS_PAGE_SIZE))
|
|
262
265
|
offset = max(0, offset)
|
|
263
|
-
total = store.count_events(run_id=run_id, asset_id=
|
|
266
|
+
total = store.count_events(run_id=run_id, asset_ids=asset_id, event_types=event_type)
|
|
264
267
|
response.headers["X-Total-Count"] = str(total)
|
|
265
|
-
events = store.list_events(
|
|
268
|
+
events = store.list_events(
|
|
269
|
+
run_id=run_id, asset_ids=asset_id, event_types=event_type, limit=limit, offset=offset
|
|
270
|
+
)
|
|
266
271
|
return [_event_to_response(e) for e in events]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/__init__.py
RENAMED
|
File without changes
|
{interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/amazon_ads.py
RENAMED
|
File without changes
|
{interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/criteo.py
RENAMED
|
File without changes
|
{interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/facebook_ads.py
RENAMED
|
File without changes
|
{interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/google_ads.py
RENAMED
|
File without changes
|
{interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/google_cloud.py
RENAMED
|
File without changes
|
{interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/impact.py
RENAMED
|
File without changes
|
{interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/pinterest_ads.py
RENAMED
|
File without changes
|
{interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/snapchat_ads.py
RENAMED
|
File without changes
|
{interloper_api-0.21.0 → interloper_api-0.22.0}/src/interloper_api/routes/external/tiktok_ads.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|