diff --git a/build.sh b/build.sh index e32a6ce..9aa015d 100755 --- a/build.sh +++ b/build.sh @@ -34,12 +34,12 @@ fi # introspect the database and generate the Djangolang API # note: the environment variables are coupled to the environment described in docker-compose.yaml -echo -e "\generating the api..." -DJANGOLANG_PACKAGE_NAME=api POSTGRES_DB=camry POSTGRES_PASSWORD=NoNVR!11 djangolang template +echo -e "\ngenerating the api..." +DJANGOLANG_API_ROOT=/api DJANGOLANG_PACKAGE_NAME=api POSTGRES_DB=camry POSTGRES_PASSWORD=NoNVR!11 djangolang template # dump out the OpenAPI v3 schema for the Djangolang API mkdir -p ./schema -./pkg/api/bin/api dump-openapi-json >./schema/openapi.json +DJANGOLANG_API_ROOT=/api ./pkg/api/bin/api dump-openapi-json >./schema/openapi.json # generate the client for use by the frontend echo -e "\ngenerating typescript client..." diff --git a/docker-compose.yaml b/docker-compose.yaml index b7756b6..be9ffcb 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -55,6 +55,6 @@ services: image: swaggerapi/swagger-ui:v5.4.2 environment: - "BASE_URL=/" - - "SWAGGER_JSON_URL=http://host.docker.internal:7070/openapi.json" + - "SWAGGER_JSON_URL=http://host.docker.internal:7070/api/openapi.json" ports: - "7071:8080" diff --git a/frontend/src/api/api.d.ts b/frontend/src/api/api.d.ts index f6529a7..2484863 100644 --- a/frontend/src/api/api.d.ts +++ b/frontend/src/api/api.d.ts @@ -4,7 +4,7 @@ */ export interface paths { - "/cameras": { + "/api/cameras": { parameters: { query?: never; header?: never; @@ -20,7 +20,7 @@ export interface paths { patch?: never; trace?: never; }; - "/cameras/{primaryKey}": { + "/api/cameras/{primaryKey}": { parameters: { query?: never; header?: never; @@ -36,7 +36,7 @@ export interface paths { patch: operations["PatchCamera"]; trace?: never; }; - "/detections": { + "/api/detections": { parameters: { query?: never; header?: never; @@ -52,7 +52,7 @@ export interface paths { patch?: never; trace?: never; }; - "/detections/{primaryKey}": { + "/api/detections/{primaryKey}": { parameters: { query?: never; header?: never; @@ -68,7 +68,7 @@ export interface paths { patch: operations["PatchDetection"]; trace?: never; }; - "/videos": { + "/api/videos": { parameters: { query?: never; header?: never; @@ -84,7 +84,7 @@ export interface paths { patch?: never; trace?: never; }; - "/videos/{primaryKey}": { + "/api/videos/{primaryKey}": { parameters: { query?: never; header?: never; @@ -197,10 +197,6 @@ export interface operations { limit?: number; /** @description SQL OFFSET operator */ offset?: number; - /** @description SQL ORDER BY _ ASC operator, permits comma-separated values */ - order_by__asc?: string; - /** @description SQL ORDER BY _ DESC operator, permits comma-separated values */ - order_by__desc?: string; /** @description SQL = operator */ id__eq?: string; /** @description SQL != operator */ @@ -219,11 +215,11 @@ export interface operations { id__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ id__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ id__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ id__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ id__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ id__l?: string; @@ -245,6 +241,10 @@ export interface operations { id__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ id__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + id__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + id__asc?: string; /** @description SQL = operator */ created_at__eq?: string; /** @description SQL != operator */ @@ -263,11 +263,11 @@ export interface operations { created_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ created_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ created_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ created_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ created_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ created_at__l?: string; @@ -289,6 +289,10 @@ export interface operations { created_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ created_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + created_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + created_at__asc?: string; /** @description SQL = operator */ updated_at__eq?: string; /** @description SQL != operator */ @@ -307,11 +311,11 @@ export interface operations { updated_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ updated_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ updated_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ updated_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ updated_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ updated_at__l?: string; @@ -333,6 +337,10 @@ export interface operations { updated_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ updated_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + updated_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + updated_at__asc?: string; /** @description SQL = operator */ deleted_at__eq?: string; /** @description SQL != operator */ @@ -351,11 +359,11 @@ export interface operations { deleted_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ deleted_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ deleted_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ deleted_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ deleted_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ deleted_at__l?: string; @@ -377,6 +385,10 @@ export interface operations { deleted_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ deleted_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + deleted_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + deleted_at__asc?: string; /** @description SQL = operator */ name__eq?: string; /** @description SQL != operator */ @@ -395,11 +407,11 @@ export interface operations { name__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ name__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ name__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ name__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ name__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ name__l?: string; @@ -421,6 +433,10 @@ export interface operations { name__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ name__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + name__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + name__asc?: string; /** @description SQL = operator */ stream_url__eq?: string; /** @description SQL != operator */ @@ -439,11 +455,11 @@ export interface operations { stream_url__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ stream_url__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ stream_url__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ stream_url__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ stream_url__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ stream_url__l?: string; @@ -465,6 +481,10 @@ export interface operations { stream_url__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ stream_url__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + stream_url__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + stream_url__asc?: string; /** @description SQL = operator */ last_seen__eq?: string; /** @description SQL != operator */ @@ -483,11 +503,11 @@ export interface operations { last_seen__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ last_seen__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ last_seen__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ last_seen__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ last_seen__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ last_seen__l?: string; @@ -509,6 +529,10 @@ export interface operations { last_seen__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ last_seen__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + last_seen__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + last_seen__asc?: string; }; header?: never; path?: never; @@ -770,10 +794,6 @@ export interface operations { limit?: number; /** @description SQL OFFSET operator */ offset?: number; - /** @description SQL ORDER BY _ ASC operator, permits comma-separated values */ - order_by__asc?: string; - /** @description SQL ORDER BY _ DESC operator, permits comma-separated values */ - order_by__desc?: string; /** @description SQL = operator */ id__eq?: string; /** @description SQL != operator */ @@ -792,11 +812,11 @@ export interface operations { id__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ id__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ id__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ id__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ id__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ id__l?: string; @@ -818,6 +838,10 @@ export interface operations { id__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ id__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + id__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + id__asc?: string; /** @description SQL = operator */ created_at__eq?: string; /** @description SQL != operator */ @@ -836,11 +860,11 @@ export interface operations { created_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ created_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ created_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ created_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ created_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ created_at__l?: string; @@ -862,6 +886,10 @@ export interface operations { created_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ created_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + created_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + created_at__asc?: string; /** @description SQL = operator */ updated_at__eq?: string; /** @description SQL != operator */ @@ -880,11 +908,11 @@ export interface operations { updated_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ updated_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ updated_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ updated_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ updated_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ updated_at__l?: string; @@ -906,6 +934,10 @@ export interface operations { updated_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ updated_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + updated_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + updated_at__asc?: string; /** @description SQL = operator */ deleted_at__eq?: string; /** @description SQL != operator */ @@ -924,11 +956,11 @@ export interface operations { deleted_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ deleted_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ deleted_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ deleted_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ deleted_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ deleted_at__l?: string; @@ -950,6 +982,10 @@ export interface operations { deleted_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ deleted_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + deleted_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + deleted_at__asc?: string; /** @description SQL = operator */ seen_at__eq?: string; /** @description SQL != operator */ @@ -968,11 +1004,11 @@ export interface operations { seen_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ seen_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ seen_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ seen_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ seen_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ seen_at__l?: string; @@ -994,6 +1030,10 @@ export interface operations { seen_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ seen_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + seen_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + seen_at__asc?: string; /** @description SQL = operator */ class_id__eq?: number; /** @description SQL != operator */ @@ -1012,11 +1052,11 @@ export interface operations { class_id__nin?: number; /** @description SQL NOT IN operator, permits comma-separated values */ class_id__notin?: number; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ class_id__isnull?: number; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ class_id__nisnull?: number; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ class_id__isnotnull?: number; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ class_id__l?: number; @@ -1038,6 +1078,10 @@ export interface operations { class_id__nilike?: number; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ class_id__notilike?: number; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + class_id__desc?: number; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + class_id__asc?: number; /** @description SQL = operator */ class_name__eq?: string; /** @description SQL != operator */ @@ -1056,11 +1100,11 @@ export interface operations { class_name__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ class_name__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ class_name__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ class_name__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ class_name__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ class_name__l?: string; @@ -1082,6 +1126,10 @@ export interface operations { class_name__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ class_name__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + class_name__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + class_name__asc?: string; /** @description SQL = operator */ score__eq?: number; /** @description SQL != operator */ @@ -1100,11 +1148,11 @@ export interface operations { score__nin?: number; /** @description SQL NOT IN operator, permits comma-separated values */ score__notin?: number; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ score__isnull?: number; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ score__nisnull?: number; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ score__isnotnull?: number; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ score__l?: number; @@ -1126,6 +1174,10 @@ export interface operations { score__nilike?: number; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ score__notilike?: number; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + score__desc?: number; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + score__asc?: number; /** @description SQL = operator */ camera_id__eq?: string; /** @description SQL != operator */ @@ -1144,11 +1196,11 @@ export interface operations { camera_id__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ camera_id__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ camera_id__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ camera_id__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ camera_id__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ camera_id__l?: string; @@ -1170,6 +1222,10 @@ export interface operations { camera_id__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ camera_id__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + camera_id__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + camera_id__asc?: string; }; header?: never; path?: never; @@ -1431,10 +1487,6 @@ export interface operations { limit?: number; /** @description SQL OFFSET operator */ offset?: number; - /** @description SQL ORDER BY _ ASC operator, permits comma-separated values */ - order_by__asc?: string; - /** @description SQL ORDER BY _ DESC operator, permits comma-separated values */ - order_by__desc?: string; /** @description SQL = operator */ id__eq?: string; /** @description SQL != operator */ @@ -1453,11 +1505,11 @@ export interface operations { id__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ id__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ id__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ id__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ id__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ id__l?: string; @@ -1479,6 +1531,10 @@ export interface operations { id__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ id__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + id__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + id__asc?: string; /** @description SQL = operator */ created_at__eq?: string; /** @description SQL != operator */ @@ -1497,11 +1553,11 @@ export interface operations { created_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ created_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ created_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ created_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ created_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ created_at__l?: string; @@ -1523,6 +1579,10 @@ export interface operations { created_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ created_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + created_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + created_at__asc?: string; /** @description SQL = operator */ updated_at__eq?: string; /** @description SQL != operator */ @@ -1541,11 +1601,11 @@ export interface operations { updated_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ updated_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ updated_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ updated_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ updated_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ updated_at__l?: string; @@ -1567,6 +1627,10 @@ export interface operations { updated_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ updated_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + updated_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + updated_at__asc?: string; /** @description SQL = operator */ deleted_at__eq?: string; /** @description SQL != operator */ @@ -1585,11 +1649,11 @@ export interface operations { deleted_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ deleted_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ deleted_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ deleted_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ deleted_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ deleted_at__l?: string; @@ -1611,6 +1675,10 @@ export interface operations { deleted_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ deleted_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + deleted_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + deleted_at__asc?: string; /** @description SQL = operator */ file_path__eq?: string; /** @description SQL != operator */ @@ -1629,11 +1697,11 @@ export interface operations { file_path__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ file_path__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ file_path__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ file_path__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ file_path__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ file_path__l?: string; @@ -1655,6 +1723,10 @@ export interface operations { file_path__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ file_path__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + file_path__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + file_path__asc?: string; /** @description SQL = operator */ started_at__eq?: string; /** @description SQL != operator */ @@ -1673,11 +1745,11 @@ export interface operations { started_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ started_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ started_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ started_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ started_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ started_at__l?: string; @@ -1699,6 +1771,10 @@ export interface operations { started_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ started_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + started_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + started_at__asc?: string; /** @description SQL = operator */ ended_at__eq?: string; /** @description SQL != operator */ @@ -1717,11 +1793,11 @@ export interface operations { ended_at__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ ended_at__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ ended_at__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ ended_at__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ ended_at__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ ended_at__l?: string; @@ -1743,6 +1819,10 @@ export interface operations { ended_at__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ ended_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + ended_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + ended_at__asc?: string; /** @description SQL = operator */ duration__eq?: number; /** @description SQL != operator */ @@ -1761,11 +1841,11 @@ export interface operations { duration__nin?: number; /** @description SQL NOT IN operator, permits comma-separated values */ duration__notin?: number; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ duration__isnull?: number; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ duration__nisnull?: number; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ duration__isnotnull?: number; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ duration__l?: number; @@ -1787,6 +1867,10 @@ export interface operations { duration__nilike?: number; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ duration__notilike?: number; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + duration__desc?: number; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + duration__asc?: number; /** @description SQL = operator */ thumbnail_path__eq?: string; /** @description SQL != operator */ @@ -1805,11 +1889,11 @@ export interface operations { thumbnail_path__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ thumbnail_path__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ thumbnail_path__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ thumbnail_path__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ thumbnail_path__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ thumbnail_path__l?: string; @@ -1831,6 +1915,10 @@ export interface operations { thumbnail_path__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ thumbnail_path__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + thumbnail_path__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + thumbnail_path__asc?: string; /** @description SQL = operator */ status__eq?: string; /** @description SQL != operator */ @@ -1849,11 +1937,11 @@ export interface operations { status__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ status__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ status__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ status__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ status__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ status__l?: string; @@ -1875,6 +1963,10 @@ export interface operations { status__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ status__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + status__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + status__asc?: string; /** @description SQL = operator */ camera_id__eq?: string; /** @description SQL != operator */ @@ -1893,11 +1985,11 @@ export interface operations { camera_id__nin?: string; /** @description SQL NOT IN operator, permits comma-separated values */ camera_id__notin?: string; - /** @description SQL IS NULL operator, value is ignored */ + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ camera_id__isnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ camera_id__nisnull?: string; - /** @description SQL IS NOT NULL operator, value is ignored */ + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ camera_id__isnotnull?: string; /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ camera_id__l?: string; @@ -1919,6 +2011,10 @@ export interface operations { camera_id__nilike?: string; /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ camera_id__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + camera_id__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + camera_id__asc?: string; }; header?: never; path?: never; diff --git a/frontend/src/components/CameraToggleButtonGroup.tsx b/frontend/src/components/CameraToggleButtonGroup.tsx index a0767a8..4d23b04 100644 --- a/frontend/src/components/CameraToggleButtonGroup.tsx +++ b/frontend/src/components/CameraToggleButtonGroup.tsx @@ -15,10 +15,10 @@ export default function CameraToggleButtonGroup( ) { const [value, setValue] = useState(); - const { data, error } = useQuery("get", "/cameras", { + const { data, error } = useQuery("get", "/api/cameras", { params: { query: { - order_by__asc: "name", + name__asc: "", }, }, }); diff --git a/frontend/src/components/VideoTable.tsx b/frontend/src/components/VideoTable.tsx index d52d2f8..7421c64 100644 --- a/frontend/src/components/VideoTable.tsx +++ b/frontend/src/components/VideoTable.tsx @@ -12,10 +12,10 @@ export interface VideoTableProps { } export function VideoTable(props: VideoTableProps) { - const { data, error, isLoading } = useQuery("get", "/videos", { + const { data, error, isLoading } = useQuery("get", "/api/videos", { params: { query: { - order_by__desc: "started_at", + started_at__desc: "", camera_id__eq: props.cameraId || undefined, started_at__gte: props.date ? `${props.date}T00:00:00+08:00` diff --git a/go.mod b/go.mod index 701805a..4dad9e8 100644 --- a/go.mod +++ b/go.mod @@ -8,14 +8,14 @@ require ( github.com/go-chi/chi/v5 v5.1.0 github.com/gomodule/redigo v1.9.2 github.com/google/uuid v1.6.0 - github.com/initialed85/djangolang v0.0.18 + github.com/initialed85/djangolang v0.0.21 github.com/jackc/pgtype v1.14.3 github.com/jackc/pgx/v5 v5.6.0 github.com/jmoiron/sqlx v1.4.0 github.com/lib/pq v1.10.9 github.com/oapi-codegen/runtime v1.1.1 github.com/paulmach/orb v0.11.1 - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 + golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index d1122c1..48bc252 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,8 @@ github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aN github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/initialed85/djangolang v0.0.18 h1:nUg9ptZOGtr5QS4o8qn9OOn1AzkLBNnUQuhyj6tr5G0= -github.com/initialed85/djangolang v0.0.18/go.mod h1:3mqaFDBq9zfX/18jyDCHs5UpH2r5XGgBj/SlRcgfY64= +github.com/initialed85/djangolang v0.0.21 h1:Fsv9tvNnQnGcXY0hl241av/Myndj73sacN4ngSsPkv0= +github.com/initialed85/djangolang v0.0.21/go.mod h1:3mqaFDBq9zfX/18jyDCHs5UpH2r5XGgBj/SlRcgfY64= github.com/initialed85/structmeta v0.0.0-20240802152142-39f398ef1ab7 h1:G9Z1k4TyxQ/9Kk4ZSuw82WZCxJayZf12Aos2MorzKRg= github.com/initialed85/structmeta v0.0.0-20240802152142-39f398ef1ab7/go.mod h1:hTGWTsfgy6Um+L8e3Qcj8/pBkHGcIGxEpZAKziWhQfc= github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= @@ -277,8 +277,8 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= diff --git a/pkg/api/0_meta.go b/pkg/api/0_meta.go index a13dbf8..0ded4f1 100755 --- a/pkg/api/0_meta.go +++ b/pkg/api/0_meta.go @@ -19,7 +19,7 @@ import ( var mu = new(sync.Mutex) var newFromItemFnByTableName = make(map[string]func(map[string]any) (any, error)) -var getRouterFnByPattern = make(map[string]func(*sqlx.DB, *redis.Pool, []server.HTTPMiddleware, []server.ModelMiddleware) chi.Router) +var getRouterFnByPattern = make(map[string]server.GetRouterFn) var allObjects = make([]any, 0) var openApi *types.OpenAPI @@ -28,7 +28,7 @@ func register( object any, newFromItem func(map[string]any) (any, error), pattern string, - getRouterFn func(*sqlx.DB, *redis.Pool, []server.HTTPMiddleware, []server.ModelMiddleware) chi.Router, + getRouterFn server.GetRouterFn, ) { allObjects = append(allObjects, object) newFromItemFnByTableName[tableName] = newFromItem @@ -68,7 +68,7 @@ func NewFromItem(tableName string, item map[string]any) (any, error) { return newFromItemFn(item) } -func GetRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []server.HTTPMiddleware, modelMiddlewares []server.ModelMiddleware) chi.Router { +func GetRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []server.HTTPMiddleware, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange) chi.Router { r := chi.NewRouter() for _, m := range httpMiddlewares { @@ -77,7 +77,7 @@ func GetRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []server.HTTP mu.Lock() for pattern, getRouterFn := range getRouterFnByPattern { - r.Mount(pattern, getRouterFn(db, redisPool, httpMiddlewares, modelMiddlewares)) + r.Mount(pattern, getRouterFn(db, redisPool, httpMiddlewares, objectMiddlewares, waitForChange)) } mu.Unlock() @@ -127,7 +127,7 @@ func RunServer( db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []server.HTTPMiddleware, - modelMiddlewares []server.ModelMiddleware, + objectMiddlewares []server.ObjectMiddleware, ) error { - return server.RunServer(ctx, changes, addr, NewFromItem, GetRouter, db, redisPool, httpMiddlewares, modelMiddlewares) + return server.RunServer(ctx, changes, addr, NewFromItem, GetRouter, db, redisPool, httpMiddlewares, objectMiddlewares) } diff --git a/pkg/api/bin/api b/pkg/api/bin/api index 6c69569..156bf9e 100755 Binary files a/pkg/api/bin/api and b/pkg/api/bin/api differ diff --git a/pkg/api/camera.go b/pkg/api/camera.go index 576d5d0..c355c50 100755 --- a/pkg/api/camera.go +++ b/pkg/api/camera.go @@ -21,6 +21,7 @@ import ( "github.com/initialed85/djangolang/pkg/introspect" "github.com/initialed85/djangolang/pkg/query" "github.com/initialed85/djangolang/pkg/server" + "github.com/initialed85/djangolang/pkg/stream" "github.com/initialed85/djangolang/pkg/types" _pgtype "github.com/jackc/pgtype" "github.com/jackc/pgx/v5/pgtype" @@ -678,7 +679,7 @@ func SelectCamera( return object, nil } -func handleGetCameras(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware) { +func handleGetCameras(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware) { ctx := r.Context() insaneOrderParams := make([]string, 0) @@ -692,48 +693,11 @@ func handleGetCameras(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redis var orderByDirection *string orderBys := make([]string, 0) - for rawKey, rawValues := range r.URL.Query() { - if !(rawKey == "order_by__desc" || rawKey == "order_by__asc") { - continue - } - - for _, rawValue := range rawValues { - switch rawKey { - case "order_by__desc": - if orderByDirection != nil && *orderByDirection != "DESC" { - insaneOrderParams = append(insaneOrderParams, fmt.Sprintf("%s=%s", rawKey, rawValue)) - hadInsaneOrderParams = true - continue - } - - orderByDirection = helpers.Ptr("DESC") - orderBys = append(orderBys, strings.Split(rawValue, ",")...) - case "order_by__asc": - if orderByDirection != nil && *orderByDirection != "ASC" { - insaneOrderParams = append(insaneOrderParams, fmt.Sprintf("%s=%s", rawKey, rawValue)) - hadInsaneOrderParams = true - continue - } - - orderByDirection = helpers.Ptr("ASC") - orderBys = append(orderBys, strings.Split(rawValue, ",")...) - } - } - } - - if hadInsaneOrderParams { - helpers.HandleErrorResponse( - w, - http.StatusInternalServerError, - fmt.Errorf("insane order params (e.g. conflicting asc / desc) %s", strings.Join(insaneOrderParams, ", ")), - ) - return - } values := make([]any, 0) wheres := make([]string, 0) for rawKey, rawValues := range r.URL.Query() { - if rawKey == "limit" || rawKey == "offset" || rawKey == "order_by__desc" || rawKey == "order_by__asc" { + if rawKey == "limit" || rawKey == "offset" { continue } @@ -787,6 +751,26 @@ func handleGetCameras(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redis case "nil", "nilike", "notilike": comparison = "NOT ILIKE" IsLikeComparison = true + case "desc": + if orderByDirection != nil && *orderByDirection != "DESC" { + hadInsaneOrderParams = true + insaneOrderParams = append(insaneOrderParams, rawKey) + continue + } + + orderByDirection = helpers.Ptr("DESC") + orderBys = append(orderBys, parts[0]) + continue + case "asc": + if orderByDirection != nil && *orderByDirection != "ASC" { + hadInsaneOrderParams = true + insaneOrderParams = append(insaneOrderParams, rawKey) + continue + } + + orderByDirection = helpers.Ptr("ASC") + orderBys = append(orderBys, parts[0]) + continue default: isUnrecognized = true } @@ -888,6 +872,15 @@ func handleGetCameras(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redis return } + if hadInsaneOrderParams { + helpers.HandleErrorResponse( + w, + http.StatusInternalServerError, + fmt.Errorf("insane order params (e.g. conflicting asc / desc) %s", strings.Join(insaneOrderParams, ", ")), + ) + return + } + limit := 2000 rawLimit := r.URL.Query().Get("limit") if rawLimit != "" { @@ -984,7 +977,7 @@ func handleGetCameras(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redis } } -func handleGetCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handleGetCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, primaryKey string) { ctx := r.Context() wheres := []string{fmt.Sprintf("%s = $$??", CameraTablePrimaryKeyColumn)} @@ -1043,7 +1036,7 @@ func handleGetCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisP } } -func handlePostCameras(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware) { +func handlePostCameras(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange) { _ = redisPool b, err := io.ReadAll(r.Body) @@ -1085,6 +1078,14 @@ func handlePostCameras(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redi _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + for i, object := range objects { err = object.Insert(r.Context(), tx, false, false) if err != nil { @@ -1103,10 +1104,17 @@ func handlePostCameras(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redi return } + _, err = waitForChange(r.Context(), []stream.Action{stream.INSERT}, CameraTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusCreated, objects) } -func handlePutCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handlePutCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange, primaryKey string) { _ = redisPool b, err := io.ReadAll(r.Body) @@ -1145,6 +1153,14 @@ func handlePutCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisP _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + err = object.Update(r.Context(), tx, true) if err != nil { err = fmt.Errorf("failed to update %#+v: %v", object, err) @@ -1159,10 +1175,17 @@ func handlePutCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisP return } + _, err = waitForChange(r.Context(), []stream.Action{stream.UPDATE, stream.SOFT_RESTORE, stream.SOFT_UPDATE}, CameraTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusOK, []*Camera{object}) } -func handlePatchCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handlePatchCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange, primaryKey string) { _ = redisPool b, err := io.ReadAll(r.Body) @@ -1210,6 +1233,14 @@ func handlePatchCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redi _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + err = object.Update(r.Context(), tx, false, forceSetValuesForFields...) if err != nil { err = fmt.Errorf("failed to update %#+v: %v", object, err) @@ -1224,10 +1255,17 @@ func handlePatchCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redi return } + _, err = waitForChange(r.Context(), []stream.Action{stream.UPDATE, stream.SOFT_RESTORE, stream.SOFT_UPDATE}, CameraTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusOK, []*Camera{object}) } -func handleDeleteCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handleDeleteCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange, primaryKey string) { _ = redisPool var item = make(map[string]any) @@ -1253,6 +1291,14 @@ func handleDeleteCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, red _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + err = object.Delete(r.Context(), tx) if err != nil { err = fmt.Errorf("failed to delete %#+v: %v", object, err) @@ -1267,10 +1313,17 @@ func handleDeleteCamera(w http.ResponseWriter, r *http.Request, db *sqlx.DB, red return } + _, err = waitForChange(r.Context(), []stream.Action{stream.DELETE, stream.SOFT_DELETE}, CameraTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusNoContent, nil) } -func GetCameraRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []server.HTTPMiddleware, modelMiddlewares []server.ModelMiddleware) chi.Router { +func GetCameraRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []server.HTTPMiddleware, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange) chi.Router { r := chi.NewRouter() for _, m := range httpMiddlewares { @@ -1278,27 +1331,27 @@ func GetCameraRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []serve } r.Get("/", func(w http.ResponseWriter, r *http.Request) { - handleGetCameras(w, r, db, redisPool, modelMiddlewares) + handleGetCameras(w, r, db, redisPool, objectMiddlewares) }) r.Get("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handleGetCamera(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handleGetCamera(w, r, db, redisPool, objectMiddlewares, chi.URLParam(r, "primaryKey")) }) r.Post("/", func(w http.ResponseWriter, r *http.Request) { - handlePostCameras(w, r, db, redisPool, modelMiddlewares) + handlePostCameras(w, r, db, redisPool, objectMiddlewares, waitForChange) }) r.Put("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handlePutCamera(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handlePutCamera(w, r, db, redisPool, objectMiddlewares, waitForChange, chi.URLParam(r, "primaryKey")) }) r.Patch("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handlePatchCamera(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handlePatchCamera(w, r, db, redisPool, objectMiddlewares, waitForChange, chi.URLParam(r, "primaryKey")) }) r.Delete("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handleDeleteCamera(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handleDeleteCamera(w, r, db, redisPool, objectMiddlewares, waitForChange, chi.URLParam(r, "primaryKey")) }) return r diff --git a/pkg/api/detection.go b/pkg/api/detection.go index bfdc4d9..6f61771 100755 --- a/pkg/api/detection.go +++ b/pkg/api/detection.go @@ -21,6 +21,7 @@ import ( "github.com/initialed85/djangolang/pkg/introspect" "github.com/initialed85/djangolang/pkg/query" "github.com/initialed85/djangolang/pkg/server" + "github.com/initialed85/djangolang/pkg/stream" "github.com/initialed85/djangolang/pkg/types" _pgtype "github.com/jackc/pgtype" "github.com/jackc/pgx/v5/pgtype" @@ -881,7 +882,7 @@ func SelectDetection( return object, nil } -func handleGetDetections(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware) { +func handleGetDetections(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware) { ctx := r.Context() insaneOrderParams := make([]string, 0) @@ -895,48 +896,11 @@ func handleGetDetections(w http.ResponseWriter, r *http.Request, db *sqlx.DB, re var orderByDirection *string orderBys := make([]string, 0) - for rawKey, rawValues := range r.URL.Query() { - if !(rawKey == "order_by__desc" || rawKey == "order_by__asc") { - continue - } - - for _, rawValue := range rawValues { - switch rawKey { - case "order_by__desc": - if orderByDirection != nil && *orderByDirection != "DESC" { - insaneOrderParams = append(insaneOrderParams, fmt.Sprintf("%s=%s", rawKey, rawValue)) - hadInsaneOrderParams = true - continue - } - - orderByDirection = helpers.Ptr("DESC") - orderBys = append(orderBys, strings.Split(rawValue, ",")...) - case "order_by__asc": - if orderByDirection != nil && *orderByDirection != "ASC" { - insaneOrderParams = append(insaneOrderParams, fmt.Sprintf("%s=%s", rawKey, rawValue)) - hadInsaneOrderParams = true - continue - } - - orderByDirection = helpers.Ptr("ASC") - orderBys = append(orderBys, strings.Split(rawValue, ",")...) - } - } - } - - if hadInsaneOrderParams { - helpers.HandleErrorResponse( - w, - http.StatusInternalServerError, - fmt.Errorf("insane order params (e.g. conflicting asc / desc) %s", strings.Join(insaneOrderParams, ", ")), - ) - return - } values := make([]any, 0) wheres := make([]string, 0) for rawKey, rawValues := range r.URL.Query() { - if rawKey == "limit" || rawKey == "offset" || rawKey == "order_by__desc" || rawKey == "order_by__asc" { + if rawKey == "limit" || rawKey == "offset" { continue } @@ -990,6 +954,26 @@ func handleGetDetections(w http.ResponseWriter, r *http.Request, db *sqlx.DB, re case "nil", "nilike", "notilike": comparison = "NOT ILIKE" IsLikeComparison = true + case "desc": + if orderByDirection != nil && *orderByDirection != "DESC" { + hadInsaneOrderParams = true + insaneOrderParams = append(insaneOrderParams, rawKey) + continue + } + + orderByDirection = helpers.Ptr("DESC") + orderBys = append(orderBys, parts[0]) + continue + case "asc": + if orderByDirection != nil && *orderByDirection != "ASC" { + hadInsaneOrderParams = true + insaneOrderParams = append(insaneOrderParams, rawKey) + continue + } + + orderByDirection = helpers.Ptr("ASC") + orderBys = append(orderBys, parts[0]) + continue default: isUnrecognized = true } @@ -1091,6 +1075,15 @@ func handleGetDetections(w http.ResponseWriter, r *http.Request, db *sqlx.DB, re return } + if hadInsaneOrderParams { + helpers.HandleErrorResponse( + w, + http.StatusInternalServerError, + fmt.Errorf("insane order params (e.g. conflicting asc / desc) %s", strings.Join(insaneOrderParams, ", ")), + ) + return + } + limit := 2000 rawLimit := r.URL.Query().Get("limit") if rawLimit != "" { @@ -1187,7 +1180,7 @@ func handleGetDetections(w http.ResponseWriter, r *http.Request, db *sqlx.DB, re } } -func handleGetDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handleGetDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, primaryKey string) { ctx := r.Context() wheres := []string{fmt.Sprintf("%s = $$??", DetectionTablePrimaryKeyColumn)} @@ -1246,7 +1239,7 @@ func handleGetDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, red } } -func handlePostDetections(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware) { +func handlePostDetections(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange) { _ = redisPool b, err := io.ReadAll(r.Body) @@ -1288,6 +1281,14 @@ func handlePostDetections(w http.ResponseWriter, r *http.Request, db *sqlx.DB, r _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + for i, object := range objects { err = object.Insert(r.Context(), tx, false, false) if err != nil { @@ -1306,10 +1307,17 @@ func handlePostDetections(w http.ResponseWriter, r *http.Request, db *sqlx.DB, r return } + _, err = waitForChange(r.Context(), []stream.Action{stream.INSERT}, DetectionTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusCreated, objects) } -func handlePutDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handlePutDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange, primaryKey string) { _ = redisPool b, err := io.ReadAll(r.Body) @@ -1348,6 +1356,14 @@ func handlePutDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, red _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + err = object.Update(r.Context(), tx, true) if err != nil { err = fmt.Errorf("failed to update %#+v: %v", object, err) @@ -1362,10 +1378,17 @@ func handlePutDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, red return } + _, err = waitForChange(r.Context(), []stream.Action{stream.UPDATE, stream.SOFT_RESTORE, stream.SOFT_UPDATE}, DetectionTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusOK, []*Detection{object}) } -func handlePatchDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handlePatchDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange, primaryKey string) { _ = redisPool b, err := io.ReadAll(r.Body) @@ -1413,6 +1436,14 @@ func handlePatchDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, r _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + err = object.Update(r.Context(), tx, false, forceSetValuesForFields...) if err != nil { err = fmt.Errorf("failed to update %#+v: %v", object, err) @@ -1427,10 +1458,17 @@ func handlePatchDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, r return } + _, err = waitForChange(r.Context(), []stream.Action{stream.UPDATE, stream.SOFT_RESTORE, stream.SOFT_UPDATE}, DetectionTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusOK, []*Detection{object}) } -func handleDeleteDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handleDeleteDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange, primaryKey string) { _ = redisPool var item = make(map[string]any) @@ -1456,6 +1494,14 @@ func handleDeleteDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + err = object.Delete(r.Context(), tx) if err != nil { err = fmt.Errorf("failed to delete %#+v: %v", object, err) @@ -1470,10 +1516,17 @@ func handleDeleteDetection(w http.ResponseWriter, r *http.Request, db *sqlx.DB, return } + _, err = waitForChange(r.Context(), []stream.Action{stream.DELETE, stream.SOFT_DELETE}, DetectionTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusNoContent, nil) } -func GetDetectionRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []server.HTTPMiddleware, modelMiddlewares []server.ModelMiddleware) chi.Router { +func GetDetectionRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []server.HTTPMiddleware, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange) chi.Router { r := chi.NewRouter() for _, m := range httpMiddlewares { @@ -1481,27 +1534,27 @@ func GetDetectionRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []se } r.Get("/", func(w http.ResponseWriter, r *http.Request) { - handleGetDetections(w, r, db, redisPool, modelMiddlewares) + handleGetDetections(w, r, db, redisPool, objectMiddlewares) }) r.Get("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handleGetDetection(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handleGetDetection(w, r, db, redisPool, objectMiddlewares, chi.URLParam(r, "primaryKey")) }) r.Post("/", func(w http.ResponseWriter, r *http.Request) { - handlePostDetections(w, r, db, redisPool, modelMiddlewares) + handlePostDetections(w, r, db, redisPool, objectMiddlewares, waitForChange) }) r.Put("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handlePutDetection(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handlePutDetection(w, r, db, redisPool, objectMiddlewares, waitForChange, chi.URLParam(r, "primaryKey")) }) r.Patch("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handlePatchDetection(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handlePatchDetection(w, r, db, redisPool, objectMiddlewares, waitForChange, chi.URLParam(r, "primaryKey")) }) r.Delete("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handleDeleteDetection(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handleDeleteDetection(w, r, db, redisPool, objectMiddlewares, waitForChange, chi.URLParam(r, "primaryKey")) }) return r diff --git a/pkg/api/video.go b/pkg/api/video.go index 60457b9..8f46708 100755 --- a/pkg/api/video.go +++ b/pkg/api/video.go @@ -21,6 +21,7 @@ import ( "github.com/initialed85/djangolang/pkg/introspect" "github.com/initialed85/djangolang/pkg/query" "github.com/initialed85/djangolang/pkg/server" + "github.com/initialed85/djangolang/pkg/stream" "github.com/initialed85/djangolang/pkg/types" _pgtype "github.com/jackc/pgtype" "github.com/jackc/pgx/v5/pgtype" @@ -881,7 +882,7 @@ func SelectVideo( return object, nil } -func handleGetVideos(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware) { +func handleGetVideos(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware) { ctx := r.Context() insaneOrderParams := make([]string, 0) @@ -895,48 +896,11 @@ func handleGetVideos(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisP var orderByDirection *string orderBys := make([]string, 0) - for rawKey, rawValues := range r.URL.Query() { - if !(rawKey == "order_by__desc" || rawKey == "order_by__asc") { - continue - } - - for _, rawValue := range rawValues { - switch rawKey { - case "order_by__desc": - if orderByDirection != nil && *orderByDirection != "DESC" { - insaneOrderParams = append(insaneOrderParams, fmt.Sprintf("%s=%s", rawKey, rawValue)) - hadInsaneOrderParams = true - continue - } - - orderByDirection = helpers.Ptr("DESC") - orderBys = append(orderBys, strings.Split(rawValue, ",")...) - case "order_by__asc": - if orderByDirection != nil && *orderByDirection != "ASC" { - insaneOrderParams = append(insaneOrderParams, fmt.Sprintf("%s=%s", rawKey, rawValue)) - hadInsaneOrderParams = true - continue - } - - orderByDirection = helpers.Ptr("ASC") - orderBys = append(orderBys, strings.Split(rawValue, ",")...) - } - } - } - - if hadInsaneOrderParams { - helpers.HandleErrorResponse( - w, - http.StatusInternalServerError, - fmt.Errorf("insane order params (e.g. conflicting asc / desc) %s", strings.Join(insaneOrderParams, ", ")), - ) - return - } values := make([]any, 0) wheres := make([]string, 0) for rawKey, rawValues := range r.URL.Query() { - if rawKey == "limit" || rawKey == "offset" || rawKey == "order_by__desc" || rawKey == "order_by__asc" { + if rawKey == "limit" || rawKey == "offset" { continue } @@ -990,6 +954,26 @@ func handleGetVideos(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisP case "nil", "nilike", "notilike": comparison = "NOT ILIKE" IsLikeComparison = true + case "desc": + if orderByDirection != nil && *orderByDirection != "DESC" { + hadInsaneOrderParams = true + insaneOrderParams = append(insaneOrderParams, rawKey) + continue + } + + orderByDirection = helpers.Ptr("DESC") + orderBys = append(orderBys, parts[0]) + continue + case "asc": + if orderByDirection != nil && *orderByDirection != "ASC" { + hadInsaneOrderParams = true + insaneOrderParams = append(insaneOrderParams, rawKey) + continue + } + + orderByDirection = helpers.Ptr("ASC") + orderBys = append(orderBys, parts[0]) + continue default: isUnrecognized = true } @@ -1091,6 +1075,15 @@ func handleGetVideos(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisP return } + if hadInsaneOrderParams { + helpers.HandleErrorResponse( + w, + http.StatusInternalServerError, + fmt.Errorf("insane order params (e.g. conflicting asc / desc) %s", strings.Join(insaneOrderParams, ", ")), + ) + return + } + limit := 2000 rawLimit := r.URL.Query().Get("limit") if rawLimit != "" { @@ -1187,7 +1180,7 @@ func handleGetVideos(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisP } } -func handleGetVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handleGetVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, primaryKey string) { ctx := r.Context() wheres := []string{fmt.Sprintf("%s = $$??", VideoTablePrimaryKeyColumn)} @@ -1246,7 +1239,7 @@ func handleGetVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPo } } -func handlePostVideos(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware) { +func handlePostVideos(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange) { _ = redisPool b, err := io.ReadAll(r.Body) @@ -1288,6 +1281,14 @@ func handlePostVideos(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redis _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + for i, object := range objects { err = object.Insert(r.Context(), tx, false, false) if err != nil { @@ -1306,10 +1307,17 @@ func handlePostVideos(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redis return } + _, err = waitForChange(r.Context(), []stream.Action{stream.INSERT}, VideoTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusCreated, objects) } -func handlePutVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handlePutVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange, primaryKey string) { _ = redisPool b, err := io.ReadAll(r.Body) @@ -1348,6 +1356,14 @@ func handlePutVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPo _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + err = object.Update(r.Context(), tx, true) if err != nil { err = fmt.Errorf("failed to update %#+v: %v", object, err) @@ -1362,10 +1378,17 @@ func handlePutVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPo return } + _, err = waitForChange(r.Context(), []stream.Action{stream.UPDATE, stream.SOFT_RESTORE, stream.SOFT_UPDATE}, VideoTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusOK, []*Video{object}) } -func handlePatchVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handlePatchVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange, primaryKey string) { _ = redisPool b, err := io.ReadAll(r.Body) @@ -1413,6 +1436,14 @@ func handlePatchVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redis _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + err = object.Update(r.Context(), tx, false, forceSetValuesForFields...) if err != nil { err = fmt.Errorf("failed to update %#+v: %v", object, err) @@ -1427,10 +1458,17 @@ func handlePatchVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redis return } + _, err = waitForChange(r.Context(), []stream.Action{stream.UPDATE, stream.SOFT_RESTORE, stream.SOFT_UPDATE}, VideoTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusOK, []*Video{object}) } -func handleDeleteVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, modelMiddlewares []server.ModelMiddleware, primaryKey string) { +func handleDeleteVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redisPool *redis.Pool, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange, primaryKey string) { _ = redisPool var item = make(map[string]any) @@ -1456,6 +1494,14 @@ func handleDeleteVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redi _ = tx.Rollback() }() + xid, err := query.GetXid(r.Context(), tx) + if err != nil { + err = fmt.Errorf("failed to get xid: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + _ = xid + err = object.Delete(r.Context(), tx) if err != nil { err = fmt.Errorf("failed to delete %#+v: %v", object, err) @@ -1470,10 +1516,17 @@ func handleDeleteVideo(w http.ResponseWriter, r *http.Request, db *sqlx.DB, redi return } + _, err = waitForChange(r.Context(), []stream.Action{stream.DELETE, stream.SOFT_DELETE}, VideoTable, xid) + if err != nil { + err = fmt.Errorf("failed to wait for change: %v", err) + helpers.HandleErrorResponse(w, http.StatusInternalServerError, err) + return + } + helpers.HandleObjectsResponse(w, http.StatusNoContent, nil) } -func GetVideoRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []server.HTTPMiddleware, modelMiddlewares []server.ModelMiddleware) chi.Router { +func GetVideoRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []server.HTTPMiddleware, objectMiddlewares []server.ObjectMiddleware, waitForChange server.WaitForChange) chi.Router { r := chi.NewRouter() for _, m := range httpMiddlewares { @@ -1481,27 +1534,27 @@ func GetVideoRouter(db *sqlx.DB, redisPool *redis.Pool, httpMiddlewares []server } r.Get("/", func(w http.ResponseWriter, r *http.Request) { - handleGetVideos(w, r, db, redisPool, modelMiddlewares) + handleGetVideos(w, r, db, redisPool, objectMiddlewares) }) r.Get("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handleGetVideo(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handleGetVideo(w, r, db, redisPool, objectMiddlewares, chi.URLParam(r, "primaryKey")) }) r.Post("/", func(w http.ResponseWriter, r *http.Request) { - handlePostVideos(w, r, db, redisPool, modelMiddlewares) + handlePostVideos(w, r, db, redisPool, objectMiddlewares, waitForChange) }) r.Put("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handlePutVideo(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handlePutVideo(w, r, db, redisPool, objectMiddlewares, waitForChange, chi.URLParam(r, "primaryKey")) }) r.Patch("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handlePatchVideo(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handlePatchVideo(w, r, db, redisPool, objectMiddlewares, waitForChange, chi.URLParam(r, "primaryKey")) }) r.Delete("/{primaryKey}", func(w http.ResponseWriter, r *http.Request) { - handleDeleteVideo(w, r, db, redisPool, modelMiddlewares, chi.URLParam(r, "primaryKey")) + handleDeleteVideo(w, r, db, redisPool, objectMiddlewares, waitForChange, chi.URLParam(r, "primaryKey")) }) return r diff --git a/pkg/api_client/client.go b/pkg/api_client/client.go index 40cb05a..60072dd 100644 --- a/pkg/api_client/client.go +++ b/pkg/api_client/client.go @@ -82,12 +82,6 @@ type GetCamerasParams struct { // Offset SQL OFFSET operator Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"` - // OrderByAsc SQL ORDER BY _ ASC operator, permits comma-separated values - OrderByAsc *string `form:"order_by__asc,omitempty" json:"order_by__asc,omitempty"` - - // OrderByDesc SQL ORDER BY _ DESC operator, permits comma-separated values - OrderByDesc *string `form:"order_by__desc,omitempty" json:"order_by__desc,omitempty"` - // IdEq SQL = operator IdEq *openapi_types.UUID `form:"id__eq,omitempty" json:"id__eq,omitempty"` @@ -115,13 +109,13 @@ type GetCamerasParams struct { // IdNotin SQL NOT IN operator, permits comma-separated values IdNotin *openapi_types.UUID `form:"id__notin,omitempty" json:"id__notin,omitempty"` - // IdIsnull SQL IS NULL operator, value is ignored + // IdIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) IdIsnull *openapi_types.UUID `form:"id__isnull,omitempty" json:"id__isnull,omitempty"` - // IdNisnull SQL IS NOT NULL operator, value is ignored + // IdNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) IdNisnull *openapi_types.UUID `form:"id__nisnull,omitempty" json:"id__nisnull,omitempty"` - // IdIsnotnull SQL IS NOT NULL operator, value is ignored + // IdIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) IdIsnotnull *openapi_types.UUID `form:"id__isnotnull,omitempty" json:"id__isnotnull,omitempty"` // IdL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -154,6 +148,12 @@ type GetCamerasParams struct { // IdNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % IdNotilike *openapi_types.UUID `form:"id__notilike,omitempty" json:"id__notilike,omitempty"` + // IdDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + IdDesc *openapi_types.UUID `form:"id__desc,omitempty" json:"id__desc,omitempty"` + + // IdAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + IdAsc *openapi_types.UUID `form:"id__asc,omitempty" json:"id__asc,omitempty"` + // CreatedAtEq SQL = operator CreatedAtEq *time.Time `form:"created_at__eq,omitempty" json:"created_at__eq,omitempty"` @@ -181,13 +181,13 @@ type GetCamerasParams struct { // CreatedAtNotin SQL NOT IN operator, permits comma-separated values CreatedAtNotin *time.Time `form:"created_at__notin,omitempty" json:"created_at__notin,omitempty"` - // CreatedAtIsnull SQL IS NULL operator, value is ignored + // CreatedAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) CreatedAtIsnull *time.Time `form:"created_at__isnull,omitempty" json:"created_at__isnull,omitempty"` - // CreatedAtNisnull SQL IS NOT NULL operator, value is ignored + // CreatedAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) CreatedAtNisnull *time.Time `form:"created_at__nisnull,omitempty" json:"created_at__nisnull,omitempty"` - // CreatedAtIsnotnull SQL IS NOT NULL operator, value is ignored + // CreatedAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) CreatedAtIsnotnull *time.Time `form:"created_at__isnotnull,omitempty" json:"created_at__isnotnull,omitempty"` // CreatedAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -220,6 +220,12 @@ type GetCamerasParams struct { // CreatedAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % CreatedAtNotilike *time.Time `form:"created_at__notilike,omitempty" json:"created_at__notilike,omitempty"` + // CreatedAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + CreatedAtDesc *time.Time `form:"created_at__desc,omitempty" json:"created_at__desc,omitempty"` + + // CreatedAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + CreatedAtAsc *time.Time `form:"created_at__asc,omitempty" json:"created_at__asc,omitempty"` + // UpdatedAtEq SQL = operator UpdatedAtEq *time.Time `form:"updated_at__eq,omitempty" json:"updated_at__eq,omitempty"` @@ -247,13 +253,13 @@ type GetCamerasParams struct { // UpdatedAtNotin SQL NOT IN operator, permits comma-separated values UpdatedAtNotin *time.Time `form:"updated_at__notin,omitempty" json:"updated_at__notin,omitempty"` - // UpdatedAtIsnull SQL IS NULL operator, value is ignored + // UpdatedAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) UpdatedAtIsnull *time.Time `form:"updated_at__isnull,omitempty" json:"updated_at__isnull,omitempty"` - // UpdatedAtNisnull SQL IS NOT NULL operator, value is ignored + // UpdatedAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) UpdatedAtNisnull *time.Time `form:"updated_at__nisnull,omitempty" json:"updated_at__nisnull,omitempty"` - // UpdatedAtIsnotnull SQL IS NOT NULL operator, value is ignored + // UpdatedAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) UpdatedAtIsnotnull *time.Time `form:"updated_at__isnotnull,omitempty" json:"updated_at__isnotnull,omitempty"` // UpdatedAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -286,6 +292,12 @@ type GetCamerasParams struct { // UpdatedAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % UpdatedAtNotilike *time.Time `form:"updated_at__notilike,omitempty" json:"updated_at__notilike,omitempty"` + // UpdatedAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + UpdatedAtDesc *time.Time `form:"updated_at__desc,omitempty" json:"updated_at__desc,omitempty"` + + // UpdatedAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + UpdatedAtAsc *time.Time `form:"updated_at__asc,omitempty" json:"updated_at__asc,omitempty"` + // DeletedAtEq SQL = operator DeletedAtEq *time.Time `form:"deleted_at__eq,omitempty" json:"deleted_at__eq,omitempty"` @@ -313,13 +325,13 @@ type GetCamerasParams struct { // DeletedAtNotin SQL NOT IN operator, permits comma-separated values DeletedAtNotin *time.Time `form:"deleted_at__notin,omitempty" json:"deleted_at__notin,omitempty"` - // DeletedAtIsnull SQL IS NULL operator, value is ignored + // DeletedAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) DeletedAtIsnull *time.Time `form:"deleted_at__isnull,omitempty" json:"deleted_at__isnull,omitempty"` - // DeletedAtNisnull SQL IS NOT NULL operator, value is ignored + // DeletedAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) DeletedAtNisnull *time.Time `form:"deleted_at__nisnull,omitempty" json:"deleted_at__nisnull,omitempty"` - // DeletedAtIsnotnull SQL IS NOT NULL operator, value is ignored + // DeletedAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) DeletedAtIsnotnull *time.Time `form:"deleted_at__isnotnull,omitempty" json:"deleted_at__isnotnull,omitempty"` // DeletedAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -352,6 +364,12 @@ type GetCamerasParams struct { // DeletedAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % DeletedAtNotilike *time.Time `form:"deleted_at__notilike,omitempty" json:"deleted_at__notilike,omitempty"` + // DeletedAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + DeletedAtDesc *time.Time `form:"deleted_at__desc,omitempty" json:"deleted_at__desc,omitempty"` + + // DeletedAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + DeletedAtAsc *time.Time `form:"deleted_at__asc,omitempty" json:"deleted_at__asc,omitempty"` + // NameEq SQL = operator NameEq *string `form:"name__eq,omitempty" json:"name__eq,omitempty"` @@ -379,13 +397,13 @@ type GetCamerasParams struct { // NameNotin SQL NOT IN operator, permits comma-separated values NameNotin *string `form:"name__notin,omitempty" json:"name__notin,omitempty"` - // NameIsnull SQL IS NULL operator, value is ignored + // NameIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) NameIsnull *string `form:"name__isnull,omitempty" json:"name__isnull,omitempty"` - // NameNisnull SQL IS NOT NULL operator, value is ignored + // NameNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) NameNisnull *string `form:"name__nisnull,omitempty" json:"name__nisnull,omitempty"` - // NameIsnotnull SQL IS NOT NULL operator, value is ignored + // NameIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) NameIsnotnull *string `form:"name__isnotnull,omitempty" json:"name__isnotnull,omitempty"` // NameL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -418,6 +436,12 @@ type GetCamerasParams struct { // NameNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % NameNotilike *string `form:"name__notilike,omitempty" json:"name__notilike,omitempty"` + // NameDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + NameDesc *string `form:"name__desc,omitempty" json:"name__desc,omitempty"` + + // NameAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + NameAsc *string `form:"name__asc,omitempty" json:"name__asc,omitempty"` + // StreamUrlEq SQL = operator StreamUrlEq *string `form:"stream_url__eq,omitempty" json:"stream_url__eq,omitempty"` @@ -445,13 +469,13 @@ type GetCamerasParams struct { // StreamUrlNotin SQL NOT IN operator, permits comma-separated values StreamUrlNotin *string `form:"stream_url__notin,omitempty" json:"stream_url__notin,omitempty"` - // StreamUrlIsnull SQL IS NULL operator, value is ignored + // StreamUrlIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) StreamUrlIsnull *string `form:"stream_url__isnull,omitempty" json:"stream_url__isnull,omitempty"` - // StreamUrlNisnull SQL IS NOT NULL operator, value is ignored + // StreamUrlNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) StreamUrlNisnull *string `form:"stream_url__nisnull,omitempty" json:"stream_url__nisnull,omitempty"` - // StreamUrlIsnotnull SQL IS NOT NULL operator, value is ignored + // StreamUrlIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) StreamUrlIsnotnull *string `form:"stream_url__isnotnull,omitempty" json:"stream_url__isnotnull,omitempty"` // StreamUrlL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -484,6 +508,12 @@ type GetCamerasParams struct { // StreamUrlNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % StreamUrlNotilike *string `form:"stream_url__notilike,omitempty" json:"stream_url__notilike,omitempty"` + // StreamUrlDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + StreamUrlDesc *string `form:"stream_url__desc,omitempty" json:"stream_url__desc,omitempty"` + + // StreamUrlAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + StreamUrlAsc *string `form:"stream_url__asc,omitempty" json:"stream_url__asc,omitempty"` + // LastSeenEq SQL = operator LastSeenEq *time.Time `form:"last_seen__eq,omitempty" json:"last_seen__eq,omitempty"` @@ -511,13 +541,13 @@ type GetCamerasParams struct { // LastSeenNotin SQL NOT IN operator, permits comma-separated values LastSeenNotin *time.Time `form:"last_seen__notin,omitempty" json:"last_seen__notin,omitempty"` - // LastSeenIsnull SQL IS NULL operator, value is ignored + // LastSeenIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) LastSeenIsnull *time.Time `form:"last_seen__isnull,omitempty" json:"last_seen__isnull,omitempty"` - // LastSeenNisnull SQL IS NOT NULL operator, value is ignored + // LastSeenNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) LastSeenNisnull *time.Time `form:"last_seen__nisnull,omitempty" json:"last_seen__nisnull,omitempty"` - // LastSeenIsnotnull SQL IS NOT NULL operator, value is ignored + // LastSeenIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) LastSeenIsnotnull *time.Time `form:"last_seen__isnotnull,omitempty" json:"last_seen__isnotnull,omitempty"` // LastSeenL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -549,6 +579,12 @@ type GetCamerasParams struct { // LastSeenNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % LastSeenNotilike *time.Time `form:"last_seen__notilike,omitempty" json:"last_seen__notilike,omitempty"` + + // LastSeenDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + LastSeenDesc *time.Time `form:"last_seen__desc,omitempty" json:"last_seen__desc,omitempty"` + + // LastSeenAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + LastSeenAsc *time.Time `form:"last_seen__asc,omitempty" json:"last_seen__asc,omitempty"` } // PostCamerasJSONBody defines parameters for PostCameras. @@ -562,12 +598,6 @@ type GetDetectionsParams struct { // Offset SQL OFFSET operator Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"` - // OrderByAsc SQL ORDER BY _ ASC operator, permits comma-separated values - OrderByAsc *string `form:"order_by__asc,omitempty" json:"order_by__asc,omitempty"` - - // OrderByDesc SQL ORDER BY _ DESC operator, permits comma-separated values - OrderByDesc *string `form:"order_by__desc,omitempty" json:"order_by__desc,omitempty"` - // IdEq SQL = operator IdEq *openapi_types.UUID `form:"id__eq,omitempty" json:"id__eq,omitempty"` @@ -595,13 +625,13 @@ type GetDetectionsParams struct { // IdNotin SQL NOT IN operator, permits comma-separated values IdNotin *openapi_types.UUID `form:"id__notin,omitempty" json:"id__notin,omitempty"` - // IdIsnull SQL IS NULL operator, value is ignored + // IdIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) IdIsnull *openapi_types.UUID `form:"id__isnull,omitempty" json:"id__isnull,omitempty"` - // IdNisnull SQL IS NOT NULL operator, value is ignored + // IdNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) IdNisnull *openapi_types.UUID `form:"id__nisnull,omitempty" json:"id__nisnull,omitempty"` - // IdIsnotnull SQL IS NOT NULL operator, value is ignored + // IdIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) IdIsnotnull *openapi_types.UUID `form:"id__isnotnull,omitempty" json:"id__isnotnull,omitempty"` // IdL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -634,6 +664,12 @@ type GetDetectionsParams struct { // IdNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % IdNotilike *openapi_types.UUID `form:"id__notilike,omitempty" json:"id__notilike,omitempty"` + // IdDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + IdDesc *openapi_types.UUID `form:"id__desc,omitempty" json:"id__desc,omitempty"` + + // IdAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + IdAsc *openapi_types.UUID `form:"id__asc,omitempty" json:"id__asc,omitempty"` + // CreatedAtEq SQL = operator CreatedAtEq *time.Time `form:"created_at__eq,omitempty" json:"created_at__eq,omitempty"` @@ -661,13 +697,13 @@ type GetDetectionsParams struct { // CreatedAtNotin SQL NOT IN operator, permits comma-separated values CreatedAtNotin *time.Time `form:"created_at__notin,omitempty" json:"created_at__notin,omitempty"` - // CreatedAtIsnull SQL IS NULL operator, value is ignored + // CreatedAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) CreatedAtIsnull *time.Time `form:"created_at__isnull,omitempty" json:"created_at__isnull,omitempty"` - // CreatedAtNisnull SQL IS NOT NULL operator, value is ignored + // CreatedAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) CreatedAtNisnull *time.Time `form:"created_at__nisnull,omitempty" json:"created_at__nisnull,omitempty"` - // CreatedAtIsnotnull SQL IS NOT NULL operator, value is ignored + // CreatedAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) CreatedAtIsnotnull *time.Time `form:"created_at__isnotnull,omitempty" json:"created_at__isnotnull,omitempty"` // CreatedAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -700,6 +736,12 @@ type GetDetectionsParams struct { // CreatedAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % CreatedAtNotilike *time.Time `form:"created_at__notilike,omitempty" json:"created_at__notilike,omitempty"` + // CreatedAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + CreatedAtDesc *time.Time `form:"created_at__desc,omitempty" json:"created_at__desc,omitempty"` + + // CreatedAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + CreatedAtAsc *time.Time `form:"created_at__asc,omitempty" json:"created_at__asc,omitempty"` + // UpdatedAtEq SQL = operator UpdatedAtEq *time.Time `form:"updated_at__eq,omitempty" json:"updated_at__eq,omitempty"` @@ -727,13 +769,13 @@ type GetDetectionsParams struct { // UpdatedAtNotin SQL NOT IN operator, permits comma-separated values UpdatedAtNotin *time.Time `form:"updated_at__notin,omitempty" json:"updated_at__notin,omitempty"` - // UpdatedAtIsnull SQL IS NULL operator, value is ignored + // UpdatedAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) UpdatedAtIsnull *time.Time `form:"updated_at__isnull,omitempty" json:"updated_at__isnull,omitempty"` - // UpdatedAtNisnull SQL IS NOT NULL operator, value is ignored + // UpdatedAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) UpdatedAtNisnull *time.Time `form:"updated_at__nisnull,omitempty" json:"updated_at__nisnull,omitempty"` - // UpdatedAtIsnotnull SQL IS NOT NULL operator, value is ignored + // UpdatedAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) UpdatedAtIsnotnull *time.Time `form:"updated_at__isnotnull,omitempty" json:"updated_at__isnotnull,omitempty"` // UpdatedAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -766,6 +808,12 @@ type GetDetectionsParams struct { // UpdatedAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % UpdatedAtNotilike *time.Time `form:"updated_at__notilike,omitempty" json:"updated_at__notilike,omitempty"` + // UpdatedAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + UpdatedAtDesc *time.Time `form:"updated_at__desc,omitempty" json:"updated_at__desc,omitempty"` + + // UpdatedAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + UpdatedAtAsc *time.Time `form:"updated_at__asc,omitempty" json:"updated_at__asc,omitempty"` + // DeletedAtEq SQL = operator DeletedAtEq *time.Time `form:"deleted_at__eq,omitempty" json:"deleted_at__eq,omitempty"` @@ -793,13 +841,13 @@ type GetDetectionsParams struct { // DeletedAtNotin SQL NOT IN operator, permits comma-separated values DeletedAtNotin *time.Time `form:"deleted_at__notin,omitempty" json:"deleted_at__notin,omitempty"` - // DeletedAtIsnull SQL IS NULL operator, value is ignored + // DeletedAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) DeletedAtIsnull *time.Time `form:"deleted_at__isnull,omitempty" json:"deleted_at__isnull,omitempty"` - // DeletedAtNisnull SQL IS NOT NULL operator, value is ignored + // DeletedAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) DeletedAtNisnull *time.Time `form:"deleted_at__nisnull,omitempty" json:"deleted_at__nisnull,omitempty"` - // DeletedAtIsnotnull SQL IS NOT NULL operator, value is ignored + // DeletedAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) DeletedAtIsnotnull *time.Time `form:"deleted_at__isnotnull,omitempty" json:"deleted_at__isnotnull,omitempty"` // DeletedAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -832,6 +880,12 @@ type GetDetectionsParams struct { // DeletedAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % DeletedAtNotilike *time.Time `form:"deleted_at__notilike,omitempty" json:"deleted_at__notilike,omitempty"` + // DeletedAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + DeletedAtDesc *time.Time `form:"deleted_at__desc,omitempty" json:"deleted_at__desc,omitempty"` + + // DeletedAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + DeletedAtAsc *time.Time `form:"deleted_at__asc,omitempty" json:"deleted_at__asc,omitempty"` + // SeenAtEq SQL = operator SeenAtEq *time.Time `form:"seen_at__eq,omitempty" json:"seen_at__eq,omitempty"` @@ -859,13 +913,13 @@ type GetDetectionsParams struct { // SeenAtNotin SQL NOT IN operator, permits comma-separated values SeenAtNotin *time.Time `form:"seen_at__notin,omitempty" json:"seen_at__notin,omitempty"` - // SeenAtIsnull SQL IS NULL operator, value is ignored + // SeenAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) SeenAtIsnull *time.Time `form:"seen_at__isnull,omitempty" json:"seen_at__isnull,omitempty"` - // SeenAtNisnull SQL IS NOT NULL operator, value is ignored + // SeenAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) SeenAtNisnull *time.Time `form:"seen_at__nisnull,omitempty" json:"seen_at__nisnull,omitempty"` - // SeenAtIsnotnull SQL IS NOT NULL operator, value is ignored + // SeenAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) SeenAtIsnotnull *time.Time `form:"seen_at__isnotnull,omitempty" json:"seen_at__isnotnull,omitempty"` // SeenAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -898,6 +952,12 @@ type GetDetectionsParams struct { // SeenAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % SeenAtNotilike *time.Time `form:"seen_at__notilike,omitempty" json:"seen_at__notilike,omitempty"` + // SeenAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + SeenAtDesc *time.Time `form:"seen_at__desc,omitempty" json:"seen_at__desc,omitempty"` + + // SeenAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + SeenAtAsc *time.Time `form:"seen_at__asc,omitempty" json:"seen_at__asc,omitempty"` + // ClassIdEq SQL = operator ClassIdEq *int64 `form:"class_id__eq,omitempty" json:"class_id__eq,omitempty"` @@ -925,13 +985,13 @@ type GetDetectionsParams struct { // ClassIdNotin SQL NOT IN operator, permits comma-separated values ClassIdNotin *int64 `form:"class_id__notin,omitempty" json:"class_id__notin,omitempty"` - // ClassIdIsnull SQL IS NULL operator, value is ignored + // ClassIdIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) ClassIdIsnull *int64 `form:"class_id__isnull,omitempty" json:"class_id__isnull,omitempty"` - // ClassIdNisnull SQL IS NOT NULL operator, value is ignored + // ClassIdNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) ClassIdNisnull *int64 `form:"class_id__nisnull,omitempty" json:"class_id__nisnull,omitempty"` - // ClassIdIsnotnull SQL IS NOT NULL operator, value is ignored + // ClassIdIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) ClassIdIsnotnull *int64 `form:"class_id__isnotnull,omitempty" json:"class_id__isnotnull,omitempty"` // ClassIdL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -964,6 +1024,12 @@ type GetDetectionsParams struct { // ClassIdNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % ClassIdNotilike *int64 `form:"class_id__notilike,omitempty" json:"class_id__notilike,omitempty"` + // ClassIdDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + ClassIdDesc *int64 `form:"class_id__desc,omitempty" json:"class_id__desc,omitempty"` + + // ClassIdAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + ClassIdAsc *int64 `form:"class_id__asc,omitempty" json:"class_id__asc,omitempty"` + // ClassNameEq SQL = operator ClassNameEq *string `form:"class_name__eq,omitempty" json:"class_name__eq,omitempty"` @@ -991,13 +1057,13 @@ type GetDetectionsParams struct { // ClassNameNotin SQL NOT IN operator, permits comma-separated values ClassNameNotin *string `form:"class_name__notin,omitempty" json:"class_name__notin,omitempty"` - // ClassNameIsnull SQL IS NULL operator, value is ignored + // ClassNameIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) ClassNameIsnull *string `form:"class_name__isnull,omitempty" json:"class_name__isnull,omitempty"` - // ClassNameNisnull SQL IS NOT NULL operator, value is ignored + // ClassNameNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) ClassNameNisnull *string `form:"class_name__nisnull,omitempty" json:"class_name__nisnull,omitempty"` - // ClassNameIsnotnull SQL IS NOT NULL operator, value is ignored + // ClassNameIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) ClassNameIsnotnull *string `form:"class_name__isnotnull,omitempty" json:"class_name__isnotnull,omitempty"` // ClassNameL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1030,6 +1096,12 @@ type GetDetectionsParams struct { // ClassNameNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % ClassNameNotilike *string `form:"class_name__notilike,omitempty" json:"class_name__notilike,omitempty"` + // ClassNameDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + ClassNameDesc *string `form:"class_name__desc,omitempty" json:"class_name__desc,omitempty"` + + // ClassNameAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + ClassNameAsc *string `form:"class_name__asc,omitempty" json:"class_name__asc,omitempty"` + // ScoreEq SQL = operator ScoreEq *float64 `form:"score__eq,omitempty" json:"score__eq,omitempty"` @@ -1057,13 +1129,13 @@ type GetDetectionsParams struct { // ScoreNotin SQL NOT IN operator, permits comma-separated values ScoreNotin *float64 `form:"score__notin,omitempty" json:"score__notin,omitempty"` - // ScoreIsnull SQL IS NULL operator, value is ignored + // ScoreIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) ScoreIsnull *float64 `form:"score__isnull,omitempty" json:"score__isnull,omitempty"` - // ScoreNisnull SQL IS NOT NULL operator, value is ignored + // ScoreNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) ScoreNisnull *float64 `form:"score__nisnull,omitempty" json:"score__nisnull,omitempty"` - // ScoreIsnotnull SQL IS NOT NULL operator, value is ignored + // ScoreIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) ScoreIsnotnull *float64 `form:"score__isnotnull,omitempty" json:"score__isnotnull,omitempty"` // ScoreL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1096,6 +1168,12 @@ type GetDetectionsParams struct { // ScoreNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % ScoreNotilike *float64 `form:"score__notilike,omitempty" json:"score__notilike,omitempty"` + // ScoreDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + ScoreDesc *float64 `form:"score__desc,omitempty" json:"score__desc,omitempty"` + + // ScoreAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + ScoreAsc *float64 `form:"score__asc,omitempty" json:"score__asc,omitempty"` + // CameraIdEq SQL = operator CameraIdEq *openapi_types.UUID `form:"camera_id__eq,omitempty" json:"camera_id__eq,omitempty"` @@ -1123,13 +1201,13 @@ type GetDetectionsParams struct { // CameraIdNotin SQL NOT IN operator, permits comma-separated values CameraIdNotin *openapi_types.UUID `form:"camera_id__notin,omitempty" json:"camera_id__notin,omitempty"` - // CameraIdIsnull SQL IS NULL operator, value is ignored + // CameraIdIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) CameraIdIsnull *openapi_types.UUID `form:"camera_id__isnull,omitempty" json:"camera_id__isnull,omitempty"` - // CameraIdNisnull SQL IS NOT NULL operator, value is ignored + // CameraIdNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) CameraIdNisnull *openapi_types.UUID `form:"camera_id__nisnull,omitempty" json:"camera_id__nisnull,omitempty"` - // CameraIdIsnotnull SQL IS NOT NULL operator, value is ignored + // CameraIdIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) CameraIdIsnotnull *openapi_types.UUID `form:"camera_id__isnotnull,omitempty" json:"camera_id__isnotnull,omitempty"` // CameraIdL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1161,6 +1239,12 @@ type GetDetectionsParams struct { // CameraIdNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % CameraIdNotilike *openapi_types.UUID `form:"camera_id__notilike,omitempty" json:"camera_id__notilike,omitempty"` + + // CameraIdDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + CameraIdDesc *openapi_types.UUID `form:"camera_id__desc,omitempty" json:"camera_id__desc,omitempty"` + + // CameraIdAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + CameraIdAsc *openapi_types.UUID `form:"camera_id__asc,omitempty" json:"camera_id__asc,omitempty"` } // PostDetectionsJSONBody defines parameters for PostDetections. @@ -1174,12 +1258,6 @@ type GetVideosParams struct { // Offset SQL OFFSET operator Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"` - // OrderByAsc SQL ORDER BY _ ASC operator, permits comma-separated values - OrderByAsc *string `form:"order_by__asc,omitempty" json:"order_by__asc,omitempty"` - - // OrderByDesc SQL ORDER BY _ DESC operator, permits comma-separated values - OrderByDesc *string `form:"order_by__desc,omitempty" json:"order_by__desc,omitempty"` - // IdEq SQL = operator IdEq *openapi_types.UUID `form:"id__eq,omitempty" json:"id__eq,omitempty"` @@ -1207,13 +1285,13 @@ type GetVideosParams struct { // IdNotin SQL NOT IN operator, permits comma-separated values IdNotin *openapi_types.UUID `form:"id__notin,omitempty" json:"id__notin,omitempty"` - // IdIsnull SQL IS NULL operator, value is ignored + // IdIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) IdIsnull *openapi_types.UUID `form:"id__isnull,omitempty" json:"id__isnull,omitempty"` - // IdNisnull SQL IS NOT NULL operator, value is ignored + // IdNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) IdNisnull *openapi_types.UUID `form:"id__nisnull,omitempty" json:"id__nisnull,omitempty"` - // IdIsnotnull SQL IS NOT NULL operator, value is ignored + // IdIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) IdIsnotnull *openapi_types.UUID `form:"id__isnotnull,omitempty" json:"id__isnotnull,omitempty"` // IdL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1246,6 +1324,12 @@ type GetVideosParams struct { // IdNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % IdNotilike *openapi_types.UUID `form:"id__notilike,omitempty" json:"id__notilike,omitempty"` + // IdDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + IdDesc *openapi_types.UUID `form:"id__desc,omitempty" json:"id__desc,omitempty"` + + // IdAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + IdAsc *openapi_types.UUID `form:"id__asc,omitempty" json:"id__asc,omitempty"` + // CreatedAtEq SQL = operator CreatedAtEq *time.Time `form:"created_at__eq,omitempty" json:"created_at__eq,omitempty"` @@ -1273,13 +1357,13 @@ type GetVideosParams struct { // CreatedAtNotin SQL NOT IN operator, permits comma-separated values CreatedAtNotin *time.Time `form:"created_at__notin,omitempty" json:"created_at__notin,omitempty"` - // CreatedAtIsnull SQL IS NULL operator, value is ignored + // CreatedAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) CreatedAtIsnull *time.Time `form:"created_at__isnull,omitempty" json:"created_at__isnull,omitempty"` - // CreatedAtNisnull SQL IS NOT NULL operator, value is ignored + // CreatedAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) CreatedAtNisnull *time.Time `form:"created_at__nisnull,omitempty" json:"created_at__nisnull,omitempty"` - // CreatedAtIsnotnull SQL IS NOT NULL operator, value is ignored + // CreatedAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) CreatedAtIsnotnull *time.Time `form:"created_at__isnotnull,omitempty" json:"created_at__isnotnull,omitempty"` // CreatedAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1312,6 +1396,12 @@ type GetVideosParams struct { // CreatedAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % CreatedAtNotilike *time.Time `form:"created_at__notilike,omitempty" json:"created_at__notilike,omitempty"` + // CreatedAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + CreatedAtDesc *time.Time `form:"created_at__desc,omitempty" json:"created_at__desc,omitempty"` + + // CreatedAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + CreatedAtAsc *time.Time `form:"created_at__asc,omitempty" json:"created_at__asc,omitempty"` + // UpdatedAtEq SQL = operator UpdatedAtEq *time.Time `form:"updated_at__eq,omitempty" json:"updated_at__eq,omitempty"` @@ -1339,13 +1429,13 @@ type GetVideosParams struct { // UpdatedAtNotin SQL NOT IN operator, permits comma-separated values UpdatedAtNotin *time.Time `form:"updated_at__notin,omitempty" json:"updated_at__notin,omitempty"` - // UpdatedAtIsnull SQL IS NULL operator, value is ignored + // UpdatedAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) UpdatedAtIsnull *time.Time `form:"updated_at__isnull,omitempty" json:"updated_at__isnull,omitempty"` - // UpdatedAtNisnull SQL IS NOT NULL operator, value is ignored + // UpdatedAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) UpdatedAtNisnull *time.Time `form:"updated_at__nisnull,omitempty" json:"updated_at__nisnull,omitempty"` - // UpdatedAtIsnotnull SQL IS NOT NULL operator, value is ignored + // UpdatedAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) UpdatedAtIsnotnull *time.Time `form:"updated_at__isnotnull,omitempty" json:"updated_at__isnotnull,omitempty"` // UpdatedAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1378,6 +1468,12 @@ type GetVideosParams struct { // UpdatedAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % UpdatedAtNotilike *time.Time `form:"updated_at__notilike,omitempty" json:"updated_at__notilike,omitempty"` + // UpdatedAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + UpdatedAtDesc *time.Time `form:"updated_at__desc,omitempty" json:"updated_at__desc,omitempty"` + + // UpdatedAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + UpdatedAtAsc *time.Time `form:"updated_at__asc,omitempty" json:"updated_at__asc,omitempty"` + // DeletedAtEq SQL = operator DeletedAtEq *time.Time `form:"deleted_at__eq,omitempty" json:"deleted_at__eq,omitempty"` @@ -1405,13 +1501,13 @@ type GetVideosParams struct { // DeletedAtNotin SQL NOT IN operator, permits comma-separated values DeletedAtNotin *time.Time `form:"deleted_at__notin,omitempty" json:"deleted_at__notin,omitempty"` - // DeletedAtIsnull SQL IS NULL operator, value is ignored + // DeletedAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) DeletedAtIsnull *time.Time `form:"deleted_at__isnull,omitempty" json:"deleted_at__isnull,omitempty"` - // DeletedAtNisnull SQL IS NOT NULL operator, value is ignored + // DeletedAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) DeletedAtNisnull *time.Time `form:"deleted_at__nisnull,omitempty" json:"deleted_at__nisnull,omitempty"` - // DeletedAtIsnotnull SQL IS NOT NULL operator, value is ignored + // DeletedAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) DeletedAtIsnotnull *time.Time `form:"deleted_at__isnotnull,omitempty" json:"deleted_at__isnotnull,omitempty"` // DeletedAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1444,6 +1540,12 @@ type GetVideosParams struct { // DeletedAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % DeletedAtNotilike *time.Time `form:"deleted_at__notilike,omitempty" json:"deleted_at__notilike,omitempty"` + // DeletedAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + DeletedAtDesc *time.Time `form:"deleted_at__desc,omitempty" json:"deleted_at__desc,omitempty"` + + // DeletedAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + DeletedAtAsc *time.Time `form:"deleted_at__asc,omitempty" json:"deleted_at__asc,omitempty"` + // FilePathEq SQL = operator FilePathEq *string `form:"file_path__eq,omitempty" json:"file_path__eq,omitempty"` @@ -1471,13 +1573,13 @@ type GetVideosParams struct { // FilePathNotin SQL NOT IN operator, permits comma-separated values FilePathNotin *string `form:"file_path__notin,omitempty" json:"file_path__notin,omitempty"` - // FilePathIsnull SQL IS NULL operator, value is ignored + // FilePathIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) FilePathIsnull *string `form:"file_path__isnull,omitempty" json:"file_path__isnull,omitempty"` - // FilePathNisnull SQL IS NOT NULL operator, value is ignored + // FilePathNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) FilePathNisnull *string `form:"file_path__nisnull,omitempty" json:"file_path__nisnull,omitempty"` - // FilePathIsnotnull SQL IS NOT NULL operator, value is ignored + // FilePathIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) FilePathIsnotnull *string `form:"file_path__isnotnull,omitempty" json:"file_path__isnotnull,omitempty"` // FilePathL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1510,6 +1612,12 @@ type GetVideosParams struct { // FilePathNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % FilePathNotilike *string `form:"file_path__notilike,omitempty" json:"file_path__notilike,omitempty"` + // FilePathDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + FilePathDesc *string `form:"file_path__desc,omitempty" json:"file_path__desc,omitempty"` + + // FilePathAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + FilePathAsc *string `form:"file_path__asc,omitempty" json:"file_path__asc,omitempty"` + // StartedAtEq SQL = operator StartedAtEq *time.Time `form:"started_at__eq,omitempty" json:"started_at__eq,omitempty"` @@ -1537,13 +1645,13 @@ type GetVideosParams struct { // StartedAtNotin SQL NOT IN operator, permits comma-separated values StartedAtNotin *time.Time `form:"started_at__notin,omitempty" json:"started_at__notin,omitempty"` - // StartedAtIsnull SQL IS NULL operator, value is ignored + // StartedAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) StartedAtIsnull *time.Time `form:"started_at__isnull,omitempty" json:"started_at__isnull,omitempty"` - // StartedAtNisnull SQL IS NOT NULL operator, value is ignored + // StartedAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) StartedAtNisnull *time.Time `form:"started_at__nisnull,omitempty" json:"started_at__nisnull,omitempty"` - // StartedAtIsnotnull SQL IS NOT NULL operator, value is ignored + // StartedAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) StartedAtIsnotnull *time.Time `form:"started_at__isnotnull,omitempty" json:"started_at__isnotnull,omitempty"` // StartedAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1576,6 +1684,12 @@ type GetVideosParams struct { // StartedAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % StartedAtNotilike *time.Time `form:"started_at__notilike,omitempty" json:"started_at__notilike,omitempty"` + // StartedAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + StartedAtDesc *time.Time `form:"started_at__desc,omitempty" json:"started_at__desc,omitempty"` + + // StartedAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + StartedAtAsc *time.Time `form:"started_at__asc,omitempty" json:"started_at__asc,omitempty"` + // EndedAtEq SQL = operator EndedAtEq *time.Time `form:"ended_at__eq,omitempty" json:"ended_at__eq,omitempty"` @@ -1603,13 +1717,13 @@ type GetVideosParams struct { // EndedAtNotin SQL NOT IN operator, permits comma-separated values EndedAtNotin *time.Time `form:"ended_at__notin,omitempty" json:"ended_at__notin,omitempty"` - // EndedAtIsnull SQL IS NULL operator, value is ignored + // EndedAtIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) EndedAtIsnull *time.Time `form:"ended_at__isnull,omitempty" json:"ended_at__isnull,omitempty"` - // EndedAtNisnull SQL IS NOT NULL operator, value is ignored + // EndedAtNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) EndedAtNisnull *time.Time `form:"ended_at__nisnull,omitempty" json:"ended_at__nisnull,omitempty"` - // EndedAtIsnotnull SQL IS NOT NULL operator, value is ignored + // EndedAtIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) EndedAtIsnotnull *time.Time `form:"ended_at__isnotnull,omitempty" json:"ended_at__isnotnull,omitempty"` // EndedAtL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1642,6 +1756,12 @@ type GetVideosParams struct { // EndedAtNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % EndedAtNotilike *time.Time `form:"ended_at__notilike,omitempty" json:"ended_at__notilike,omitempty"` + // EndedAtDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + EndedAtDesc *time.Time `form:"ended_at__desc,omitempty" json:"ended_at__desc,omitempty"` + + // EndedAtAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + EndedAtAsc *time.Time `form:"ended_at__asc,omitempty" json:"ended_at__asc,omitempty"` + // DurationEq SQL = operator DurationEq *int64 `form:"duration__eq,omitempty" json:"duration__eq,omitempty"` @@ -1669,13 +1789,13 @@ type GetVideosParams struct { // DurationNotin SQL NOT IN operator, permits comma-separated values DurationNotin *int64 `form:"duration__notin,omitempty" json:"duration__notin,omitempty"` - // DurationIsnull SQL IS NULL operator, value is ignored + // DurationIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) DurationIsnull *int64 `form:"duration__isnull,omitempty" json:"duration__isnull,omitempty"` - // DurationNisnull SQL IS NOT NULL operator, value is ignored + // DurationNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) DurationNisnull *int64 `form:"duration__nisnull,omitempty" json:"duration__nisnull,omitempty"` - // DurationIsnotnull SQL IS NOT NULL operator, value is ignored + // DurationIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) DurationIsnotnull *int64 `form:"duration__isnotnull,omitempty" json:"duration__isnotnull,omitempty"` // DurationL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1708,6 +1828,12 @@ type GetVideosParams struct { // DurationNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % DurationNotilike *int64 `form:"duration__notilike,omitempty" json:"duration__notilike,omitempty"` + // DurationDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + DurationDesc *int64 `form:"duration__desc,omitempty" json:"duration__desc,omitempty"` + + // DurationAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + DurationAsc *int64 `form:"duration__asc,omitempty" json:"duration__asc,omitempty"` + // ThumbnailPathEq SQL = operator ThumbnailPathEq *string `form:"thumbnail_path__eq,omitempty" json:"thumbnail_path__eq,omitempty"` @@ -1735,13 +1861,13 @@ type GetVideosParams struct { // ThumbnailPathNotin SQL NOT IN operator, permits comma-separated values ThumbnailPathNotin *string `form:"thumbnail_path__notin,omitempty" json:"thumbnail_path__notin,omitempty"` - // ThumbnailPathIsnull SQL IS NULL operator, value is ignored + // ThumbnailPathIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) ThumbnailPathIsnull *string `form:"thumbnail_path__isnull,omitempty" json:"thumbnail_path__isnull,omitempty"` - // ThumbnailPathNisnull SQL IS NOT NULL operator, value is ignored + // ThumbnailPathNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) ThumbnailPathNisnull *string `form:"thumbnail_path__nisnull,omitempty" json:"thumbnail_path__nisnull,omitempty"` - // ThumbnailPathIsnotnull SQL IS NOT NULL operator, value is ignored + // ThumbnailPathIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) ThumbnailPathIsnotnull *string `form:"thumbnail_path__isnotnull,omitempty" json:"thumbnail_path__isnotnull,omitempty"` // ThumbnailPathL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1774,6 +1900,12 @@ type GetVideosParams struct { // ThumbnailPathNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % ThumbnailPathNotilike *string `form:"thumbnail_path__notilike,omitempty" json:"thumbnail_path__notilike,omitempty"` + // ThumbnailPathDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + ThumbnailPathDesc *string `form:"thumbnail_path__desc,omitempty" json:"thumbnail_path__desc,omitempty"` + + // ThumbnailPathAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + ThumbnailPathAsc *string `form:"thumbnail_path__asc,omitempty" json:"thumbnail_path__asc,omitempty"` + // StatusEq SQL = operator StatusEq *string `form:"status__eq,omitempty" json:"status__eq,omitempty"` @@ -1801,13 +1933,13 @@ type GetVideosParams struct { // StatusNotin SQL NOT IN operator, permits comma-separated values StatusNotin *string `form:"status__notin,omitempty" json:"status__notin,omitempty"` - // StatusIsnull SQL IS NULL operator, value is ignored + // StatusIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) StatusIsnull *string `form:"status__isnull,omitempty" json:"status__isnull,omitempty"` - // StatusNisnull SQL IS NOT NULL operator, value is ignored + // StatusNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) StatusNisnull *string `form:"status__nisnull,omitempty" json:"status__nisnull,omitempty"` - // StatusIsnotnull SQL IS NOT NULL operator, value is ignored + // StatusIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) StatusIsnotnull *string `form:"status__isnotnull,omitempty" json:"status__isnotnull,omitempty"` // StatusL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1840,6 +1972,12 @@ type GetVideosParams struct { // StatusNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % StatusNotilike *string `form:"status__notilike,omitempty" json:"status__notilike,omitempty"` + // StatusDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + StatusDesc *string `form:"status__desc,omitempty" json:"status__desc,omitempty"` + + // StatusAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + StatusAsc *string `form:"status__asc,omitempty" json:"status__asc,omitempty"` + // CameraIdEq SQL = operator CameraIdEq *openapi_types.UUID `form:"camera_id__eq,omitempty" json:"camera_id__eq,omitempty"` @@ -1867,13 +2005,13 @@ type GetVideosParams struct { // CameraIdNotin SQL NOT IN operator, permits comma-separated values CameraIdNotin *openapi_types.UUID `form:"camera_id__notin,omitempty" json:"camera_id__notin,omitempty"` - // CameraIdIsnull SQL IS NULL operator, value is ignored + // CameraIdIsnull SQL IS NULL operator, value is ignored (presence of key is sufficient) CameraIdIsnull *openapi_types.UUID `form:"camera_id__isnull,omitempty" json:"camera_id__isnull,omitempty"` - // CameraIdNisnull SQL IS NOT NULL operator, value is ignored + // CameraIdNisnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) CameraIdNisnull *openapi_types.UUID `form:"camera_id__nisnull,omitempty" json:"camera_id__nisnull,omitempty"` - // CameraIdIsnotnull SQL IS NOT NULL operator, value is ignored + // CameraIdIsnotnull SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) CameraIdIsnotnull *openapi_types.UUID `form:"camera_id__isnotnull,omitempty" json:"camera_id__isnotnull,omitempty"` // CameraIdL SQL LIKE operator, value is implicitly prefixed and suffixed with % @@ -1905,6 +2043,12 @@ type GetVideosParams struct { // CameraIdNotilike SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % CameraIdNotilike *openapi_types.UUID `form:"camera_id__notilike,omitempty" json:"camera_id__notilike,omitempty"` + + // CameraIdDesc SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + CameraIdDesc *openapi_types.UUID `form:"camera_id__desc,omitempty" json:"camera_id__desc,omitempty"` + + // CameraIdAsc SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + CameraIdAsc *openapi_types.UUID `form:"camera_id__asc,omitempty" json:"camera_id__asc,omitempty"` } // PostVideosJSONBody defines parameters for PostVideos. @@ -2416,7 +2560,7 @@ func NewGetCamerasRequest(server string, params *GetCamerasParams) (*http.Reques return nil, err } - operationPath := fmt.Sprintf("/cameras") + operationPath := fmt.Sprintf("/api/cameras") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2461,38 +2605,6 @@ func NewGetCamerasRequest(server string, params *GetCamerasParams) (*http.Reques } - if params.OrderByAsc != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order_by__asc", runtime.ParamLocationQuery, *params.OrderByAsc); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrderByDesc != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order_by__desc", runtime.ParamLocationQuery, *params.OrderByDesc); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - if params.IdEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id__eq", runtime.ParamLocationQuery, *params.IdEq); err != nil { @@ -2845,6 +2957,38 @@ func NewGetCamerasRequest(server string, params *GetCamerasParams) (*http.Reques } + if params.IdDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id__desc", runtime.ParamLocationQuery, *params.IdDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IdAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id__asc", runtime.ParamLocationQuery, *params.IdAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.CreatedAtEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__eq", runtime.ParamLocationQuery, *params.CreatedAtEq); err != nil { @@ -3197,6 +3341,38 @@ func NewGetCamerasRequest(server string, params *GetCamerasParams) (*http.Reques } + if params.CreatedAtDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__desc", runtime.ParamLocationQuery, *params.CreatedAtDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAtAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__asc", runtime.ParamLocationQuery, *params.CreatedAtAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.UpdatedAtEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at__eq", runtime.ParamLocationQuery, *params.UpdatedAtEq); err != nil { @@ -3549,6 +3725,38 @@ func NewGetCamerasRequest(server string, params *GetCamerasParams) (*http.Reques } + if params.UpdatedAtDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at__desc", runtime.ParamLocationQuery, *params.UpdatedAtDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAtAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at__asc", runtime.ParamLocationQuery, *params.UpdatedAtAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.DeletedAtEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at__eq", runtime.ParamLocationQuery, *params.DeletedAtEq); err != nil { @@ -3901,6 +4109,38 @@ func NewGetCamerasRequest(server string, params *GetCamerasParams) (*http.Reques } + if params.DeletedAtDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at__desc", runtime.ParamLocationQuery, *params.DeletedAtDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAtAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at__asc", runtime.ParamLocationQuery, *params.DeletedAtAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.NameEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name__eq", runtime.ParamLocationQuery, *params.NameEq); err != nil { @@ -4253,6 +4493,38 @@ func NewGetCamerasRequest(server string, params *GetCamerasParams) (*http.Reques } + if params.NameDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name__desc", runtime.ParamLocationQuery, *params.NameDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NameAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name__asc", runtime.ParamLocationQuery, *params.NameAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.StreamUrlEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stream_url__eq", runtime.ParamLocationQuery, *params.StreamUrlEq); err != nil { @@ -4605,6 +4877,38 @@ func NewGetCamerasRequest(server string, params *GetCamerasParams) (*http.Reques } + if params.StreamUrlDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stream_url__desc", runtime.ParamLocationQuery, *params.StreamUrlDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StreamUrlAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stream_url__asc", runtime.ParamLocationQuery, *params.StreamUrlAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.LastSeenEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "last_seen__eq", runtime.ParamLocationQuery, *params.LastSeenEq); err != nil { @@ -4957,6 +5261,38 @@ func NewGetCamerasRequest(server string, params *GetCamerasParams) (*http.Reques } + if params.LastSeenDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "last_seen__desc", runtime.ParamLocationQuery, *params.LastSeenDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.LastSeenAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "last_seen__asc", runtime.ParamLocationQuery, *params.LastSeenAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } @@ -4988,7 +5324,7 @@ func NewPostCamerasRequestWithBody(server string, contentType string, body io.Re return nil, err } - operationPath := fmt.Sprintf("/cameras") + operationPath := fmt.Sprintf("/api/cameras") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5024,7 +5360,7 @@ func NewDeleteCameraRequest(server string, primaryKey interface{}) (*http.Reques return nil, err } - operationPath := fmt.Sprintf("/cameras/%s", pathParam0) + operationPath := fmt.Sprintf("/api/cameras/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5058,7 +5394,7 @@ func NewGetCameraRequest(server string, primaryKey interface{}) (*http.Request, return nil, err } - operationPath := fmt.Sprintf("/cameras/%s", pathParam0) + operationPath := fmt.Sprintf("/api/cameras/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5103,7 +5439,7 @@ func NewPatchCameraRequestWithBody(server string, primaryKey interface{}, conten return nil, err } - operationPath := fmt.Sprintf("/cameras/%s", pathParam0) + operationPath := fmt.Sprintf("/api/cameras/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5150,7 +5486,7 @@ func NewPutCameraRequestWithBody(server string, primaryKey interface{}, contentT return nil, err } - operationPath := fmt.Sprintf("/cameras/%s", pathParam0) + operationPath := fmt.Sprintf("/api/cameras/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5179,7 +5515,7 @@ func NewGetDetectionsRequest(server string, params *GetDetectionsParams) (*http. return nil, err } - operationPath := fmt.Sprintf("/detections") + operationPath := fmt.Sprintf("/api/detections") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5224,38 +5560,6 @@ func NewGetDetectionsRequest(server string, params *GetDetectionsParams) (*http. } - if params.OrderByAsc != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order_by__asc", runtime.ParamLocationQuery, *params.OrderByAsc); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrderByDesc != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order_by__desc", runtime.ParamLocationQuery, *params.OrderByDesc); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - if params.IdEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id__eq", runtime.ParamLocationQuery, *params.IdEq); err != nil { @@ -5608,6 +5912,38 @@ func NewGetDetectionsRequest(server string, params *GetDetectionsParams) (*http. } + if params.IdDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id__desc", runtime.ParamLocationQuery, *params.IdDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IdAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id__asc", runtime.ParamLocationQuery, *params.IdAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.CreatedAtEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__eq", runtime.ParamLocationQuery, *params.CreatedAtEq); err != nil { @@ -5960,6 +6296,38 @@ func NewGetDetectionsRequest(server string, params *GetDetectionsParams) (*http. } + if params.CreatedAtDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__desc", runtime.ParamLocationQuery, *params.CreatedAtDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAtAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__asc", runtime.ParamLocationQuery, *params.CreatedAtAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.UpdatedAtEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at__eq", runtime.ParamLocationQuery, *params.UpdatedAtEq); err != nil { @@ -6312,6 +6680,38 @@ func NewGetDetectionsRequest(server string, params *GetDetectionsParams) (*http. } + if params.UpdatedAtDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at__desc", runtime.ParamLocationQuery, *params.UpdatedAtDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAtAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at__asc", runtime.ParamLocationQuery, *params.UpdatedAtAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.DeletedAtEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at__eq", runtime.ParamLocationQuery, *params.DeletedAtEq); err != nil { @@ -6664,6 +7064,38 @@ func NewGetDetectionsRequest(server string, params *GetDetectionsParams) (*http. } + if params.DeletedAtDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at__desc", runtime.ParamLocationQuery, *params.DeletedAtDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAtAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at__asc", runtime.ParamLocationQuery, *params.DeletedAtAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.SeenAtEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "seen_at__eq", runtime.ParamLocationQuery, *params.SeenAtEq); err != nil { @@ -7016,6 +7448,38 @@ func NewGetDetectionsRequest(server string, params *GetDetectionsParams) (*http. } + if params.SeenAtDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "seen_at__desc", runtime.ParamLocationQuery, *params.SeenAtDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SeenAtAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "seen_at__asc", runtime.ParamLocationQuery, *params.SeenAtAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.ClassIdEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "class_id__eq", runtime.ParamLocationQuery, *params.ClassIdEq); err != nil { @@ -7368,6 +7832,38 @@ func NewGetDetectionsRequest(server string, params *GetDetectionsParams) (*http. } + if params.ClassIdDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "class_id__desc", runtime.ParamLocationQuery, *params.ClassIdDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ClassIdAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "class_id__asc", runtime.ParamLocationQuery, *params.ClassIdAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.ClassNameEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "class_name__eq", runtime.ParamLocationQuery, *params.ClassNameEq); err != nil { @@ -7720,6 +8216,38 @@ func NewGetDetectionsRequest(server string, params *GetDetectionsParams) (*http. } + if params.ClassNameDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "class_name__desc", runtime.ParamLocationQuery, *params.ClassNameDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ClassNameAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "class_name__asc", runtime.ParamLocationQuery, *params.ClassNameAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.ScoreEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "score__eq", runtime.ParamLocationQuery, *params.ScoreEq); err != nil { @@ -8072,6 +8600,38 @@ func NewGetDetectionsRequest(server string, params *GetDetectionsParams) (*http. } + if params.ScoreDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "score__desc", runtime.ParamLocationQuery, *params.ScoreDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ScoreAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "score__asc", runtime.ParamLocationQuery, *params.ScoreAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.CameraIdEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "camera_id__eq", runtime.ParamLocationQuery, *params.CameraIdEq); err != nil { @@ -8424,6 +8984,38 @@ func NewGetDetectionsRequest(server string, params *GetDetectionsParams) (*http. } + if params.CameraIdDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "camera_id__desc", runtime.ParamLocationQuery, *params.CameraIdDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CameraIdAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "camera_id__asc", runtime.ParamLocationQuery, *params.CameraIdAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } @@ -8455,7 +9047,7 @@ func NewPostDetectionsRequestWithBody(server string, contentType string, body io return nil, err } - operationPath := fmt.Sprintf("/detections") + operationPath := fmt.Sprintf("/api/detections") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8491,7 +9083,7 @@ func NewDeleteDetectionRequest(server string, primaryKey interface{}) (*http.Req return nil, err } - operationPath := fmt.Sprintf("/detections/%s", pathParam0) + operationPath := fmt.Sprintf("/api/detections/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8525,7 +9117,7 @@ func NewGetDetectionRequest(server string, primaryKey interface{}) (*http.Reques return nil, err } - operationPath := fmt.Sprintf("/detections/%s", pathParam0) + operationPath := fmt.Sprintf("/api/detections/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8570,7 +9162,7 @@ func NewPatchDetectionRequestWithBody(server string, primaryKey interface{}, con return nil, err } - operationPath := fmt.Sprintf("/detections/%s", pathParam0) + operationPath := fmt.Sprintf("/api/detections/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8617,7 +9209,7 @@ func NewPutDetectionRequestWithBody(server string, primaryKey interface{}, conte return nil, err } - operationPath := fmt.Sprintf("/detections/%s", pathParam0) + operationPath := fmt.Sprintf("/api/detections/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8646,7 +9238,7 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, return nil, err } - operationPath := fmt.Sprintf("/videos") + operationPath := fmt.Sprintf("/api/videos") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8691,38 +9283,6 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } - if params.OrderByAsc != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order_by__asc", runtime.ParamLocationQuery, *params.OrderByAsc); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrderByDesc != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "order_by__desc", runtime.ParamLocationQuery, *params.OrderByDesc); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - if params.IdEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id__eq", runtime.ParamLocationQuery, *params.IdEq); err != nil { @@ -9075,6 +9635,38 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } + if params.IdDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id__desc", runtime.ParamLocationQuery, *params.IdDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IdAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id__asc", runtime.ParamLocationQuery, *params.IdAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.CreatedAtEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__eq", runtime.ParamLocationQuery, *params.CreatedAtEq); err != nil { @@ -9395,9 +9987,41 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } - if params.CreatedAtNilike != nil { + if params.CreatedAtNilike != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__nilike", runtime.ParamLocationQuery, *params.CreatedAtNilike); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAtNotilike != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__notilike", runtime.ParamLocationQuery, *params.CreatedAtNotilike); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreatedAtDesc != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__nilike", runtime.ParamLocationQuery, *params.CreatedAtNilike); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__desc", runtime.ParamLocationQuery, *params.CreatedAtDesc); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -9411,9 +10035,9 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } - if params.CreatedAtNotilike != nil { + if params.CreatedAtAsc != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__notilike", runtime.ParamLocationQuery, *params.CreatedAtNotilike); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at__asc", runtime.ParamLocationQuery, *params.CreatedAtAsc); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -9779,6 +10403,38 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } + if params.UpdatedAtDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at__desc", runtime.ParamLocationQuery, *params.UpdatedAtDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UpdatedAtAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at__asc", runtime.ParamLocationQuery, *params.UpdatedAtAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.DeletedAtEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at__eq", runtime.ParamLocationQuery, *params.DeletedAtEq); err != nil { @@ -10131,6 +10787,38 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } + if params.DeletedAtDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at__desc", runtime.ParamLocationQuery, *params.DeletedAtDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DeletedAtAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted_at__asc", runtime.ParamLocationQuery, *params.DeletedAtAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.FilePathEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "file_path__eq", runtime.ParamLocationQuery, *params.FilePathEq); err != nil { @@ -10483,6 +11171,38 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } + if params.FilePathDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "file_path__desc", runtime.ParamLocationQuery, *params.FilePathDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FilePathAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "file_path__asc", runtime.ParamLocationQuery, *params.FilePathAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.StartedAtEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "started_at__eq", runtime.ParamLocationQuery, *params.StartedAtEq); err != nil { @@ -10835,6 +11555,38 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } + if params.StartedAtDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "started_at__desc", runtime.ParamLocationQuery, *params.StartedAtDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StartedAtAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "started_at__asc", runtime.ParamLocationQuery, *params.StartedAtAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.EndedAtEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "ended_at__eq", runtime.ParamLocationQuery, *params.EndedAtEq); err != nil { @@ -11187,6 +11939,38 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } + if params.EndedAtDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "ended_at__desc", runtime.ParamLocationQuery, *params.EndedAtDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndedAtAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "ended_at__asc", runtime.ParamLocationQuery, *params.EndedAtAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.DurationEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration__eq", runtime.ParamLocationQuery, *params.DurationEq); err != nil { @@ -11539,6 +12323,38 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } + if params.DurationDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration__desc", runtime.ParamLocationQuery, *params.DurationDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DurationAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration__asc", runtime.ParamLocationQuery, *params.DurationAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.ThumbnailPathEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "thumbnail_path__eq", runtime.ParamLocationQuery, *params.ThumbnailPathEq); err != nil { @@ -11891,6 +12707,38 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } + if params.ThumbnailPathDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "thumbnail_path__desc", runtime.ParamLocationQuery, *params.ThumbnailPathDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ThumbnailPathAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "thumbnail_path__asc", runtime.ParamLocationQuery, *params.ThumbnailPathAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.StatusEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status__eq", runtime.ParamLocationQuery, *params.StatusEq); err != nil { @@ -12243,6 +13091,38 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } + if params.StatusDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status__desc", runtime.ParamLocationQuery, *params.StatusDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StatusAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status__asc", runtime.ParamLocationQuery, *params.StatusAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.CameraIdEq != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "camera_id__eq", runtime.ParamLocationQuery, *params.CameraIdEq); err != nil { @@ -12595,6 +13475,38 @@ func NewGetVideosRequest(server string, params *GetVideosParams) (*http.Request, } + if params.CameraIdDesc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "camera_id__desc", runtime.ParamLocationQuery, *params.CameraIdDesc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CameraIdAsc != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "camera_id__asc", runtime.ParamLocationQuery, *params.CameraIdAsc); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } @@ -12626,7 +13538,7 @@ func NewPostVideosRequestWithBody(server string, contentType string, body io.Rea return nil, err } - operationPath := fmt.Sprintf("/videos") + operationPath := fmt.Sprintf("/api/videos") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12662,7 +13574,7 @@ func NewDeleteVideoRequest(server string, primaryKey interface{}) (*http.Request return nil, err } - operationPath := fmt.Sprintf("/videos/%s", pathParam0) + operationPath := fmt.Sprintf("/api/videos/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12696,7 +13608,7 @@ func NewGetVideoRequest(server string, primaryKey interface{}) (*http.Request, e return nil, err } - operationPath := fmt.Sprintf("/videos/%s", pathParam0) + operationPath := fmt.Sprintf("/api/videos/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12741,7 +13653,7 @@ func NewPatchVideoRequestWithBody(server string, primaryKey interface{}, content return nil, err } - operationPath := fmt.Sprintf("/videos/%s", pathParam0) + operationPath := fmt.Sprintf("/api/videos/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12788,7 +13700,7 @@ func NewPutVideoRequestWithBody(server string, primaryKey interface{}, contentTy return nil, err } - operationPath := fmt.Sprintf("/videos/%s", pathParam0) + operationPath := fmt.Sprintf("/api/videos/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -14439,81 +15351,88 @@ func ParsePutVideoResponse(rsp *http.Response) (*PutVideoResponse, error) { // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "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", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/schema/openapi.json b/schema/openapi.json index 9d23933..678561e 100644 --- a/schema/openapi.json +++ b/schema/openapi.json @@ -4,8 +4,9 @@ "title": "Djangolang", "version": "1.0" }, + "servers": null, "paths": { - "/cameras": { + "/api/cameras": { "get": { "tags": [ "Camera" @@ -32,24 +33,6 @@ }, "description": "SQL OFFSET operator" }, - { - "name": "order_by__asc", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "description": "SQL ORDER BY _ ASC operator, permits comma-separated values" - }, - { - "name": "order_by__desc", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "description": "SQL ORDER BY _ DESC operator, permits comma-separated values" - }, { "name": "id__eq", "in": "query", @@ -148,7 +131,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "id__nisnull", @@ -158,7 +141,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "id__isnotnull", @@ -168,7 +151,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "id__l", @@ -270,6 +253,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "id__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "id__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "created_at__eq", "in": "query", @@ -368,7 +371,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "created_at__nisnull", @@ -378,7 +381,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "created_at__isnotnull", @@ -388,7 +391,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "created_at__l", @@ -490,6 +493,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "created_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "created_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "updated_at__eq", "in": "query", @@ -588,7 +611,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "updated_at__nisnull", @@ -598,7 +621,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "updated_at__isnotnull", @@ -608,7 +631,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "updated_at__l", @@ -710,6 +733,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "updated_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "updated_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "deleted_at__eq", "in": "query", @@ -808,7 +851,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "deleted_at__nisnull", @@ -818,7 +861,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "deleted_at__isnotnull", @@ -828,7 +871,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "deleted_at__l", @@ -930,6 +973,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "deleted_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "deleted_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "name__eq", "in": "query", @@ -1018,7 +1081,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "name__nisnull", @@ -1027,7 +1090,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "name__isnotnull", @@ -1036,7 +1099,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "name__l", @@ -1128,6 +1191,24 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "name__desc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "name__asc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "stream_url__eq", "in": "query", @@ -1216,7 +1297,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "stream_url__nisnull", @@ -1225,7 +1306,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "stream_url__isnotnull", @@ -1234,7 +1315,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "stream_url__l", @@ -1326,6 +1407,24 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "stream_url__desc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "stream_url__asc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "last_seen__eq", "in": "query", @@ -1424,7 +1523,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "last_seen__nisnull", @@ -1434,7 +1533,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "last_seen__isnotnull", @@ -1444,7 +1543,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "last_seen__l", @@ -1545,6 +1644,26 @@ "format": "date-time" }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "last_seen__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "last_seen__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" } ], "responses": { @@ -1688,7 +1807,7 @@ } } }, - "/cameras/{primaryKey}": { + "/api/cameras/{primaryKey}": { "get": { "tags": [ "Camera" @@ -1981,7 +2100,7 @@ } } }, - "/detections": { + "/api/detections": { "get": { "tags": [ "Detection" @@ -2008,24 +2127,6 @@ }, "description": "SQL OFFSET operator" }, - { - "name": "order_by__asc", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "description": "SQL ORDER BY _ ASC operator, permits comma-separated values" - }, - { - "name": "order_by__desc", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "description": "SQL ORDER BY _ DESC operator, permits comma-separated values" - }, { "name": "id__eq", "in": "query", @@ -2124,7 +2225,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "id__nisnull", @@ -2134,7 +2235,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "id__isnotnull", @@ -2144,7 +2245,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "id__l", @@ -2246,6 +2347,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "id__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "id__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "created_at__eq", "in": "query", @@ -2344,7 +2465,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "created_at__nisnull", @@ -2354,7 +2475,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "created_at__isnotnull", @@ -2364,7 +2485,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "created_at__l", @@ -2466,6 +2587,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "created_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "created_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "updated_at__eq", "in": "query", @@ -2564,7 +2705,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "updated_at__nisnull", @@ -2574,7 +2715,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "updated_at__isnotnull", @@ -2584,7 +2725,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "updated_at__l", @@ -2686,6 +2827,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "updated_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "updated_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "deleted_at__eq", "in": "query", @@ -2784,7 +2945,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "deleted_at__nisnull", @@ -2794,7 +2955,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "deleted_at__isnotnull", @@ -2804,7 +2965,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "deleted_at__l", @@ -2906,6 +3067,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "deleted_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "deleted_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "seen_at__eq", "in": "query", @@ -3004,7 +3185,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "seen_at__nisnull", @@ -3014,7 +3195,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "seen_at__isnotnull", @@ -3024,7 +3205,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "seen_at__l", @@ -3126,6 +3307,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "seen_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "seen_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "class_id__eq", "in": "query", @@ -3224,7 +3425,7 @@ "type": "integer", "format": "int64" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "class_id__nisnull", @@ -3234,7 +3435,7 @@ "type": "integer", "format": "int64" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "class_id__isnotnull", @@ -3244,7 +3445,7 @@ "type": "integer", "format": "int64" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "class_id__l", @@ -3346,6 +3547,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "class_id__desc", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "class_id__asc", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "class_name__eq", "in": "query", @@ -3434,7 +3655,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "class_name__nisnull", @@ -3443,7 +3664,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "class_name__isnotnull", @@ -3452,7 +3673,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "class_name__l", @@ -3544,6 +3765,24 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "class_name__desc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "class_name__asc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "score__eq", "in": "query", @@ -3642,7 +3881,7 @@ "type": "number", "format": "double" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "score__nisnull", @@ -3652,7 +3891,7 @@ "type": "number", "format": "double" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "score__isnotnull", @@ -3662,7 +3901,7 @@ "type": "number", "format": "double" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "score__l", @@ -3764,6 +4003,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "score__desc", + "in": "query", + "required": false, + "schema": { + "type": "number", + "format": "double" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "score__asc", + "in": "query", + "required": false, + "schema": { + "type": "number", + "format": "double" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "camera_id__eq", "in": "query", @@ -3862,7 +4121,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "camera_id__nisnull", @@ -3872,7 +4131,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "camera_id__isnotnull", @@ -3882,7 +4141,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "camera_id__l", @@ -3983,6 +4242,26 @@ "format": "uuid" }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "camera_id__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "camera_id__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" } ], "responses": { @@ -4126,7 +4405,7 @@ } } }, - "/detections/{primaryKey}": { + "/api/detections/{primaryKey}": { "get": { "tags": [ "Detection" @@ -4419,7 +4698,7 @@ } } }, - "/videos": { + "/api/videos": { "get": { "tags": [ "Video" @@ -4446,24 +4725,6 @@ }, "description": "SQL OFFSET operator" }, - { - "name": "order_by__asc", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "description": "SQL ORDER BY _ ASC operator, permits comma-separated values" - }, - { - "name": "order_by__desc", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "description": "SQL ORDER BY _ DESC operator, permits comma-separated values" - }, { "name": "id__eq", "in": "query", @@ -4562,7 +4823,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "id__nisnull", @@ -4572,7 +4833,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "id__isnotnull", @@ -4582,7 +4843,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "id__l", @@ -4684,6 +4945,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "id__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "id__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "created_at__eq", "in": "query", @@ -4782,7 +5063,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "created_at__nisnull", @@ -4792,7 +5073,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "created_at__isnotnull", @@ -4802,7 +5083,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "created_at__l", @@ -4904,6 +5185,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "created_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "created_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "updated_at__eq", "in": "query", @@ -5002,7 +5303,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "updated_at__nisnull", @@ -5012,7 +5313,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "updated_at__isnotnull", @@ -5022,7 +5323,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "updated_at__l", @@ -5124,6 +5425,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "updated_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "updated_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "deleted_at__eq", "in": "query", @@ -5222,7 +5543,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "deleted_at__nisnull", @@ -5232,7 +5553,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "deleted_at__isnotnull", @@ -5242,7 +5563,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "deleted_at__l", @@ -5344,6 +5665,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "deleted_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "deleted_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "file_path__eq", "in": "query", @@ -5432,7 +5773,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "file_path__nisnull", @@ -5441,7 +5782,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "file_path__isnotnull", @@ -5450,7 +5791,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "file_path__l", @@ -5542,6 +5883,24 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "file_path__desc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "file_path__asc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "started_at__eq", "in": "query", @@ -5640,7 +5999,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "started_at__nisnull", @@ -5650,7 +6009,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "started_at__isnotnull", @@ -5660,7 +6019,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "started_at__l", @@ -5762,6 +6121,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "started_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "started_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "ended_at__eq", "in": "query", @@ -5860,7 +6239,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "ended_at__nisnull", @@ -5870,7 +6249,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "ended_at__isnotnull", @@ -5880,7 +6259,7 @@ "type": "string", "format": "date-time" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "ended_at__l", @@ -5982,6 +6361,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "ended_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "ended_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "duration__eq", "in": "query", @@ -6080,7 +6479,7 @@ "type": "integer", "format": "int64" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "duration__nisnull", @@ -6090,7 +6489,7 @@ "type": "integer", "format": "int64" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "duration__isnotnull", @@ -6100,7 +6499,7 @@ "type": "integer", "format": "int64" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "duration__l", @@ -6202,6 +6601,26 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "duration__desc", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "duration__asc", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "thumbnail_path__eq", "in": "query", @@ -6290,7 +6709,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "thumbnail_path__nisnull", @@ -6299,7 +6718,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "thumbnail_path__isnotnull", @@ -6308,7 +6727,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "thumbnail_path__l", @@ -6400,6 +6819,24 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "thumbnail_path__desc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "thumbnail_path__asc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "status__eq", "in": "query", @@ -6488,7 +6925,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "status__nisnull", @@ -6497,7 +6934,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "status__isnotnull", @@ -6506,7 +6943,7 @@ "schema": { "type": "string" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "status__l", @@ -6598,6 +7035,24 @@ }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" }, + { + "name": "status__desc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "status__asc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, { "name": "camera_id__eq", "in": "query", @@ -6696,7 +7151,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NULL operator, value is ignored" + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "camera_id__nisnull", @@ -6706,7 +7161,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "camera_id__isnotnull", @@ -6716,7 +7171,7 @@ "type": "string", "format": "uuid" }, - "description": "SQL IS NOT NULL operator, value is ignored" + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" }, { "name": "camera_id__l", @@ -6817,6 +7272,26 @@ "format": "uuid" }, "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "camera_id__desc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "camera_id__asc", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" } ], "responses": { @@ -6960,7 +7435,7 @@ } } }, - "/videos/{primaryKey}": { + "/api/videos/{primaryKey}": { "get": { "tags": [ "Video"